kinow commented on code in PR #161:
URL: https://github.com/apache/commons-net/pull/161#discussion_r1249295029


##########
src/test/java/org/apache/commons/net/util/Base64Test.java:
##########
@@ -208,9 +241,10 @@ public void testEncodeObject() {
     }
 
     @Test
-    @Ignore
     public void testEncodeToString() {
-        fail("Not yet implemented");
+        final Base64 base64 = new Base64();
+        final byte[] bytesToEncode = new byte[] {'l', 'i', 'g', 'h', 't', ' ', 
'w', 'o', 'r'};

Review Comment:
   Random question here; was the example intended to be "light work" encoded? 
:slightly_smiling_face: Asking as it was used in the other tests, but doesn't 
really matter as this test is working fine :+1: 



##########
src/main/java/org/apache/commons/net/util/Base64.java:
##########
@@ -114,10 +114,10 @@ public class Base64 {
     // some state be preserved between calls of encode() and decode().
 
     /**
-     * Tests a given byte array to see if it contains only valid characters 
within the Base64 alphabet.
+     * Tests a given byte array to see if it contains any valid character 
within the Base64 alphabet.

Review Comment:
   Oh, I had to read the code to confirm it. To me the updated text looks 
correct, great catch!



##########
src/main/java/org/apache/commons/net/util/Base64.java:
##########
@@ -603,10 +603,10 @@ int avail() {
     }
 
     /**
-     * Decodes a byte[] containing characters in the Base64 alphabet.
+     * Decodes a byte array containing characters in the Base64 alphabet.
      *
      * @param pArray A byte array containing Base64 character data
-     * @return a byte array containing binary data
+     * @return a byte array containing binary data; will return {@code null} 
if provided byte array is null.

Review Comment:
   s/is null/is {@code null}



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to