Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002187 [Resin] trivial always 11-19-07 01:23 12-17-07 16:18
Reporter dibo View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.5 Product Version 3.1.3
  Product Build
Summary 0002187: java.lang.StringIndexOutOfBoundsException: String index out of range: 1
Description While playing with a JAX-WS client on Resin Open Source 3.1.3 under Windows XP, I've encountered the following exception:

java.lang.StringIndexOutOfBoundsException: String index out of range: 1
at java.lang.String.charAt(String.java:558)
at java.util.regex.Matcher.appendReplacement(Matcher.java:696)
at java.util.regex.Matcher.replaceAll(Matcher.java:806)
at java.lang.String.replaceAll(String.java:2000)
at javax.xml.bind.FactoryLoader.getFactoryClass(FactoryLoader.java:113)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:144)
Steps To Reproduce
Additional Information Having a look at source code of javax.xml.bind.FactoryLoader.getFactoryClass(FactoryLoader.java:113)
 
Line 113: String pkg = pkgs[i].replaceAll("\\.", File.separator);

I see that this code is platform dependant on unix based systems ( because on Windows ones File.separator unfolds to "\\" ).I've changed this to
 
Line 113: String pkg = pkgs[i].replaceAll("\\.", escapeSeparator(File.separator));

where escapeSeparator is defined as follows:
public static String escapeSeparator( String separator )
{
  if( "\\".equals( separator ) )
  {
    return "\\" + separator;
  }
  else
  {
    return separator;
  }
}

After having resin recompiled, the problem seems to be fixed.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
11-19-07 01:23 dibo New Issue
11-19-07 01:30 stbu Issue Monitored: stbu
12-17-07 16:18 ferg Assigned To  => ferg
12-17-07 16:18 ferg Status new => closed
12-17-07 16:18 ferg Resolution open => fixed
12-17-07 16:18 ferg Fixed in Version  => 3.1.5
01-30-08 09:03 davehardwick Issue Monitored: davehardwick


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker