jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig <mdue...@apache.org>
Subject Re: svn commit: r1482792 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/ oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/ oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/
Date Tue, 21 May 2013 12:20:40 GMT


On 15.5.13 13:35, jukka@apache.org wrote:
> Author: jukka
> Date: Wed May 15 12:35:49 2013
> New Revision: 1482792

[...]

> Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
> URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java?rev=1482792&r1=1482791&r2=1482792&view=diff
> ==============================================================================
> --- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
(original)
> +++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
Wed May 15 12:35:49 2013
> @@ -19,6 +19,7 @@
>   package org.apache.jackrabbit.oak.kernel;
>
>   import static com.google.common.base.Preconditions.checkNotNull;
> +import static java.util.Collections.emptyList;
>   import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.EMPTY_NODE;
>   import static org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.MISSING_NODE;
>   import static org.apache.jackrabbit.oak.plugins.memory.PropertyStates.createProperty;
> @@ -55,6 +56,7 @@ import org.apache.jackrabbit.oak.plugins
>   import org.apache.jackrabbit.oak.plugins.memory.BooleanPropertyState;
>   import org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState;
>   import org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder;
> +import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
>   import org.apache.jackrabbit.oak.plugins.memory.StringPropertyState;
>   import org.apache.jackrabbit.oak.plugins.value.Conversions;
>   import org.apache.jackrabbit.oak.spi.state.AbstractChildNodeEntry;
> @@ -627,6 +629,12 @@ public final class KernelNodeState exten
>               return BooleanPropertyState.booleanProperty(name, false);
>           } else if (reader.matches(JsopReader.STRING)) {
>               String jsonString = reader.getToken();
> +            if (jsonString.startsWith(TypeCodes.EMPTY_ARRAY)) {
> +                int type = PropertyType.valueFromName(
> +                        jsonString.substring(TypeCodes.EMPTY_ARRAY.length()));
> +                return PropertyStates.createProperty(
> +                        name, emptyList(), Type.fromTag(type, true));
> +            }
>               int split = TypeCodes.split(jsonString);
>               if (split != -1) {
>                   int type = TypeCodes.decodeType(split, jsonString);
>

Note that we need to duplicate these changes to the respective method in 
org.apache.jackrabbit.oak.query.JsopUtil. There was a common utility 
earlier for this decoding, which was removed at some point however. I 
suggest to put such an utility back in place since this is not the first 
time these are getting out of sync.

Michael

Mime
View raw message