diff options
author | Freddy Mallet <freddy.mallet@gmail.com> | 2011-04-17 00:27:30 +0200 |
---|---|---|
committer | Freddy Mallet <freddy.mallet@gmail.com> | 2011-04-17 00:27:30 +0200 |
commit | 1d7e1e31407a49f365b811145b566754250e416a (patch) | |
tree | 457863402d1e56dea531eb786723d62836719775 /sonar-channel/src | |
parent | 6b366e15d372189aebe827b337abb2fe8433927e (diff) | |
download | sonarqube-1d7e1e31407a49f365b811145b566754250e416a.tar.gz sonarqube-1d7e1e31407a49f365b811145b566754250e416a.zip |
fix SONAR-2295 : Line number representation in source code view are wrong for files that use mixed line endings
Diffstat (limited to 'sonar-channel/src')
-rw-r--r-- | sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java | 1 |
1 files changed, 1 insertions, 0 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 5515e7eb284..dbb28eb7b0b 100644 --- a/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java +++ b/sonar-channel/src/main/java/org/sonar/channel/CodeBuffer.java @@ -94,6 +94,7 @@ public class CodeBuffer implements CharSequence { } private void updateCursorPosition(int character) { + //see Java Language Specification : http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.4 if (character == LF || character == CR) { if ((lastChar != LF && lastChar != CR) || lastChar == character || lastChar == LF) { cursor.line++; |