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;