From 6b730677bc7d29a59b1127d3cbc8dd7bd60c2174 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Sat, 23 Apr 2011 18:18:10 +0200 Subject: SONAR-2384 Support markdown in review comments --- .../src/main/java/org/sonar/channel/ChannelDispatcher.java | 2 +- sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sonar-channel/src/main/java/org') 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 extends Channel { @SuppressWarnings("rawtypes") public ChannelDispatcher(List 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(); } -- cgit v1.2.3