This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 68276

Summary: createMethod hint - incorrect parameter type for new type[]{element}
Product: java Reporter: pzajac <pzajac>
Component: UnsupportedAssignee: Pavel Flaska <pflaska>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description pzajac 2005-11-08 13:18:26 UTC
[200511071900]
Example:
  ..
  aMethod(new String[]{"hello"};
  ..

Shows hint:
create method aMethod(String string);

and create hint"
static void aMethod(String string) {

}

But correct method is:
static void aMethod(String string[]) {

}
Comment 1 Pavel Flaska 2005-11-08 14:00:50 UTC
Incorrect type is returned by NewClassExpression.getType() in java model.
Comment 2 Pavel Flaska 2005-11-08 14:05:51 UTC
Sorry, I meant New*Array*Expression.getType().
Comment 3 Pavel Flaska 2005-11-08 14:22:03 UTC
Checking in
org/netbeans/modules/javacore/jmiimpl/javamodel/NewArrayExpressionImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/NewArrayExpressionImpl.java,v
 <--  NewArrayExpressionImpl.java
new revision: 1.6; previous revision: 1.5
done
Comment 4 pzajac 2005-11-16 13:35:23 UTC
verified in trunk
Comment 5 Quality Engineering 2007-09-20 10:10:30 UTC
Reorganization of java component