Files
openide/java/java-impl/resources/inspectionDescriptions/DuplicateStringLiteralInspection.html
2025-02-05 04:43:28 +00:00

19 lines
815 B
HTML

<html>
<body>
Reports string literals that are replicated unchanged throughout the project.
Two quick-fixes are provided. One to introduce a constant for a duplicated string and use it throughout the project,
and one to show the location of all the duplicates of a particular string literal.
<p>Example:</p>
<pre><code>
class C1 { String CONST1 = "duplicate string"; }
class C2 { String CONST2 = "duplicate string"; }
</code></pre>
<!-- tooltip end -->
<p>Configure the inspection:</p>
<ul>
<li>Use the <b>Min string length</b> field to set the minimal string length required to detect duplicates.</li>
<li>Use the <b>Ignore @PropertyKey expressions</b> option to ignore strings passed as arguments to methods annotated with
<code>org.jetbrains.annotations.PropertyKey</code>.</li>
</ul>
</body>
</html>