branch develop updated (0bad75a -> 7cd3fcc)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository nuiton-csv. See http://git.nuiton.org/nuiton-csv.git from 0bad75a [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 20015eb fixes #3634: Updates pom to 1.8.1 new 7cd3fcc fixes #3635: Add a Short parser formater The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 7cd3fcce257a6de4ed0f7295f3ac6fe16e5b6d75 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Feb 14 09:35:35 2015 +0100 fixes #3635: Add a Short parser formater commit 20015eb875d752a2c3b31327c91956376f1eccd9 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Feb 14 09:29:58 2015 +0100 fixes #3634: Updates pom to 1.8.1 Summary of changes: pom.xml | 4 ++-- src/main/java/org/nuiton/csv/Common.java | 32 ++++++++++++++++++++++++++++++++ src/site/site.xml | 6 ++---- 3 files changed, 36 insertions(+), 6 deletions(-) -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository nuiton-csv. See http://git.nuiton.org/nuiton-csv.git commit 20015eb875d752a2c3b31327c91956376f1eccd9 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Feb 14 09:29:58 2015 +0100 fixes #3634: Updates pom to 1.8.1 --- pom.xml | 4 ++-- src/site/site.xml | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index d3413d5..74af76b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.nuiton</groupId> <artifactId>nuitonpom</artifactId> - <version>1.2</version> + <version>1.8.1</version> </parent> <artifactId>nuiton-csv</artifactId> @@ -13,7 +13,7 @@ <name>Nuiton CSV</name> <description>Simple CSV API</description> - <url>https://doc.nuiton.org/nuiton-csv</url> + <url>https://nuiton-csv.nuiton.org</url> <inceptionYear>2013</inceptionYear> <developers> diff --git a/src/site/site.xml b/src/site/site.xml index 5eb30d2..78065fd 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -42,10 +42,8 @@ </links> <breadcrumbs> - <item name="${project.name}" - href="${project.url}/index.html"/> - <item name="${project.version}" - href="${project.url}/${siteDeployClassifier}/index.html"/> + <item name="${project.name}" href="${project.url}/index.html"/> + <item name="${project.version}" href="${project.url}/v/${siteDeployClassifier}/index.html"/> </breadcrumbs> <menu name="Utilisateur"> -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository nuiton-csv. See http://git.nuiton.org/nuiton-csv.git commit 7cd3fcce257a6de4ed0f7295f3ac6fe16e5b6d75 Author: Tony CHEMIT <chemit@codelutin.com> Date: Sat Feb 14 09:35:35 2015 +0100 fixes #3635: Add a Short parser formater --- src/main/java/org/nuiton/csv/Common.java | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/main/java/org/nuiton/csv/Common.java b/src/main/java/org/nuiton/csv/Common.java index 119c128..89e2f46 100644 --- a/src/main/java/org/nuiton/csv/Common.java +++ b/src/main/java/org/nuiton/csv/Common.java @@ -61,6 +61,12 @@ public class Common { public static ValueParserFormatter<Character> CHAR = new CharacterParserFormatter(null, true); + public static ValueParserFormatter<Short> PRIMITIVE_SHORT = + new ShortParserFormatter((short) 0, false); + + public static ValueParserFormatter<Short> SHORT = + new ShortParserFormatter(null, true); + public static ValueParserFormatter<Integer> INTEGER = new IntegerParserFormatter(null, true); @@ -456,6 +462,32 @@ public class Common { } } + public static class ShortParserFormatter extends NullableParserFormatter<Short> { + + public ShortParserFormatter(Short defaultValue, boolean nullAllowed) { + super(defaultValue, nullAllowed); + } + + @Override + public String format(Short value) { + String str = ""; + if (value != null) { + str = String.valueOf(value); + } + return str; + } + + @Override + protected Short parseNoneEmptyValue(String value) { + Float aFloat = Float.valueOf(value); + if (aFloat > Short.MAX_VALUE) { + // too big + throw new IllegalArgumentException(value + " is too big to be an short, should be a integer."); + } + return aFloat.shortValue(); + } + } + public static class IntegerParserFormatter extends NullableParserFormatter<Integer> { public IntegerParserFormatter(Integer defaultValue, boolean nullAllowed) { -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.
participants (1)
-
nuiton.org scm