You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2015/04/17 19:48:33 UTC

svn commit: r1674364 - /ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java

Author: jleroux
Date: Fri Apr 17 17:48:32 2015
New Revision: 1674364

URL: http://svn.apache.org/r1674364
Log:
A patch from Martin Decker for "Release branches fail to compile with JDK 1.8" https://issues.apache.org/jira/browse/OFBIZ-6252

Due to a bug that was already fixed in trunk by Adrian C. (Jan 2015) but not in the current release branches (I checked 12.04, 13.07 and 14.12), the branches  could not be compiled using JDK 1.8 because it discovers an "variable operator might not have been initialized" error in ModelViewController.java.

Furthermore this is also a logical bug that leads to an incomplete error message.

So the trivial fix should be applied to the release branches, I will attach one for 14.12.

Modified:
    ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java

Modified: ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java?rev=1674364&r1=1674363&r2=1674364&view=diff
==============================================================================
--- ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java (original)
+++ ofbiz/branches/release14.12/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java Fri Apr 17 17:48:32 2015
@@ -1337,7 +1337,7 @@ public class ModelViewEntity extends Mod
             try {
                 this.operator = EntityOperator.lookupComparison(operator);
             } catch (IllegalArgumentException e) {
-                throw new IllegalArgumentException("[" + this.viewEntityCondition.modelViewEntity.getEntityName() + "]: Could not find an entity operator for the name: " + this.operator);
+                throw new IllegalArgumentException("[" + this.viewEntityCondition.modelViewEntity.getEntityName() + "]: Could not find an entity operator for the name: " + operator);
             }
             String relEntityAlias = conditionExprElement.getAttribute("rel-entity-alias");
             String relFieldNameStr = conditionExprElement.getAttribute("rel-field-name");