aboutsummaryrefslogtreecommitdiff
path: root/src/utils/lombok/javac/JavacTreeMaker.java
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2020-08-31 09:57:29 +0200
committerRawi01 <Rawi01@users.noreply.github.com>2020-08-31 09:57:29 +0200
commit82ac8aad1d0e3e152db4ce328184c40c73700cee (patch)
tree3d5abb9072d43b87f19e5faf88a3d09b6c6da8e4 /src/utils/lombok/javac/JavacTreeMaker.java
parent3d90a51163354930eeea0e26c2b0a567af8e96be (diff)
parent9148294f78a8e646ee131ca182a9b692bc028fdb (diff)
downloadlombok-82ac8aad1d0e3e152db4ce328184c40c73700cee.tar.gz
lombok-82ac8aad1d0e3e152db4ce328184c40c73700cee.tar.bz2
lombok-82ac8aad1d0e3e152db4ce328184c40c73700cee.zip
Merge branch 'master' into extensionmethod
Conflicts: build.xml
Diffstat (limited to 'src/utils/lombok/javac/JavacTreeMaker.java')
-rw-r--r--src/utils/lombok/javac/JavacTreeMaker.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/utils/lombok/javac/JavacTreeMaker.java b/src/utils/lombok/javac/JavacTreeMaker.java
index 20f4b66d..15a11151 100644
--- a/src/utils/lombok/javac/JavacTreeMaker.java
+++ b/src/utils/lombok/javac/JavacTreeMaker.java
@@ -343,10 +343,7 @@ public class JavacTreeMaker {
Method method = getFromCache(m);
try {
if (m.returnType.isPrimitive()) {
- Object res = method.invoke(owner, args);
- String sn = res.getClass().getSimpleName().toLowerCase();
- if (!sn.startsWith(m.returnType.getSimpleName())) throw new ClassCastException(res.getClass() + " to " + m.returnType);
- return (J) res;
+ return (J) method.invoke(owner, args);
}
return m.returnType.cast(method.invoke(owner, args));
} catch (InvocationTargetException e) {