You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2016/05/20 12:37:05 UTC

svn commit: r1744726 [1/3] - in /commons/proper/codec/trunk: ./ src/main/java/org/apache/commons/codec/binary/ src/test/java/org/apache/commons/codec/binary/

Author: sebb
Date: Fri May 20 12:37:05 2016
New Revision: 1744726

URL: http://svn.apache.org/viewvc?rev=1744726&view=rev
Log:
Tab police

Modified:
    commons/proper/codec/trunk/build.xml
    commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base32Test.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base64Test.java
    commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java

Modified: commons/proper/codec/trunk/build.xml
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/build.xml?rev=1744726&r1=1744725&r2=1744726&view=diff
==============================================================================
--- commons/proper/codec/trunk/build.xml (original)
+++ commons/proper/codec/trunk/build.xml Fri May 20 12:37:05 2016
@@ -56,8 +56,8 @@ limitations under the License.
         <javac srcdir="${source.home}" destdir="${build.home}/classes"
             source="${compile.source}" target="${compile.target}"
             debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" 
-			includeantruntime="${compile.includeantruntime}"
-			encoding="${compile.encoding}">
+            includeantruntime="${compile.includeantruntime}"
+            encoding="${compile.encoding}">
             <classpath refid="compile.classpath"/>
         </javac>
         <copy todir="${build.home}/classes" filtering="on">
@@ -91,7 +91,7 @@ limitations under the License.
             bottom="${component.name} version ${component.version} - Copyright &amp;copy; 2002-${current.year} - Apache Software Foundation"
             use="true"
             link="http://download.oracle.com/javase/1.5.0/docs/api/"
-			encoding="${compile.encoding}">
+            encoding="${compile.encoding}">
             <classpath refid="compile.classpath"/>
         </javadoc>
     </target>
@@ -192,8 +192,8 @@ limitations under the License.
         <javac srcdir="${test.home}" destdir="${build.home}/tests"
             source="${compile.source}" target="${compile.target}"
             debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" 
-			includeantruntime="${compile.includeantruntime}"
-			encoding="${compile.encoding}">
+            includeantruntime="${compile.includeantruntime}"
+            encoding="${compile.encoding}">
             <classpath refid="test.classpath"/>
         </javac>
         <copy todir="${build.home}/tests" filtering="on">

Modified: commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java?rev=1744726&r1=1744725&r2=1744726&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java (original)
+++ commons/proper/codec/trunk/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java Fri May 20 12:37:05 2016
@@ -429,19 +429,19 @@ public abstract class BaseNCodec impleme
         return encode(pArray, 0, pArray.length);
     }
 
-	/**
-	 * Encodes a byte[] containing binary data, into a byte[] containing
-	 * characters in the alphabet.
-	 *
-	 * @param pArray
-	 *            a byte array containing binary data
-	 * @param offset
-	 *            initial offset of the subarray.
-	 * @param length
-	 *            length of the subarray.
-	 * @return A byte array containing only the base N alphabetic character data
-	 * @since 1.11
-	 */
+    /**
+     * Encodes a byte[] containing binary data, into a byte[] containing
+     * characters in the alphabet.
+     *
+     * @param pArray
+     *            a byte array containing binary data
+     * @param offset
+     *            initial offset of the subarray.
+     * @param length
+     *            length of the subarray.
+     * @return A byte array containing only the base N alphabetic character data
+     * @since 1.11
+     */
     public byte[] encode(final byte[] pArray, int offset, int length) {
         if (pArray == null || pArray.length == 0) {
             return pArray;

Modified: commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base32Test.java
URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base32Test.java?rev=1744726&r1=1744725&r2=1744726&view=diff
==============================================================================
--- commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base32Test.java (original)
+++ commons/proper/codec/trunk/src/test/java/org/apache/commons/codec/binary/Base32Test.java Fri May 20 12:37:05 2016
@@ -75,30 +75,30 @@ public class Base32Test {
         {"foobar" ,"MZXW6YTBOI%%%%%%"},
     };
 
-	@Test
-	public void testBase64AtBufferStart() {
-		testBase64InBuffer(0, 100);
-	}
+    @Test
+    public void testBase64AtBufferStart() {
+        testBase64InBuffer(0, 100);
+    }
 
-	@Test
-	public void testBase64AtBufferEnd() {
-		testBase64InBuffer(100, 0);
-	}
+    @Test
+    public void testBase64AtBufferEnd() {
+        testBase64InBuffer(100, 0);
+    }
 
-	@Test
-	public void testBase64AtBufferMiddle() {
-		testBase64InBuffer(100, 100);
-	}
+    @Test
+    public void testBase64AtBufferMiddle() {
+        testBase64InBuffer(100, 100);
+    }
 
-	private void testBase64InBuffer(int startPasSize, int endPadSize) {
-		final Base32 codec = new Base32();
-		for (final String[] element : BASE32_TEST_CASES) {
-			final byte[] bytes = element[0].getBytes(CHARSET_UTF8);
-			byte[] buffer = ArrayUtils.addAll(bytes, new byte[endPadSize]);
-			buffer = ArrayUtils.addAll(new byte[startPasSize], buffer);
-			assertEquals(element[1], StringUtils.newStringUtf8(codec.encode(buffer, startPasSize, bytes.length)));
-		}
-	}
+    private void testBase64InBuffer(int startPasSize, int endPadSize) {
+        final Base32 codec = new Base32();
+        for (final String[] element : BASE32_TEST_CASES) {
+            final byte[] bytes = element[0].getBytes(CHARSET_UTF8);
+            byte[] buffer = ArrayUtils.addAll(bytes, new byte[endPadSize]);
+            buffer = ArrayUtils.addAll(new byte[startPasSize], buffer);
+            assertEquals(element[1], StringUtils.newStringUtf8(codec.encode(buffer, startPasSize, bytes.length)));
+        }
+    }
 
     @Test
     public void testBase32Chunked () throws Exception {