aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-channel/src
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-channel/src')
-rw-r--r--sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java10
-rw-r--r--sonar-channel/src/main/java/org/sonar/channel/CodeReader.java2
2 files changed, 6 insertions, 6 deletions
diff --git a/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java b/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java
index 50359838d72..6373bb0ff40 100644
--- a/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java
+++ b/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java
@@ -62,7 +62,7 @@ public class CodeBuffer implements CharSequence {
buffer = new char[bufferCapacity];
Reader reader = initialCodeReader;
for (CodeReaderFilter<?> codeReaderFilter : configuration.getCodeReaderFilters()) {
- reader = new Filter(reader, codeReaderFilter);
+ reader = new Filter(reader, codeReaderFilter, configuration);
}
this.code = reader;
fillBuffer();
@@ -240,7 +240,7 @@ public class CodeBuffer implements CharSequence {
}
/**
- * Warning : this method returns Integer.MAX_VALUE when the buffer is fully used
+ * Warning : this method returns Integer.MAX_VALUE when the buffer is fully used
* as the length of the stream can't be known before having consumed all characters.
*
* Integer.MAX_VALUE is returned to prevent regular expression matchers to stop consuming the stream of characters (see
@@ -289,14 +289,14 @@ public class CodeBuffer implements CharSequence {
/**
* Bridge class between CodeBuffer and CodeReaderFilter
*/
- final class Filter extends FilterReader {
+ static final class Filter extends FilterReader {
private CodeReaderFilter<?> codeReaderFilter;
- public Filter(Reader in, CodeReaderFilter<?> codeReaderFilter) {
+ public Filter(Reader in, CodeReaderFilter<?> codeReaderFilter, CodeReaderConfiguration configuration) {
super(in);
this.codeReaderFilter = codeReaderFilter;
- this.codeReaderFilter.setConfiguration(CodeBuffer.this.configuration.cloneWithoutCodeReaderFilters());
+ this.codeReaderFilter.setConfiguration(configuration.cloneWithoutCodeReaderFilters());
this.codeReaderFilter.setReader(in);
}
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 8d8673edbc1..1033ad20668 100644
--- a/sonar-channel/src/main/java/org/sonar/channel/CodeReader.java
+++ b/sonar-channel/src/main/java/org/sonar/channel/CodeReader.java
@@ -79,7 +79,7 @@ public class CodeReader extends CodeBuffer {
try {
appendable.append((char) pop());
} catch (IOException e) {
- throw new ChannelException(e.getMessage());
+ throw new ChannelException(e.getMessage(), e);
}
}