Improved: Fixing defects reported by code analysis tools, package
org.apache.ofbiz.base.util.string. (OFBIZ-10097) Thanks Dennis Balkir for reporting and providing the patch. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818677 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -242,14 +242,12 @@ public final class UelUtil {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof ReadOnlyExpression) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
if (obj instanceof ReadOnlyExpression) {
|
||||
ReadOnlyExpression other = (ReadOnlyExpression) obj;
|
||||
return this.object.equals(other.object);
|
||||
} catch (ClassCastException e) {
|
||||
Debug.logInfo(e.getMessage(), module);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -281,14 +279,12 @@ public final class UelUtil {
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof BasicValueExpression) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
if (obj instanceof BasicValueExpression) {
|
||||
BasicValueExpression other = (BasicValueExpression) obj;
|
||||
return this.varName.equals(other.varName);
|
||||
} catch (ClassCastException e) {
|
||||
Debug.logInfo(e.getMessage(), module);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user