You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2021/06/24 18:57:44 UTC

[sling-org-apache-sling-commons-crypto] branch master updated (c3297e1 -> e000b95)

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

olli pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-crypto.git.


    from c3297e1  add assertion
     new 0b7f463  remove redundant properties
     new 8fa1162  SLING-10543 Enable code checks with PMD
     new e000b95  [pmd] UnnecessaryModifier

The 3 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:
 pom.xml                                                | 18 ++++++++++++++++--
 .../commons/crypto/internal/FilePasswordProvider.java  |  2 +-
 2 files changed, 17 insertions(+), 3 deletions(-)

[sling-org-apache-sling-commons-crypto] 03/03: [pmd] UnnecessaryModifier

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

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-crypto.git

commit e000b95a21de2228bf488bc0ca961927c0a25856
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Thu Jun 24 20:56:17 2021 +0200

    [pmd] UnnecessaryModifier
---
 .../org/apache/sling/commons/crypto/internal/FilePasswordProvider.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/commons/crypto/internal/FilePasswordProvider.java b/src/main/java/org/apache/sling/commons/crypto/internal/FilePasswordProvider.java
index 8980cd7..b2297d3 100644
--- a/src/main/java/org/apache/sling/commons/crypto/internal/FilePasswordProvider.java
+++ b/src/main/java/org/apache/sling/commons/crypto/internal/FilePasswordProvider.java
@@ -82,7 +82,7 @@ public class FilePasswordProvider implements PasswordProvider {
         final File file = new File(path);
         checkPasswordFile(file);
         final char[] buffer = new char[(int) file.length()];
-        try (final BufferedReader reader = Files.newBufferedReader(file.toPath(), StandardCharsets.UTF_8)) {
+        try (BufferedReader reader = Files.newBufferedReader(file.toPath(), StandardCharsets.UTF_8)) {
             final int size = reader.read(buffer);
             final int length;
             if (fixPosixNewline && buffer[size - 1] == NEWLINE_CHARACTER) {

[sling-org-apache-sling-commons-crypto] 01/03: remove redundant properties

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

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-crypto.git

commit 0b7f4634a1de4adab965eedf0045d92db7dbe7b7
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Thu Jun 24 16:57:02 2021 +0200

    remove redundant properties
---
 pom.xml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 11f68f0..b606d5d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,8 +35,6 @@
   <description>Apache Sling Commons Crypto</description>
 
   <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <sling.java.version>11</sling.java.version>
     <org.ops4j.pax.exam.version>4.13.3</org.ops4j.pax.exam.version>
   </properties>

[sling-org-apache-sling-commons-crypto] 02/03: SLING-10543 Enable code checks with PMD

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

olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-crypto.git

commit 8fa11620c53ef054b1b1aec51917141ac856dc40
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Thu Jun 24 20:53:45 2021 +0200

    SLING-10543 Enable code checks with PMD
---
 pom.xml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/pom.xml b/pom.xml
index b606d5d..2e36cb0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,6 +90,22 @@
           </excludes>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>3.14.0</version>
+        <configuration>
+          <targetJdk>${sling.java.version}</targetJdk>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>