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/NewMethodCompletionProposal.java
private ITypeBinding fSenderBinding;
	private boolean fIsLocalChange;
	
	public NewMethodCompletionProposal(String label, ICompilationUnit targetCU, ASTNode invocationNode,  List arguments, ITypeBinding binding, int relevance) {
		super(label, targetCU, null, relevance, JavaPluginImages.get(JavaPluginImages.IMG_MISC_PUBLIC));
		
		fNode= invocationNode;
		fArguments= arguments;
		fSenderBinding= binding;
	}
		
	protected ASTRewrite getRewrite() {
		ASTRewrite rewrite;
		CompilationUnit astRoot= ASTResolving.findParentCompilationUnit(fNode);
		ASTNode typeDecl= astRoot.findDeclaringNode(fSenderBinding);
		ASTNode newTypeDecl= null;
		if (typeDecl != null) {
			fIsLocalChange= true;
			ASTCloner cloner= new ASTCloner(new AST(), astRoot);
			CompilationUnit newRoot= (CompilationUnit) cloner.getClonedRoot();
			rewrite= new ASTRewrite(newRoot);
			
			newTypeDecl= cloner.getCloned(typeDecl);
		} else {
			fIsLocalChange= false;
			CompilationUnit newRoot= AST.parseCompilationUnit(getCompilationUnit(), true);
			rewrite= new ASTRewrite(newRoot);
			
			newTypeDecl= ASTResolving.findTypeDeclaration(newRoot, fSenderBinding);
		}