poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1717024 - /poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java
Date Sun, 29 Nov 2015 02:18:46 GMT
Author: onealj
Date: Sun Nov 29 02:18:45 2015
New Revision: 1717024

URL: http://svn.apache.org/viewvc?rev=1717024&view=rev
Log:
bug 58636: make ClientAnchor enum constructor private, make byId Internal

Modified:
    poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java?rev=1717024&r1=1717023&r2=1717024&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/ClientAnchor.java Sun Nov 29 02:18:45 2015
@@ -16,6 +16,8 @@
 ==================================================================== */
 package org.apache.poi.ss.usermodel;
 
+import org.apache.poi.util.Internal;
+
 /**
  * A client anchor is attached to an excel worksheet.  It anchors against a
  * top-left and bottom-right cell.
@@ -120,10 +122,19 @@ public interface ClientAnchor {
         DONT_MOVE_AND_RESIZE(3);
         
         public final short value;
-        AnchorType(int value) {
+
+        // disallow non-sequential enum instance creation
+        private AnchorType(int value) {
             this.value = (short) value;
         }
         
+        /**
+         * return the AnchorType corresponding to the code
+         *
+         * @param value the anchor type code
+         * @return the anchor type enum
+         */
+        @Internal
         public static AnchorType byId(int value) {
             return values()[value];
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message