|
|
|
@ -42,7 +42,8 @@ public class PathCompiler {
|
|
|
|
|
path = "$." + path; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Path p = cache.get(path + filterList.toString()); |
|
|
|
|
String cacheKey = path + filterList.toString(); |
|
|
|
|
Path p = cache.get(cacheKey); |
|
|
|
|
if(p != null){ |
|
|
|
|
return p; |
|
|
|
|
} |
|
|
|
@ -110,7 +111,7 @@ public class PathCompiler {
|
|
|
|
|
|
|
|
|
|
Path pa = new CompiledPath(root); |
|
|
|
|
|
|
|
|
|
cache.put(path, pa); |
|
|
|
|
cache.put(cacheKey, pa); |
|
|
|
|
|
|
|
|
|
return pa; |
|
|
|
|
} |
|
|
|
@ -344,6 +345,7 @@ public class PathCompiler {
|
|
|
|
|
StringBuilder buffer = new StringBuilder(); |
|
|
|
|
|
|
|
|
|
boolean propertyIsOpen = false; |
|
|
|
|
boolean propertyDone = false; |
|
|
|
|
|
|
|
|
|
while (current != ']') { |
|
|
|
|
switch (current) { |
|
|
|
@ -351,12 +353,17 @@ public class PathCompiler {
|
|
|
|
|
if (propertyIsOpen) { |
|
|
|
|
property = buffer.toString(); |
|
|
|
|
propertyIsOpen = false; |
|
|
|
|
propertyDone = true; |
|
|
|
|
} else { |
|
|
|
|
propertyIsOpen = true; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
if (propertyIsOpen) { |
|
|
|
|
if(propertyDone){ |
|
|
|
|
//Don't understand how to create a "Normalized path expressions" for this type of query
|
|
|
|
|
throw new InvalidPathException("Only single properties are supported."); |
|
|
|
|
} |
|
|
|
|
buffer.append(current); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|