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 23044 - Infinite loop for relative URI (../../../*)
Summary: Infinite loop for relative URI (../../../*)
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Tools (show other bugs)
Version: 3.x
Hardware: PC Linux
: P4 blocker (vote)
Assignee: _ lkramolis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-02 13:04 UTC by _ pkuzel
Modified: 2007-09-25 01:33 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 _ pkuzel 2002-05-02 13:04:26 UTC
I have processing intruction referencing
stylesheet using relative URI to some parent. Then
if I perform Transform action it ends in infinite
loop:

"Module-Actions" daemon prio=1 tid=0x0x51504f38
nid=0x77d4 runnable [bd9ff000..bd9ff8ac]
        at
java.lang.String.substring(String.java:1478)
        at
org.apache.xml.utils.URI.initialize(URI.java:579)
        at
org.apache.xml.utils.URI.<init>(URI.java:232)
        at
org.apache.xml.utils.SystemIDResolver.getAbsoluteURI(SystemIDResolver.java:253)
        at
org.apache.xalan.processor.StylesheetPIHandler.processingInstruction(StylesheetPIHandler.java:255)
        at
org.apache.crimson.parser.Parser2.maybePI(Parser2.java:984)
        at
org.apache.crimson.parser.Parser2.maybeMisc(Parser2.java:1092)
        at
org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:487)
        at
org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
        at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
        at
org.apache.xalan.processor.TransformerFactoryImpl.getAssociatedStylesheet(TransformerFactoryImpl.java:430)
        at
org.netbeans.modules.xsl.utils.TransformUtil.getAssociatedStylesheet(TransformUtil.java:84)
        at
org.netbeans.modules.xsl.actions.TransformAction.getAssociatedStylesheet(TransformAction.java:208)
        at
org.netbeans.modules.xsl.actions.TransformAction.transformSingle(TransformAction.java:144)
        at
org.netbeans.modules.xsl.actions.TransformAction.performAction(TransformAction.java:123)
        at
org.openide.util.actions.NodeAction.performAction(Unknown
Source)
        at
org.openide.util.actions.NodeAction.actionPerformed(Unknown
Source)
        at
org.netbeans.core.ModuleActions$1.run(Unknown
Source)
        at org.openide.util.Task.run(Unknown
Source)
        at
org.openide.util.RequestProcessor$Processor.run(Unknown
Source)
Comment 1 _ pkuzel 2002-05-02 13:11:12 UTC
nbfs:QBdataQBcvsQBnb34QBnb_allQBxml/api/doc/changes/../../../../openide

It is caused by fact that mounted FS is mounted too deep.
URI should throw an exception to allow handling.

WORKAROUND:
Execute the action at a filesystem that is mounted at shallower
parent. 
Comment 2 _ pkuzel 2002-06-10 16:01:51 UTC
While fixing it try to use FileUtil.toFile().toURL(). It is not bullet
proof but it should work well for LocalFilesystem.
Comment 3 _ lkramolis 2002-06-11 11:04:17 UTC
Whenever possible "file:" URL used.
Comment 4 Martin Schovanek 2002-11-06 12:46:01 UTC
VERIFIED
Comment 5 Quality Engineering 2003-07-02 08:38:51 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.