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 2019/12/26 13:51:24 UTC

[commons-codec] branch master updated (0ec741f -> ac7a700)

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

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


    from 0ec741f  Javadoc.
     new 17d8f33  Use final.
     new ac7a700  Prepare for next release.

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:
 pom.xml                                                      | 12 ++++++------
 .../java/org/apache/commons/codec/binary/BaseNCodec.java     |  4 ++--
 .../java/org/apache/commons/codec/digest/MurmurHash3.java    |  4 ++--
 .../java/org/apache/commons/codec/binary/Base32Test.java     |  2 +-
 .../java/org/apache/commons/codec/binary/Base64Test.java     |  4 ++--
 .../java/org/apache/commons/codec/binary/BaseNCodecTest.java | 12 ++++++------
 src/test/java/org/apache/commons/codec/binary/HexTest.java   |  2 +-
 .../org/apache/commons/codec/digest/MurmurHash3Test.java     | 10 +++++-----
 8 files changed, 25 insertions(+), 25 deletions(-)


[commons-codec] 02/02: Prepare for next release.

Posted by gg...@apache.org.
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-codec.git

commit ac7a700094c772aed0668273c31477cb8751c2cf
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Dec 26 08:51:20 2019 -0500

    Prepare for next release.
    
    - Update Apache Commons Parent from 48 to 50.
    - Update JApiCmp from 0.14.1 to 0.14.3.
    - Update JaCoCo from 0.8.4 to 0.8.5.
    - Update release plugin from 1.5 to 1.7.
    - Update BC version from 1.12 to 1.13.
    - Reuse parent property commons.pmd.version.
---
 pom.xml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/pom.xml b/pom.xml
index f63db04..43a17f5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@ limitations under the License.
   <parent>
     <groupId>org.apache.commons</groupId>
     <artifactId>commons-parent</artifactId>
-    <version>48</version>
+    <version>50</version>
   </parent>
   <groupId>commons-codec</groupId>
   <artifactId>commons-codec</artifactId>
@@ -240,17 +240,17 @@ limitations under the License.
     <commons.encoding>UTF-8</commons.encoding>
     <checkstyle.header.file>${basedir}/LICENSE-header.txt</checkstyle.header.file>
     <checkstyle.version>2.17</checkstyle.version>
-    <commons.japicmp.version>0.14.1</commons.japicmp.version>
-    <commons.jacoco.version>0.8.4</commons.jacoco.version>
+    <commons.japicmp.version>0.14.3</commons.japicmp.version>
+    <commons.jacoco.version>0.8.5</commons.jacoco.version>
 
     <!-- generate report even if there are binary incompatible changes -->
     <commons.japicmp.breakBuildOnBinaryIncompatibleModifications>false</commons.japicmp.breakBuildOnBinaryIncompatibleModifications>
     <japicmp.skip>false</japicmp.skip>
 
     <!-- Commons Release Plugin -->
-    <commons.bc.version>1.12</commons.bc.version>
+    <commons.bc.version>1.13</commons.bc.version>
     <commons.rc.version>RC1</commons.rc.version>
-    <commons.release-plugin.version>1.5</commons.release-plugin.version>
+    <commons.release-plugin.version>1.7</commons.release-plugin.version>
     <commons.release.isDistModule>true</commons.release.isDistModule>
     <commons.distSvnStagingUrl>scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}</commons.distSvnStagingUrl>
     <commons.releaseManagerName>Gary Gregory</commons.releaseManagerName>    
@@ -362,7 +362,7 @@ limitations under the License.
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-pmd-plugin</artifactId>
-        <version>3.12.0</version>
+        <version>${commons.pmd.version}</version>
         <configuration>
           <targetJdk>${maven.compiler.target}</targetJdk>
           <linkXref>true</linkXref>


[commons-codec] 01/02: Use final.

Posted by gg...@apache.org.
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-codec.git

commit 17d8f331a0dafd731a99254a2dd2b6aba2fc0317
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Dec 26 08:46:14 2019 -0500

    Use final.
---
 .../java/org/apache/commons/codec/binary/BaseNCodec.java     |  4 ++--
 .../java/org/apache/commons/codec/digest/MurmurHash3.java    |  4 ++--
 .../java/org/apache/commons/codec/binary/Base32Test.java     |  2 +-
 .../java/org/apache/commons/codec/binary/Base64Test.java     |  4 ++--
 .../java/org/apache/commons/codec/binary/BaseNCodecTest.java | 12 ++++++------
 src/test/java/org/apache/commons/codec/binary/HexTest.java   |  2 +-
 .../org/apache/commons/codec/digest/MurmurHash3Test.java     | 10 +++++-----
 7 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java b/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
index 065f5ef..016a9e8 100644
--- a/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
+++ b/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
@@ -289,7 +289,7 @@ public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder {
      *         a value greater than {@code 0} if {@code x > y} as
      *         unsigned values
      */
-    private static int compareUnsigned(int x, int y) {
+    private static int compareUnsigned(final int x, final int y) {
         return Integer.compare(x + Integer.MIN_VALUE, y + Integer.MIN_VALUE);
     }
 
@@ -302,7 +302,7 @@ public abstract class BaseNCodec implements BinaryEncoder, BinaryDecoder {
      * @return the capacity
      * @throws OutOfMemoryError if the {@code minCapacity} is negative
      */
-    private static int createPositiveCapacity(int minCapacity) {
+    private static int createPositiveCapacity(final int minCapacity) {
         if (minCapacity < 0) {
             // overflow
             throw new OutOfMemoryError("Unable to allocate array size: " + (minCapacity & 0xffffffffL));
diff --git a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
index 1507b00..65f174d 100644
--- a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
+++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
@@ -1104,7 +1104,7 @@ public final class MurmurHash3 {
          * @param totalLen The total number of input bytes added since the start.
          * @return The 32-bit hash
          */
-        int finalise(int hash, int unprocessedLength, byte[] unprocessed, int totalLen) {
+        int finalise(final int hash, final int unprocessedLength, final byte[] unprocessed, final int totalLen) {
             int result = hash;
             int k1 = 0;
             switch (unprocessedLength) {
@@ -1169,7 +1169,7 @@ public final class MurmurHash3 {
          */
         @Override
         @Deprecated
-        int finalise(int hash, int unprocessedLength, byte[] unprocessed, int totalLen) {
+        int finalise(final int hash, final int unprocessedLength, final byte[] unprocessed, final int totalLen) {
             int result = hash;
             // ************
             // Note: This fails to apply masking using 0xff to the 3 remaining bytes.
diff --git a/src/test/java/org/apache/commons/codec/binary/Base32Test.java b/src/test/java/org/apache/commons/codec/binary/Base32Test.java
index de62be8..360f221 100644
--- a/src/test/java/org/apache/commons/codec/binary/Base32Test.java
+++ b/src/test/java/org/apache/commons/codec/binary/Base32Test.java
@@ -347,7 +347,7 @@ public class Base32Test {
      *
      * @param nbits the number of trailing bits (must be a factor of 5 and {@code <40})
      */
-    private static void assertBase32DecodingOfTrailingBits(int nbits) {
+    private static void assertBase32DecodingOfTrailingBits(final int nbits) {
         final Base32 codec = new Base32();
         // Create the encoded bytes. The first characters must be valid so fill with 'zero'.
         final byte[] encoded = new byte[nbits / 5];
diff --git a/src/test/java/org/apache/commons/codec/binary/Base64Test.java b/src/test/java/org/apache/commons/codec/binary/Base64Test.java
index 3a4af93..d4a63fc 100644
--- a/src/test/java/org/apache/commons/codec/binary/Base64Test.java
+++ b/src/test/java/org/apache/commons/codec/binary/Base64Test.java
@@ -1347,7 +1347,7 @@ public class Base64Test {
      *
      * @param nbits the number of trailing bits (must be a factor of 6 and {@code <24})
      */
-    private static void assertBase64DecodingOfTrailingBits(int nbits) {
+    private static void assertBase64DecodingOfTrailingBits(final int nbits) {
         final Base64 codec = new Base64();
         // Create the encoded bytes. The first characters must be valid so fill with 'zero'.
         final byte[] encoded = new byte[nbits / 6];
@@ -1390,7 +1390,7 @@ public class Base64Test {
 
         // Expecting a size of 4 output bytes per 3 input bytes plus the trailing bytes
         // padded to a block size of 4.
-        int blocks = (int) Math.ceil(size1GiB / 3.0);
+        final int blocks = (int) Math.ceil(size1GiB / 3.0);
         final int expectedLength = 4 * blocks;
 
         // This test is memory hungry. Check we can run it.
diff --git a/src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java b/src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java
index 3e8d6dc..6a4c305 100644
--- a/src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java
+++ b/src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java
@@ -249,7 +249,7 @@ public class BaseNCodecTest {
         assertEnsureBufferSizeExpandsToMaxBufferSize(true);
     }
 
-    private static void assertEnsureBufferSizeExpandsToMaxBufferSize(boolean exceedMaxBufferSize) {
+    private static void assertEnsureBufferSizeExpandsToMaxBufferSize(final boolean exceedMaxBufferSize) {
         // This test is memory hungry.
         // By default expansion will double the buffer size.
         // Using a buffer that must be doubled to get close to 2GiB requires at least 3GiB
@@ -298,11 +298,11 @@ public class BaseNCodecTest {
     /**
      * Verify this VM can allocate the given size byte array. Otherwise skip the test.
      */
-    private static void assumeCanAllocateBufferSize(int size) {
+    private static void assumeCanAllocateBufferSize(final int size) {
         byte[] bytes = null;
         try {
             bytes = new byte[size];
-        } catch (OutOfMemoryError ignore) {
+        } catch (final OutOfMemoryError ignore) {
             // ignore
         }
         Assume.assumeTrue("Cannot allocate array of size: " + size, bytes != null);
@@ -352,15 +352,15 @@ public class BaseNCodecTest {
         }
 
         @Override
-        void encode(byte[] pArray, int i, int length, Context context) {
+        void encode(final byte[] pArray, final int i, final int length, final Context context) {
         }
 
         @Override
-        void decode(byte[] pArray, int i, int length, Context context) {
+        void decode(final byte[] pArray, final int i, final int length, final Context context) {
         }
 
         @Override
-        protected boolean isInAlphabet(byte value) {
+        protected boolean isInAlphabet(final byte value) {
             return false;
         }
     }
diff --git a/src/test/java/org/apache/commons/codec/binary/HexTest.java b/src/test/java/org/apache/commons/codec/binary/HexTest.java
index 0acde5b..be50718 100644
--- a/src/test/java/org/apache/commons/codec/binary/HexTest.java
+++ b/src/test/java/org/apache/commons/codec/binary/HexTest.java
@@ -68,7 +68,7 @@ public class HexTest {
      * @param string the String to encode
      * @return the byte buffer
      */
-    private ByteBuffer getByteBufferUtf8(String string) {
+    private ByteBuffer getByteBufferUtf8(final String string) {
         final byte[] bytes = string.getBytes(StandardCharsets.UTF_8);
         final ByteBuffer bb = allocate(bytes.length);
         bb.put(bytes);
diff --git a/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java b/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java
index 4ba16cf..4703f9f 100644
--- a/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java
+++ b/src/test/java/org/apache/commons/codec/digest/MurmurHash3Test.java
@@ -322,7 +322,7 @@ public class MurmurHash3Test {
      * @param length the length
      * @return true, if negative bytes exist
      */
-    private static boolean negativeBytes(byte[] bytes, int start, int length) {
+    private static boolean negativeBytes(final byte[] bytes, final int start, final int length) {
         for (int i = start; i < start + length; i++) {
             if (bytes[i] < 0) {
                 return true;
@@ -798,7 +798,7 @@ public class MurmurHash3Test {
      * @param seed the seed
      * @param blocks the blocks
      */
-    private static void assertIncrementalHash32(byte[] bytes, int seed, int... blocks) {
+    private static void assertIncrementalHash32(final byte[] bytes, final int seed, final int... blocks) {
         int offset = 0;
         int total = 0;
         final IncrementalHash32 inc = new IncrementalHash32();
@@ -856,7 +856,7 @@ public class MurmurHash3Test {
      * @param seed the seed
      * @param blocks the blocks
      */
-    private static void assertIncrementalHash32x86(byte[] bytes, int seed, int... blocks) {
+    private static void assertIncrementalHash32x86(final byte[] bytes, final int seed, final int... blocks) {
         int offset = 0;
         int total = 0;
         final IncrementalHash32x86 inc = new IncrementalHash32x86();
@@ -878,8 +878,8 @@ public class MurmurHash3Test {
      * @param maxLength the max length
      * @return the blocks
      */
-    private static int[] createRandomBlocks(int maxLength) {
-        int[] blocks = new int[20];
+    private static int[] createRandomBlocks(final int maxLength) {
+        final int[] blocks = new int[20];
         int count = 0;
         int length = 0;
         while (count < blocks.length && length < maxLength) {