[Git][java-team/ciftools-java][master] 5 commits: New upstream version 4.0.5
Andrius Merkys (@merkys)
gitlab at salsa.debian.org
Fri Jan 13 11:42:39 GMT 2023
Andrius Merkys pushed to branch master at Debian Java Maintainers / ciftools-java
Commits:
3482a174 by Andrius Merkys at 2023-01-13T06:11:17-05:00
New upstream version 4.0.5
- - - - -
82921cbe by Andrius Merkys at 2023-01-13T06:11:25-05:00
Update upstream source from tag 'upstream/4.0.5'
Update to upstream version '4.0.5'
with Debian dir 198df10052881b03d5bb71459f69a3ddb1704ca3
- - - - -
5597305b by Andrius Merkys at 2023-01-13T06:13:07-05:00
Bump copyright years.
- - - - -
4e7cffb3 by Andrius Merkys at 2023-01-13T06:13:34-05:00
Update standards version to 4.6.2, no changes needed.
Changes-By: lintian-brush
Fixes: lintian: out-of-date-standards-version
See-also: https://lintian.debian.org/tags/out-of-date-standards-version.html
- - - - -
6ddbe962 by Andrius Merkys at 2023-01-13T06:15:39-05:00
Update changelog for 4.0.5-1 release
- - - - -
7 changed files:
- CHANGELOG.md
- debian/changelog
- debian/control
- debian/copyright
- pom.xml
- src/main/java/org/rcsb/cif/text/TextCifWriter.java
- src/test/java/org/rcsb/cif/WriterTest.java
Changes:
=====================================
CHANGELOG.md
=====================================
@@ -3,6 +3,11 @@ CIFTools Changelog
This project uses semantic versioning. Furthermore, this project provides code that was generated from schemata. Any schema change that introduces a breaking change in the generated code is considered as breaking for the whole project. Additional information is provided below when this occurs (named `Breaking schema changes`). Most of these occur in experimental categories and are unlikely to affect your code. `Breaking API changes` will be avoided starting with version 1.0.0.
+ciftools-java 4.0.5 - January 2023
+-------------
+### Bug fixes
+* fix text writing when non-English number formats are used on the platform
+
ciftools-java 4.0.4 - November 2022
-------------
### Bug fixes
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+ciftools-java (4.0.5-1) unstable; urgency=medium
+
+ * New upstream version 4.0.5
+ * Bump copyright years.
+ * Update standards version to 4.6.2, no changes needed.
+
+ -- Andrius Merkys <merkys at debian.org> Fri, 13 Jan 2023 06:15:32 -0500
+
ciftools-java (4.0.4-1) unstable; urgency=medium
* New upstream version 4.0.4 (Closes: #1012093)
=====================================
debian/control
=====================================
@@ -11,7 +11,7 @@ Build-Depends: debhelper-compat (= 13),
libgeronimo-annotation-1.3-spec-java,
libgoogle-gson-java,
junit5 <!nocheck>
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
Vcs-Browser: https://salsa.debian.org/java-team/ciftools-java
Vcs-Git: https://salsa.debian.org/java-team/ciftools-java.git
Homepage: https://github.com/rcsb/ciftools-java
=====================================
debian/copyright
=====================================
@@ -3,7 +3,7 @@ Upstream-Name: ciftools-java
Source: https://github.com/rcsb/ciftools-java/
Files: *
-Copyright: 2019-2022, Sebastian Bittrich
+Copyright: 2019-2023, Sebastian Bittrich
License: Expat
Files: src/main/java/org/rcsb/cif/model/LinkedCaseInsensitiveMap.java
@@ -12,7 +12,7 @@ License: Apache-2.0
Files: debian/*
Copyright: 2021, Pierre Gruet <pgt at debian.org>
- 2022, Andrius Merkys <merkys at debian.org>
+ 2022-2023, Andrius Merkys <merkys at debian.org>
License: Expat
License: Expat
=====================================
pom.xml
=====================================
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.rcsb</groupId>
<artifactId>ciftools-java</artifactId>
- <version>4.0.4</version>
+ <version>4.0.5</version>
<packaging>jar</packaging>
<description>
A Java library for handling text and binary CIF files.
@@ -35,7 +35,7 @@
<connection>scm:git:git://github.com/rcsb/ciftools-java.git</connection>
<developerConnection>scm:git:git at github.com:rcsb/ciftools-java.git</developerConnection>
<url>https://github.com/rcsb/ciftools-java</url>
- <tag>ciftools-java-4.0.4</tag>
+ <tag>ciftools-java-4.0.5</tag>
</scm>
<dependencies>
=====================================
src/main/java/org/rcsb/cif/text/TextCifWriter.java
=====================================
@@ -11,7 +11,9 @@ import org.rcsb.cif.model.ValueKind;
import java.nio.charset.StandardCharsets;
import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
import java.util.List;
+import java.util.Locale;
import java.util.NoSuchElementException;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@@ -136,9 +138,10 @@ public class TextCifWriter {
return false;
}
- private static final DecimalFormat FLOAT_2 = new DecimalFormat("0.00");
- private static final DecimalFormat FLOAT_3 = new DecimalFormat("0.000");
- private static final DecimalFormat FLOAT_6 = new DecimalFormat("0.######");
+ private static final DecimalFormatSymbols SYMBOLS = new DecimalFormatSymbols(Locale.US);
+ private static final DecimalFormat FLOAT_2 = new DecimalFormat("0.00", SYMBOLS);
+ private static final DecimalFormat FLOAT_3 = new DecimalFormat("0.000", SYMBOLS);
+ private static final DecimalFormat FLOAT_6 = new DecimalFormat("0.######", SYMBOLS);
/**
* Some columns (i.e. CartnX, CartnY, CartnZ, and Occupancy demand for more fine-grained over the values they report.
* @param val the double value
=====================================
src/test/java/org/rcsb/cif/WriterTest.java
=====================================
@@ -26,6 +26,7 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
+import java.util.Locale;
import java.util.Map;
import java.util.regex.Pattern;
@@ -222,4 +223,21 @@ class WriterTest {
assertNotNull(authAsymId);
assertNull(authAsymId.get("mask"), "empty mask must be encoded by 'null' value");
}
+
+ @Test
+ void testNonEnglishLocaleSupport() throws IOException {
+ // set to some locale that has a different number format
+ Locale.setDefault(Locale.FRANCE);
+
+ MmCifFile cifFile = CifIO.readFromInputStream(TestHelper.getInputStream("cif/1a2c.cif"))
+ .as(StandardSchemata.MMCIF);
+ byte[] written = CifIO.writeText(cifFile);
+
+ MmCifFile back = CifIO.readFromInputStream(new ByteArrayInputStream(written))
+ .as(StandardSchemata.MMCIF);
+ org.rcsb.cif.schema.mm.AtomSite atomSite = back.getFirstBlock().getAtomSite();
+ assertEquals(18.623, atomSite.getCartnX().get(0));
+ assertEquals(1.00, atomSite.getOccupancy().get(0));
+ assertEquals(0.013895, back.getFirstBlock().getAtomSites().getFractTransfMatrix11().get(0));
+ }
}
View it on GitLab: https://salsa.debian.org/java-team/ciftools-java/-/compare/2715965c56fa51ab4817b3070b68031003f1b6f5...6ddbe962c4eb8ed99d9b8b8b72be1bbad93e36f2
--
View it on GitLab: https://salsa.debian.org/java-team/ciftools-java/-/compare/2715965c56fa51ab4817b3070b68031003f1b6f5...6ddbe962c4eb8ed99d9b8b8b72be1bbad93e36f2
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20230113/6b0d6e76/attachment.htm>
More information about the pkg-java-commits
mailing list