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 46008 - XmiSAXReader throws IllegalArgumentException
Summary: XmiSAXReader throws IllegalArgumentException
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-11 19:08 UTC by alexandersthomas
Modified: 2004-08-13 12:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alexandersthomas 2004-07-11 19:08:17 UTC
Build number: 200405251800

File XMIReader contains a code segement:
    public Collection read (InputStream input, 
String uri, RefPackage[] extents, String 
encoding)
        throws IOException, SAXException, 
ParserConfigurationException {            
        InputSource is = new InputSource (input);
        if (encoding != null) {
            is.setEncoding(encoding);
        }
        if (uri != null) {
            is.setSystemId(uri);
            try {
                docURL = new URI (uri).toURL ();
            } catch (URISyntaxException e) {
            } catch (MalformedURLException e) {
            }
            //New start
            catch (IllegalArgumentException e) {
            }
            //New end
        }
        return read (is, extents);
    }

I had to add the line which is enclosed by 
the //New start //New end lines to be able to 
load xmi files.
Otherwise an IllegalArgumentException will be 
thrown.
Comment 1 alexandersthomas 2004-07-11 19:13:05 UTC
I did not quote the filename correctly. 
That one is: org.netbeans.lib.jmi.xmi.XmiSAXReader
Comment 2 Martin Matula 2004-07-12 09:09:27 UTC
How are you using the XMI reader? Could you attach the stacktrace of
the exception? I don't see why this is a P1 bug in MDR code since the
exception most likely means you are passing an invalid URI.
Comment 3 Martin Matula 2004-07-12 09:11:52 UTC
Oops, ok, I see what you mean. Could you please attach the exception
stacktrace and the url you are passing?
Comment 4 Martin Matula 2004-07-12 14:44:01 UTC
Fixed.

Checking in jmiutils/src/org/netbeans/lib/jmi/xmi/XmiSAXReader.java;
/cvs/mdr/jmiutils/src/org/netbeans/lib/jmi/xmi/XmiSAXReader.java,v 
<--  XmiSAXReader.java
new revision: 1.3; previous revision: 1.2
done