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 42728

Summary: ClassPathProviderImpl causes AIOOB
Product: java Reporter: Petr Nejedly <pnejedly>
Component: ProjectAssignee: issues@java <issues>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41537    

Description Petr Nejedly 2004-05-03 17:46:06 UTC
org.netbeans.modules.java.j2seproject.classpath.ClassPathProviderImpl:202
can end up in AIOOB because getType can return -1,
but line 202 does cache[type] without further
checking.

How to reproduce (probably bad usage, but the IDE
should either survive or prevent me from doing it):
Create a j2se project, make a lib dir under its
project root, copy some external library there,
create a library definition from that folder and
add that library to the project classpath.
About any parser inquiry will cause the exception.
Comment 1 Jesse Glick 2004-08-04 02:11:48 UTC
Old issue; current code does not appear to have such a problem.