Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-2973

Escaped Unicode characters should not be used

    XMLWordPrintable

    Details

    • Type: Code Smell Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Remove this Unicode escape sequence and use the character instead.
    • Default Severity:
      Major
    • Impact:
      Low
    • Likelihood:
      High
    • Covered Languages:
      Java
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      5min
    • Analysis Scope:
      Main Sources, Test Sources
    • Checkstyle:
      AvoidEscapedUnicodeCharacters

      Description

      The use of Unicode escape sequences should be reserved for characters that would otherwise be ambiguous, such as unprintable characters.

      This rule ignores sequences composed entirely of Unicode characters, but otherwise raises an issue for each Unicode character that represents a printable character.

      Noncompliant Code Example

      String prefix = "n\u00E9e"; // Noncompliant
      

      Compliant Solution

      String prefix = "née";
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ann.campbell.2 Ann Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: