commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1648100 - /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java
Date Sat, 27 Dec 2014 19:58:31 GMT
Author: britter
Date: Sat Dec 27 19:58:31 2014
New Revision: 1648100

URL: http://svn.apache.org/r1648100
Log:
Make sure no instance of Imaging class can be created

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java?rev=1648100&r1=1648099&r2=1648100&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/Imaging.java Sat
Dec 27 19:58:31 2014
@@ -110,7 +110,8 @@ import static org.apache.commons.imaging
  *      href="https://svn.apache.org/repos/asf/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java">org.apache.commons.imaging.examples.SampleUsage</a>
  * @see <a href="http://commons.apache.org/imaging/formatsupport.html">Format Support</a>
  */
-public abstract class Imaging {
+public final class Imaging {
+
     private static final int[] MAGIC_NUMBERS_GIF = { 0x47, 0x49, };
     private static final int[] MAGIC_NUMBERS_PNG = { 0x89, 0x50, };
     private static final int[] MAGIC_NUMBERS_JPEG = { 0xff, 0xd8, };
@@ -131,6 +132,10 @@ public abstract class Imaging {
     private static final int[] MAGIC_NUMBERS_DCX = { 0xB1, 0x68, };
     private static final int[] MAGIC_NUMBERS_RGBE = { 0x23, 0x3F, };
 
+    private Imaging() {
+        // Instances can not be created
+    }
+
     /**
      * Attempts to determine if a file contains an image recorded in 
      * a supported graphics format based on its file-name extension 



Mime
View raw message