소스 검색

Remove initialization method from text input state.

Timur Sağlam 4 년 전
부모
커밋
5d5d6c8cc6
1개의 변경된 파일과 2개의 추가작업 그리고 10개의 파일을 삭제
  1. 2 10
      jplag.frontend.text/src/main/java/de/jplag/text/InputState.java

+ 2 - 10
jplag.frontend.text/src/main/java/de/jplag/text/InputState.java

@@ -11,22 +11,19 @@ import antlr.LexerSharedInputState;
  * LexerSharedInputState to lex the same input stream.
  * LexerSharedInputState to lex the same input stream.
  */
  */
 public class InputState extends LexerSharedInputState {
 public class InputState extends LexerSharedInputState {
-    private int columnIndex;
-    private int tokenColumnIndex;
+    private int columnIndex = 1;
+    private int tokenColumnIndex = 1;
 
 
     public InputState(InputBuffer inputBuffer) {
     public InputState(InputBuffer inputBuffer) {
         super(inputBuffer);
         super(inputBuffer);
-        initialize();
     }
     }
 
 
     public InputState(InputStream inputStream) {
     public InputState(InputStream inputStream) {
         super(inputStream);
         super(inputStream);
-        initialize();
     }
     }
 
 
     public InputState(Reader inputReader) {
     public InputState(Reader inputReader) {
         super(inputReader);
         super(inputReader);
-        initialize();
     }
     }
 
 
     @Override
     @Override
@@ -49,9 +46,4 @@ public class InputState extends LexerSharedInputState {
     public void setTokenColumnIndex(int tokenColumnIndex) {
     public void setTokenColumnIndex(int tokenColumnIndex) {
         this.tokenColumnIndex = tokenColumnIndex;
         this.tokenColumnIndex = tokenColumnIndex;
     }
     }
-
-    private final void initialize() {
-        columnIndex = 1;
-        line = 1;
-    }
 }
 }