You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mikhail Loenko <ml...@gmail.com> on 2006/06/28 14:04:48 UTC
[classlib] request for modification of String.java
As a fix for H-663 I'd like to apply this patch
@@ -848,6 +848,8 @@
if (charset == null || !encoding.equalsIgnoreCase(charset.name())) {
try {
charset = Charset.forName(encoding);
+ } catch (IllegalCharsetNameException e) {
+ throw new UnsupportedEncodingException(encoding);
} catch (UnsupportedCharsetException e) {
throw new UnsupportedEncodingException(encoding);
}
Please comment
Thanks,
Mikhail
http://issues.apache.org/jira/browse/HARMONY-663
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
Re: [classlib] request for modification of String.java
Posted by Tim Ellison <t....@gmail.com>.
So for it!
Regards,
Tim
Mikhail Loenko wrote:
> As a fix for H-663 I'd like to apply this patch
>
> @@ -848,6 +848,8 @@
> if (charset == null ||
> !encoding.equalsIgnoreCase(charset.name())) {
> try {
> charset = Charset.forName(encoding);
> + } catch (IllegalCharsetNameException e) {
> + throw new UnsupportedEncodingException(encoding);
> } catch (UnsupportedCharsetException e) {
> throw new UnsupportedEncodingException(encoding);
> }
>
>
> Please comment
>
> Thanks,
> Mikhail
>
> http://issues.apache.org/jira/browse/HARMONY-663
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>
--
Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org
RE: [classlib] request for modification of String.java
Posted by Nathan Beyer <nb...@kc.rr.com>.
The patch looks okay to me. Although not a big concern in this case, I like
to propagate the cause of exceptions that are results of other exceptions.
Since this exception doesn't have a cause constructor, you can use
'initCause' like this: throw (UnsupportedEncodingException)(new
UnsupportedEncodingException(encoding).initCause(e);
-Nathan
> -----Original Message-----
> From: Mikhail Loenko [mailto:mloenko@gmail.com]
> Sent: Wednesday, June 28, 2006 7:05 AM
> To: harmony-dev@incubator.apache.org
> Subject: [classlib] request for modification of String.java
>
> As a fix for H-663 I'd like to apply this patch
>
> @@ -848,6 +848,8 @@
> if (charset == null ||
> !encoding.equalsIgnoreCase(charset.name())) {
> try {
> charset = Charset.forName(encoding);
> + } catch (IllegalCharsetNameException e) {
> + throw new
UnsupportedEncodingException(encoding);
> } catch (UnsupportedCharsetException e) {
> throw new
UnsupportedEncodingException(encoding);
> }
>
>
> Please comment
>
> Thanks,
> Mikhail
>
> http://issues.apache.org/jira/browse/HARMONY-663
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org