diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt
index 1b217185c6..59bd496044 100644
--- a/pmd/etc/changelog.txt
+++ b/pmd/etc/changelog.txt
@@ -12,6 +12,7 @@ Fixed bug 1998185 - BeanMembersShouldSerialize vs @SuppressWarnings("serial")
Fixed bug 2002722 - false + in UseStringBufferForStringAppends
Fixed bug 2056318 - False positive for AvoidInstantiatingObjectsInLoops
Fixed bug 1977438 - False positive for UselessStringValueOf
+Fixed bug 2050064 - False + SuspiciousOctalEscape with backslash literal
Optimizations and false positive fixes in PreserveStackTrace
@SuppressWarnings("all") disables all warnings
All comment types are now stored in ASTCompilationUnit, not just formal ones
diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/controversial/xml/SuspiciousOctalEscape.xml b/pmd/regress/test/net/sourceforge/pmd/rules/controversial/xml/SuspiciousOctalEscape.xml
index 90d9aa5ad0..cb05da5fde 100644
--- a/pmd/regress/test/net/sourceforge/pmd/rules/controversial/xml/SuspiciousOctalEscape.xml
+++ b/pmd/regress/test/net/sourceforge/pmd/rules/controversial/xml/SuspiciousOctalEscape.xml
@@ -49,6 +49,32 @@ public class Foo {
void bar() {
System.out.println("foo = \4008");
}
+}
+ ]]>
+
+
+
+ 0
+
+
+
+
+ 1
+
diff --git a/pmd/src/net/sourceforge/pmd/rules/SuspiciousOctalEscape.java b/pmd/src/net/sourceforge/pmd/rules/SuspiciousOctalEscape.java
index b044154d9b..7ce52dde5e 100644
--- a/pmd/src/net/sourceforge/pmd/rules/SuspiciousOctalEscape.java
+++ b/pmd/src/net/sourceforge/pmd/rules/SuspiciousOctalEscape.java
@@ -57,6 +57,8 @@ public class SuspiciousOctalEscape extends AbstractRule {
addViolation(data, node);
}
}
+ } else if (first == '\\') {
+ slash++;
}
offset = slash + 1;