Merge branch 'master' into BAEL-20856-move-spring-boot-autoconfiguration

This commit is contained in:
Loredana Crusoveanu 2020-01-28 22:47:58 +02:00 committed by GitHub
commit 63a0600bdf
11 changed files with 10 additions and 3 deletions

View File

@ -4,6 +4,7 @@ import org.junit.Test;
import java.time.OffsetDateTime;
import java.util.Date;
import java.util.TimeZone;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@ -18,12 +19,19 @@ public class ConvertToOffsetDateTimeUnitTest {
@Test
public void givenDate_whenHasOffset_thenConvertWithOffset() {
TimeZone prevTimezone = TimeZone.getDefault();
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
Date date = new Date();
date.setHours(6);
date.setMinutes(30);
OffsetDateTime odt = ConvertToOffsetDateTime.convert(date, 3, 30);
assertEquals(10, odt.getHour());
assertEquals(0, odt.getMinute());
// Reset the timezone to its original value to prevent side effects
TimeZone.setDefault(prevTimezone);
}
}

View File

@ -642,7 +642,6 @@
<module>spring-boot-modules</module>
<module>spring-boot-admin</module>
<module>spring-boot-angular</module>
<module>spring-boot-artifacts</module>
<module>spring-boot-bootstrap</module>
<module>spring-boot-camel</module>
<!-- <module>spring-boot-cli</module> --> <!-- Not a maven project -->
@ -1176,7 +1175,6 @@
<module>spring-boot-modules</module>
<module>spring-boot-admin</module>
<module>spring-boot-angular</module>
<module>spring-boot-artifacts</module>
<module>spring-boot-bootstrap</module>
<module>spring-boot-camel</module>
<!-- <module>spring-boot-cli</module> --> <!-- Not a maven project -->

View File

@ -14,6 +14,7 @@
</parent>
<modules>
<module>spring-boot-artifacts</module>
<module>spring-boot-autoconfiguration</module>
<module>spring-boot-data</module>
<module>spring-boot-mvc-birt</module>

View File

@ -11,7 +11,7 @@
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath>
<relativePath>../../parent-boot-2</relativePath>
</parent>
<dependencies>