From 3948a2d58b4b76b6da0f6b2a13e7751fdf9990f7 Mon Sep 17 00:00:00 2001 From: Andreas Gudian Date: Wed, 12 Nov 2014 21:26:58 +0100 Subject: [PATCH] #312 prevent another possible ClassCastException in JDT in case we try to compute the erasure of the Null type --- .../java/org/mapstruct/ap/util/SpecificCompilerWorkarounds.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processor/src/main/java/org/mapstruct/ap/util/SpecificCompilerWorkarounds.java b/processor/src/main/java/org/mapstruct/ap/util/SpecificCompilerWorkarounds.java index dc62c5782..251a5f5fc 100644 --- a/processor/src/main/java/org/mapstruct/ap/util/SpecificCompilerWorkarounds.java +++ b/processor/src/main/java/org/mapstruct/ap/util/SpecificCompilerWorkarounds.java @@ -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 {