verify #1310 PMD cannot parse int.class

This commit is contained in:
Andreas Dangel
2015-02-09 21:36:49 +01:00
parent 12d6d71242
commit 5fbbe0ac94

View File

@ -194,4 +194,28 @@ class SuperTest {
}
throw new UnsupportedOperationException();
}
}
}
/*
* Test case for #1310 PMD cannot parse int.class
*/
class ClazzPropertyOfPrimitiveTypes {
public void test() {
Class<?> c = int.class;
c = short.class;
c = long.class;
c = float.class;
c = double.class;
c = char.class;
c = byte.class;
c = void.class;
if (c == int.class || c == short.class || c == long.class || c == double.class || c == char.class || c == byte.class || c == void.class) {
}
if ("a".equals((int.class).getName())) {
}
}
}