mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00

Generalizing the crules infrastructure, adding a new analyzer to check String concatenation in Assert calls. Reviewed-by: jjg, vromero
11 lines
289 B
Java
11 lines
289 B
Java
/**@test /nodynamiccopyright/
|
|
* @compile/fail/ref=Test.out -Xplugin:coding_rules -XDrawDiagnostics Test.java
|
|
*/
|
|
|
|
import com.sun.tools.javac.util.Assert;
|
|
|
|
public class Test {
|
|
public void check(String value) {
|
|
Assert.check(value.trim().length() > 0, "value=" + value);
|
|
}
|
|
}
|