Improved: ‘ObjectType’ contains unneeded code
(OFBIZ-10771) The ObjectType class contains utilities that extends the Java reflection API by defining methods which accepts string representation of Java types and classes. It appears that this class contains unneeded code which is either dead or is redundant with the services already defined in the reflection API Removes the useless isOrSubOf, instanceOf and interfaceOf methods. Additionally it removes the getInstance method which is not used anywhere in the framework or in the plugins. Also includes similar changes in AbstractConverter.java Converters.java DateTimeConverters.java GenericEntity.java IfInstanceOf.java Thanks: Mathieu git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851701 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ public final class IfInstanceOf extends MethodOperation {
|
||||
boolean runSubOps = false;
|
||||
Object fieldVal = fieldFma.get(methodContext.getEnvMap());
|
||||
if (fieldVal != null) {
|
||||
runSubOps = ObjectType.instanceOf(fieldVal.getClass(), compareClass);
|
||||
runSubOps = compareClass.isAssignableFrom(fieldVal.getClass());
|
||||
}
|
||||
if (runSubOps) {
|
||||
return SimpleMethod.runSubOps(subOps, methodContext);
|
||||
|
||||
Reference in New Issue
Block a user