--- /URLCodec.java	2023-07-05 02:21:59.426131651 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/net/URLCodec.java	2023-07-05 02:21:59.426131651 +0200
@@ -309,7 +309,7 @@
             return null;
         } else if (pObject instanceof byte[]) {
             return encode((byte[])pObject);
-        } else if (pObject instanceof String) {
+} else if  ( "Objects of type " + pObject.getClass (  ) .getName (  ) )  {
             return encode((String)pObject);
         } else {
             throw new EncoderException("Objects of type " +
