sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1753535 - in /sling/trunk/bundles/extensions/repoinit/parser/src: main/javacc/RepoInitGrammar.jjt test/resources/testcases/test-40-output.txt test/resources/testcases/test-40.txt
Date Wed, 20 Jul 2016 15:22:53 GMT
Author: bdelacretaz
Date: Wed Jul 20 15:22:53 2016
New Revision: 1753535

URL: http://svn.apache.org/viewvc?rev=1753535&view=rev
Log:
SLING-5843 - prefix is required when registering JCR namespaces

Modified:
    sling/trunk/bundles/extensions/repoinit/parser/src/main/javacc/RepoInitGrammar.jjt
    sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases/test-40-output.txt
    sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases/test-40.txt

Modified: sling/trunk/bundles/extensions/repoinit/parser/src/main/javacc/RepoInitGrammar.jjt
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/repoinit/parser/src/main/javacc/RepoInitGrammar.jjt?rev=1753535&r1=1753534&r2=1753535&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/repoinit/parser/src/main/javacc/RepoInitGrammar.jjt (original)
+++ sling/trunk/bundles/extensions/repoinit/parser/src/main/javacc/RepoInitGrammar.jjt Wed
Jul 20 15:22:53 2016
@@ -302,15 +302,11 @@ void registerNamespaceStatement(List<Ope
 }
 {
     <REGISTER> <NAMESPACE> 
-    ( <LPAREN> prefix = <STRING> <RPAREN> )? 
+    <LPAREN> prefix = <STRING> <RPAREN> 
     uri = <STRING> 
 
     {
-        if(prefix == null) {
-            result.add(new RegisterNamespace(null, uri.image)); 
-        } else {
-            result.add(new RegisterNamespace(prefix.image, uri.image)); 
-        } 
+        result.add(new RegisterNamespace(prefix.image, uri.image)); 
     }
     
     (<EOL> | <EOF>)

Modified: sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases/test-40-output.txt
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases/test-40-output.txt?rev=1753535&r1=1753534&r2=1753535&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases/test-40-output.txt
(original)
+++ sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases/test-40-output.txt
Wed Jul 20 15:22:53 2016
@@ -1,3 +1,2 @@
 RegisterNamespace (foo) uri:some-uri/V/1.0
-RegisterNamespace () uri:without-prefix
 RegisterNamespace (prefix_with-other.things) andSimpleURI
\ No newline at end of file

Modified: sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases/test-40.txt
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases/test-40.txt?rev=1753535&r1=1753534&r2=1753535&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases/test-40.txt
(original)
+++ sling/trunk/bundles/extensions/repoinit/parser/src/test/resources/testcases/test-40.txt
Wed Jul 20 15:22:53 2016
@@ -1,4 +1,3 @@
 # Test the register namespace statement
 register namespace (foo) uri:some-uri/V/1.0
-register namespace uri:without-prefix
 register namespace ( prefix_with-other.things ) andSimpleURI
\ No newline at end of file



Mime
View raw message