You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by en...@apache.org on 2022/07/06 21:42:44 UTC
[sling-org-apache-sling-repoinit-parser] branch master updated: SLING-11402 Update to Sling Bundle Parent 48 (#23)
This is an automated email from the ASF dual-hosted git repository.
enorman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-parser.git
The following commit(s) were added to refs/heads/master by this push:
new ed466d0 SLING-11402 Update to Sling Bundle Parent 48 (#23)
ed466d0 is described below
commit ed466d08bf7bc313b53f526d5ede5a030ec2678e
Author: Eric Norman <er...@gmail.com>
AuthorDate: Wed Jul 6 14:42:40 2022 -0700
SLING-11402 Update to Sling Bundle Parent 48 (#23)
Also resolve "private references" troubles reported by bnd
---
pom.xml | 3 +--
.../sling/repoinit/parser/operations/CreateGroup.java | 1 -
.../repoinit/parser/operations/CreateServiceUser.java | 1 -
.../sling/repoinit/parser/operations/CreateUser.java | 1 -
.../parser/operations/OperationWithPathOptions.java | 1 -
.../sling/repoinit/parser/operations/PropertyLine.java | 2 +-
.../repoinit/parser/operations/ServiceUserOperation.java | 1 -
.../parser/{impl => operations}/WithPathOptions.java | 2 +-
.../sling/repoinit/parser/operations/package-info.java | 4 +---
src/main/javacc/RepoInitGrammar.jjt | 1 -
.../sling/repoinit/parser/test/PropertyLineTest.java | 14 +++++++-------
11 files changed, 11 insertions(+), 20 deletions(-)
diff --git a/pom.xml b/pom.xml
index c5af640..5741e0d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling-bundle-parent</artifactId>
- <version>41</version>
+ <version>48</version>
<relativePath />
</parent>
@@ -109,7 +109,6 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
- <version>18.0.0</version>
<scope>provided</scope>
</dependency>
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/CreateGroup.java b/src/main/java/org/apache/sling/repoinit/parser/operations/CreateGroup.java
index 56e1f69..117965f 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/CreateGroup.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/CreateGroup.java
@@ -18,7 +18,6 @@
package org.apache.sling.repoinit.parser.operations;
import org.apache.sling.repoinit.parser.impl.QuotableStringUtil;
-import org.apache.sling.repoinit.parser.impl.WithPathOptions;
import org.jetbrains.annotations.NotNull;
import org.osgi.annotation.versioning.ProviderType;
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/CreateServiceUser.java b/src/main/java/org/apache/sling/repoinit/parser/operations/CreateServiceUser.java
index ade4d12..590719a 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/CreateServiceUser.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/CreateServiceUser.java
@@ -17,7 +17,6 @@
package org.apache.sling.repoinit.parser.operations;
-import org.apache.sling.repoinit.parser.impl.WithPathOptions;
import org.jetbrains.annotations.NotNull;
import org.osgi.annotation.versioning.ProviderType;
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/CreateUser.java b/src/main/java/org/apache/sling/repoinit/parser/operations/CreateUser.java
index 827cdf5..b649411 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/CreateUser.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/CreateUser.java
@@ -17,7 +17,6 @@
package org.apache.sling.repoinit.parser.operations;
-import org.apache.sling.repoinit.parser.impl.WithPathOptions;
import org.jetbrains.annotations.NotNull;
import org.osgi.annotation.versioning.ProviderType;
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/OperationWithPathOptions.java b/src/main/java/org/apache/sling/repoinit/parser/operations/OperationWithPathOptions.java
index a4f1f65..f87ee45 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/OperationWithPathOptions.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/OperationWithPathOptions.java
@@ -17,7 +17,6 @@
package org.apache.sling.repoinit.parser.operations;
-import org.apache.sling.repoinit.parser.impl.WithPathOptions;
import org.jetbrains.annotations.NotNull;
import org.osgi.annotation.versioning.ProviderType;
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/PropertyLine.java b/src/main/java/org/apache/sling/repoinit/parser/operations/PropertyLine.java
index e3802fe..58f1d71 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/PropertyLine.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/PropertyLine.java
@@ -53,7 +53,7 @@ public class PropertyLine {
* @param isDefault true if this line is a "default" as opposed to a "set" instruction
* @throws ParseException if the line cannot be parsed.
*/
- public PropertyLine(String name, String typeString, List<String> values, boolean isDefault) throws ParseException {
+ public PropertyLine(String name, String typeString, List<String> values, boolean isDefault) throws Exception { // NOSONAR
this.name = name;
boolean forceList = typeString != null && typeString.endsWith(MULTI_TOKEN);
if(forceList) {
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/ServiceUserOperation.java b/src/main/java/org/apache/sling/repoinit/parser/operations/ServiceUserOperation.java
index 989905b..8226f6b 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/ServiceUserOperation.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/ServiceUserOperation.java
@@ -17,7 +17,6 @@
package org.apache.sling.repoinit.parser.operations;
-import org.apache.sling.repoinit.parser.impl.WithPathOptions;
import org.osgi.annotation.versioning.ProviderType;
@ProviderType
diff --git a/src/main/java/org/apache/sling/repoinit/parser/impl/WithPathOptions.java b/src/main/java/org/apache/sling/repoinit/parser/operations/WithPathOptions.java
similarity index 95%
rename from src/main/java/org/apache/sling/repoinit/parser/impl/WithPathOptions.java
rename to src/main/java/org/apache/sling/repoinit/parser/operations/WithPathOptions.java
index f9688e1..d6cf5b1 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/impl/WithPathOptions.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/WithPathOptions.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.sling.repoinit.parser.impl;
+package org.apache.sling.repoinit.parser.operations;
public class WithPathOptions {
public final String path;
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/package-info.java b/src/main/java/org/apache/sling/repoinit/parser/operations/package-info.java
index 53f8070..034cab1 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/package-info.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/package-info.java
@@ -15,8 +15,6 @@
* limitations under the License.
******************************************************************************/
- // DO NOT use version 5.x here, once a major change is
- // needed skip directly to 6.x (SLING-10139)
-@org.osgi.annotation.versioning.Version("4.10.0")
+@org.osgi.annotation.versioning.Version("6.0.0")
package org.apache.sling.repoinit.parser.operations;
diff --git a/src/main/javacc/RepoInitGrammar.jjt b/src/main/javacc/RepoInitGrammar.jjt
index 2041af9..e46346e 100644
--- a/src/main/javacc/RepoInitGrammar.jjt
+++ b/src/main/javacc/RepoInitGrammar.jjt
@@ -23,7 +23,6 @@ import java.util.List;
import java.util.ArrayList;
import org.apache.sling.repoinit.parser.operations.*;
-import org.apache.sling.repoinit.parser.impl.WithPathOptions;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
diff --git a/src/test/java/org/apache/sling/repoinit/parser/test/PropertyLineTest.java b/src/test/java/org/apache/sling/repoinit/parser/test/PropertyLineTest.java
index 7e166d0..55fb8da 100644
--- a/src/test/java/org/apache/sling/repoinit/parser/test/PropertyLineTest.java
+++ b/src/test/java/org/apache/sling/repoinit/parser/test/PropertyLineTest.java
@@ -22,31 +22,31 @@ import java.util.Arrays;
import java.util.Date;
import org.apache.jackrabbit.util.ISO8601;
-import org.apache.sling.repoinit.parser.operations.PropertyLine;
import org.apache.sling.repoinit.parser.impl.ParseException;
+import org.apache.sling.repoinit.parser.operations.PropertyLine;
import org.junit.Test;
public class PropertyLineTest {
@Test
- public void testDefaultPropertyType() throws ParseException {
+ public void testDefaultPropertyType() throws Exception {
final PropertyLine p = new PropertyLine("someName", null, null, false);
assertEquals(PropertyLine.PropertyType.String, p.getPropertyType());
}
@Test
- public void testValidPropertyType() throws ParseException {
+ public void testValidPropertyType() throws Exception {
final PropertyLine p = new PropertyLine("someName", "Boolean", null, false);
assertEquals(PropertyLine.PropertyType.Boolean, p.getPropertyType());
}
@Test(expected = ParseException.class)
- public void testInvalidPropertyType() throws ParseException {
+ public void testInvalidPropertyType() throws Exception {
new PropertyLine("someName", "invalidTypeName", null, false);
}
@Test
- public void testValidDateFormat() throws ParseException {
+ public void testValidDateFormat() throws Exception {
final Date now = new Date();
final String [] value = { ISO8601.format(now) };
final PropertyLine p = new PropertyLine("someName", "Date", Arrays.asList(value), false);
@@ -54,13 +54,13 @@ public class PropertyLineTest {
}
@Test(expected=ParseException.class)
- public void testInvalidDateFormat() throws ParseException {
+ public void testInvalidDateFormat() throws Exception {
final String [] notAnIsoDate = { "really not a date" };
new PropertyLine("someName", "Date", Arrays.asList(notAnIsoDate), false);
}
@Test
- public void testInvalidDateFormatAsString() throws ParseException {
+ public void testInvalidDateFormatAsString() throws Exception {
final String [] notAnIsoDate = { "2020-03-24" };
final PropertyLine p = new PropertyLine("someName", "String", Arrays.asList(notAnIsoDate), false);
assertEquals(notAnIsoDate[0], p.getPropertyValues().get(0));