mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
24 lines
701 B
HTML
24 lines
701 B
HTML
<html>
|
|
<body>
|
|
Reports <code>StringTokenizer()</code> constructor calls or <code>nextToken()</code> method calls that
|
|
contain duplicate characters in the delimiter argument.
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
void printTokens(String text) {
|
|
StringTokenizer tokenizer = new StringTokenizer(text, "\n\n");
|
|
while (tokenizer.hasMoreTokens()) {
|
|
System.out.println(tokenizer.nextToken());
|
|
}
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
void printTokens(String text) {
|
|
StringTokenizer tokenizer = new StringTokenizer(text, "\n");
|
|
while (tokenizer.hasMoreTokens()) {
|
|
System.out.println(tokenizer.nextToken());
|
|
}
|
|
}
|
|
</code></pre>
|
|
</body>
|
|
</html> |