You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by le...@apache.org on 2021/03/25 06:54:57 UTC

svn commit: r1888054 - /pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cff/CFFOperator.java

Author: lehmi
Date: Thu Mar 25 06:54:57 2021
New Revision: 1888054

URL: http://svn.apache.org/viewvc?rev=1888054&view=rev
Log:
PDFBOX-4892: make members final

Modified:
    pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cff/CFFOperator.java

Modified: pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cff/CFFOperator.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cff/CFFOperator.java?rev=1888054&r1=1888053&r2=1888054&view=diff
==============================================================================
--- pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cff/CFFOperator.java (original)
+++ pdfbox/trunk/fontbox/src/main/java/org/apache/fontbox/cff/CFFOperator.java Thu Mar 25 06:54:57 2021
@@ -27,13 +27,13 @@ import java.util.Map;
 public final class CFFOperator
 {
 
-    private Key operatorKey = null;
-    private String operatorName = null;
+    private final Key operatorKey;
+    private final String operatorName;
 
     private CFFOperator(Key key, String name)
     {
-        setKey(key);
-        setName(name);
+        operatorKey = key;
+        operatorName = name;
     }
 
     /**
@@ -45,11 +45,6 @@ public final class CFFOperator
         return operatorKey;
     }
 
-    private void setKey(Key key)
-    {
-        operatorKey = key;
-    }
-
     /**
      * The name of the operator.
      * @return the name
@@ -59,11 +54,6 @@ public final class CFFOperator
         return operatorName;
     }
 
-    private void setName(String name)
-    {
-        operatorName = name;
-    }
-
     /**
      * {@inheritDoc}
      */
@@ -115,6 +105,7 @@ public final class CFFOperator
 
     /**
      * Returns the operator corresponding to the given name.
+     * 
      * @param name the given name
      * @return the corresponding operator
      */
@@ -129,7 +120,7 @@ public final class CFFOperator
      */
     public static class Key
     {
-        private int[] value = null;
+        private final int[] value;
 
         /**
          * Constructor.
@@ -152,7 +143,7 @@ public final class CFFOperator
 
         private Key(int[] value)
         {
-            setValue(value);
+            this.value = value;
         }
 
         /**
@@ -164,11 +155,6 @@ public final class CFFOperator
             return value;
         }
 
-        private void setValue(int[] value)
-        {
-            this.value = value;
-        }
-
         /**
          * {@inheritDoc}
          */