#312 prevent another possible ClassCastException in JDT in case we try to compute the erasure of the Null type

This commit is contained in:
Andreas Gudian 2014-11-12 21:26:58 +01:00 committed by Gunnar Morling
parent 760be8f4f8
commit 3948a2d58b

View File

@ -66,7 +66,7 @@ public class SpecificCompilerWorkarounds {
* @jls 4.6 Type Erasure
*/
public static TypeMirror erasure(Types types, TypeMirror t) {
if ( t.getKind() == TypeKind.VOID ) {
if ( t.getKind() == TypeKind.VOID || t.getKind() == TypeKind.NULL ) {
return t;
}
else {