diff options
author | bellingard <bellingard@gmail.com> | 2010-10-15 08:31:59 +0000 |
---|---|---|
committer | bellingard <bellingard@gmail.com> | 2010-10-15 08:31:59 +0000 |
commit | e52bf3645122401bd5f4178d551cc9fd0721be91 (patch) | |
tree | 0d43bb60b18fbfa3621d4bcff75d8aca3c3ad8f6 /sonar-channel | |
parent | fa92a9ff62bf333360faf17700f162edfaa94c27 (diff) | |
download | sonarqube-e52bf3645122401bd5f4178d551cc9fd0721be91.tar.gz sonarqube-e52bf3645122401bd5f4178d551cc9fd0721be91.zip |
[SONAR-1853] Create a new CodeReaderFilter mechanism to prevent logic duplications between Channel(s)
http://jira.codehaus.org/browse/SONAR-1853
Added constructors without CodeReaderFilter ellipsis to be binary-backward compatible
Diffstat (limited to 'sonar-channel')
-rw-r--r-- | sonar-channel/src/main/java/org/sonar/channel/CodeReader.java | 17 |
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); } |