aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-channel
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-04-23 18:18:10 +0200
committersimonbrandhof <simon.brandhof@gmail.com>2011-04-23 18:35:26 +0200
commit6b730677bc7d29a59b1127d3cbc8dd7bd60c2174 (patch)
tree349348a853ef3ffa4df9f22650709033dc813a0c /sonar-channel
parent3e265a43011c4bc6c9b8c5df4484fcef8ac7965b (diff)
downloadsonarqube-6b730677bc7d29a59b1127d3cbc8dd7bd60c2174.tar.gz
sonarqube-6b730677bc7d29a59b1127d3cbc8dd7bd60c2174.zip
SONAR-2384 Support markdown in review comments
Diffstat (limited to 'sonar-channel')
-rw-r--r--sonar-channel/src/main/java/org/sonar/channel/ChannelDispatcher.java2
-rw-r--r--sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/sonar-channel/src/main/java/org/sonar/channel/ChannelDispatcher.java b/sonar-channel/src/main/java/org/sonar/channel/ChannelDispatcher.java
index d772d81ffd5..dcbd5c56a74 100644
--- a/sonar-channel/src/main/java/org/sonar/channel/ChannelDispatcher.java
+++ b/sonar-channel/src/main/java/org/sonar/channel/ChannelDispatcher.java
@@ -46,7 +46,7 @@ public class ChannelDispatcher<OUTPUT> extends Channel<OUTPUT> {
@SuppressWarnings("rawtypes")
public ChannelDispatcher(List<Channel> channels, boolean failIfNoChannelToConsumeOneCharacter) {
- this.channels = channels.toArray(new Channel[0]); // NOSONAR, lack of performance is not an issue here
+ this.channels = channels.toArray(new Channel[channels.size()]);
this.failIfNoChannelToConsumeOneCharacter = failIfNoChannelToConsumeOneCharacter;
}
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 25ad180b4b3..2358e0bfa44 100644
--- a/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java
+++ b/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java
@@ -258,9 +258,9 @@ public class CodeBuffer implements CharSequence {
public final String toString() {
StringBuilder result = new StringBuilder();
result.append("CodeReader(");
- result.append("line:" + cursor.line);
- result.append("|column:" + cursor.column);
- result.append("|cursor value:'" + (char) peek() + "'");
+ result.append("line:").append(cursor.line);
+ result.append("|column:").append(cursor.column);
+ result.append("|cursor value:'").append((char) peek()).append("'");
result.append(")");
return result.toString();
}