Skip to content

Commit

Permalink
GROOVY-8757
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Sep 16, 2019
1 parent 64f3ae0 commit 59ef171
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,9 @@ private static void createForwarderMethod(
helperMethodArgList
);
mce.setImplicitThis(false);

/* GRECLIPSE edit -- GROOVY-8757
genericsSpec = GenericsUtils.addMethodGenerics(helperMethod,genericsSpec);

*/
ClassNode[] exceptionNodes = correctToGenericsSpecRecurse(genericsSpec, copyExceptions(helperMethod.getExceptions()));
ClassNode fixedReturnType = correctToGenericsSpecRecurse(genericsSpec, helperMethod.getReturnType());
boolean noCastRequired = genericsSpec.isEmpty() || fixedReturnType.getName().equals(ClassHelper.VOID_TYPE.getName());
Expand All @@ -341,8 +341,7 @@ private static void createForwarderMethod(
// guaranteed to be always present
boolean isHelperForStaticMethod = helperMethodParams[0].getOriginType().equals(ClassHelper.CLASS_Type);
if (Modifier.isPrivate(access) && !isHelperForStaticMethod) {
// do not create forwarder for private methods
// see GROOVY-7213
// GROOVY-7213: do not create forwarder for private methods
return;
}
if (!isHelperForStaticMethod) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ private static void createForwarderMethod(
helperMethodArgList
);
mce.setImplicitThis(false);

/* GRECLIPSE edit -- GROOVY-8757
genericsSpec = GenericsUtils.addMethodGenerics(helperMethod,genericsSpec);

*/
ClassNode[] exceptionNodes = correctToGenericsSpecRecurse(genericsSpec, copyExceptions(helperMethod.getExceptions()));
ClassNode fixedReturnType = correctToGenericsSpecRecurse(genericsSpec, helperMethod.getReturnType());
boolean noCastRequired = genericsSpec.isEmpty() || fixedReturnType.getName().equals(ClassHelper.VOID_TYPE.getName());
Expand All @@ -345,8 +345,7 @@ private static void createForwarderMethod(
// guaranteed to be always present
boolean isHelperForStaticMethod = helperMethodParams[0].getOriginType().equals(ClassHelper.CLASS_Type);
if (Modifier.isPrivate(access) && !isHelperForStaticMethod) {
// do not create forwarder for private methods
// see GROOVY-7213
// GROOVY-7213: do not create forwarder for private methods
return;
}
if (!isHelperForStaticMethod) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ private static void createForwarderMethod(
helperMethodArgList
);
mce.setImplicitThis(false);

/* GRECLIPSE edit -- GROOVY-8757
genericsSpec = GenericsUtils.addMethodGenerics(helperMethod,genericsSpec);

*/
ClassNode[] exceptionNodes = correctToGenericsSpecRecurse(genericsSpec, copyExceptions(helperMethod.getExceptions()));
ClassNode fixedReturnType = correctToGenericsSpecRecurse(genericsSpec, helperMethod.getReturnType());
boolean noCastRequired = genericsSpec.isEmpty() || fixedReturnType.getName().equals(ClassHelper.VOID_TYPE.getName());
Expand All @@ -345,8 +345,7 @@ private static void createForwarderMethod(
// guaranteed to be always present
boolean isHelperForStaticMethod = helperMethodParams[0].getOriginType().equals(ClassHelper.CLASS_Type);
if (Modifier.isPrivate(access) && !isHelperForStaticMethod) {
// do not create forwarder for private methods
// see GROOVY-7213
// GROOVY-7213: do not create forwarder for private methods
return;
}
if (!isHelperForStaticMethod) {
Expand Down

0 comments on commit 59ef171

Please sign in to comment.