Please use the Apache issue tracking system for new NetBeans issues ( !!

Bug 121664

Summary: code completion does not work with generic array creation
Product: java Reporter: damian_nb <damian_nb>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: VERIFIED FIXED QA Contact: issues <>
Priority: P2    
Version: 6.x   
Target Milestone: 6.x   
Hardware: All   
OS: All   
Whiteboard: release60_fixes_candidate1, release60_fixes_fixed
Issue Type: DEFECT Exception Report:

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

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

Checking in;
/cvs/java/editor/src/org/netbeans/modules/editor/java/,v  <--
new revision: 1.168; previous revision: 1.167
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;
/cvs/java/editor/src/org/netbeans/modules/editor/java/,v  <--
new revision:; previous revision: 1.166
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