jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1325348 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java
Date Thu, 12 Apr 2012 16:16:59 GMT
Author: mduerig
Date: Thu Apr 12 16:16:59 2012
New Revision: 1325348

URL: http://svn.apache.org/viewvc?rev=1325348&view=rev
Log:
OAK-15: Clean up oak-jcr
- remove unused method

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java?rev=1325348&r1=1325347&r2=1325348&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/util/ValueConverter.java
Thu Apr 12 16:16:59 2012
@@ -38,37 +38,6 @@ import java.util.List;
 public final class ValueConverter {
     private ValueConverter() {}
 
-    public static Scalar toScalar(String value, int propertyType) throws RepositoryException
{
-        switch (propertyType) {
-            case PropertyType.STRING: {
-                return ScalarImpl.stringScalar(value);
-            }
-            case PropertyType.DOUBLE: {
-                return ScalarImpl.doubleScalar(Double.parseDouble(value));
-            }
-            case PropertyType.LONG: {
-                return ScalarImpl.longScalar(Long.parseLong(value));
-            }
-            case PropertyType.BOOLEAN: {
-                return ScalarImpl.booleanScalar(Boolean.parseBoolean(value));
-            }
-            case PropertyType.BINARY: {
-                return ScalarImpl.binaryScalar(value);
-            }
-            case PropertyType.DECIMAL:
-            case PropertyType.DATE:
-            case PropertyType.NAME:
-            case PropertyType.PATH:
-            case PropertyType.REFERENCE:
-            case PropertyType.WEAKREFERENCE:
-            case PropertyType.URI:
-            default: {
-                // todo implement toScalar
-                throw new UnsupportedRepositoryOperationException("toScalar");
-            }
-        }
-    }
-
     public static Scalar toScalar(Value value) throws RepositoryException {
         switch (value.getType()) {
             case PropertyType.STRING: {



Mime
View raw message