You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2006/02/05 18:36:34 UTC

DO NOT REPLY [Bug 38520] New: - charset error handling not compatible with Java 1.4

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=38520>.
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=38520

           Summary: charset error handling not compatible with Java 1.4
           Product: HttpClient
           Version: 4.0
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: minor
          Priority: P2
         Component: HttpCommon
        AssignedTo: httpclient-dev@jakarta.apache.org
        ReportedBy: http-async@dubioso.net


Two methods in EncodingUtils check for UnsupportedEncodingException,
to trigger a fallback, but Java 1.4 or above might throw java.nio.charset.*
exceptions. Still, there should not be a dependency on the Java 1.4 API.

patch follows,
  Roland

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38520] - charset error handling not compatible with Java 1.4

Posted by bu...@apache.org.
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=38520>.
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=38520





------- Additional Comments From olegk@apache.org  2006-02-06 10:56 -------
(In reply to comment #3)
> Hi Oleg,
...
> I wouldn't have a problem with exceptions being thrown on all JVMs. But
> handling the exception on some JVMs, while letting it fly through on another,
> that can not be the idea of writing portable code.
> 
> cheers,
>   Roland

Roland,
This is not our job to work around inconsistencies across various JRE
implementations. Plain and simple. IBM JVMs are known to behave quite
differently compared to SUN ones especially with regards to TCP/IP networking.
We do not do anything (and cant do much) about it 

Oleg 

Oleg


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38520] - charset error handling not compatible with Java 1.4

Posted by bu...@apache.org.
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=38520>.
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=38520





------- Additional Comments From http-async@dubioso.net  2006-02-05 18:37 -------
Created an attachment (id=17595)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17595&action=view)
patch, take 1

not pretty, but functional
test cases included

cheers,
  Roland


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38520] - charset error handling not compatible with Java 1.4

Posted by bu...@apache.org.
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=38520>.
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=38520





------- Additional Comments From http-async@dubioso.net  2006-02-06 11:27 -------
Ok, let's drop this. If ever a user encounters the problem,
we know where to find the patch. If not, there is no problem :-)

cheers,
  Roland

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38520] - charset error handling not compatible with Java 1.4

Posted by bu...@apache.org.
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=38520>.
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=38520





------- Additional Comments From olegk@apache.org  2006-02-06 10:07 -------
Roland,
Honestly, I do not think this is all worth it. IllegalCharsetException is
perfectly okay in my opinion. It should be handled differently as
UnsupportedEncodingException.

Oleg 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38520] - charset error handling not compatible with Java 1.4

Posted by bu...@apache.org.
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=38520>.
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=38520





------- Additional Comments From http-async@dubioso.net  2006-02-06 10:39 -------
Hi Oleg,

two of the three JDKs I've tested with will throw an UnsupportedCharsetException
*although* the error is actually an IllegalCharsetNameException. Since different
JVMs do throw different exceptions for the *same* problem, I don't think it is a
good idea to handle these different exceptions differently in our code.

I don't see the point of implementing a fallback handling if you're not going
to fall back to it consistently. The fallback should apply in a specific
error situation, even if that situation is indicated by different exceptions
in different JVMs.

I wouldn't have a problem with exceptions being thrown on all JVMs. But
handling the exception on some JVMs, while letting it fly through on another,
that can not be the idea of writing portable code.

cheers,
  Roland

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38520] - charset error handling not compatible with Java 1.4

Posted by bu...@apache.org.
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=38520>.
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=38520


olegk@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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