Bug 24025 Quick fix create method gets wrong parameters if parameters are arrays
Steps: 1)type somewhere: Object[] test1= new Object[]{}; Object[] test2= new Object[]{}; if(compareTheseArrays(test1,test2)){ System.out.println("they are the same"); } 2)A Quick fix icon will appear and ask you to create Method compareTheseArrays, select this. 3)note that the method created takes Object as parameters and not Object[]. Should this be? version. 20020920. JRT.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/NewVariableCompletionProposal.java
if (fVariableKind == PARAM) {
			doAddParam(ast, node, rewrite);
		} else if (fVariableKind == FIELD) {
			doAddField(ast, node, rewrite);
		} else if (fVariableKind == LOCAL) {
			doAddLocal(ast, node, rewrite);
		}
		return rewrite;
	}
	private void doAddParam(AST ast, SimpleName node, ASTRewrite rewrite) {
		BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(node);
		if (decl instanceof MethodDeclaration) {
			SingleVariableDeclaration newDecl= ast.newSingleVariableDeclaration();
			newDecl.setType(evaluateVariableType(ast));
			newDecl.setName(ast.newSimpleName(node.getIdentifier()));
			
			rewrite.markAsInserted(newDecl);
			((MethodDeclaration)decl).parameters().add(newDecl);
		}
	}
	private void doAddLocal(AST ast, SimpleName node, ASTRewrite rewrite) {
		BodyDeclaration decl= ASTResolving.findParentBodyDeclaration(node);
		if (decl instanceof MethodDeclaration || decl instanceof Initializer) {
			
			VariableDeclarationFragment newDeclFrag= ast.newVariableDeclarationFragment();
			VariableDeclarationStatement newDecl= ast.newVariableDeclarationStatement(newDeclFrag);
			
			Type type= evaluateVariableType(ast);
			newDecl.setType(type);
			newDeclFrag.setName(ast.newSimpleName(node.getIdentifier()));