From commits-return-64796-archive-asf-public=cust-asf.ponee.io@commons.apache.org Mon Oct 1 21:46:58 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 48E64180660 for ; Mon, 1 Oct 2018 21:46:57 +0200 (CEST) Received: (qmail 78832 invoked by uid 500); 1 Oct 2018 19:46:56 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 78822 invoked by uid 99); 1 Oct 2018 19:46:56 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Oct 2018 19:46:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DF6D1DFE18; Mon, 1 Oct 2018 19:46:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vanzin@apache.org To: commits@commons.apache.org Message-Id: <68fd60bfdf7243d6bbcf8965ee922662@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: commons-crypto git commit: Add clirr:check target to CI build. Date: Mon, 1 Oct 2018 19:46:55 +0000 (UTC) Repository: commons-crypto Updated Branches: refs/heads/master 057487902 -> ea5ecc369 Add clirr:check target to CI build. - add default implementations for new interface methods that were added - add an excludes file with an entry to ignore the current clirr failure - disable javancss plugin since it does not like java 8 default methods Closes #82 Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/ea5ecc36 Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/ea5ecc36 Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/ea5ecc36 Branch: refs/heads/master Commit: ea5ecc369edbf4ba91986e4ede0eea170d8c94c5 Parents: 0574879 Author: Marcelo Vanzin Authored: Mon Oct 1 12:46:23 2018 -0700 Committer: Marcelo Vanzin Committed: Mon Oct 1 12:46:23 2018 -0700 ---------------------------------------------------------------------- .travis.yml | 1 + clirr-excludes.xml | 26 ++++++++++++++++++++ pom.xml | 16 +++++++++++- .../commons/crypto/cipher/CryptoCipher.java | 16 +++++++----- 4 files changed, 52 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/ea5ecc36/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index dc97190..41d9766 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,6 +25,7 @@ before_install: script: - mvn apache-rat:check - mvn site + - mvn clirr:check after_success: - mvn clean test jacoco:report coveralls:report http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/ea5ecc36/clirr-excludes.xml ---------------------------------------------------------------------- diff --git a/clirr-excludes.xml b/clirr-excludes.xml new file mode 100644 index 0000000..f9709de --- /dev/null +++ b/clirr-excludes.xml @@ -0,0 +1,26 @@ + + + + + + org/apache/commons/crypto/cipher/CryptoCipher + 7012 + * + + http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/ea5ecc36/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index d0a0811..1277133 100644 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ org.apache.commons commons-parent - 43 + 47 org.apache.commons @@ -312,6 +312,13 @@ The following provides more details on the included cryptographic software: coveralls-maven-plugin 3.1.0 + + org.codehaus.mojo + clirr-maven-plugin + + ${basedir}/clirr-excludes.xml + + @@ -636,6 +643,13 @@ The following provides more details on the included cryptographic software: + + org.codehaus.mojo + javancss-maven-plugin + + true + + http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/ea5ecc36/src/main/java/org/apache/commons/crypto/cipher/CryptoCipher.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/crypto/cipher/CryptoCipher.java b/src/main/java/org/apache/commons/crypto/cipher/CryptoCipher.java index 668ef2f..722bc6c 100644 --- a/src/main/java/org/apache/commons/crypto/cipher/CryptoCipher.java +++ b/src/main/java/org/apache/commons/crypto/cipher/CryptoCipher.java @@ -34,7 +34,7 @@ import javax.crypto.ShortBufferException; * Note that implementations must provide a constructor that has 2 parameters: *
* a Properties instance and a String (transformation) - * + * */ public interface CryptoCipher extends Closeable { @@ -60,7 +60,7 @@ public interface CryptoCipher extends Closeable { /** * Initializes the cipher with mode, key and iv. * - * @param mode {@link javax.crypto.Cipher#ENCRYPT_MODE} or + * @param mode {@link javax.crypto.Cipher#ENCRYPT_MODE} or * {@link javax.crypto.Cipher#DECRYPT_MODE} * @param key crypto key for the cipher * @param params the algorithm parameters @@ -177,8 +177,10 @@ public interface CryptoCipher extends Closeable { * has not been overridden by an implementation * */ - void updateAAD(byte[] aad) - throws IllegalArgumentException, IllegalStateException, UnsupportedOperationException; + default void updateAAD(byte[] aad) + throws IllegalArgumentException, IllegalStateException, UnsupportedOperationException { + throw new UnsupportedOperationException(); + } /** * Continues a multi-part update of the Additional Authentication @@ -203,6 +205,8 @@ public interface CryptoCipher extends Closeable { * has not been overridden by an implementation * */ - void updateAAD(ByteBuffer aad) - throws IllegalArgumentException, IllegalStateException, UnsupportedOperationException; + default void updateAAD(ByteBuffer aad) + throws IllegalArgumentException, IllegalStateException, UnsupportedOperationException { + throw new UnsupportedOperationException(); + } }