This is an automated email from the ASF dual-hosted git repository.

thomasm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 3a6efdf  OAK-9625 (remove trailing whitespace)
3a6efdf is described below

commit 3a6efdf3de8488bc8593c85cda3d3394de4f0333
Author: thomasm <[email protected]>
AuthorDate: Fri Nov 26 17:49:49 2021 +0100

    OAK-9625 (remove trailing whitespace)
---
 .../oak/query/ast/NodeLocalNameImpl.java           | 18 +++---
 .../jackrabbit/oak/query/ast/NodeNameImpl.java     | 12 ++--
 .../apache/jackrabbit/oak/query/FilterTest.java    | 70 +++++++++++-----------
 3 files changed, 50 insertions(+), 50 deletions(-)

diff --git 
a/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
 
b/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
index fc91008..4687671 100644
--- 
a/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
+++ 
b/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeLocalNameImpl.java
@@ -57,12 +57,12 @@ public class NodeLocalNameImpl extends DynamicOperandImpl {
     public void bindSelector(SourceImpl source) {
         selector = source.getExistingSelector(selectorName);
     }
-    
+
     @Override
     public PropertyExistenceImpl getPropertyExistence() {
         return null;
     }
-    
+
     @Override
     public Set<SelectorImpl> getSelectors() {
         return Collections.singleton(selector);
@@ -79,7 +79,7 @@ public class NodeLocalNameImpl extends DynamicOperandImpl {
         // TODO reverse namespace remapping?
         return PropertyValues.newString(localName);
     }
-    
+
     static String getLocalName(String name) {
         int colon = name.indexOf(':');
         // TODO LOCALNAME: evaluation of local name might not be correct
@@ -107,7 +107,7 @@ public class NodeLocalNameImpl extends DynamicOperandImpl {
     public void restrictList(FilterImpl f, List<PropertyValue> list) {
         // optimizations of type "LOCALNAME(..) IN(A, B)" are not supported
     }
-    
+
     @Override
     public String getFunction(SelectorImpl s) {
         if (!s.equals(selector)) {
@@ -115,7 +115,7 @@ public class NodeLocalNameImpl extends DynamicOperandImpl {
         }
         return "@" + QueryConstants.RESTRICTION_LOCAL_NAME;
     }
-    
+
     @Override
     public boolean supportsRangeConditions() {
         return false;
@@ -125,7 +125,7 @@ public class NodeLocalNameImpl extends DynamicOperandImpl {
     public boolean canRestrictSelector(SelectorImpl s) {
         return s.equals(selector);
     }
-    
+
     @Override
     int getPropertyType() {
         return PropertyType.STRING;
@@ -135,7 +135,7 @@ public class NodeLocalNameImpl extends DynamicOperandImpl {
     public DynamicOperandImpl createCopy() {
         return new NodeLocalNameImpl(selectorName);
     }
-    
+
     @Override
     public OrderEntry getOrderEntry(SelectorImpl s, OrderingImpl o) {
         if (!s.equals(selector)) {
@@ -144,8 +144,8 @@ public class NodeLocalNameImpl extends DynamicOperandImpl {
         }
         return new OrderEntry(
                 QueryConstants.FUNCTION_RESTRICTION_PREFIX + getFunction(s),
-            Type.STRING, 
-            o.isDescending() ? 
+            Type.STRING,
+            o.isDescending() ?
             OrderEntry.Order.DESCENDING : OrderEntry.Order.ASCENDING);
     }
 
diff --git 
a/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java 
b/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
index b5bce13..e97c80a 100644
--- 
a/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
+++ 
b/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
@@ -65,12 +65,12 @@ public class NodeNameImpl extends DynamicOperandImpl {
     public boolean supportsRangeConditions() {
         return false;
     }
-    
+
     @Override
     public PropertyExistenceImpl getPropertyExistence() {
         return null;
     }
-    
+
     @Override
     public Set<SelectorImpl> getSelectors() {
         return Collections.singleton(selector);
@@ -104,7 +104,7 @@ public class NodeNameImpl extends DynamicOperandImpl {
                     operator, PropertyValues.newString(localName));
         }
     }
-    
+
     @Override
     public void restrictList(FilterImpl f, List<PropertyValue> list) {
         // optimizations of type "NAME(..) IN(A, B)" are not supported
@@ -178,7 +178,7 @@ public class NodeNameImpl extends DynamicOperandImpl {
     public DynamicOperandImpl createCopy() {
         return new NodeNameImpl(selectorName);
     }
-    
+
     @Override
     public OrderEntry getOrderEntry(SelectorImpl s, OrderingImpl o) {
         if (!s.equals(selector)) {
@@ -187,8 +187,8 @@ public class NodeNameImpl extends DynamicOperandImpl {
         }
         return new OrderEntry(
                 QueryConstants.FUNCTION_RESTRICTION_PREFIX + getFunction(s),
-            Type.STRING, 
-            o.isDescending() ? 
+            Type.STRING,
+            o.isDescending() ?
             OrderEntry.Order.DESCENDING : OrderEntry.Order.ASCENDING);
     }
 
diff --git 
a/oak-core/src/test/java/org/apache/jackrabbit/oak/query/FilterTest.java 
b/oak-core/src/test/java/org/apache/jackrabbit/oak/query/FilterTest.java
index bcf3ab0..7a2cf9d 100644
--- a/oak-core/src/test/java/org/apache/jackrabbit/oak/query/FilterTest.java
+++ b/oak-core/src/test/java/org/apache/jackrabbit/oak/query/FilterTest.java
@@ -32,7 +32,7 @@ import org.junit.Test;
  * Test filter conditions.
  */
 public class FilterTest {
-    
+
     private final SQL2Parser p = SQL2ParserTest.createTestSQL2Parser();
 
     private Filter createFilter(String xpath) throws ParseException {
@@ -40,77 +40,77 @@ public class FilterTest {
         QueryImpl q = (QueryImpl) p.parse(sql);
         return q.createFilter(true);
     }
-    
+
     private Filter createFilterSQL(String sql) throws ParseException {
         QueryImpl q = (QueryImpl) p.parse(sql);
         return q.createFilter(true);
     }
-    
+
     @Test
     public void functionBasedIndex() throws Exception {
         String sql2 = "select [jcr:path] from [nt:base] where lower([test]) = 
'hello'";
-        assertEquals("Filter(query=select [jcr:path] from [nt:base] " + 
-                "where lower([test]) = 'hello', " + 
-                "path=*, property=[" + 
+        assertEquals("Filter(query=select [jcr:path] from [nt:base] " +
+                "where lower([test]) = 'hello', " +
+                "path=*, property=[" +
                 "function*lower*@test=[hello], " +
                 "test=[is not null]])", createFilterSQL(sql2).toString());
-        
+
         sql2 = "select [jcr:path] from [nt:base] where upper([test]) = 
'HELLO'";
-        assertEquals("Filter(query=select [jcr:path] from [nt:base] " + 
-                "where upper([test]) = 'HELLO', " + 
-                "path=*, property=[" + 
+        assertEquals("Filter(query=select [jcr:path] from [nt:base] " +
+                "where upper([test]) = 'HELLO', " +
+                "path=*, property=[" +
                 "function*upper*@test=[HELLO], " +
                 "test=[is not null]])", createFilterSQL(sql2).toString());
-        
+
         sql2 = "select [jcr:path] from [nt:base] where upper(name()) = 
'ACME:TEST'";
-        assertEquals("Filter(query=select [jcr:path] from [nt:base] " + 
-                "where upper(name()) = 'ACME:TEST', " + 
-                "path=*, property=[" + 
+        assertEquals("Filter(query=select [jcr:path] from [nt:base] " +
+                "where upper(name()) = 'ACME:TEST', " +
+                "path=*, property=[" +
                 "function*upper*@:name=[ACME:TEST]])", 
createFilterSQL(sql2).toString());
-        
+
         sql2 = "select [jcr:path] from [nt:base] where lower(localname()) > 
'test'";
-        assertEquals("Filter(query=select [jcr:path] from [nt:base] " + 
-                "where lower(localname()) > 'test', " + 
-                "path=*, property=[" + 
+        assertEquals("Filter(query=select [jcr:path] from [nt:base] " +
+                "where lower(localname()) > 'test', " +
+                "path=*, property=[" +
                 "function*lower*@:localname=[(test..]])", 
createFilterSQL(sql2).toString());
 
         sql2 = "select [jcr:path] from [nt:base] where length([test]) <= 10";
-        assertEquals("Filter(query=select [jcr:path] from [nt:base] " + 
-                "where length([test]) <= 10, " + 
-                "path=*, property=[function*length*@test=[..10]], " + 
+        assertEquals("Filter(query=select [jcr:path] from [nt:base] " +
+                "where length([test]) <= 10, " +
+                "path=*, property=[function*length*@test=[..10]], " +
                 "test=[is not null]])", createFilterSQL(sql2).toString());
-        
+
         sql2 = "select [jcr:path] from [nt:base] where length([data/test]) > 
2";
-        assertEquals("Filter(query=select [jcr:path] from [nt:base] " + 
-                "where length([data/test]) > 2, " + 
-                "path=*, property=[data/test=[is not null], " + 
+        assertEquals("Filter(query=select [jcr:path] from [nt:base] " +
+                "where length([data/test]) > 2, " +
+                "path=*, property=[data/test=[is not null], " +
                 "function*length*@data/test=[(2..]])", 
createFilterSQL(sql2).toString());
     }
-    
+
     @Test
     public void oak4170() throws ParseException {
         String sql2 = "select * from [nt:unstructured] where 
CONTAINS([jcr:content/metadata/comment], 'december')";
         Filter f = createFilterSQL(sql2);
         String plan = f.toString();
         // with the "property is not null" restriction, it would be:
-        // assertEquals("Filter(query=select * from [nt:unstructured] " + 
-        //         "where CONTAINS([jcr:content/metadata/comment], 'december') 
" + 
-        //         "fullText=jcr:content/metadata/comment:\"december\", " + 
+        // assertEquals("Filter(query=select * from [nt:unstructured] " +
+        //         "where CONTAINS([jcr:content/metadata/comment], 'december') 
" +
+        //         "fullText=jcr:content/metadata/comment:\"december\", " +
         //         "path=*, property=[jcr:content/metadata/comment=[is not 
null]])", plan);
-        assertEquals("Filter(query=select * from [nt:unstructured] " + 
-                "where CONTAINS([jcr:content/metadata/comment], 'december') " 
+ 
-                "fullText=jcr:content/metadata/comment:\"december\", " + 
+        assertEquals("Filter(query=select * from [nt:unstructured] " +
+                "where CONTAINS([jcr:content/metadata/comment], 'december') " +
+                "fullText=jcr:content/metadata/comment:\"december\", " +
                 "path=*)", plan);
         assertEquals(f.getPropertyRestrictions().toString(), 0, 
f.getPropertyRestrictions().size());
         f.getPropertyRestriction("jcr:content/metadata/comment");
     }
-    
+
     @Test
     public void localName() throws Exception {
         Filter f = createFilterSQL("select * from [nt:base] where localname() 
= 'resource'");
         assertEquals("[resource]", 
f.getPropertyRestrictions(":localname").toString());
     }
-    
+
     @Test
     public void name() throws Exception {
         Filter f = createFilter("//*[fn:name() = 'nt:resource']");
@@ -123,7 +123,7 @@ public class FilterTest {
         Filter f = createFilter("//*[(@prop = 'aaa' and @prop = 'bbb' and 
@prop = 'ccc')]");
         assertFalse(f.isAlwaysFalse());
     }
-    
+
     @Test
     public void isNull() throws Exception {
         // this can refer to a multi-valued property

Reply via email to