svn commit: r1817799 - /ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1817799 - /ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java

jleroux@apache.org
Author: jleroux
Date: Mon Dec 11 17:35:42 2017
New Revision: 1817799

URL: http://svn.apache.org/viewvc?rev=1817799&view=rev
Log:
Removes some formatting which were also automated (w/o my consent, I must have
missed it at some point :/)

Modified:
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java?rev=1817799&r1=1817798&r2=1817799&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/model/ModelReader.java Mon Dec 11 17:35:42 2017
@@ -146,10 +146,12 @@ public class ModelReader implements Seri
 
         // check to see if entity with same name has already been read
         if (entityCache.containsKey(entityName) && !redefinedEntity) {
-            Debug.logWarning("Entity " + entityName + " is defined more than once, most recent will over-write " + "previous definition(s)", module);
-            Debug.logWarning(
-                    "Entity " + entityName + " was found in " + entityResourceHandler + ", but was already defined in " + entityResourceHandlerMap.get(entityName).toString(),
-                    module);
+            Debug.logWarning("Entity " + entityName +
+                    " is defined more than once, most recent will over-write " +
+                    "previous definition(s)", module);
+            Debug.logWarning("Entity " + entityName + " was found in " +
+                    entityResourceHandler + ", but was already defined in " +
+                    entityResourceHandlerMap.get(entityName).toString(), module);
         }
 
         // add entityName, entityFileName pair to entityResourceHandlerMap map
@@ -250,10 +252,9 @@ public class ModelReader implements Seri
                                     } else {
                                         entityCache.put(modelEntity.getEntityName(), modelEntity);
                                     }
-                                } else
-                                    if (isExtendEntity && curChild.getNodeType() == Node.ELEMENT_NODE) {
-                                        tempExtendEntityElementList.add((Element) curChild);
-                                    }
+                                } else if (isExtendEntity && curChild.getNodeType() == Node.ELEMENT_NODE) {
+                                    tempExtendEntityElementList.add((Element) curChild);
+                                }
                             } while ((curChild = curChild.getNextSibling()) != null);
                         } else {
                             Debug.logWarning("No child nodes found.", module);
@@ -342,9 +343,7 @@ public class ModelReader implements Seri
                             Iterator<ModelRelation> relationsIter = curModelEntity.getRelationsIterator();
                             while (relationsIter.hasNext()) {
                                 ModelRelation modelRelation = relationsIter.next();
-                                if (("one".equals(modelRelation.getType())
-                                        || "one-nofk".equals(modelRelation.getType()))
-                                            && !modelRelation.isAutoRelation()) {
+                                if (("one".equals(modelRelation.getType()) || "one-nofk".equals(modelRelation.getType())) && !modelRelation.isAutoRelation()) {
                                     ModelEntity relatedEnt = null;
                                     try {
                                         relatedEnt = this.getModelEntity(modelRelation.getRelEntityName());
@@ -403,8 +402,7 @@ public class ModelReader implements Seri
                                     } else {
                                         if (newRel.equals(existingRelation)) {
                                             // don't warn if the target title+entity = current title+entity
-                                            if (Debug.infoOn()
-                                                    && !(title + curModelEntity.getEntityName()).equals(modelRelation.getTitle() + modelRelation.getRelEntityName())) {
+                                            if (Debug.infoOn() && !(title + curModelEntity.getEntityName()).equals(modelRelation.getTitle() + modelRelation.getRelEntityName())) {
                                                 // String errorMsg = "Relation already exists to entity [] with title ["
                                                 // + targetTitle + "],from entity []";
                                                 String message = "Entity [" + relatedEnt.getPackageName() + ":" + relatedEnt.getEntityName()