Closed mastergberry closed 8 years ago
Found this when doing some TinyProtocol stuff on my own system. Wasted some time trying to figure out why the Reflection was not working properly and picking the wrong method.
Missing a pair of partheneses around
(returnType == null) || method.getReturnType().equals(returnType)
Should be
((returnType == null) || method.getReturnType().equals(returnType))
https://github.com/aadnk/ProtocolLib/blob/master/modules/TinyProtocol/src/main/java/com/comphenix/tinyprotocol/Reflection.java#L218
As a result the order of operations is ignoring the Arrays.equals() call in some cases.
Arrays.equals()
Could be wrong, but i'm 99% sure this just fixed my issue with the wrong method being found.
Found this when doing some TinyProtocol stuff on my own system. Wasted some time trying to figure out why the Reflection was not working properly and picking the wrong method.
Missing a pair of partheneses around
(returnType == null) || method.getReturnType().equals(returnType)
Should be
((returnType == null) || method.getReturnType().equals(returnType))
https://github.com/aadnk/ProtocolLib/blob/master/modules/TinyProtocol/src/main/java/com/comphenix/tinyprotocol/Reflection.java#L218
As a result the order of operations is ignoring the
Arrays.equals()
call in some cases.Could be wrong, but i'm 99% sure this just fixed my issue with the wrong method being found.