commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 28257] New: - [PATCH] ValidatorAction class issue
Date Wed, 07 Apr 2004 12:07:55 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28257>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28257

[PATCH] ValidatorAction class issue

           Summary: [PATCH] ValidatorAction class issue
           Product: Commons
           Version: 1.1.1
          Platform: PC
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Validator
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: mike@summa-tech.com


I'm currently using commons-validator 1.1.1 in a Java Web Start client bundled
with jre 1.4.2.
Whenever using a JNLP file to download the application, commons-validator hangs
in ValidatorAction class and to be more precise, it hangs in readJavascriptFile
method.

Debugging that method I found a while loop that reads a javascript resource
based on InputStream.available() and InputStream.read() methods.
It seems that inside a Web Start environment, available() method always returns
a positive number while read() method is returning a negative number (-1) which
leads to a infinite loop.

That doesn't happen using a regular jar or class file to kick off the
application. I really don't know why this happens in Web Start environment but
either way, I've listened that InputStream.available() is not a very trusted
method. Does it make sense?

I've also downloaded commons-validator 1.1.2 but it has the same issue.
I've also tested Java Web Start bundled with jre 1.5 beta - it does not hang in
this environment.
The same behavior happens in a W2K/XP box as in a Mandrake Linux box.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message