You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2015/04/02 23:13:56 UTC
svn commit: r1670970 - in
/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4:
ExecutionContext.java InstructionSequence.java
InstructionSequenceBuilder.java Operators.java
Author: tilman
Date: Thu Apr 2 21:13:55 2015
New Revision: 1670970
URL: http://svn.apache.org/r1670970
Log:
PDFBOX-2576: make fields final; remove boxing / unboxing
Modified:
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/ExecutionContext.java
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequence.java
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java
pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/Operators.java
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/ExecutionContext.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/ExecutionContext.java?rev=1670970&r1=1670969&r2=1670970&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/ExecutionContext.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/ExecutionContext.java Thu Apr 2 21:13:55 2015
@@ -26,8 +26,8 @@ import java.util.Stack;
public class ExecutionContext
{
- private Operators operators;
- private Stack<Object> stack = new Stack<Object>();
+ private final Operators operators;
+ private final Stack<Object> stack = new Stack<Object>();
/**
* Creates a new execution context.
@@ -73,7 +73,7 @@ public class ExecutionContext
*/
public int popInt()
{
- return ((Integer)stack.pop()).intValue();
+ return ((Integer) stack.pop());
}
/**
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequence.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequence.java?rev=1670970&r1=1670969&r2=1670970&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequence.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequence.java Thu Apr 2 21:13:55 2015
@@ -27,7 +27,7 @@ import java.util.Stack;
public class InstructionSequence
{
- private List<Object> instructions = new java.util.ArrayList<Object>();
+ private final List<Object> instructions = new java.util.ArrayList<Object>();
/**
* Add a name (ex. an operator)
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java?rev=1670970&r1=1670969&r2=1670970&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/InstructionSequenceBuilder.java Thu Apr 2 21:13:55 2015
@@ -28,8 +28,8 @@ import java.util.regex.Pattern;
public class InstructionSequenceBuilder extends Parser.AbstractSyntaxHandler
{
- private InstructionSequence mainSequence = new InstructionSequence();
- private Stack<InstructionSequence> seqStack = new Stack<InstructionSequence>();
+ private final InstructionSequence mainSequence = new InstructionSequence();
+ private final Stack<InstructionSequence> seqStack = new Stack<InstructionSequence>();
private InstructionSequenceBuilder()
{
Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/Operators.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/Operators.java?rev=1670970&r1=1670969&r2=1670970&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/Operators.java (original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/function/type4/Operators.java Thu Apr 2 21:13:55 2015
@@ -75,7 +75,7 @@ public class Operators
private static final Operator POP = new StackOperators.Pop();
private static final Operator ROLL = new StackOperators.Roll();
- private Map<String, Operator> operators = new java.util.HashMap<String, Operator>();
+ private final Map<String, Operator> operators = new java.util.HashMap<String, Operator>();
/**
* Creates a new Operators object with the default set of operators.