diff --git a/CHANGELOG.txt b/CHANGELOG.txt index bd7033d..5d486d1 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,9 @@ +------------------------------------------------------------------------------ + qJava 2.1.2 [2015.03.23] +------------------------------------------------------------------------------ + + - Add serialization for type: char[][] + ------------------------------------------------------------------------------ qJava 2.1.1 [2015.03.09] ------------------------------------------------------------------------------ diff --git a/src/main/java/com/exxeleron/qjava/QType.java b/src/main/java/com/exxeleron/qjava/QType.java index 01d1082..e7c5470 100644 --- a/src/main/java/com/exxeleron/qjava/QType.java +++ b/src/main/java/com/exxeleron/qjava/QType.java @@ -123,6 +123,7 @@ byte getTypeCode() { put(Double[].class, DOUBLE_LIST); put(Character.class, CHAR); put(char[].class, STRING); + put(char[][].class, GENERAL_LIST); put(String.class, SYMBOL); put(String[].class, SYMBOL_LIST); put(QTimestamp.class, TIMESTAMP); diff --git a/src/test/java/com/exxeleron/qjava/QExpressions.java b/src/test/java/com/exxeleron/qjava/QExpressions.java index ab90f75..d2a974c 100644 --- a/src/test/java/com/exxeleron/qjava/QExpressions.java +++ b/src/test/java/com/exxeleron/qjava/QExpressions.java @@ -99,6 +99,7 @@ private void initExpressions() throws QException { reference.put("``quick``fox", new String[] { "", "quick", "", "fox" }); reference.put("``", new String[] { "", "" }); reference.put("(\"quick\"; \"brown\"; \"fox\"; \"jumps\"; \"over\"; \"a lazy\"; \"dog\")", new Object[] {"quick".toCharArray(), "brown".toCharArray(), "fox".toCharArray(), "jumps".toCharArray(), "over".toCharArray(), "a lazy".toCharArray(), "dog".toCharArray() }); + reference.put("(\"quick\"; \"brown\"; \"fox\")", new char[][] {"quick".toCharArray(), "brown".toCharArray(), "fox".toCharArray() }); reference.put("2000.01.04D05:36:57.600 0Np", new QTimestamp[] { new QTimestamp(279417600000000L), new QTimestamp(Long.MIN_VALUE) }); reference.put("(2001.01m; 0Nm)", new QMonth[] { new QMonth(12), new QMonth(Integer.MIN_VALUE) }); reference.put("2001.01.01 2000.05.01 0Nd", new QDate[] { new QDate(366), new QDate(121), new QDate(Integer.MIN_VALUE) }); diff --git a/src/test/resources/QExpressions.out b/src/test/resources/QExpressions.out index c1987ba..803de4d 100644 --- a/src/test/resources/QExpressions.out +++ b/src/test/resources/QExpressions.out @@ -114,6 +114,8 @@ ED00000080 0B00020000000000 ("quick"; "brown"; "fox"; "jumps"; "over"; "a lazy"; "dog") 0000070000000A0005000000717569636B0A000500000062726F776E0A0003000000666F780A00050000006A756D70730A00040000006F7665720A000600000061206C617A790A0003000000646F67 +("quick"; "brown"; "fox") +0000030000000A0005000000717569636B0A000500000062726F776E0A0003000000666F78 2000.01.04D05:36:57.600 0Np 0C000200000000C0CAFA20FE00000000000000000080 (2001.01m; 0Nm)