summaryrefslogtreecommitdiffstats
path: root/java/examples
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-01-17 20:20:07 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-01-17 20:20:44 (GMT)
commit5bb153cc3b6b62e830f464bb66f0f0539ddd8517 (patch)
treef7fae0090a1392861a7ce3b3e176fe3c10e67496 /java/examples
parentc75eed72f17017b0fee6f6df7f08988b9837fa3d (diff)
downloadhdf5-5bb153cc3b6b62e830f464bb66f0f0539ddd8517.zip
hdf5-5bb153cc3b6b62e830f464bb66f0f0539ddd8517.tar.gz
hdf5-5bb153cc3b6b62e830f464bb66f0f0539ddd8517.tar.bz2
HDFFV-11001 merge java locale from develop
Diffstat (limited to 'java/examples')
-rw-r--r--java/examples/datatypes/H5Ex_T_Float.java4
-rw-r--r--java/examples/datatypes/H5Ex_T_FloatAttribute.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/java/examples/datatypes/H5Ex_T_Float.java b/java/examples/datatypes/H5Ex_T_Float.java
index f677479..f15f774 100644
--- a/java/examples/datatypes/H5Ex_T_Float.java
+++ b/java/examples/datatypes/H5Ex_T_Float.java
@@ -22,6 +22,8 @@
package examples.datatypes;
import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.util.Locale;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
@@ -173,7 +175,7 @@ public class H5Ex_T_Float {
}
// Output the data to the screen.
- DecimalFormat df = new DecimalFormat("#,##0.0000");
+ DecimalFormat df = new DecimalFormat("#,##0.0000", new DecimalFormatSymbols(Locale.US));
System.out.println(DATASETNAME + ":");
for (int indx = 0; indx < dims[0]; indx++) {
System.out.print(" [");
diff --git a/java/examples/datatypes/H5Ex_T_FloatAttribute.java b/java/examples/datatypes/H5Ex_T_FloatAttribute.java
index 2e706d9..12831bc 100644
--- a/java/examples/datatypes/H5Ex_T_FloatAttribute.java
+++ b/java/examples/datatypes/H5Ex_T_FloatAttribute.java
@@ -22,6 +22,8 @@
package examples.datatypes;
import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.util.Locale;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
@@ -201,7 +203,7 @@ public class H5Ex_T_FloatAttribute {
}
// Output the data to the screen.
- DecimalFormat df = new DecimalFormat("#,##0.0000");
+ DecimalFormat df = new DecimalFormat("#,##0.0000", new DecimalFormatSymbols(Locale.US));
System.out.println(ATTRIBUTENAME + ":");
for (int indx = 0; indx < dims[0]; indx++) {
System.out.print(" [");