cuongup4d / gettext-commons

Automatically exported from code.google.com/p/gettext-commons
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Please use equals() to compare two strings in I18n.java #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In I18n.java:

this could cause problems:
return translated == key ? text : translated;

it should be:
return translated.equals( key ) ? text : translated;

Regards, 
Rainer

Original issue reported on code.google.com by google@backend-server.de on 23 Feb 2009 at 9:57

GoogleCodeExporter commented 8 years ago
Hi, Rainer,

I don't see a problem with that. As you can see I18n.tr(String) returns the 
argument if the resource can't be 
found, so an == comparison should be fine there.

Original comment by berge...@gmail.com on 23 Feb 2009 at 1:51

GoogleCodeExporter commented 8 years ago

Original comment by berge...@gmail.com on 1 Mar 2009 at 9:39