@@ -182,8 +182,9 @@ public abstract class Advice extends ShadowMunger { | |||
// " from " + shadow.getReturnType()); | |||
if (getSignature().getReturnType().equals(UnresolvedType.VOID)) { | |||
if (!shadow.getReturnType().equals(UnresolvedType.VOID)) { | |||
world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.NON_VOID_RETURN, shadow), | |||
getSourceLocation(), shadow.getSourceLocation()); | |||
String s = shadow.toString(); | |||
String s2 = WeaverMessages.format(WeaverMessages.NON_VOID_RETURN, s); | |||
world.showMessage(IMessage.ERROR, s2, getSourceLocation(), shadow.getSourceLocation()); | |||
return false; | |||
} | |||
} else if (getSignature().getReturnType().equals(UnresolvedType.OBJECT)) { |
@@ -61,7 +61,7 @@ itdNonExposedImplementor=type {0} must be accessible for weaving interface inter | |||
itdAbstractMustBePublicOnInterface=abstract intertype method declaration ''{0}'' on interface {1} must be declared public (compiler limitation) | |||
# advice messages... | |||
nonVoidReturn=applying to join point that doesn't return void: {0} | |||
nonVoidReturn=applying to join point that doesn''t return void: {0} | |||
incompatibleReturnType=incompatible return type applying to {0} | |||
cantThrowChecked=can''t throw checked exception ''{0}'' at this join point ''{1}'' | |||
circularDependency=circular advice precedence: can''t determine precedence between two or more pieces of advice that apply to the same join point: {0} |