### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: model/org/eclipse/jdt/internal/core/BinaryMethod.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryMethod.java,v retrieving revision 1.106 diff -u -r1.106 BinaryMethod.java --- model/org/eclipse/jdt/internal/core/BinaryMethod.java 28 Jun 2010 13:07:11 -0000 1.106 +++ model/org/eclipse/jdt/internal/core/BinaryMethod.java 4 Aug 2010 21:38:35 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -183,8 +183,15 @@ IBinaryMethod info = (IBinaryMethod) getElementInfo(); // https://bugs.eclipse.org/bugs/show_bug.cgi?id=316937 // Use Signature#getParameterCount() only if the argument names are not already available. - final int paramCount = info.getArgumentNames() == null ? info.getArgumentNames().length : - Signature.getParameterCount(new String(info.getMethodDescriptor())); + int paramCount = Signature.getParameterCount(new String(info.getMethodDescriptor())); + if (this.isConstructor()) { + final IType declaringType = this.getDeclaringType(); + if (declaringType.isMember() + && !Flags.isStatic(declaringType.getFlags())) { + paramCount--; // remove synthetic argument from constructor param count + } + } + if (paramCount != 0) { // don't try to look for javadoc for synthetic methods int modifiers = getFlags();