chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1489976 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java
Date Wed, 05 Jun 2013 17:33:52 GMT
Author: jens
Date: Wed Jun  5 17:33:52 2013
New Revision: 1489976

URL: http://svn.apache.org/r1489976
Log:
InMemory:. fix a bug in query response for not set properties

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java?rev=1489976&r1=1489975&r2=1489976&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/types/PropertyCreationHelper.java
Wed Jun  5 17:33:52 2013
@@ -526,24 +526,29 @@ public final class PropertyCreationHelpe
     }
 
     private static AbstractPropertyData<?> getEmptyValue(PropertyDefinition<?>
propDef) {
+    	AbstractPropertyData<?> emptyValue;
         if (propDef.getPropertyType().equals(PropertyType.BOOLEAN))
-            return new PropertyBooleanImpl(propDef.getId(), (Boolean) null);
+        	emptyValue =  new PropertyBooleanImpl(propDef.getId(), (Boolean) null);
         else if (propDef.getPropertyType().equals(PropertyType.DATETIME))
-            return new PropertyDateTimeImpl(propDef.getId(), (GregorianCalendar) null);
+        	emptyValue =  new PropertyDateTimeImpl(propDef.getId(), (GregorianCalendar) null);
         else if (propDef.getPropertyType().equals(PropertyType.DECIMAL))
-            return new PropertyDecimalImpl(propDef.getId(), (BigDecimal) null);
+        	emptyValue =  new PropertyDecimalImpl(propDef.getId(), (BigDecimal) null);
         else if (propDef.getPropertyType().equals(PropertyType.HTML))
-            return new PropertyHtmlImpl(propDef.getId(), (String) null);
+        	emptyValue =  new PropertyHtmlImpl(propDef.getId(), (String) null);
         else if (propDef.getPropertyType().equals(PropertyType.ID))
-            return new PropertyIdImpl(propDef.getId(), (String) null);
+        	emptyValue =  new PropertyIdImpl(propDef.getId(), (String) null);
         else if (propDef.getPropertyType().equals(PropertyType.INTEGER))
-            return new PropertyIntegerImpl(propDef.getId(), (BigInteger) null);
+        	emptyValue =  new PropertyIntegerImpl(propDef.getId(), (BigInteger) null);
         else if (propDef.getPropertyType().equals(PropertyType.STRING))
-            return new PropertyStringImpl(propDef.getId(), (String) null);
+        	emptyValue =  new PropertyStringImpl(propDef.getId(), (String) null);
         else if (propDef.getPropertyType().equals(PropertyType.URI))
-            return new PropertyUriImpl(propDef.getId(), (String) null);
+        	emptyValue =  new PropertyUriImpl(propDef.getId(), (String) null);
         else
-            return null;
+        	emptyValue =  null;
+        emptyValue.setDisplayName(propDef.getDisplayName());
+        emptyValue.setQueryName(propDef.getQueryName());
+        emptyValue.setLocalName(propDef.getLocalName());
+        return emptyValue;
     }
 
     private static AbstractPropertyData<?> clonePropertyData(PropertyData<?>
prop) {



Mime
View raw message