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 19151 - IllegalArgumentException while navigating contents of a jar file
Summary: IllegalArgumentException while navigating contents of a jar file
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 3.x
Hardware: Other Other
: P2 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-08 16:45 UTC by Richard Malaschitz
Modified: 2008-12-22 18:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
error (256.75 KB, image/jpeg)
2002-01-08 16:47 UTC, Richard Malaschitz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Malaschitz 2002-01-08 16:45:12 UTC
Bugtraq number: 4615397
Bugtraq author: vijaya.mummaneni@sun.com


Tested Env : 
Build011216, Win2000

FFJ automatically mounts the jar files that are in WEB_INF/lib 
direcotry.
I have two jar files parser.xml and jaxp.jar files that came with 

petstore1.1.2.

When I expanded the jar file and start navigating the sub 
directories
of these jar files I see the exception.  The exception picture is in 
the
attachment.
Comment 1 Richard Malaschitz 2002-01-08 16:47:17 UTC
Created attachment 4012 [details]
error
Comment 2 brinkley 2002-01-08 18:16:26 UTC
This is not a jarpackager issue. The default is not within the
jarpackager code. Additionally a full stack dump is needed. the
picture send is cropped and of little value as the line numbers are
not shown.
Comment 3 _ ttran 2002-01-09 07:04:27 UTC
Roger, why do you think that this bug belongs to core?  From the
picture of the exceptions it's clear that the exc happened in the text
module
Comment 4 Miloslav Metelka 2002-01-10 09:58:57 UTC
I think that this is not a problem of the text module. The cause of
the exception is the following:
1) The text module loader is trying to get an attribute named
"org.netbeans.modules.text.IsTextFile" from the fileobject that is
located in jar filesystem. As there are no restrictions on the name of
the attribute in the FileSystem API, this is pretty fine.
2) The JarFileSystem implementation delegates getting of the
fileobject attribute to getting of the attribute from the manifest.
The manifest creates Attributes.Name(String attrName) but there are
restrictions that prohibit having "." in the attribute name and the
IAE is thrown.
IMHO I think that JFS could either ignore such attribute or do some
kind of name mangling so that the name is valid from the Attributes
point of view. Reassigning to openide.
Comment 5 rmatous 2002-01-10 13:14:03 UTC
Fixed in release33 (JarFileSystem 1.60.2.3). Method readAttriubute
catches IllegalArgumentException and return null if not permitted
attribute-name appears (I also intend to add new test to extend test
suite).
Comment 6 Jan Zajicek 2002-01-10 15:46:59 UTC
verified
Comment 7 Jesse Glick 2002-01-14 20:43:35 UTC
Also cf. JDK docs bug: 4623202 (should show up on JDC shortly)
Comment 8 Quality Engineering 2003-07-01 16:10:42 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.