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/07/13 20:29:19 UTC

[sling-org-apache-sling-commons-crypto] 08/13: [checkstyle] (modifier) InterfaceMemberImpliedModifier

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 18f11d2eb767b52bfb683028ca18913c8ef1633a
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Tue Jul 13 22:12:27 2021 +0200

    [checkstyle] (modifier) InterfaceMemberImpliedModifier
---
 pmd-exclude.properties                             | 22 ++++++++++++++++++++++
 pom.xml                                            |  1 +
 .../apache/sling/commons/crypto/CryptoService.java |  4 ++--
 .../sling/commons/crypto/PasswordProvider.java     |  2 +-
 .../apache/sling/commons/crypto/SaltProvider.java  |  2 +-
 .../sling/commons/crypto/SecretKeyProvider.java    |  2 +-
 6 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/pmd-exclude.properties b/pmd-exclude.properties
new file mode 100644
index 0000000..2168b31
--- /dev/null
+++ b/pmd-exclude.properties
@@ -0,0 +1,22 @@
+################################################################################
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You under the Apache License, Version 2.0
+#    (the "License"); you may not use this file except in compliance with
+#    the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS,
+#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#    See the License for the specific language governing permissions and
+#    limitations under the License.
+#
+################################################################################
+org.apache.sling.commons.crypto.CryptoService=UnnecessaryModifier
+org.apache.sling.commons.crypto.PasswordProvider=UnnecessaryModifier
+org.apache.sling.commons.crypto.SaltProvider=UnnecessaryModifier
+org.apache.sling.commons.crypto.SecretKeyProvider=UnnecessaryModifier
diff --git a/pom.xml b/pom.xml
index 6c40c71..e7d2c51 100644
--- a/pom.xml
+++ b/pom.xml
@@ -126,6 +126,7 @@
         <version>3.14.0</version>
         <configuration>
           <targetJdk>${sling.java.version}</targetJdk>
+          <excludeFromFailureFile>pmd-exclude.properties</excludeFromFailureFile>
         </configuration>
         <executions>
           <execution>
diff --git a/src/main/java/org/apache/sling/commons/crypto/CryptoService.java b/src/main/java/org/apache/sling/commons/crypto/CryptoService.java
index fb300de..6cc54e7 100644
--- a/src/main/java/org/apache/sling/commons/crypto/CryptoService.java
+++ b/src/main/java/org/apache/sling/commons/crypto/CryptoService.java
@@ -33,7 +33,7 @@ public interface CryptoService {
      * @param message The message to encrypt
      * @return The encrypted message, the ciphertext
      */
-    @NotNull String encrypt(@NotNull final String message);
+    public abstract @NotNull String encrypt(@NotNull final String message);
 
     /**
      * Decrypts the given ciphertext.
@@ -41,6 +41,6 @@ public interface CryptoService {
      * @param ciphertext The encrypted message, the ciphertext to decrypt
      * @return The decrypted message
      */
-    @NotNull String decrypt(@NotNull final String ciphertext);
+    public abstract @NotNull String decrypt(@NotNull final String ciphertext);
 
 }
diff --git a/src/main/java/org/apache/sling/commons/crypto/PasswordProvider.java b/src/main/java/org/apache/sling/commons/crypto/PasswordProvider.java
index ad7aa8b..efa89dc 100644
--- a/src/main/java/org/apache/sling/commons/crypto/PasswordProvider.java
+++ b/src/main/java/org/apache/sling/commons/crypto/PasswordProvider.java
@@ -34,6 +34,6 @@ public interface PasswordProvider {
      *
      * @return The password
      */
-    char @NotNull [] getPassword();
+    public abstract char @NotNull [] getPassword();
 
 }
diff --git a/src/main/java/org/apache/sling/commons/crypto/SaltProvider.java b/src/main/java/org/apache/sling/commons/crypto/SaltProvider.java
index 0899aba..039350e 100644
--- a/src/main/java/org/apache/sling/commons/crypto/SaltProvider.java
+++ b/src/main/java/org/apache/sling/commons/crypto/SaltProvider.java
@@ -34,6 +34,6 @@ public interface SaltProvider {
      *
      * @return The salt
      */
-    byte @NotNull [] getSalt();
+    public abstract byte @NotNull [] getSalt();
 
 }
diff --git a/src/main/java/org/apache/sling/commons/crypto/SecretKeyProvider.java b/src/main/java/org/apache/sling/commons/crypto/SecretKeyProvider.java
index 9a0251f..d84aee4 100644
--- a/src/main/java/org/apache/sling/commons/crypto/SecretKeyProvider.java
+++ b/src/main/java/org/apache/sling/commons/crypto/SecretKeyProvider.java
@@ -36,6 +36,6 @@ public interface SecretKeyProvider {
      *
      * @return The secret key
      */
-    @NotNull SecretKey getSecretKey();
+    public abstract @NotNull SecretKey getSecretKey();
 
 }