Revision: 1258
http://stripes.svn.sourceforge.net/stripes/?rev=1258&view=rev
Author: fdaoud
Date: 2010-07-18 17:08:22 +0000 (Sun, 18 Jul 2010)
Log Message:
-----------
Fix for STS-757
Modified Paths:
--------------
trunk/stripes/src/net/sourceforge/stripes/validation/NumberTypeConverterSupport.java
Modified:
trunk/stripes/src/net/sourceforge/stripes/validation/NumberTypeConverterSupport.java
===================================================================
---
trunk/stripes/src/net/sourceforge/stripes/validation/NumberTypeConverterSupport.java
2010-06-09 20:02:10 UTC (rev 1257)
+++
trunk/stripes/src/net/sourceforge/stripes/validation/NumberTypeConverterSupport.java
2010-07-18 17:08:22 UTC (rev 1258)
@@ -37,10 +37,15 @@
this.formats = getNumberFormats();
// Use the appropriate currency symbol if our locale has a country,
otherwise try the dollar sign!
- if (locale.getCountry() != null && !"".equals(locale.getCountry()))
- this.currencySymbol =
Currency.getInstance(locale).getSymbol(locale);
- else
- this.currencySymbol = "$";
+ this.currencySymbol = "$";
+ if (locale.getCountry() != null && !"".equals(locale.getCountry())) {
+ try {
+ this.currencySymbol =
Currency.getInstance(locale).getSymbol(locale);
+ }
+ catch (IllegalArgumentException exc) {
+ // use dollar sign as default value
+ }
+ }
}
/** Returns the Locale set on the object using setLocale(). */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development