[Git][java-team/jcodings][debian/sid] 6 commits: [maven-release-plugin] prepare for next development iteration

Hideki Yamane gitlab at salsa.debian.org
Fri Jun 5 00:58:53 BST 2020



Hideki Yamane pushed to branch debian/sid at Debian Java Maintainers / jcodings


Commits:
10a7f453 by Charles Oliver Nutter at 2020-05-19T05:46:21-05:00
[maven-release-plugin] prepare for next development iteration

- - - - -
6b2fb14c by kiichi at 2020-05-21T00:29:10+09:00
Fix range check for euc-jp and sjis case fold.

- - - - -
c0dd4202 by Charles Oliver Nutter at 2020-06-03T20:25:50-05:00
Merge pull request #37 from k77ch7/fix-isInRange

Fix range check for euc-jp and sjis case fold.
- - - - -
11a1fdc0 by Charles Oliver Nutter at 2020-06-03T20:35:25-05:00
[maven-release-plugin] prepare release jcodings-1.0.55

- - - - -
cec1a9f3 by Hideki Yamane at 2020-06-05T08:55:21+09:00
Merge tag 'jcodings-1.0.55' into debian/sid

[maven-release-plugin]  copy for tag jcodings-1.0.55

- - - - -
eab197dd by Hideki Yamane at 2020-06-05T08:56:00+09:00
note to changelog

- - - - -


5 changed files:

- debian/changelog
- pom.xml
- src/org/jcodings/MultiByteEncoding.java
- test/org/jcodings/specific/TestEUCJP.java
- + test/org/jcodings/specific/TestSJIS.java


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+jcodings (1.0.55-1) unstable; urgency=medium
+
+  * New upstream release
+
+ -- Hideki Yamane <henrich at debian.org>  Fri, 05 Jun 2020 08:55:40 +0900
+
 jcodings (1.0.54-1) unstable; urgency=medium
 
   * New upstream release


=====================================
pom.xml
=====================================
@@ -3,7 +3,7 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.jruby.jcodings</groupId>
   <artifactId>jcodings</artifactId>
-  <version>1.0.54</version>
+  <version>1.0.55</version>
   <name>JCodings</name>
   <description>Byte based encoding support library for java</description>
   <parent>


=====================================
src/org/jcodings/MultiByteEncoding.java
=====================================
@@ -221,6 +221,6 @@ public abstract class MultiByteEncoding extends AbstractEncoding {
     }
 
     public static boolean isInRange(int code, int from, int to) {
-        return code - from <= to - from;
+        return code - from >= 0 && to - code >= 0;
     }
 }


=====================================
test/org/jcodings/specific/TestEUCJP.java
=====================================
@@ -1,11 +1,12 @@
 package org.jcodings.specific;
 
+import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assume.assumeTrue;
 
 import java.nio.charset.Charset;
 
-import org.jcodings.specific.EUCJPEncoding;
+import org.jcodings.IntHolder;
 import org.junit.Test;
 
 public class TestEUCJP {
@@ -24,4 +25,21 @@ public class TestEUCJP {
                 "EUC-JP",
                 EUCJPEncoding.INSTANCE.getCharsetName());
     }
+
+    @Test
+    public void testCaseFold() {
+        EUCJPEncoding enc = EUCJPEncoding.INSTANCE;
+        byte [] lowerSrc = new byte[]{(byte)0xA3, (byte)0xE1};
+        byte [] upperSrc = new byte[]{(byte)0xA3, (byte)0xC1};
+        byte [] lower = new byte[2];
+        IntHolder pp = new IntHolder();
+
+        pp.value = 0;
+        enc.mbcCaseFold(0, lowerSrc, pp, 2, lower);
+        assertArrayEquals(lowerSrc, lower);
+
+        pp.value = 0;
+        enc.mbcCaseFold(0, upperSrc, pp, 2, lower);
+        assertArrayEquals(lowerSrc, lower);
+    }
 }


=====================================
test/org/jcodings/specific/TestSJIS.java
=====================================
@@ -0,0 +1,26 @@
+package org.jcodings.specific;
+
+import static org.junit.Assert.assertArrayEquals;
+
+import org.jcodings.IntHolder;
+import org.junit.Test;
+
+public class TestSJIS {
+
+    @Test
+    public void testCaseFold() {
+        SJISEncoding enc = SJISEncoding.INSTANCE;
+        byte [] lowerSrc = new byte[]{(byte)0x82, (byte)0x81};
+        byte [] upperSrc = new byte[]{(byte)0x82, (byte)0x60};
+        byte [] lower = new byte[2];
+        IntHolder pp = new IntHolder();
+        
+        pp.value = 0;
+        enc.mbcCaseFold(0, lowerSrc, pp, 2, lower);
+        assertArrayEquals(lowerSrc, lower);
+
+        pp.value = 0;
+        enc.mbcCaseFold(0, upperSrc, pp, 2, lower);
+        assertArrayEquals(lowerSrc, lower);
+    }   
+}
\ No newline at end of file



View it on GitLab: https://salsa.debian.org/java-team/jcodings/-/compare/76d0361cfaf965cb57c1a24b699225553f552229...eab197ddde6f05ec57040d4fec024a0d39bf052d

-- 
View it on GitLab: https://salsa.debian.org/java-team/jcodings/-/compare/76d0361cfaf965cb57c1a24b699225553f552229...eab197ddde6f05ec57040d4fec024a0d39bf052d
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/20200604/0b48e606/attachment.html>


More information about the pkg-java-commits mailing list