Well, I used the JDK as-is. This looks like a bug in the code
class WriteFinishedEvent extends Event {
WriteFinishedEvent (ExchangeImpl t) {
super (t);
assert !t.writefinished;
t.writefinished = true;
}
}
Why do a false assertion then set the same variable to true? Also,
writefinished is not referenced/set anywhere in that package except for
this code. So how can it ever work?
BTW, apologies, I didn't even know you could have mulitple non-public
class definitions in the same .java file.
On 4/24/12 12:07 PM, Jason T. Greene wrote:
Oh btw. Assertions are broken in the sun http server code.
That's
probably your problem. If you enable assertions they are not enabled for
the JDK code. We need to comment them out and do a new release.
On 4/24/12 11:06 AM, Jason T. Greene wrote:
> That's a private class:
>
>
https://github.com/jbossas/httpserver/blob/master/src/main/java/org/jboss...
>
>
>
> On 4/24/12 11:00 AM, Bill Burke wrote:
>> Code is missing, Specifically
>> org.jboss.sun.net.httpserver.WriteFinishedEvent
>>
>>
>>
>>
>> Exception in thread "Thread-3" java.lang.AssertionError
>> at org.jboss.sun.net.httpserver.WriteFinishedEvent.<init>(Event.java:40)
>> at
>>
org.jboss.sun.net.httpserver.FixedLengthOutputStream.close(FixedLengthOutputStream.java:98)
>>
>>
>>
>> at
>>
org.jboss.sun.net.httpserver.PlaceholderOutputStream.close(ExchangeImpl.java:517)
>>
>>
>>
>> at
>>
org.jboss.resteasy.plugins.server.sun.http.ResteasyHttpHandler.handle(ResteasyHttpHandler.java:86)
>>
>>
>>
>> at
>> org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)
>> at org.jboss.sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:80)
>> at
>> org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81)
>> at
>>
org.jboss.sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:710)
>>
>>
>>
>> at
>> org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)
>> at
>> org.jboss.sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:682)
>>
>> at
>>
org.jboss.sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:202)
>>
>>
>>
>> at
>> org.jboss.sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:468)
>>
>>
>>
>> at
>> org.jboss.sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:433)
>>
>>
>> at java.lang.Thread.run(Thread.java:680)
>>
>>
>>
>
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com