Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.1.15.pre0, 6.1.15.rc2, 6.1.15.rc3, 6.1.15.rc4, 6.1.15.rc5, 6.1.15, 6.1.16, 6.1.17, 6.1.18, 6.1.19, 6.1.20, 6.1.21, 6.1.22, 6.1.23, 6.1.24, 6.1.25
-
Fix Version/s: 6.1.26
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Reported by Matt Tenant on the jetty list:
I have run across an issue in our usage of Jetty which I would like to bounce off this list. We have an application that runs in an OSGi environment, and we use the Apache Felix Jetty OSGi bundle version 1.0.0 to provide Jetty. The Jetty version in that OSGi bundle is 6.1.14. In a recent run, we got the following exception:
java.lang.NoSuchMethodError: java.lang.String: method split(Ljava/lang/String
[Ljava/lang/String; not found
at org.mortbay.jetty.HttpConnection$RequestHandler.parsedHeader(UnknownSource)
at org.mortbay.jetty.HttpParser.parseNext(Unknown Source)
at org.mortbay.jetty.HttpParser.parseAvailable(Unknown Source)
at org.mortbay.jetty.HttpConnection.handle(Unknown Source)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(Unknown Source)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(Unknown Source)
at java.lang.Thread.startup(Unknown Source)
Note that we run with a JVM that supplies the Connected Device Configuration, and the CDC does not contain a split method for the String class, as you can see here:
http://download.oracle.com/javame/config/cdc/ref-impl/cdc1.1.2/jsr218/java/lang/String.html
After some looking around, it appears that Jetty is supposed to be CDC-compatible, as mentioned here:
http://docs.codehaus.org/display/JETTY/J2ME+CDC
I downloaded the 6.1.14 Jetty source, as well as the latest 6.1 source (6.1.25). In both cases I found the String.split usage, as seen here in the 6.1.25 version of HttpConnection.java:
grep -n --context=5 split HttpConnection.java
819- int ordinal = HttpHeaderValues.CACHE.getOrdinal(value);
820- switch (ordinal)
821- {
822- case -1:
823- {
824: String[] values = value.toString().split(",");
825- for (int i = 0; values != null && i < values.length; i++)
826- {
827- CachedBuffer cb = HttpHeaderValues.CACHE.get(values[i].trim());
828-
829- if (cb != null)
Some quick grepping shows that the String.split method is also used in a few other places. So, can anyone tell me whether this is a bug? Please give me any suggestions based on my research above.
Replaced split with QuotedStringtokenizer