This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.repoinit.parser-1.0.4 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-parser.git
commit fcbb581cac72dc84612d732614bde28d6b64ca3d Author: Bertrand Delacretaz <[email protected]> AuthorDate: Wed Jul 20 15:22:53 2016 +0000 SLING-5843 - prefix is required when registering JCR namespaces git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/repoinit/parser@1753535 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/javacc/RepoInitGrammar.jjt | 8 ++------ src/test/resources/testcases/test-40-output.txt | 1 - src/test/resources/testcases/test-40.txt | 1 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/javacc/RepoInitGrammar.jjt b/src/main/javacc/RepoInitGrammar.jjt index 9939f81..288b6d5 100644 --- a/src/main/javacc/RepoInitGrammar.jjt +++ b/src/main/javacc/RepoInitGrammar.jjt @@ -302,15 +302,11 @@ void registerNamespaceStatement(List<Operation> result) : } { <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>) diff --git a/src/test/resources/testcases/test-40-output.txt b/src/test/resources/testcases/test-40-output.txt index e80b5c8..097e4bf 100644 --- a/src/test/resources/testcases/test-40-output.txt +++ b/src/test/resources/testcases/test-40-output.txt @@ -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 diff --git a/src/test/resources/testcases/test-40.txt b/src/test/resources/testcases/test-40.txt index aa77e26..f5be1b9 100644 --- a/src/test/resources/testcases/test-40.txt +++ b/src/test/resources/testcases/test-40.txt @@ -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 -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
