pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msahy...@apache.org
Subject svn commit: r1666733 - in /pdfbox/trunk/pdfbox/src: main/java/org/apache/pdfbox/pdmodel/graphics/color/ test/java/org/apache/pdfbox/io/ test/java/org/apache/pdfbox/pdfparser/
Date Sat, 14 Mar 2015 19:26:18 GMT
Author: msahyoun
Date: Sat Mar 14 19:26:18 2015
New Revision: 1666733

URL: http://svn.apache.org/r1666733
Log:
PDFBOX-2576 fix bracket position in Array declaration

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/io/TestRandomAccessFileOutputStream.java
    pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/EndstreamOutputStreamTest.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java?rev=1666733&r1=1666732&r2=1666733&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDSeparation.java
Sat Mar 14 19:26:18 2015
@@ -129,7 +129,7 @@ public class PDSeparation extends PDSpec
             for (int x = 0; x < width; x++)
             {
                 raster.getPixel(x, y, samples);
-                int alt[] = calculatedValues.get(hash = Float.floatToIntBits(samples[0]));
+                int[] alt = calculatedValues.get(hash = Float.floatToIntBits(samples[0]));
                 if (alt == null)
                 {
                     alt = new int[numAltComponents];
@@ -144,10 +144,10 @@ public class PDSeparation extends PDSpec
         return alternateColorSpace.toRGBImage(altRaster);
     }
 
-    protected void tintTransform(float samples[], int alt[]) throws IOException
+    protected void tintTransform(float[] samples, int[] alt) throws IOException
     {
         samples[0] /= 255; // 0..1
-        float result[] = tintTransform.eval(samples);
+        float[] result = tintTransform.eval(samples);
         for (int s = 0; s < alt.length; s++)
         {
             // scale to 0..255

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/io/TestRandomAccessFileOutputStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/io/TestRandomAccessFileOutputStream.java?rev=1666733&r1=1666732&r2=1666733&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/io/TestRandomAccessFileOutputStream.java
(original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/io/TestRandomAccessFileOutputStream.java
Sat Mar 14 19:26:18 2015
@@ -44,7 +44,7 @@ public class TestRandomAccessFileOutputS
     public void testWrite() throws IOException
     {
         RandomAccessFileOutputStream out;
-        byte buffer[];
+        byte[] buffer;
 
         File file = new File(testResultsDir, "raf-outputstream.bin");
 
@@ -142,7 +142,7 @@ public class TestRandomAccessFileOutputS
 
         RandomAccessFile raFile = new RandomAccessFile(file, "rw");
 
-        byte buffer[] = createDataSequence(16, 10);
+        byte[] buffer = createDataSequence(16, 10);
 
         // Test COSInteger
         out = new RandomAccessFileOutputStream(raFile);
@@ -208,7 +208,7 @@ public class TestRandomAccessFileOutputS
 
     protected byte[] createDataSequence(int length, int firstByteValue)
     {
-        byte buffer[] = new byte[length];
+        byte[] buffer = new byte[length];
         for (int i = 0; i < buffer.length; i++)
         {
             buffer[i] = (byte) (firstByteValue + i);

Modified: pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/EndstreamOutputStreamTest.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/EndstreamOutputStreamTest.java?rev=1666733&r1=1666732&r2=1666733&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/EndstreamOutputStreamTest.java
(original)
+++ pdfbox/trunk/pdfbox/src/test/java/org/apache/pdfbox/pdfparser/EndstreamOutputStreamTest.java
Sat Mar 14 19:26:18 2015
@@ -31,66 +31,66 @@ public class EndstreamOutputStreamTest e
     {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         EndstreamOutputStream feos = new EndstreamOutputStream(baos);
-        byte tab1[] = {1, 2, 3, 4};
-        byte tab2[] = {5, 6, 7, '\r', '\n'};
-        byte tab3[] = {8, 9, '\r', '\n'};
+        byte[] tab1 = {1, 2, 3, 4};
+        byte[] tab2 = {5, 6, 7, '\r', '\n'};
+        byte[] tab3 = {8, 9, '\r', '\n'};
         feos.write(tab1, 0, tab1.length);
         feos.write(tab2, 0, tab2.length);
         feos.write(tab3, 0, tab3.length);
         feos.flush();
-        byte expectedResult1[] = { 1, 2, 3, 4, 5, 6, 7, '\r', '\n', 8, 9};
+        byte[] expectedResult1 = { 1, 2, 3, 4, 5, 6, 7, '\r', '\n', 8, 9};
         Assert.assertArrayEquals(expectedResult1, baos.toByteArray());
 
         baos = new ByteArrayOutputStream();
         feos = new EndstreamOutputStream(baos);
-        byte tab4[] = {1, 2, 3, 4};
-        byte tab5[] = {5, 6, 7, '\r' };
-        byte tab6[] = {8, 9, '\n'};
+        byte[] tab4 = {1, 2, 3, 4};
+        byte[] tab5 = {5, 6, 7, '\r' };
+        byte[] tab6 = {8, 9, '\n'};
         feos.write(tab4, 0, tab4.length);
         feos.write(tab5, 0, tab5.length);
         feos.write(tab6, 0, tab6.length);
         feos.flush();
-        byte expectedResult2[] = { 1, 2, 3, 4, 5, 6, 7, '\r', 8, 9};
+        byte[] expectedResult2 = { 1, 2, 3, 4, 5, 6, 7, '\r', 8, 9};
         Assert.assertArrayEquals(expectedResult2, baos.toByteArray());
         
         baos = new ByteArrayOutputStream();
         feos = new EndstreamOutputStream(baos);
-        byte tab7[] = {1, 2, 3, 4, '\r'};
-        byte tab8[] = {'\n', 5, 6, 7, '\n' };
-        byte tab9[] = {8, 9, '\r'}; // final CR is not to be discarded
+        byte[] tab7 = {1, 2, 3, 4, '\r'};
+        byte[] tab8 = {'\n', 5, 6, 7, '\n' };
+        byte[] tab9 = {8, 9, '\r'}; // final CR is not to be discarded
         feos.write(tab7, 0, tab7.length);
         feos.write(tab8, 0, tab8.length);
         feos.write(tab9, 0, tab9.length);
         feos.flush();
-        byte expectedResult3[] = { 1, 2, 3, 4, '\r', '\n', 5, 6, 7, '\n', 8, 9, '\r'};
+        byte[] expectedResult3 = { 1, 2, 3, 4, '\r', '\n', 5, 6, 7, '\n', 8, 9, '\r'};
         Assert.assertArrayEquals(expectedResult3, baos.toByteArray());
         
         baos = new ByteArrayOutputStream();
         feos = new EndstreamOutputStream(baos);
-        byte tab10[] = {1, 2, 3, 4, '\r'};
-        byte tab11[] = {'\n', 5, 6, 7, '\r' };
-        byte tab12[] = {8, 9, '\r'};
-        byte tab13[] = {'\n'}; // final CR LF across buffers
+        byte[] tab10 = {1, 2, 3, 4, '\r'};
+        byte[] tab11 = {'\n', 5, 6, 7, '\r' };
+        byte[] tab12 = {8, 9, '\r'};
+        byte[] tab13 = {'\n'}; // final CR LF across buffers
         feos.write(tab10, 0, tab10.length);
         feos.write(tab11, 0, tab11.length);
         feos.write(tab12, 0, tab12.length);
         feos.write(tab13, 0, tab13.length);
         feos.flush();
-        byte expectedResult4[] = { 1, 2, 3, 4, '\r', '\n', 5, 6, 7, '\r', 8, 9};
+        byte[] expectedResult4 = { 1, 2, 3, 4, '\r', '\n', 5, 6, 7, '\r', 8, 9};
         Assert.assertArrayEquals(expectedResult4, baos.toByteArray());
 
         baos = new ByteArrayOutputStream();
         feos = new EndstreamOutputStream(baos);
-        byte tab14[] = {1, 2, 3, 4, '\r'};
-        byte tab15[] = {'\n', 5, 6, 7, '\r' };
-        byte tab16[] = {8, 9, '\n'};
-        byte tab17[] = {'\r'}; // final CR is not to be discarded
+        byte[] tab14 = {1, 2, 3, 4, '\r'};
+        byte[] tab15 = {'\n', 5, 6, 7, '\r' };
+        byte[] tab16 = {8, 9, '\n'};
+        byte[] tab17 = {'\r'}; // final CR is not to be discarded
         feos.write(tab14, 0, tab14.length);
         feos.write(tab15, 0, tab15.length);
         feos.write(tab16, 0, tab16.length);
         feos.write(tab17, 0, tab17.length);
         feos.flush();
-        byte expectedResult5[] = { 1, 2, 3, 4, '\r', '\n', 5, 6, 7, '\r', 8, 9, '\n', '\r'};
+        byte[] expectedResult5 = { 1, 2, 3, 4, '\r', '\n', 5, 6, 7, '\r', 8, 9, '\n', '\r'};
         Assert.assertArrayEquals(expectedResult5, baos.toByteArray());
     }
     



Mime
View raw message