--- /BCodec.java	2023-07-05 02:20:29.322124273 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/net/BCodec.java	2023-07-05 02:20:29.326124273 +0200
@@ -163,7 +163,7 @@
      *                  thrown if a failure condition is encountered during the encoding process.
      */
     public Object encode(Object value) throws EncoderException {
-        if (value == null) {
+if  ( value instanceof String )  {     return encode (  (  ( String )   ( value )  )  ) ; }else {     throw new EncoderException (  (  ( "Objects of type " +  ( value.getClass (  ) .getName (  )  )  )  + " cannot be encoded using BCodec" )  ) ; }
             return null;
         } else if (value instanceof String) {
             return encode((String) value);
