[Git][java-team/jcodings][master] 3 commits: fix for #23 - reenable old reflection loading api
Hideki Yamane
gitlab at salsa.debian.org
Sat May 18 03:05:31 BST 2019
Hideki Yamane pushed to branch master at Debian Java Maintainers / jcodings
Commits:
9e4cbe27 by Marcin Mielzynski at 2019-04-23T16:29:53Z
fix for #23 - reenable old reflection loading api
- - - - -
0b5dc3cd by Marcin Mielzynski at 2019-04-23T16:32:48Z
[maven-release-plugin] prepare release jcodings-1.0.44
- - - - -
8e09c6ca by Marcin Mielzynski at 2019-04-23T16:32:55Z
[maven-release-plugin] prepare for next development iteration
- - - - -
3 changed files:
- pom.xml
- src/org/jcodings/Encoding.java
- test/org/jcodings/specific/TestUnicode.java
Changes:
=====================================
pom.xml
=====================================
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jruby.jcodings</groupId>
<artifactId>jcodings</artifactId>
- <version>1.0.44-SNAPSHOT</version>
+ <version>1.0.45-SNAPSHOT</version>
<name>JCodings</name>
<description>Byte based encoding support library for java</description>
<parent>
=====================================
src/org/jcodings/Encoding.java
=====================================
@@ -564,7 +564,11 @@ public abstract class Encoding implements Cloneable {
public static final byte NEW_LINE = (byte)0x0a;
public static Encoding load(String name) {
- String encClassName = name;
+ return load(name, "org.jcodings.specific");
+ }
+
+ public static Encoding load(String name, String pkg) {
+ String encClassName = pkg + "." + name + "Encoding";
Class<?> encClass;
try {
encClass = Class.forName(encClassName);
=====================================
test/org/jcodings/specific/TestUnicode.java
=====================================
@@ -45,4 +45,9 @@ public class TestUnicode {
assertEquals(enc.codeToMbcLength(0xfffffffe), 1); // USE_INVALID_CODE_SCHEME
assertEquals(enc.codeToMbcLength(0xffffffff), 1); // USE_INVALID_CODE_SCHEME
}
+
+ @Test
+ public void testEncodingLoad() throws Exception {
+ assertEquals(UTF8Encoding.INSTANCE, Encoding.load("UTF8"));
+ }
}
View it on GitLab: https://salsa.debian.org/java-team/jcodings/compare/9553c0c3ce278e3b130ebef06a357695485cc1be...8e09c6caab59f9a0b9760e57d2708eea185c2de1
--
View it on GitLab: https://salsa.debian.org/java-team/jcodings/compare/9553c0c3ce278e3b130ebef06a357695485cc1be...8e09c6caab59f9a0b9760e57d2708eea185c2de1
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/20190518/bba46a70/attachment.html>
More information about the pkg-java-commits
mailing list