]> source.dussan.org Git - sonarqube.git/commitdiff
[SONAR-1853] Create a new CodeReaderFilter mechanism to prevent logic duplications...
authorbellingard <bellingard@gmail.com>
Fri, 15 Oct 2010 08:31:59 +0000 (08:31 +0000)
committerbellingard <bellingard@gmail.com>
Fri, 15 Oct 2010 08:31:59 +0000 (08:31 +0000)
http://jira.codehaus.org/browse/SONAR-1853

Added constructors without CodeReaderFilter ellipsis to be binary-backward compatible

sonar-channel/src/main/java/org/sonar/channel/CodeReader.java

index e597385d3879f902d8e324a570109f616801369a..af4ade884d0e7f1bd98fd7442d7f8335031492e9 100644 (file)
@@ -24,8 +24,7 @@ import java.io.Reader;
 import java.util.regex.Matcher;
 
 /**
- * The CodeReader class provides all the basic features to lex a source code. 
- * Those features are :
+ * The CodeReader class provides all the basic features to lex a source code. Those features are :
  * <ul>
  * <li>Read and consume next characters until a regular expression is matched</li>
  * </ul>
@@ -34,6 +33,20 @@ public class CodeReader extends CodeBuffer {
 
   private Cursor previousCursor;
 
+  /*
+   * Constructor needed to be backward compatible (before using CodeReaderFilter)
+   */
+  public CodeReader(Reader code) {
+    super(code, new CodeReaderFilter[] {});
+  }
+
+  /*
+   * Constructor needed to be backward compatible (before using CodeReaderFilter)
+   */
+  public CodeReader(String code) {
+    super(code, new CodeReaderFilter[] {});
+  }
+
   public CodeReader(Reader code, CodeReaderFilter... codeReaderFilters) {
     super(code, codeReaderFilters);
   }