From e52bf3645122401bd5f4178d551cc9fd0721be91 Mon Sep 17 00:00:00 2001 From: bellingard Date: Fri, 15 Oct 2010 08:31:59 +0000 Subject: [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 --- .../src/main/java/org/sonar/channel/CodeReader.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'sonar-channel/src') 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 : * @@ -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); } -- cgit v1.2.3