Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 121664 - code completion does not work with generic array creation
code completion does not work with generic array creation
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Editor
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Dusan Balek
issues@java
release60_fixes_candidate1, release60...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-10 20:29 UTC by damian_nb
Modified: 2007-12-12 16:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description damian_nb 2007-11-10 20:29:27 UTC
In following class:


import java.util.Vector;

public class ArrayGeneric
{
	static Vector<String>[] vArray;

	public static void main(String[] args)
	{
		vArray = (Vector<String>[]) Array/*1*/.newInstance(Vector.class, 0);
	}
}

code completion does not work in #1, should be possible to choose java.lang.reflect.Array (more, drop down list is
empty)- the problem is in String[] - when I remove [] code completion works
Comment 1 Jiri Prox 2007-11-12 11:21:01 UTC
Reproducible,

in RC1 the problem seems to be more general - CC does not work behind the cast to generic, e.g. 
List s = (List<String>) /* here */

Product Version: NetBeans IDE 6.0 RC1 (Build 200711111200)
Java: 1.6.0_05-ea; Java HotSpot(TM) Client VM 1.6.0_05-ea-b06
System: Linux version 2.6.5-1.358 running on i386; UTF-8; en_US (nb)
Comment 2 Dusan Balek 2007-11-12 15:04:57 UTC
Fixed.

Checking in JavaCompletionProvider.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/JavaCompletionProvider.java,v  <--  JavaCompletionProvider.java
new revision: 1.168; previous revision: 1.167
done
Comment 3 damian_nb 2007-11-15 14:49:11 UTC
verified with build 200711141200
Comment 4 pgebauer 2007-12-03 14:51:29 UTC
The fix has been ported into the release60_fixes branch.

Checking in JavaCompletionProvider.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/JavaCompletionProvider.java,v  <--  JavaCompletionProvider.java
new revision: 1.166.4.1; previous revision: 1.166
done
Comment 5 Max Sauer 2007-12-10 10:17:40 UTC
Verified in 6.0 with patch1.
---
Product Version: NetBeans IDE Dev (Build 20071207081312)
Java: 1.5.0_14; Java HotSpot(TM) Client VM 1.5.0_14-b03
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)
Userdir: /space/test0


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo