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

dkulp pushed a commit to branch 3.5.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 7a3d7806bb56e376361f61c1f99d8ba12d003486
Author: Daniel Kulp <d...@kulp.com>
AuthorDate: Wed Dec 7 12:23:58 2022 -0500

    Fix compile failures
---
 core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java | 2 ++
 core/src/test/java/org/apache/cxf/attachment/AttachmentUtilTest.java   | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java 
b/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
index 9c9278e218..dbc6efa94f 100644
--- a/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
+++ b/core/src/main/java/org/apache/cxf/attachment/AttachmentSerializer.java
@@ -393,6 +393,8 @@ public class AttachmentSerializer {
             return decode(s, charset);
         } catch (IllegalArgumentException ex) {
             return s;
+        } catch (UnsupportedEncodingException ex) {
+            return s;
         }
     }
 }
diff --git 
a/core/src/test/java/org/apache/cxf/attachment/AttachmentUtilTest.java 
b/core/src/test/java/org/apache/cxf/attachment/AttachmentUtilTest.java
index 6b3285c810..466cae2fab 100644
--- a/core/src/test/java/org/apache/cxf/attachment/AttachmentUtilTest.java
+++ b/core/src/test/java/org/apache/cxf/attachment/AttachmentUtilTest.java
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.math.BigInteger;
 import java.net.URLEncoder;
-import java.nio.charset.StandardCharsets;
 
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.message.Message;
@@ -179,7 +178,7 @@ public class AttachmentUtilTest {
         String url = "http://"; + domain + "/a/b/c";
 
         String actual = AttachmentUtil.createContentID(url);
-        assertThat(actual, endsWith("@" + URLEncoder.encode(domain, 
StandardCharsets.UTF_8)));
+        assertThat(actual, endsWith("@" + URLEncoder.encode(domain, "UTF-8")));
     }
 
     private CachedOutputStream testSetStreamedAttachmentProperties(final 
String property, final Object value)

Reply via email to