aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-channel
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-channel')
-rw-r--r--sonar-channel/src/main/java/org/sonar/channel/CodeReader.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/sonar-channel/src/main/java/org/sonar/channel/CodeReader.java b/sonar-channel/src/main/java/org/sonar/channel/CodeReader.java
index e597385d387..af4ade884d0 100644
--- a/sonar-channel/src/main/java/org/sonar/channel/CodeReader.java
+++ b/sonar-channel/src/main/java/org/sonar/channel/CodeReader.java
@@ -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);
}