commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1390620 - in /commons/proper/imaging/trunk/src: main/java/org/apache/commons/imaging/formats/png/ main/java/org/apache/commons/imaging/formats/png/chunks/ test/java/org/apache/commons/imaging/formats/png/
Date Wed, 26 Sep 2012 17:23:07 GMT
Author: damjan
Date: Wed Sep 26 17:23:06 2012
New Revision: 1390620

URL: http://svn.apache.org/viewvc?rev=1390620&view=rev
Log:
Use standard case for class names.


Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngText.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkItxt.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkText.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkZtxt.java
    commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngTextTest.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngText.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngText.java?rev=1390620&r1=1390619&r2=1390620&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngText.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngText.java
Wed Sep 26 17:23:06 2012
@@ -24,19 +24,19 @@ public abstract class PngText {
 
     public final String keyword, text;
 
-    public static class tEXt extends PngText {
-        public tEXt(String keyword, String text) {
+    public static class Text extends PngText {
+        public Text(String keyword, String text) {
             super(keyword, text);
         }
     }
 
-    public static class zTXt extends PngText {
-        public zTXt(String keyword, String text) {
+    public static class Ztxt extends PngText {
+        public Ztxt(String keyword, String text) {
             super(keyword, text);
         }
     }
 
-    public static class iTXt extends PngText {
+    public static class Itxt extends PngText {
 
         /*
          * The language tag defined in [RFC-3066] indicates the human language
@@ -52,7 +52,7 @@ public abstract class PngText {
 
         public final String translatedKeyword;
 
-        public iTXt(String keyword, String text, String languageTag,
+        public Itxt(String keyword, String text, String languageTag,
                 String translatedKeyword) {
             super(keyword, text);
             this.languageTag = languageTag;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java?rev=1390620&r1=1390619&r2=1390620&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java
Wed Sep 26 17:23:06 2012
@@ -140,7 +140,7 @@ public class PngWriter implements PngCon
         writeChunk(os, IHDR_CHUNK_TYPE.toByteArray(), baos.toByteArray());
     }
 
-    private void writeChunkiTXt(OutputStream os, PngText.iTXt text)
+    private void writeChunkiTXt(OutputStream os, PngText.Itxt text)
             throws IOException, ImageWriteException {
         if (!UnicodeUtils.isValidISO_8859_1(text.keyword))
             throw new ImageWriteException(
@@ -172,7 +172,7 @@ public class PngWriter implements PngCon
         writeChunk(os, iTXt_CHUNK_TYPE.toByteArray(), baos.toByteArray());
     }
 
-    private void writeChunkzTXt(OutputStream os, PngText.zTXt text)
+    private void writeChunkzTXt(OutputStream os, PngText.Ztxt text)
             throws IOException, ImageWriteException {
         if (!UnicodeUtils.isValidISO_8859_1(text.keyword))
             throw new ImageWriteException(
@@ -196,7 +196,7 @@ public class PngWriter implements PngCon
         writeChunk(os, zTXt_CHUNK_TYPE.toByteArray(), baos.toByteArray());
     }
 
-    private void writeChunktEXt(OutputStream os, PngText.tEXt text)
+    private void writeChunktEXt(OutputStream os, PngText.Text text)
             throws IOException, ImageWriteException {
         if (!UnicodeUtils.isValidISO_8859_1(text.keyword))
             throw new ImageWriteException(
@@ -495,12 +495,12 @@ public class PngWriter implements PngCon
                     .get(PARAM_KEY_PNG_TEXT_CHUNKS);
             for (int i = 0; i < outputTexts.size(); i++) {
                 PngText text = outputTexts.get(i);
-                if (text instanceof PngText.tEXt)
-                    writeChunktEXt(os, (PngText.tEXt) text);
-                else if (text instanceof PngText.zTXt)
-                    writeChunkzTXt(os, (PngText.zTXt) text);
-                else if (text instanceof PngText.iTXt)
-                    writeChunkiTXt(os, (PngText.iTXt) text);
+                if (text instanceof PngText.Text)
+                    writeChunktEXt(os, (PngText.Text) text);
+                else if (text instanceof PngText.Ztxt)
+                    writeChunkzTXt(os, (PngText.Ztxt) text);
+                else if (text instanceof PngText.Itxt)
+                    writeChunkiTXt(os, (PngText.Itxt) text);
                 else
                     throw new ImageWriteException(
                             "Unknown text to embed in PNG: " + text);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkItxt.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkItxt.java?rev=1390620&r1=1390619&r2=1390620&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkItxt.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkItxt.java
Wed Sep 26 17:23:06 2012
@@ -121,6 +121,6 @@ public class PngChunkItxt extends PngTex
 
     @Override
     public PngText getContents() {
-        return new PngText.iTXt(keyword, text, languageTag, translatedKeyword);
+        return new PngText.Itxt(keyword, text, languageTag, translatedKeyword);
     }
 }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkText.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkText.java?rev=1390620&r1=1390619&r2=1390620&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkText.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkText.java
Wed Sep 26 17:23:06 2012
@@ -64,7 +64,7 @@ public class PngChunkText extends PngTex
 
     @Override
     public PngText getContents() {
-        return new PngText.tEXt(keyword, text);
+        return new PngText.Text(keyword, text);
     }
 
 }

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkZtxt.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkZtxt.java?rev=1390620&r1=1390619&r2=1390620&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkZtxt.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkZtxt.java
Wed Sep 26 17:23:06 2012
@@ -74,7 +74,7 @@ public class PngChunkZtxt extends PngTex
 
     @Override
     public PngText getContents() {
-        return new PngText.zTXt(keyword, text);
+        return new PngText.Ztxt(keyword, text);
     }
 
 }

Modified: commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngTextTest.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngTextTest.java?rev=1390620&r1=1390619&r2=1390620&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngTextTest.java
(original)
+++ commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/formats/png/PngTextTest.java
Wed Sep 26 17:23:06 2012
@@ -47,19 +47,19 @@ public class PngTextTest extends PngBase
         {
             String keyword = "a";
             String text = "b";
-            writeTexts.add(new PngText.tEXt(keyword, text));
+            writeTexts.add(new PngText.Text(keyword, text));
         }
         {
             String keyword = "c";
             String text = "d";
-            writeTexts.add(new PngText.zTXt(keyword, text));
+            writeTexts.add(new PngText.Ztxt(keyword, text));
         }
         {
             String keyword = "e";
             String text = "f";
             String languageTag = "g";
             String translatedKeyword = "h";
-            writeTexts.add(new PngText.iTXt(keyword, text, languageTag,
+            writeTexts.add(new PngText.Itxt(keyword, text, languageTag,
                     translatedKeyword));
         }
 



Mime
View raw message