branch feature/241-versionJdk created (now 786c7dfb)
This is an automated email from the git hooks/post-receive script. New change to branch feature/241-versionJdk in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git at 786c7dfb fixes #241 : Build on jdk 8 to 13 (tested on 8, 11 and 13) This branch includes the following new commits: new 786c7dfb fixes #241 : Build on jdk 8 to 13 (tested on 8, 11 and 13) The 1 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 786c7dfb63db32311794b5b7806414803cdb73dc Author: jcouteau <couteau@codelutin.com> Date: Tue Nov 26 15:21:10 2019 +0100 fixes #241 : Build on jdk 8 to 13 (tested on 8, 11 and 13) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/241-versionJdk in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 786c7dfb63db32311794b5b7806414803cdb73dc Author: jcouteau <couteau@codelutin.com> Date: Tue Nov 26 15:21:10 2019 +0100 fixes #241 : Build on jdk 8 to 13 (tested on 8, 11 and 13) --- .../src/main/java/javax/annotation/Generated.java | 85 ++++++++++++++++++++++ pollen-services/pom.xml | 17 +++++ .../services/bean/PaginationParameterBean.java | 12 ++- .../services/service/FavoriteListServiceTest.java | 2 +- .../MajorityJudgmentVoteCountingStrategyTest.java | 5 +- pom.xml | 28 ++++++- 6 files changed, 141 insertions(+), 8 deletions(-) diff --git a/pollen-persistence/src/main/java/javax/annotation/Generated.java b/pollen-persistence/src/main/java/javax/annotation/Generated.java new file mode 100644 index 00000000..e3e1b407 --- /dev/null +++ b/pollen-persistence/src/main/java/javax/annotation/Generated.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + */ + + + +/** XXX Remove this when we stop supporting java 8, hack for java 11 compilation (should use javax.annotation.processing.Generated) **/ +package javax.annotation; + +import java.lang.annotation.*; +import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.RetentionPolicy.*; + +/** + * The Generated annotation is used to mark source code that has been generated. + * It can also be used to differentiate user written code from generated code in + * a single file. + * + * <h3>Examples:</h3> + * <pre> + * @Generated("com.example.Generator") + * </pre> + * <pre> + * @Generated(value="com.example.Generator", date= "2017-07-04T12:08:56.235-0700") + * </pre> + * <pre> + * @Generated(value="com.example.Generator", date= "2017-07-04T12:08:56.235-0700", + * comments= "comment 1") + * </pre> + * + * @since 9 + */ +@Documented +@Retention(SOURCE) +@Target({PACKAGE, TYPE, METHOD, CONSTRUCTOR, FIELD, + LOCAL_VARIABLE, PARAMETER}) +public @interface Generated { + + /** + * The value element MUST have the name of the code generator. The + * name is the fully qualified name of the code generator. + * + * @return The name of the code generator + */ + String[] value(); + + /** + * Date when the source was generated. The date element must follow the ISO + * 8601 standard. For example the date element would have the following + * value 2017-07-04T12:08:56.235-0700 which represents 2017-07-04 12:08:56 + * local time in the U.S. Pacific Time time zone. + * + * @return The date the source was generated + */ + String date() default ""; + + /** + * A place holder for any comments that the code generator may want to + * include in the generated code. + * + * @return Comments that the code generated included + */ + String comments() default ""; +} \ No newline at end of file diff --git a/pollen-services/pom.xml b/pollen-services/pom.xml index 0bc5add8..cd07d554 100644 --- a/pollen-services/pom.xml +++ b/pollen-services/pom.xml @@ -105,6 +105,18 @@ <scope>provided</scope> </dependency--> + <!-- API, java.xml.bind module --> + <dependency> + <groupId>jakarta.xml.bind</groupId> + <artifactId>jakarta.xml.bind-api</artifactId> + </dependency> + + <!-- Runtime, com.sun.xml.bind module --> + <dependency> + <groupId>org.glassfish.jaxb</groupId> + <artifactId>jaxb-runtime</artifactId> + </dependency> + <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-email</artifactId> @@ -238,6 +250,11 @@ <artifactId>bcpg-jdk15on</artifactId> </dependency> + <dependency> + <groupId>org.javassist</groupId> + <artifactId>javassist</artifactId> + </dependency> + </dependencies> <build> diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/bean/PaginationParameterBean.java b/pollen-services/src/main/java/org/chorem/pollen/services/bean/PaginationParameterBean.java index 7eec3ab4..723808f2 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/bean/PaginationParameterBean.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/bean/PaginationParameterBean.java @@ -63,6 +63,11 @@ public class PaginationParameterBean { public PaginationParameter toPaginationParameter() { PaginationParameter paginationParameter; + //XXX JC191126 - Hack to prevent value overflowing + if (pageSize == -1) { + pageSize = Integer.MAX_VALUE-1; + } + if (order != null) { paginationParameter = PaginationParameter.of(pageNumber, pageSize, order, desc); } else { @@ -88,7 +93,12 @@ public class PaginationParameterBean { @QueryParam("pageSize") public void setPageSize(int pageSize) { - this.pageSize = pageSize; + //XXX JC191126 - Hack to prevent value overflowing + if (pageSize == -1) { + this.pageSize = Integer.MAX_VALUE-1; + } else { + this.pageSize = pageSize; + } } public String getOrder() { diff --git a/pollen-services/src/test/java/org/chorem/pollen/services/service/FavoriteListServiceTest.java b/pollen-services/src/test/java/org/chorem/pollen/services/service/FavoriteListServiceTest.java index e5f12b6a..93feed56 100644 --- a/pollen-services/src/test/java/org/chorem/pollen/services/service/FavoriteListServiceTest.java +++ b/pollen-services/src/test/java/org/chorem/pollen/services/service/FavoriteListServiceTest.java @@ -92,7 +92,7 @@ public class FavoriteListServiceTest extends AbstractPollenServiceTest { // create import file File importFile = new File(application.getTestBasedir(), "importFavoriteListFromFile_" + System.nanoTime()); - Files.write(IMPORT_FILE_CONTENT, importFile, Charsets.UTF_8); + Files.asCharSink(importFile, Charsets.UTF_8).write(IMPORT_FILE_CONTENT); PaginationResultBean<FavoriteListMemberBean> members = service.getFavoriteListMembers(favoriteListId, null, PaginationParameterBean.of(0, -1)); Assert.assertEquals(0, members.getElements().size()); diff --git a/pollen-votecounting-majority-judgment/src/test/java/org/chorem/pollen/votecounting/MajorityJudgmentVoteCountingStrategyTest.java b/pollen-votecounting-majority-judgment/src/test/java/org/chorem/pollen/votecounting/MajorityJudgmentVoteCountingStrategyTest.java index 377bd1d9..4082f2ae 100644 --- a/pollen-votecounting-majority-judgment/src/test/java/org/chorem/pollen/votecounting/MajorityJudgmentVoteCountingStrategyTest.java +++ b/pollen-votecounting-majority-judgment/src/test/java/org/chorem/pollen/votecounting/MajorityJudgmentVoteCountingStrategyTest.java @@ -31,7 +31,6 @@ import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.omg.CosNaming.NamingContextPackage.NotFound; import java.math.BigDecimal; import java.util.List; @@ -212,12 +211,12 @@ public class MajorityJudgmentVoteCountingStrategyTest { MajorityJudgmentChoiceResult resultA = detailResult.getChoiceResults().stream() .filter(c -> CHOICE_A.equals(c.getChoiceId())) .findFirst() - .orElseThrow(NotFound::new); + .orElseThrow(() -> new Exception("Not found")); MajorityJudgmentChoiceResult resultD = detailResult.getChoiceResults().stream() .filter(c -> CHOICE_D.equals(c.getChoiceId())) .findFirst() - .orElseThrow(NotFound::new); + .orElseThrow(() -> new Exception("Not found")); int compareDtoA = MajorityJudgmentVoteCountingStrategy.CHOICE_RESULT_COMPARATOR.compare(resultD, resultA); Assert.assertEquals(1, compareDtoA); diff --git a/pom.xml b/pom.xml index c226a13d..8b5b2070 100644 --- a/pom.xml +++ b/pom.xml @@ -177,7 +177,7 @@ <resteasyVersion>3.6.1.Final</resteasyVersion> <jacksonVersion>2.9.7</jacksonVersion> - <nuitonI18nVersion>3.7</nuitonI18nVersion> + <nuitonI18nVersion>3.8-SNAPSHOT</nuitonI18nVersion> <eugenePluginVersion>3.0-alpha-10</eugenePluginVersion> <topiaVersion>3.7</topiaVersion> <flywayVersion>6.0.4</flywayVersion> @@ -191,11 +191,12 @@ <postgresqlVersion>42.2.8.jre7</postgresqlVersion> <javaJwtVersion>3.4.0</javaJwtVersion> <slf4jVersion>1.7.28</slf4jVersion> - <tomcatEmbedVersion>8.5.31</tomcatEmbedVersion> + <tomcatEmbedVersion>8.5.40</tomcatEmbedVersion> <tomcatEmbedLoggingVersion>8.5.2</tomcatEmbedLoggingVersion> - <hibernateVersion>5.2.10.Final</hibernateVersion> + <hibernateVersion>5.3.14.Final</hibernateVersion> <httpCommonsHttpclientVersion>4.5.10</httpCommonsHttpclientVersion> <bouncycastleVersion>1.63</bouncycastleVersion> + <jaxbVersion>2.3.2</jaxbVersion> <pollenI18nBundle>pollen-i18n</pollenI18nBundle> <!-- license to use --> @@ -297,6 +298,27 @@ <version>26.0-jre</version> </dependency> + <!-- API, java.xml.bind module --> + <dependency> + <groupId>jakarta.xml.bind</groupId> + <artifactId>jakarta.xml.bind-api</artifactId> + <version>${jaxbVersion}</version> + </dependency> + + <!-- Runtime, com.sun.xml.bind module --> + <dependency> + <groupId>org.glassfish.jaxb</groupId> + <artifactId>jaxb-runtime</artifactId> + <version>${jaxbVersion}</version> + </dependency> + + <dependency> + <groupId>org.javassist</groupId> + <artifactId>javassist</artifactId> + <version>3.23.2-GA</version> + </dependency> + + <!-- persistence module dependencies --> <dependency> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm