22 lines
587 B
Plaintext
22 lines
587 B
Plaintext
include::../description.adoc[]
|
||
|
||
== Noncompliant Code Example
|
||
|
||
----
|
||
String tabInside = "A B"; // Noncompliant, contains a tabulation
|
||
String zeroWidthSpaceInside = "foobar"; // Noncompliant, it contains a U+200B character inside
|
||
char tab = ' ';
|
||
----
|
||
|
||
== Compliant Solution
|
||
|
||
----
|
||
String tabInside = "A\tB"; // Compliant, uses escaped value
|
||
String zeroWidthSpaceInside = "foo\u200Bbar"; // Compliant, uses escaped value
|
||
char tab = '\t';
|
||
----
|
||
|
||
== Exceptions
|
||
|
||
Text Blocks string literals (java 13 three double-quote marks) can contain tabulations to allow indentation using tabulations.
|