You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by mr...@apache.org on 2016/03/03 20:05:44 UTC

usergrid git commit: Hide unnecessary warn message behind DEBUG.

Repository: usergrid
Updated Branches:
  refs/heads/release-2.1.1 e15cb12a3 -> 56c995f6b


Hide unnecessary warn message behind DEBUG.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/56c995f6
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/56c995f6
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/56c995f6

Branch: refs/heads/release-2.1.1
Commit: 56c995f6b78be60aca43b31392537fddd1e6c255
Parents: e15cb12
Author: Michael Russo <mr...@apigee.com>
Authored: Thu Mar 3 11:05:39 2016 -0800
Committer: Michael Russo <mr...@apigee.com>
Committed: Thu Mar 3 11:05:39 2016 -0800

----------------------------------------------------------------------
 .../model/entity/MapToEntityConverter.java        | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/56c995f6/stack/corepersistence/model/src/main/java/org/apache/usergrid/persistence/model/entity/MapToEntityConverter.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/model/src/main/java/org/apache/usergrid/persistence/model/entity/MapToEntityConverter.java b/stack/corepersistence/model/src/main/java/org/apache/usergrid/persistence/model/entity/MapToEntityConverter.java
index fb19963..b5ffd74 100644
--- a/stack/corepersistence/model/src/main/java/org/apache/usergrid/persistence/model/entity/MapToEntityConverter.java
+++ b/stack/corepersistence/model/src/main/java/org/apache/usergrid/persistence/model/entity/MapToEntityConverter.java
@@ -186,8 +186,11 @@ public class MapToEntityConverter{
                         "Latitude and longitude must be doubles (e.g. 32.1234).");
                 }
             } else if (m.containsKey("lat") && m.containsKey("lon")) {
-                logger.warn("Entity contains latitude and longitude in old format location{lat,long}"
-                );
+
+                if(logger.isDebugEnabled()){
+                    logger.debug("Entity contains latitude and longitude in old format location{lat,long}");
+                }
+
                 try {
                     latVal = Double.parseDouble(m.get("lat").toString());
                     lonVal = Double.parseDouble(m.get("lon").toString());
@@ -202,10 +205,13 @@ public class MapToEntityConverter{
 
            return new LocationField(fieldName, new Location(latVal, lonVal));
         } else {
-            //can't process non enties
-            logger.warn(
-                "entity cannot process location values that don't have valid location{latitude,longitude} values, changing to generic object"
-            );
+
+            if(logger.isDebugEnabled()){
+                logger.debug(
+                    "entity cannot process location values that don't have valid " +
+                        "location{latitude,longitude} values, changing to generic object");
+            }
+
            return new EntityObjectField(fieldName,fromMap( value, false)); // recursion
         }
     }