Index: IfPseudoToken.java =================================================================== retrieving revision 1.4 diff -u -r1.4 IfPseudoToken.java --- IfPseudoToken.java 26 Feb 2003 10:57:59 -0000 1.4 +++ IfPseudoToken.java 24 Feb 2004 08:40:16 -0000 @@ -23,6 +23,7 @@ import org.eclipse.jdt.internal.compiler.CompilationResult; import org.eclipse.jdt.internal.compiler.ast.Argument; import org.eclipse.jdt.internal.compiler.ast.Expression; +import org.eclipse.jdt.internal.compiler.ast.FalseLiteral; import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; import org.eclipse.jdt.internal.compiler.ast.ReturnStatement; import org.eclipse.jdt.internal.compiler.ast.Statement; @@ -77,6 +78,10 @@ // "if pcd is not implemented in 1.1alpha1"); //XXX need to implement correctly if (pointcut == null) return; + //if the expression is just "false", then there is no need to + //generate that method + //hint: This behaviour here is also exploited by IfPointcut.fastMatch ! + if (this.expr.getClass()==FalseLiteral.class) return; testMethod = makeMethod(enclosingDec.compilationResult, enclosingDec); AstUtil.addMethodDeclaration(typeDec, testMethod); }