You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/12/09 20:08:41 UTC

[commons-crypto] branch master updated: Remove unused imports and clean up

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

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


The following commit(s) were added to refs/heads/master by this push:
     new e4b05cb  Remove unused imports and clean up
e4b05cb is described below

commit e4b05cb0667302c2d64633e44a9021ca1df49ebe
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Dec 9 15:08:37 2022 -0500

    Remove unused imports and clean up
---
 .../java/org/apache/commons/crypto/jna/OpenSslInterfaceNativeJna.java | 2 +-
 src/main/java/org/apache/commons/crypto/stream/input/StreamInput.java | 4 ++--
 src/test/java/org/apache/commons/crypto/cipher/GcmCipherTest.java     | 1 -
 src/test/java/org/apache/commons/crypto/cipher/OpenSslCipherTest.java | 1 -
 src/test/java/org/apache/commons/crypto/jna/OpenSslNativeJnaTest.java | 4 ++--
 .../org/apache/commons/crypto/stream/AbstractCipherStreamTest.java    | 1 -
 .../apache/commons/crypto/stream/PositionedCryptoInputStreamTest.java | 1 -
 7 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/main/java/org/apache/commons/crypto/jna/OpenSslInterfaceNativeJna.java b/src/main/java/org/apache/commons/crypto/jna/OpenSslInterfaceNativeJna.java
index 76ee83b..97d3d4a 100644
--- a/src/main/java/org/apache/commons/crypto/jna/OpenSslInterfaceNativeJna.java
+++ b/src/main/java/org/apache/commons/crypto/jna/OpenSslInterfaceNativeJna.java
@@ -20,8 +20,8 @@ package org.apache.commons.crypto.jna;
 
 import java.nio.ByteBuffer;
 
-import com.sun.jna.ptr.PointerByReference;
 import com.sun.jna.NativeLong;
+import com.sun.jna.ptr.PointerByReference;
 
 /**
  * This interface defines the API for the native code.
diff --git a/src/main/java/org/apache/commons/crypto/stream/input/StreamInput.java b/src/main/java/org/apache/commons/crypto/stream/input/StreamInput.java
index 3727017..18d468d 100644
--- a/src/main/java/org/apache/commons/crypto/stream/input/StreamInput.java
+++ b/src/main/java/org/apache/commons/crypto/stream/input/StreamInput.java
@@ -17,12 +17,12 @@
  */
 package org.apache.commons.crypto.stream.input;
 
+import static org.apache.commons.crypto.stream.CryptoInputStream.EOS;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
 
-import static org.apache.commons.crypto.stream.CryptoInputStream.EOS;
-
  /**
  * The StreamInput class takes a {@code InputStream} object and wraps it as
  * {@code Input} object acceptable by {@code CryptoInputStream}.
diff --git a/src/test/java/org/apache/commons/crypto/cipher/GcmCipherTest.java b/src/test/java/org/apache/commons/crypto/cipher/GcmCipherTest.java
index 35ce2cf..13a5591 100644
--- a/src/test/java/org/apache/commons/crypto/cipher/GcmCipherTest.java
+++ b/src/test/java/org/apache/commons/crypto/cipher/GcmCipherTest.java
@@ -30,7 +30,6 @@ import java.util.Random;
 import javax.crypto.AEADBadTagException;
 import javax.crypto.Cipher;
 import javax.crypto.spec.GCMParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
 import javax.xml.bind.DatatypeConverter;
 
 import org.apache.commons.crypto.utils.AES;
diff --git a/src/test/java/org/apache/commons/crypto/cipher/OpenSslCipherTest.java b/src/test/java/org/apache/commons/crypto/cipher/OpenSslCipherTest.java
index a234e89..e4f2c12 100644
--- a/src/test/java/org/apache/commons/crypto/cipher/OpenSslCipherTest.java
+++ b/src/test/java/org/apache/commons/crypto/cipher/OpenSslCipherTest.java
@@ -34,7 +34,6 @@ import javax.crypto.NoSuchPaddingException;
 import javax.crypto.ShortBufferException;
 import javax.crypto.spec.GCMParameterSpec;
 import javax.crypto.spec.IvParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.commons.crypto.utils.AES;
 import org.junit.jupiter.api.Test;
diff --git a/src/test/java/org/apache/commons/crypto/jna/OpenSslNativeJnaTest.java b/src/test/java/org/apache/commons/crypto/jna/OpenSslNativeJnaTest.java
index f6ae77e..60bcea1 100644
--- a/src/test/java/org/apache/commons/crypto/jna/OpenSslNativeJnaTest.java
+++ b/src/test/java/org/apache/commons/crypto/jna/OpenSslNativeJnaTest.java
@@ -18,11 +18,11 @@
 
 package org.apache.commons.crypto.jna;
 
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestReporter;
 
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
 public class OpenSslNativeJnaTest {
 
     @Test
diff --git a/src/test/java/org/apache/commons/crypto/stream/AbstractCipherStreamTest.java b/src/test/java/org/apache/commons/crypto/stream/AbstractCipherStreamTest.java
index 4b77812..c7018bb 100644
--- a/src/test/java/org/apache/commons/crypto/stream/AbstractCipherStreamTest.java
+++ b/src/test/java/org/apache/commons/crypto/stream/AbstractCipherStreamTest.java
@@ -44,7 +44,6 @@ import java.util.concurrent.TimeUnit;
 
 import javax.crypto.spec.GCMParameterSpec;
 import javax.crypto.spec.IvParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.commons.crypto.Crypto;
 import org.apache.commons.crypto.cipher.AbstractCipherTest;
diff --git a/src/test/java/org/apache/commons/crypto/stream/PositionedCryptoInputStreamTest.java b/src/test/java/org/apache/commons/crypto/stream/PositionedCryptoInputStreamTest.java
index c6bfff7..e7f99e3 100644
--- a/src/test/java/org/apache/commons/crypto/stream/PositionedCryptoInputStreamTest.java
+++ b/src/test/java/org/apache/commons/crypto/stream/PositionedCryptoInputStreamTest.java
@@ -34,7 +34,6 @@ import java.util.Properties;
 import java.util.Random;
 
 import javax.crypto.spec.IvParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.commons.crypto.Crypto;
 import org.apache.commons.crypto.cipher.AbstractCipherTest;