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 8977

Summary: StringIndexOfBoundException on add file attribute
Product: platform Reporter: pzajac <pzajac>
Component: -- Other --Assignee: rmatous <rmatous>
Status: CLOSED FIXED    
Severity: normal    
Priority: P4    
Version: 3.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description pzajac 2000-12-21 21:20:14 UTC
[release31-31]
Exception thrown on add filesystem attribute with object value:
(String) "\\"
java.lang.StringIndexOutOfBoundsException: String index out of range: 2
        at java.lang.String.charAt(String.java:507)
        at org.openide.filesystems.XMLMapAttr$Attr.decode(XMLMapAttr.java:536)
        at org.openide.filesystems.XMLMapAttr$Attr.putEntry(XMLMapAttr.java:299)
        at org.openide.filesystems.XMLMapAttr$Attr.<init>(XMLMapAttr.java:278)
        at
org.openide.filesystems.DefaultAttributes.writeAttribute(DefaultAttributes.java:248)
        at
org.openide.filesystems.AbstractFileObject.setAttribute(AbstractFileObject.java:251)
        at org.netbeans.qa.test.FileAttrib.randomAdd(FileAttrib.java:146)
        at org.netbeans.qa.test.FileAttrib.access$000(FileAttrib.java:20)
        at org.netbeans.qa.test.FileAttrib$TestRunnable.run(FileAttrib.java:247)
        at org.openide.util.Task.run(Task.java:124)
        at java.lang.Thread.run(Thread.java:484)
Comment 1 rmatous 2001-01-05 10:45:59 UTC
Fixed in main trunk. Loop is now correctly tested.
Comment 2 pzajac 2002-08-15 16:51:35 UTC
verified in Nb34 rc2
Comment 3 Quality Engineering 2003-07-01 16:16:00 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.