Skip to content

Commit

Permalink
from Development/5.6.0 (#957)
Browse files Browse the repository at this point in the history
* fix convert of Boolean #846

* fix Boolean convert method #846

* fix name for test of Boolean convert #846

* Drop Oracle JDK from Travis CI #923

* Upgrade Spring Boot 2.2.0.RELEASE #925

* Remove tomcat dependencyManagement that define our own version #925

* [DATACMNS-1496] apply removed deprecations at Spring Data Commons 2.2 #926

* Modify from http to https #930 (#931)

* update self defined libraries #933 (#934)

* Upgrade Spring Boot 2.2.2.RELEASE #935

* update sequence processing to match H2 specifications #936

* upgrade tomcat used in cargo #935

* add dependency of java mail #945

* fix dependency position of java mail #945

* not use static import that not needed #925

* difine properties first #925

* remove log4jdbc-remix #947

* remove property of log4jdbc #947

* Exclude javax.activation:activation and add com.sun.activation:javax.activation 1.2.0 #945

* change to use properties #945

* Upgrade to hamcrest 2.x #950 (#955)

* Manage dependency Bouncy Castle Provider. #953 (#956)

Co-authored-by: btkobayashirun <Ryuusuke.Kobayashi.bp@nttdata.com>
Co-authored-by: btyanagawamg <Mugi.Yanagawa.bp@nttdata.com>
Co-authored-by: takahashihrzg <Hironobu.Takahashi@nttdata.com>
Co-authored-by: bthabukar <39939101+bthabukar@users.noreply.github.com>
  • Loading branch information
5 people committed Jan 15, 2020
1 parent 2129ead commit 423c3d5
Show file tree
Hide file tree
Showing 21 changed files with 141 additions and 176 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions terasoluna-gfw-common-libraries/terasoluna-gfw-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<!-- Log4JDBC -->
<dependency>
<groupId>org.lazyluke</groupId>
<artifactId>log4jdbc-remix</artifactId>
</dependency>
<!-- == End Logging == -->

<!-- == Begin Spring == -->
Expand Down Expand Up @@ -153,11 +148,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ public void testGetCurrent01() {

jdbcSequencer.setSequenceClass(String.class);
jdbcSequencer.afterPropertiesSet();
String nextVal1 = jdbcSequencer.getNext();
String currentVal1 = jdbcSequencer.getCurrent();
String nextVal = jdbcSequencer.getNext();
String nextVal2 = jdbcSequencer.getNext();
String currentVal2 = jdbcSequencer.getCurrent();

assertThat(currentVal1, is(String.valueOf(0)));
assertThat(nextVal, is(String.valueOf(1)));
assertThat(currentVal2, is(String.valueOf(1)));
assertThat(nextVal1, is(String.valueOf(1)));
assertThat(currentVal1, is(String.valueOf(1)));
assertThat(nextVal2, is(String.valueOf(2)));
assertThat(currentVal2, is(String.valueOf(2)));
}

@Test(expected = IllegalArgumentException.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd
">

<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd">


<bean id="CL_testSetRows" class="org.terasoluna.gfw.common.codelist.i18n.SimpleI18nCodeList">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/jee https://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/data/jpa https://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">

<!-- component scan -->
<tx:annotation-driven />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx.xsd">


<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<!-- == End Unit Test == -->

<!-- == Begin Database == -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx.xsd">


<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions terasoluna-gfw-common-libraries/terasoluna-gfw-string/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions terasoluna-gfw-common-libraries/terasoluna-gfw-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private boolean flatten(Map<String, String> map, String prefix, String name,
Object value, TypeDescriptor sourceType) {
String key = StringUtils.isEmpty(prefix) ? name : prefix + "." + name;
if (value == null) {
String resetKey = "_" + key;
String resetKey = determineResetKey(key, sourceType);
map.put(resetKey, "");
// the value has been flatten
return true;
Expand Down Expand Up @@ -323,6 +323,24 @@ private boolean flatten(Map<String, String> map, String prefix, String name,
return true;
}

/**
* Determine whether to convert null value to field marker.
* <p>
* Should not convert Boolean null value to field marker.<br>
* {@link org.springframework.web.bind.WebDataBinder} bind boolean & Boolean field marker as same false value.
* @param key Property name with prefix
* @param sourceType {@link TypeDescriptor} to use
* @return ResetKey
*/
private String determineResetKey(String key, TypeDescriptor sourceType) {
if (sourceType != null) {
if (Boolean.class == sourceType.getType()) {
return key;
}
}
return "_" + key;
}

/**
* Convert any array to {@code List<Object>}
* @param arrayObject array to convert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,17 @@ public void test10_propertiesIsEmptyElement() {
assertThat(map, hasEntry("nestedForm.array", ""));
}

@Test
public void testConvert11_Boolean() {
BooleanForm11 form = new BooleanForm11(true, false, null);
Map<String, String> map = converter.convert(form);

assertThat(map.size(), is(3));
assertThat(map, hasEntry("bool1", "true"));
assertThat(map, hasEntry("bool2", "false"));
assertThat(map, hasEntry("bool3", ""));
}

public static class SearchUserForm0 {
private String name;

Expand Down Expand Up @@ -1086,4 +1097,43 @@ public void setArray(int[] array) {
}
}

public static class BooleanForm11 {
private Boolean bool1;

private Boolean bool2;

private Boolean bool3;

public BooleanForm11(Boolean bool1, Boolean bool2, Boolean bool3) {
this.bool1 = bool1;
this.bool2 = bool2;
this.bool3 = bool3;
}

public Boolean getBool1() {
return bool1;
}

public void setBool1(Boolean bool1) {
this.bool1 = bool1;
}

public Boolean getBool2() {
return bool2;
}

public void setBool2(Boolean bool2) {
this.bool2 = bool2;
}

public Boolean getBool3() {
return bool3;
}

public void setBool3(Boolean bool3) {
this.bool3 = bool3;
}

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void testCreateAttributeMap_SortSet() {

int page = 1;
int size = 1;
Sort mockedSort = new Sort(Direction.DESC, "id");
Sort mockedSort = Sort.by(Direction.DESC, "id");

// run
Map<String, Object> attributesMap = PaginationInfo.createAttributeMap(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/jee https://www.springframework.org/schema/jee/spring-jee.xsd
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/data/jpa https://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">


<bean id="simpleMapCodeList" class="org.terasoluna.gfw.common.codelist.SimpleMapCodeList">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:c="http://www.springframework.org/schema/c"
xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc https://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd">

<bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="driverClass" value="org.h2.Driver" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- Log4JDBC -->
<dependency>
<groupId>org.lazyluke</groupId>
<artifactId>log4jdbc-remix</artifactId>
</dependency>
<!-- == End Logging == -->

<!-- == Begin Spring == -->
Expand Down
Loading

0 comments on commit 423c3d5

Please sign in to comment.