You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/07/04 19:21:40 UTC

[commons-imaging] 16/33: Use Java camel-case naming conventions

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git

commit 211eaac55209baa8eb527654aeb17bfe41ffa1c0
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Jul 4 15:02:06 2023 -0400

    Use Java camel-case naming conventions
---
 .../formats/jpeg/iptc/JpegIptcRewriter.java        | 44 +++++++++++-----------
 .../formats/jpeg/exif/MicrosoftTagTest.java        |  2 +-
 .../imaging/formats/jpeg/iptc/IptcAddTest.java     |  2 +-
 .../formats/jpeg/iptc/IptcFullDiscardTest.java     |  4 +-
 .../imaging/formats/jpeg/iptc/IptcUpdateTest.java  |  6 +--
 5 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java
index 7cc09f51..e2e4da7c 100644
--- a/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java
+++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java
@@ -52,9 +52,9 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void removeIPTC(final byte[] src, final OutputStream os)
+    public void removeIptc(final byte[] src, final OutputStream os)
             throws ImagingException, IOException, ImagingException {
-        removeIPTC(src, os, false);
+        removeIptc(src, os, false);
     }
 
     /**
@@ -75,10 +75,10 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void removeIPTC(final byte[] src, final OutputStream os, final boolean removeSegment)
+    public void removeIptc(final byte[] src, final OutputStream os, final boolean removeSegment)
             throws ImagingException, IOException, ImagingException {
         final ByteSource byteSource = ByteSource.array(src);
-        removeIPTC(byteSource, os, removeSegment);
+        removeIptc(byteSource, os, removeSegment);
     }
 
     /**
@@ -97,9 +97,9 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void removeIPTC(final ByteSource byteSource, final OutputStream os)
+    public void removeIptc(final ByteSource byteSource, final OutputStream os)
             throws ImagingException, IOException, ImagingException {
-        removeIPTC(byteSource, os, false);
+        removeIptc(byteSource, os, false);
     }
 
     /**
@@ -120,7 +120,7 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void removeIPTC(final ByteSource byteSource, final OutputStream os, final boolean removeSegment)
+    public void removeIptc(final ByteSource byteSource, final OutputStream os, final boolean removeSegment)
             throws ImagingException, IOException, ImagingException {
         final JFIFPieces jfifPieces = analyzeJFIF(byteSource);
         final List<JFIFPiece> oldPieces = jfifPieces.pieces;
@@ -166,9 +166,9 @@ public class JpegIptcRewriter extends JpegRewriter {
      * @see java.io.File
      * @see java.io.OutputStream
      */
-    public void removeIPTC(final File src, final OutputStream os)
+    public void removeIptc(final File src, final OutputStream os)
             throws ImagingException, IOException, ImagingException {
-        removeIPTC(src, os, false);
+        removeIptc(src, os, false);
     }
 
     /**
@@ -192,10 +192,10 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void removeIPTC(final File src, final OutputStream os, final boolean removeSegment)
+    public void removeIptc(final File src, final OutputStream os, final boolean removeSegment)
             throws ImagingException, IOException, ImagingException {
         final ByteSource byteSource = ByteSource.file(src);
-        removeIPTC(byteSource, os, removeSegment);
+        removeIptc(byteSource, os, removeSegment);
     }
 
     /**
@@ -214,9 +214,9 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void removeIPTC(final InputStream src, final OutputStream os)
+    public void removeIptc(final InputStream src, final OutputStream os)
             throws ImagingException, IOException, ImagingException {
-        removeIPTC(src, os, false);
+        removeIptc(src, os, false);
     }
 
     /**
@@ -237,10 +237,10 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void removeIPTC(final InputStream src, final OutputStream os, final boolean removeSegment)
+    public void removeIptc(final InputStream src, final OutputStream os, final boolean removeSegment)
             throws ImagingException, IOException, ImagingException {
         final ByteSource byteSource = ByteSource.inputStream(src, null);
-        removeIPTC(byteSource, os, removeSegment);
+        removeIptc(byteSource, os, removeSegment);
     }
 
     /**
@@ -260,11 +260,11 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void writeIPTC(final byte[] src, final OutputStream os,
+    public void writeIptc(final byte[] src, final OutputStream os,
             final PhotoshopApp13Data newData) throws ImagingException, IOException,
             ImagingException {
         final ByteSource byteSource = ByteSource.array(src);
-        writeIPTC(byteSource, os, newData);
+        writeIptc(byteSource, os, newData);
     }
 
     /**
@@ -284,7 +284,7 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void writeIPTC(final ByteSource byteSource, final OutputStream os,
+    public void writeIptc(final ByteSource byteSource, final OutputStream os,
             PhotoshopApp13Data newData) throws ImagingException, IOException,
             ImagingException {
         final JFIFPieces jfifPieces = analyzeJFIF(byteSource);
@@ -335,10 +335,10 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void writeIPTC(final File src, final OutputStream os, final PhotoshopApp13Data newData)
+    public void writeIptc(final File src, final OutputStream os, final PhotoshopApp13Data newData)
             throws ImagingException, IOException, ImagingException {
         final ByteSource byteSource = ByteSource.file(src);
-        writeIPTC(byteSource, os, newData);
+        writeIptc(byteSource, os, newData);
     }
 
     /**
@@ -358,11 +358,11 @@ public class JpegIptcRewriter extends JpegRewriter {
      *         target byte source
      * @throws ImagingException if it fails to write the target image
      */
-    public void writeIPTC(final InputStream src, final OutputStream os,
+    public void writeIptc(final InputStream src, final OutputStream os,
             final PhotoshopApp13Data newData) throws ImagingException, IOException,
             ImagingException {
         final ByteSource byteSource = ByteSource.inputStream(src, null);
-        writeIPTC(byteSource, os, newData);
+        writeIptc(byteSource, os, newData);
     }
 
 }
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/MicrosoftTagTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/MicrosoftTagTest.java
index c7a2ecd4..fa5838ea 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/MicrosoftTagTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/MicrosoftTagTest.java
@@ -73,7 +73,7 @@ public class MicrosoftTagTest extends ExifBaseTest {
         final ByteArrayOutputStream noXmp = new ByteArrayOutputStream();
         new JpegXmpRewriter().removeXmpXml(imageWithExif, noXmp);
         final ByteArrayOutputStream noXmpNoIptc = new ByteArrayOutputStream();
-        new JpegIptcRewriter().removeIPTC(noXmp.toByteArray(), noXmpNoIptc);
+        new JpegIptcRewriter().removeIptc(noXmp.toByteArray(), noXmpNoIptc);
         return noXmpNoIptc.toByteArray();
     }
 
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcAddTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcAddTest.java
index cb4d94b6..7699a0b3 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcAddTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcAddTest.java
@@ -74,7 +74,7 @@ public class IptcAddTest extends IptcBaseTest {
 
         byte[] bytes;
         try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            new JpegIptcRewriter().writeIPTC(byteSource, os, newData);
+            new JpegIptcRewriter().writeIptc(byteSource, os, newData);
             bytes = os.toByteArray();
         }
 
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java
index 3c7d0c7c..1e292588 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcFullDiscardTest.java
@@ -33,7 +33,7 @@ public class IptcFullDiscardTest {
         final IptcRecord record = new IptcRecord(IptcTypes.KEYWORDS, "meta; data");
         final PhotoshopApp13Data data = new PhotoshopApp13Data(Collections.singletonList(record), Collections.emptyList());
         final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-        new JpegIptcRewriter().writeIPTC(bytes, byteArrayOutputStream, data);
+        new JpegIptcRewriter().writeIptc(bytes, byteArrayOutputStream, data);
         return byteArrayOutputStream.toByteArray();
     }
 
@@ -64,7 +64,7 @@ public class IptcFullDiscardTest {
 
     private byte[] removeMetaData(final byte[] bytes, final boolean removeApp13Segment) throws Exception {
         final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-        new JpegIptcRewriter().removeIPTC(bytes, byteArrayOutputStream, removeApp13Segment);
+        new JpegIptcRewriter().removeIptc(bytes, byteArrayOutputStream, removeApp13Segment);
         return byteArrayOutputStream.toByteArray();
     }
 }
diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcUpdateTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcUpdateTest.java
index 581109b7..97ad0798 100644
--- a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcUpdateTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcUpdateTest.java
@@ -44,7 +44,7 @@ public class IptcUpdateTest extends IptcBaseTest {
 
     public byte[] removeIptc(final ByteSource byteSource, final File imageFile) throws Exception {
         try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            new JpegIptcRewriter().removeIPTC(byteSource, os);
+            new JpegIptcRewriter().removeIptc(byteSource, os);
             return os.toByteArray();
         }
     }
@@ -74,7 +74,7 @@ public class IptcUpdateTest extends IptcBaseTest {
 
         byte[] updated;
         try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            new JpegIptcRewriter().writeIPTC(ByteSource.array(noIptcFile,
+            new JpegIptcRewriter().writeIptc(ByteSource.array(noIptcFile,
                     "test.jpg"), os, newData);
             updated = os.toByteArray();
         }
@@ -177,7 +177,7 @@ public class IptcUpdateTest extends IptcBaseTest {
 
     public byte[] writeIptc(final ByteSource byteSource, final PhotoshopApp13Data newData, final File imageFile) throws IOException, ImagingException, ImagingException {
         try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            new JpegIptcRewriter().writeIPTC(byteSource, os, newData);
+            new JpegIptcRewriter().writeIptc(byteSource, os, newData);
             return os.toByteArray();
         }
     }