[Git][java-team/libsejda-commons-java][master] 4 commits: Declare compliance with Debian Policy 4.6.0.

Markus Koschany (@apo) gitlab at salsa.debian.org
Mon Sep 6 20:21:54 BST 2021



Markus Koschany pushed to branch master at Debian Java Maintainers / libsejda-commons-java


Commits:
04a6a0df by Markus Koschany at 2021-09-06T21:17:08+02:00
Declare compliance with Debian Policy 4.6.0.

- - - - -
a681a284 by Markus Koschany at 2021-09-06T21:18:13+02:00
New upstream version 1.1.7
- - - - -
399a7eee by Markus Koschany at 2021-09-06T21:18:17+02:00
Update upstream source from tag 'upstream/1.1.7'

Update to upstream version '1.1.7'
with Debian dir bbe277c272d80dca46eedd186d5f3588de080cc9
- - - - -
03ba2a86 by Markus Koschany at 2021-09-06T21:19:12+02:00
Update changelog

- - - - -


5 changed files:

- debian/changelog
- debian/control
- pom.xml
- src/main/java/org/sejda/commons/util/NumericalSortFilenameComparator.java
- src/test/java/org/sejda/commons/util/NumericalSortFilenameComparatorTest.java


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+libsejda-commons-java (1.1.7-1) unstable; urgency=medium
+
+  * New upstream version 1.1.7.
+  * Declare compliance with Debian Policy 4.6.0.
+
+ -- Markus Koschany <apo at debian.org>  Mon, 06 Sep 2021 21:18:54 +0200
+
 libsejda-commons-java (1.1.6-1) unstable; urgency=medium
 
   * New upstream version 1.1.6.


=====================================
debian/control
=====================================
@@ -9,7 +9,7 @@ Build-Depends:
  default-jdk,
  libslf4j-java (>= 1.7.25),
  maven-debian-helper (>= 2.1)
-Standards-Version: 4.5.1
+Standards-Version: 4.6.0
 Vcs-Git: https://salsa.debian.org/java-team/libsejda-commons-java.git
 Vcs-Browser: https://salsa.debian.org/java-team/libsejda-commons-java
 Homepage: http://www.sejda.org


=====================================
pom.xml
=====================================
@@ -5,7 +5,7 @@
 	<artifactId>sejda-commons</artifactId>
 	<packaging>jar</packaging>
 	<name>sejda-commons</name>
-	<version>1.1.6</version>
+	<version>1.1.7</version>
 
 	<description>A collection of utilities and common classes.</description>
 	<url>http://www.sejda.org</url>
@@ -37,7 +37,7 @@
 		<connection>scm:git:git at github.com:torakiki/sejda-commons.git</connection>
 		<developerConnection>scm:git:git at github.com:torakiki/sejda-commons.git</developerConnection>
 		<url>scm:git:git at github.com:torakiki/sejda-commons.git</url>
-		<tag>v1.1.6</tag>
+		<tag>v1.1.7</tag>
 	</scm>
 
 	<developers>


=====================================
src/main/java/org/sejda/commons/util/NumericalSortFilenameComparator.java
=====================================
@@ -38,7 +38,7 @@ import java.util.regex.Pattern;
  */
 public class NumericalSortFilenameComparator implements Comparator<File> {
 
-    private static Pattern PATTERN = Pattern.compile("^(\\d*)(\\D*)(\\d*)$");
+    private static Pattern PATTERN = Pattern.compile("^(\\d*)(.*)(\\d*)$");
 
     private static Function<String, BigInteger> DIGITS_EXTRACTOR = (g) -> {
         return ofNullable(g).filter(StringUtils::isNotEmpty).map(BigInteger::new).orElse(null);


=====================================
src/test/java/org/sejda/commons/util/NumericalSortFilenameComparatorTest.java
=====================================
@@ -34,6 +34,15 @@ public class NumericalSortFilenameComparatorTest {
         assertTrue(victim.compare(new File("bla"), null) < 0);
     }
 
+    @Test
+    public void onlyDigits() {
+        NumericalSortFilenameComparator victim = new NumericalSortFilenameComparator();
+        assertTrue(victim.compare(new File("123.pdf"), new File("1.pdf")) > 0);
+        assertTrue(victim.compare(new File("0023.pdf"), new File("230.pdf")) < 0);
+        assertTrue(victim.compare(new File("1"), new File("001.pdf")) > 0);
+        assertTrue(victim.compare(new File("005.pdf"), new File("500.pdf")) < 0);
+    }
+
     @Test
     public void nonDigit() {
         NumericalSortFilenameComparator victim = new NumericalSortFilenameComparator();
@@ -74,5 +83,8 @@ public class NumericalSortFilenameComparatorTest {
         assertTrue(victim.compare(new File("banana.pdf"), new File("avocado.pdf")) > 0);
         assertTrue(victim.compare(new File("chuck.pdf"), new File("chuck.abc")) > 0);
         assertTrue(victim.compare(new File("1234file.pdf"), new File("chuck.abc")) < 0);
+        assertTrue(victim.compare(new File("bla003abc.pdf"), new File("chuck.pdf")) < 0);
     }
+
+
 }



View it on GitLab: https://salsa.debian.org/java-team/libsejda-commons-java/-/compare/662c1aa29a3784ca91068fc0d06dfc4acc36b5cf...03ba2a8639cd6e13e3d11e1acfbf700545a80323

-- 
View it on GitLab: https://salsa.debian.org/java-team/libsejda-commons-java/-/compare/662c1aa29a3784ca91068fc0d06dfc4acc36b5cf...03ba2a8639cd6e13e3d11e1acfbf700545a80323
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/20210906/f4bb52d0/attachment.htm>


More information about the pkg-java-commits mailing list