On 11/10/2016 05:59 PM, Alan Bateman wrote:
On 10/11/2016 17:42, David M. Lloyd wrote:
My original suggestion for the method was to make it static, and
possibly even caller-sensitive, for just this reason.
Changing it to be non-final looks reasonable here, the main reason
being that it's a no-arg isXXXX method and so unlikely that there are
custom class loaders that have a method with this name that returns
something other than boolean. However the modifier might be a concern
and so time will tell if there are custom class loaders that defining
a non-public no-arg method with this name.
-Alan
It would be nice for this method to be final. This way it could be
relied on to return the "correct" answer regardless of the
implementation subclass. Who knows, maybe some internal logic might need
this method in the future and at that time another package-protected
method would have to be added and exposed via SharedSecrets or similar.
If "isParallelCapable" is already taken, then what about choosing
another name? Since there is already a @CallerSensitive protected static
method called "registerAsParallelCapable" for subclasses to call from
their <clinit> blocks, the query could be called:
isRegisteredAsParallelCapable() ?
I doubt this name is already taken by any subclass out there...
Regards, Peter