You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2022/02/15 12:03:38 UTC

[jackrabbit-filevault] branch master updated (94b130d -> fcab5d7)

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

kwin pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git.


    from 94b130d  releng: partly revert last commit, fix nullability annotation
     new 7332dc7  JCRVLT-607 require Java 11+ for building
     new fcab5d7  releng: fix remaining SonarQube issues

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Jenkinsfile                                        |  2 +-
 README.md                                          |  2 +-
 parent/pom.xml                                     | 23 ++--------------------
 .../vault/fs/impl/io/DocViewImporter.java          | 11 ++++++-----
 .../jackrabbit/vault/util/DocViewProperty2.java    |  2 +-
 5 files changed, 11 insertions(+), 29 deletions(-)

[jackrabbit-filevault] 02/02: releng: fix remaining SonarQube issues

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git

commit fcab5d786794ec5de637c19e03d5a64f473b6144
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Feb 15 11:49:02 2022 +0100

    releng: fix remaining SonarQube issues
---
 .../apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java   | 11 ++++++-----
 .../org/apache/jackrabbit/vault/util/DocViewProperty2.java    |  2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java
index 752567e..98e7663 100644
--- a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java
+++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java
@@ -1163,11 +1163,12 @@ public class DocViewImporter implements DocViewParserHandler {
         return effectiveNodeType.getApplicablePropertyDefinition(npResolver.getJCRName(docViewProperty.getName()), docViewProperty.isMultiValue(), docViewProperty.getType()).map(PropertyDefinition::isProtected).orElse(false);
     }
 
-    private Node getNodeByIdOrName(@NotNull Node currentNode, @NotNull DocViewNode2 ni, boolean isUuidNewlyAssigned) throws RepositoryException {
+    private Node getNodeByIdOrName(@NotNull Node currentNode, @NotNull DocViewNode2 ni, boolean isIdNewlyAssigned) throws RepositoryException {
         Node node = null;
-        if (ni.getIdentifier().isPresent() && !isUuidNewlyAssigned) {
+        Optional<String> id = ni.getIdentifier();
+        if (id.isPresent() && !isIdNewlyAssigned) {
             try {
-                node = currentNode.getSession().getNodeByIdentifier(ni.getIdentifier().get());
+                node = currentNode.getSession().getNodeByIdentifier(id.get());
             } catch (RepositoryException e) {
                 log.warn("Newly created node not found by uuid {}: {}", currentNode.getPath() + "/" + ni.getName(), e.toString());
             }
@@ -1183,7 +1184,7 @@ public class DocViewImporter implements DocViewParserHandler {
             try {
                 node = currentNode.getNode(ni.getName().toString());
             } catch (RepositoryException e) {
-                log.warn("Newly created node not found by name {}: {}", currentNode.getPath() + "/" + ni.getName(), e.toString());
+                log.debug("Newly created node not found by name {}: {}", currentNode.getPath() + "/" + ni.getName(), e.toString());
                 throw e;
             }
         }
@@ -1283,7 +1284,7 @@ public class DocViewImporter implements DocViewParserHandler {
          */
         private DocViewAdapter adapter;
 
-        public StackElement(@NotNull Node node, boolean isNew) throws RepositoryException {
+        public StackElement(@Nullable Node node, boolean isNew) throws RepositoryException {
             this.node = node;
             this.isNew = isNew;
             isCheckedOut = node == null || !node.isNodeType(JcrConstants.MIX_VERSIONABLE) || node.isCheckedOut();
diff --git a/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty2.java b/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty2.java
index 36f4695..faaceba 100644
--- a/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty2.java
+++ b/vault-core/src/main/java/org/apache/jackrabbit/vault/util/DocViewProperty2.java
@@ -582,7 +582,7 @@ public class DocViewProperty2 {
                 Value binaryValue = node.getSession().getValueFactory().createValue(ref);
                 binaryValues.add(binaryValue);
                 // compare with existing value
-                if (!modified && n < existingValues.length && existingValues[n] != null) {
+                if (!modified && existingValues != null && n < existingValues.length && existingValues[n] != null) {
                     Binary existingBinary = existingValues[0].getBinary();
                     if (!existingBinary.equals(binaryValue.getBinary())) {
                         modified = true;

[jackrabbit-filevault] 01/02: JCRVLT-607 require Java 11+ for building

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git

commit 7332dc73e1686c60acb261629a8d5cf0e65f04e2
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Feb 15 11:28:06 2022 +0100

    JCRVLT-607 require Java 11+ for building
---
 Jenkinsfile    |  2 +-
 README.md      |  2 +-
 parent/pom.xml | 23 ++---------------------
 3 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 3bce96b..2afe1cb 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -21,7 +21,7 @@
 library "filevault@master"
 
 vaultPipeline('ubuntu', 11, '3', {
-   vaultStageBuild(['ubuntu', 'Windows'], [8, 11, 17], ['3', '3.6.3'], 'apache_jackrabbit-filevault')
+   vaultStageBuild(['ubuntu', 'Windows'], [11, 17], ['3', '3.6.3'], 'apache_jackrabbit-filevault')
    vaultStageDeploy()
   }
 )
\ No newline at end of file
diff --git a/README.md b/README.md
index 933aa1f..e34462a 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ You can build FileVault like this:
 
     mvn clean install
 
-You need Maven 3.6.2 (or higher) with Java 8 (or higher) for the build.
+You need Maven 3.6.2 (or higher) with Java 11 (or higher) for the build.
 For more instructions, please see the documentation at:
 
    <https://jackrabbit.apache.org/building-jackrabbit.html>
diff --git a/parent/pom.xml b/parent/pom.xml
index 721828e..efeb7ff 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -54,8 +54,8 @@ Apache Jackrabbit FileVault is a project of the Apache Software Foundation.
         <test.oak>true</test.oak> <!-- passed to integration test as property "oak", set to true to test with Oak, false means test with Jackrabbit 2 -->
         <bnd.version>6.1.0</bnd.version>
         <minimalMavenBuildVersion>3.6.1</minimalMavenBuildVersion><!-- due to https://issues.apache.org/jira/browse/MNG-6059 -->
-        <minimalJavaBuildVersion>1.8</minimalJavaBuildVersion>
-        <maven.compiler.target>1.8</maven.compiler.target>
+        <minimalJavaBuildVersion>11</minimalJavaBuildVersion>
+        <maven.compiler.release>8</maven.compiler.release>
         <surefire.version>3.0.0-M5</surefire.version>
         <sling.url>http://localhost:4502</sling.url>
         <jacoco.command /><!-- is overwritten by https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html -->
@@ -556,25 +556,6 @@ Bundle-Category: jackrabbit
     <!-- ====================================================================== -->
     <profiles>
         <profile>
-            <id>java9-or-above</id>
-            <activation>
-                <jdk>[9,)</jdk>
-            </activation>
-            <build>
-                <pluginManagement>
-                    <plugins>
-                        <plugin>
-                            <artifactId>maven-javadoc-plugin</artifactId>
-                            <configuration>
-                                <!-- workaround for https://bugs.openjdk.java.net/browse/JDK-8212233 -->
-                                <source>8</source>
-                            </configuration>
-                        </plugin>
-                    </plugins>
-                </pluginManagement>
-            </build>
-        </profile>
-        <profile>
             <id>jacoco-report</id>
             <build>
                 <plugins>