You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xmlgraphics.apache.org by bu...@apache.org on 2010/06/09 11:55:26 UTC
DO NOT REPLY [Bug 49412] New: [PATCH] Useless messages for exception
thrown in Image codec
https://issues.apache.org/bugzilla/show_bug.cgi?id=49412
Summary: [PATCH] Useless messages for exception thrown in Image
codec
Product: XMLGraphicsCommons
Version: Trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Image codecs
AssignedTo: general@xmlgraphics.apache.org
ReportedBy: julien.ayme@gmail.com
Created an attachment (id=25557)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25557)
The proposed patch
PropertyUtil references a non-existent resource bundle:
"org.apache.xmlgraphics.image.codec.resources.Messages".
The PropertyUtil class is used to generated localized message for the exception
thrown in image.codec subpackages, and since the resource is not supplied, the
generated exceptions messages are all useless (e.g. "PNGEncodeParam0").
I propose to change the pattern of the message key, instead of using "classname
+ number", by using a "real" meaningful message, like "invalid value supplied".
I will attach shortly:
- A patch to PropertyUtil to be able to give arguments to the messages,
- an enhancement of the messages for some classes in image.codec,
- a resource bundle (for Locale "en" and "fr")
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 49412] [PATCH] Useless messages for exception
thrown in Image codec
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49412
Julien Aymé <ju...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |PatchAvailable
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 49412] [PATCH] Useless messages for exception
thrown in Image codec
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49412
--- Comment #2 from Julien Aymé <ju...@gmail.com> 2010-06-09 05:58:58 EDT ---
Created an attachment (id=25558)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25558)
Resource bundle for English locale
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 49412] [PATCH] Useless messages for exception
thrown in Image codec
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49412
--- Comment #5 from Julien Aymé <ju...@gmail.com> 2010-06-09 06:03:06 EDT ---
Created an attachment (id=25561)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25561)
Patch for PNGEncodeParam class
Adding path for PNGEncodeParam class using the new bundle.
It produces more explicit/understandable messages in the exceptions thrown.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 49412] [PATCH] Useless messages for exception
thrown in Image codec
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49412
--- Comment #4 from Julien Aymé <ju...@gmail.com> 2010-06-09 06:01:18 EDT ---
Created an attachment (id=25560)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25560)
Patch for PNGDecodeParam class
Adding path for PNGDecodeParam class using the new bundle.
It produces more explicit/understandable messages in the exceptions thrown.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 49412] [PATCH] Useless messages for exception
thrown in Image codec
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49412
Jeremias Maerki <je...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #7 from Jeremias Maerki <je...@apache.org> 2010-06-13 12:37:13 EDT ---
Julien, thanks for looking into this. I've been wanting to do this for a long
time, and with your ticket I actually had to. Turns out, the original message
resources got lost along the way at some point and they didn't make the
transition from Batik to XGC.
Apparently, the mistake happened here:
http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/resources/org/apache/batik/ext/awt/image/codec/properties?r1=378233&r2=378232&pathrev=378233
In that light, your effort to start translating the messages is great but
unnecessary, except if you want to refine the whole thing. The exception
handling in these classes is certainly not a role model, for example. I'm
closing this issue. Please re-open if you think it's not good enough and want
to refine.
Messages restored:
http://svn.apache.org/viewvc?rev=954256&view=rev
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 49412] [PATCH] Useless messages for exception
thrown in Image codec
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49412
--- Comment #6 from Julien Aymé <ju...@gmail.com> 2010-06-09 06:06:49 EDT ---
I intend to continue for other classes in the image.codec package,
so I would like to have some comments/feedback on the method I used to add
localization for the codec package before changing the whole classes.
Any thoughts?
Julien
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 49412] [PATCH] Useless messages for exception
thrown in Image codec
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49412
--- Comment #1 from Julien Aymé <ju...@gmail.com> 2010-06-09 05:57:15 EDT ---
Note that the issue 47175 is similar to this issue; but this one propose a
better approach for solving the problem encountered.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org
DO NOT REPLY [Bug 49412] [PATCH] Useless messages for exception
thrown in Image codec
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49412
--- Comment #3 from Julien Aymé <ju...@gmail.com> 2010-06-09 05:59:22 EDT ---
Created an attachment (id=25559)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25559)
Resource bundle for French locale
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org