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 2023/08/19 12:39:04 UTC

[commons-codec] branch master updated (b18a246c -> 3acdc6c2)

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 b18a246c Better test class name
     new 6723ed42 Update commons.bc.version
     new 3acdc6c2 JApiCmp complains but shouldn't?

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                                            |  5 +-
 .../java/org/apache/commons/codec/net/BCodec.java  |  2 +-
 .../java/org/apache/commons/codec/net/QCodec.java  |  2 +-
 ...AbstractRFC1522Codec.java => RFC1522Codec.java} |  2 +-
 .../commons/codec/net/CustomRFC1522Codec.java      | 61 ++++++++++++++++++++++
 .../apache/commons/codec/net/RFC1522CodecTest.java |  2 +-
 6 files changed, 67 insertions(+), 7 deletions(-)
 rename src/main/java/org/apache/commons/codec/net/{AbstractRFC1522Codec.java => RFC1522Codec.java} (99%)
 create mode 100644 src/test/java/org/apache/commons/codec/net/CustomRFC1522Codec.java


[commons-codec] 01/02: Update commons.bc.version

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 6723ed427a5a5cdea199778c6c47a8d7ed84d99e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 19 08:33:54 2023 -0400

    Update commons.bc.version
---
 pom.xml | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index 4ff97a0b..2c2e2789 100644
--- a/pom.xml
+++ b/pom.xml
@@ -271,12 +271,11 @@ limitations under the License.
     <commons.encoding>UTF-8</commons.encoding>
     <checkstyle.header.file>${basedir}/src/conf/checkstyle-header.txt</checkstyle.header.file>
     <checkstyle.config.file>${basedir}/src/conf/checkstyle.xml</checkstyle.config.file>
-    <japicmp.skip>false</japicmp.skip>
     <jacoco.skip>false</jacoco.skip>
     <!-- Commons Release Plugin -->
     <commons.release.version>1.16.0</commons.release.version>
-    <commons.bc.version>1.15</commons.bc.version>
-    <commons.rc.version>RC2</commons.rc.version>
+    <commons.bc.version>1.16.0</commons.bc.version>
+    <commons.rc.version>R1</commons.rc.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-codec] 02/02: JApiCmp complains but shouldn't?

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 3acdc6c2ff65a0bc8c02b3f0c7e0d8b64adc0548
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Aug 19 08:39:00 2023 -0400

    JApiCmp complains but shouldn't?
---
 .../java/org/apache/commons/codec/net/BCodec.java  |  2 +-
 .../java/org/apache/commons/codec/net/QCodec.java  |  2 +-
 ...AbstractRFC1522Codec.java => RFC1522Codec.java} |  2 +-
 .../commons/codec/net/CustomRFC1522Codec.java      | 61 ++++++++++++++++++++++
 .../apache/commons/codec/net/RFC1522CodecTest.java |  2 +-
 5 files changed, 65 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/apache/commons/codec/net/BCodec.java b/src/main/java/org/apache/commons/codec/net/BCodec.java
index 55f1bc00..943f2ea8 100644
--- a/src/main/java/org/apache/commons/codec/net/BCodec.java
+++ b/src/main/java/org/apache/commons/codec/net/BCodec.java
@@ -46,7 +46,7 @@ import org.apache.commons.codec.binary.BaseNCodec;
  *
  * @since 1.3
  */
-public class BCodec extends AbstractRFC1522Codec implements StringEncoder, StringDecoder {
+public class BCodec extends RFC1522Codec implements StringEncoder, StringDecoder {
 
     /**
      * The default decoding policy.
diff --git a/src/main/java/org/apache/commons/codec/net/QCodec.java b/src/main/java/org/apache/commons/codec/net/QCodec.java
index a1259ad3..6717cf78 100644
--- a/src/main/java/org/apache/commons/codec/net/QCodec.java
+++ b/src/main/java/org/apache/commons/codec/net/QCodec.java
@@ -50,7 +50,7 @@ import org.apache.commons.codec.StringEncoder;
  *
  * @since 1.3
  */
-public class QCodec extends AbstractRFC1522Codec implements StringEncoder, StringDecoder {
+public class QCodec extends RFC1522Codec implements StringEncoder, StringDecoder {
     /**
      * The default Charset used for string decoding and encoding.
      */
diff --git a/src/main/java/org/apache/commons/codec/net/AbstractRFC1522Codec.java b/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java
similarity index 99%
rename from src/main/java/org/apache/commons/codec/net/AbstractRFC1522Codec.java
rename to src/main/java/org/apache/commons/codec/net/RFC1522Codec.java
index 72cc0523..2a16aa38 100644
--- a/src/main/java/org/apache/commons/codec/net/AbstractRFC1522Codec.java
+++ b/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java
@@ -40,7 +40,7 @@ import org.apache.commons.codec.binary.StringUtils;
  *
  * @since 1.3
  */
-abstract class AbstractRFC1522Codec {
+abstract class RFC1522Codec {
 
     /** Separator. */
     protected static final char SEP = '?';
diff --git a/src/test/java/org/apache/commons/codec/net/CustomRFC1522Codec.java b/src/test/java/org/apache/commons/codec/net/CustomRFC1522Codec.java
new file mode 100644
index 00000000..b3280348
--- /dev/null
+++ b/src/test/java/org/apache/commons/codec/net/CustomRFC1522Codec.java
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+package org.apache.commons.codec.net;
+
+import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
+
+import org.apache.commons.codec.DecoderException;
+import org.apache.commons.codec.EncoderException;
+
+/**
+ * Tests overriding the package private AbstractRFC1522Codec.
+ */
+public class CustomRFC1522Codec extends RFC1522Codec {
+
+    @Override
+    protected String getEncoding() {
+        return null;
+    }
+
+    @Override
+    protected byte[] doEncoding(byte[] bytes) throws EncoderException {
+        return null;
+    }
+
+    @Override
+    protected byte[] doDecoding(byte[] bytes) throws DecoderException {
+        return null;
+    }
+
+    @Override
+    protected String encodeText(String text, Charset charset) throws EncoderException {
+        return super.encodeText(text, charset);
+    }
+
+    @Override
+    protected String encodeText(String text, String charsetName) throws EncoderException, UnsupportedEncodingException {
+        return super.encodeText(text, charsetName);
+    }
+
+    @Override
+    protected String decodeText(String text) throws DecoderException, UnsupportedEncodingException {
+        return super.decodeText(text);
+    }
+
+}
diff --git a/src/test/java/org/apache/commons/codec/net/RFC1522CodecTest.java b/src/test/java/org/apache/commons/codec/net/RFC1522CodecTest.java
index d5dcf8a5..28b80bb0 100644
--- a/src/test/java/org/apache/commons/codec/net/RFC1522CodecTest.java
+++ b/src/test/java/org/apache/commons/codec/net/RFC1522CodecTest.java
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.Test;
  */
 public class RFC1522CodecTest {
 
-    static class RFC1522TestCodec extends AbstractRFC1522Codec {
+    static class RFC1522TestCodec extends RFC1522Codec {
 
         @Override
         protected byte[] doDecoding(final byte[] bytes) {