From e128f693c6a79c94f7a5c35c54ec9769447d5ca7 Mon Sep 17 00:00:00 2001 From: "f.bobin" Date: Mon, 2 Sep 2024 16:14:38 +0300 Subject: [PATCH] fix assigning custom factories --- src/main/java/org/jitsi/srtp/crypto/Aes.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/jitsi/srtp/crypto/Aes.java b/src/main/java/org/jitsi/srtp/crypto/Aes.java index de26aec..c21cd9c 100644 --- a/src/main/java/org/jitsi/srtp/crypto/Aes.java +++ b/src/main/java/org/jitsi/srtp/crypto/Aes.java @@ -564,7 +564,6 @@ else if (t instanceof ThreadDeath) // new Class to FACTORY_CLASSES. if (factoryClass != null) { - Class[] newFactoryClasses; if (add) { for (Class clazz : factoryClasses) @@ -577,7 +576,7 @@ else if (t instanceof ThreadDeath) } if (add) { - newFactoryClasses + Class[] newFactoryClasses = new Class[1 + factoryClasses.length]; newFactoryClasses[0] = factoryClass; @@ -585,12 +584,13 @@ else if (t instanceof ThreadDeath) factoryClasses, 0, newFactoryClasses, 1, factoryClasses.length); + factoryClasses = newFactoryClasses; } } else { /* Otherwise, move the FACTORY_CLASS to the beginning of the list. */ - newFactoryClasses + Class[] newFactoryClasses = new Class[factoryClasses.length]; newFactoryClasses[0] = factoryClass;