Bug fix for LocalUtil
Previous LocalUtil.java makes below useless:
clazz = Thread.currentThread().getContextClassLoader().loadClass(remappedClassName);
Because of the next:
clazz = LocalUtil.class.getClassLoader().loadClass(remappedClassName);
What bug is being fixed with this change? It appears to be a stylistic change that doesn't impact the results.
You can see this:
https://github.com/directwebremoting/dwr/blob/c1d9375e6a46954cd820de7a6d6418529f72277f/core/api/main/java/org/directwebremoting/util/LocalUtil.java#L1179-L1197
the code run this:
clazz = LocalUtil.class.getClassLoader().loadClass(remappedClassName);
immediately after this:
clazz = Thread.currentThread().getContextClassLoader().loadClass(remappedClassName);
So even clazz = Thread.currentThread().getContextClassLoader().loadClass(remappedClassName) is successful returned, the program will also run clazz = LocalUtil.class.getClassLoader().loadClass(remappedClassName), this makes clazz = Thread.currentThread().getContextClassLoader().loadClass(remappedClassName) useless.
Or we can just run clazz = LocalUtil.class.getClassLoader().loadClass(remappedClassName) if this is you wanted, but I think not.
Yes, thanks. I wonder if the first attempt is even needed. I would have to look into more but this change looks fine.