Closed Clashsoft closed 4 years ago
Hmm...I guess it is safe to catch any exception... what could it be ignoring that really should be thrown? is this too broad in other words?
@parrt getMethod
can throw NoSuchMethodException
and SecurityException
, which were caught previously. setAccessible
can throw SecurityException
in Java 6, but in Java 9 it can also throw InaccessibleObjectException
. This lead to a problem in #249. Since we're on Java 6, we cannot refer to and therefore not catch InaccessibleObjectException
. The common super type of all of them is Exception
@sharwell Do you see any problems with this PR? basically we will catch and ignore any exception when reading a property
basically we will catch and ignore any exception when reading a property
That pretty much already happens due to this line:
It already ignores any exception that occurs even during execution of the getter. This change makes it more consistent in that it now also ignores access-related exception.
Any updates on this? @parrt and @sharwell
@Clashsoft and you've run the unit tests?
Yes, I ran the tests and they were all green :) Btw, the "All checks have passed" at the bottom means that the Travis CI build was successful, which implies that the tests also passed.
haha. I wasn't sure we had Travis connected.
This addresses #249, and is consistent with
getProperty
in that it converts any Exception to aSTNoSuchPropertyException
.Closes #249