Remove redundant boxing and casting by Minimaximize · Pull Request #5982 · processing/processing
Removed array instantiation where parameters could be accepted as VArgs
callbackClass.getMethod(callbackMethod, new Class[] { File.class }); =>
callbackClass.getMethod(callbackMethod, File.class);
Remove redundant unboxing where appropriate
(scale instanceof Integer && ((Integer)scale).intValue() == 2) =>
(scale instanceof Integer && (Integer) scale == 2)
In this case scale will automaticaly be unboxed to it's int value
Replace protected void handleMethods(String methodName) and
protected void handleMethods(String methodName, Object[] args)
with
protected void handleMethods(String methodName, Object...args)
as it handles both cases
Remove redundant extends Object clause from type wildcards
List<Disposable<? extends Object>> reachableWeakReferences =>
List<Disposable<?>> reachableWeakReferences