aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-channel
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-05-29 01:24:07 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-05-29 03:09:39 +0400
commita44965f6bdee2dcb6b96b7a0cae1ef2a1f8604c9 (patch)
tree4453364397808b7caad6842e56e63a9c4d9fb0df /sonar-channel
parent42e6f9118e856f010e4c3bd301f7435ec71d5399 (diff)
downloadsonarqube-a44965f6bdee2dcb6b96b7a0cae1ef2a1f8604c9.tar.gz
sonarqube-a44965f6bdee2dcb6b96b7a0cae1ef2a1f8604c9.zip
Fix violations
Diffstat (limited to 'sonar-channel')
-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);
}
}