Skip to content

Commit 2dc0cf6

Browse files
committed
upgrade and cleanup
1 parent 7ae02ac commit 2dc0cf6

3 files changed

Lines changed: 18 additions & 36 deletions

File tree

‎spring-rest/pom.xml‎

Lines changed: 15 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<dependency>
5555
<groupId>commons-fileupload</groupId>
5656
<artifactId>commons-fileupload</artifactId>
57-
<version>1.3.2</version>
57+
<version>${commons-fileupload.version}</version>
5858
</dependency>
5959
<!-- web -->
6060

@@ -85,7 +85,7 @@
8585
<dependency>
8686
<groupId>com.thoughtworks.xstream</groupId>
8787
<artifactId>xstream</artifactId>
88-
<version>1.4.8</version>
88+
<version>${xstream.version}</version>
8989
</dependency>
9090

9191
<!-- util -->
@@ -99,7 +99,7 @@
9999
<dependency>
100100
<groupId>org.apache.commons</groupId>
101101
<artifactId>commons-lang3</artifactId>
102-
<version>3.5</version>
102+
<version>${commons-lang3.version}</version>
103103
</dependency>
104104

105105
<!-- logging -->
@@ -171,18 +171,18 @@
171171
<dependency>
172172
<groupId>com.google.protobuf</groupId>
173173
<artifactId>protobuf-java</artifactId>
174-
<version>3.1.0</version>
174+
<version>${protobuf-java.version}</version>
175175
</dependency>
176176
<dependency>
177177
<groupId>com.googlecode.protobuf-java-format</groupId>
178178
<artifactId>protobuf-java-format</artifactId>
179-
<version>1.4</version>
179+
<version>${protobuf-java-format.version}</version>
180180
</dependency>
181181

182182
<dependency>
183183
<groupId>com.esotericsoftware</groupId>
184184
<artifactId>kryo</artifactId>
185-
<version>4.0.0</version>
185+
<version>${kryo.version}</version>
186186
</dependency>
187187
</dependencies>
188188

@@ -337,38 +337,20 @@
337337
</profiles>
338338

339339
<properties>
340-
<!-- Spring -->
341-
342-
<!-- persistence -->
343-
<hibernate.version>4.3.11.Final</hibernate.version>
344-
<mysql-connector-java.version>5.1.40</mysql-connector-java.version>
345-
346-
<!-- various -->
347-
<hibernate-validator.version>5.2.2.Final</hibernate-validator.version>
348-
340+
<commons-fileupload.version>1.3.2</commons-fileupload.version>
341+
<kryo.version>4.0.0</kryo.version>
342+
<protobuf-java-format.version>1.4</protobuf-java-format.version>
343+
<protobuf-java.version>3.1.0</protobuf-java.version>
344+
<commons-lang3.version>3.5</commons-lang3.version>
345+
<xstream.version>1.4.9</xstream.version>
346+
349347
<!-- util -->
350348
<guava.version>20.0</guava.version>
351-
<commons-lang3.version>3.4</commons-lang3.version>
352-
353-
<!-- testing -->
354-
<org.hamcrest.version>1.3</org.hamcrest.version>
355-
<junit.version>4.12</junit.version>
356-
<mockito.version>1.10.19</mockito.version>
357-
358-
<httpcore.version>4.4.1</httpcore.version>
359-
<httpclient.version>4.5</httpclient.version>
360-
361349
<rest-assured.version>2.9.0</rest-assured.version>
362350

363-
<!-- logging -->
364-
<org.slf4j.version>1.7.13</org.slf4j.version>
365-
<logback.version>1.1.3</logback.version>
366-
367351
<!-- Maven plugins -->
368-
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
369-
<maven-war-plugin.version>2.6</maven-war-plugin.version>
370-
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
371352
<cargo-maven2-plugin.version>1.6.0</cargo-maven2-plugin.version>
353+
<findbugs-maven-plugin.version>3.0.4</findbugs-maven-plugin.version>
372354

373355
<!-- okhttp -->
374356
<com.squareup.okhttp3.version>3.4.1</com.squareup.okhttp3.version>
@@ -380,7 +362,7 @@
380362
<plugin>
381363
<groupId>org.codehaus.mojo</groupId>
382364
<artifactId>findbugs-maven-plugin</artifactId>
383-
<version>3.0.4</version>
365+
<version>${findbugs-maven-plugin.version}</version>
384366
<configuration>
385367
<effort>Max</effort>
386368
<omitVisitors>FindDeadLocalStores,FindNullDeref</omitVisitors>

‎spring-rest/src/test/java/org/baeldung/okhttp/OkHttpMiscLiveTest.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import java.io.File;
66
import java.io.IOException;
7+
import java.net.SocketTimeoutException;
78
import java.util.concurrent.Executors;
89
import java.util.concurrent.ScheduledExecutorService;
910
import java.util.concurrent.TimeUnit;
@@ -32,7 +33,7 @@ public void init() {
3233
client = new OkHttpClient();
3334
}
3435

35-
@Test
36+
@Test(expected = SocketTimeoutException.class)
3637
public void whenSetRequestTimeout_thenFail() throws IOException {
3738
final OkHttpClient clientWithTimeout = new OkHttpClient.Builder().readTimeout(1, TimeUnit.SECONDS).build();
3839

‎spring-rest/src/test/java/org/baeldung/web/controller/redirect/RedirectControllerIntegrationTest.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.baeldung.web.controller.redirect;
22

33
import static org.hamcrest.CoreMatchers.equalTo;
4-
import static org.hamcrest.CoreMatchers.nullValue;
54
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
65
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.flash;
76
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl;
@@ -51,7 +50,7 @@ public void whenRedirectOnUrlWithUsingRedirectPrefix_thenStatusRedirectionAndRed
5150
@Test
5251
public void whenRedirectOnUrlWithUsingRedirectAttributes_thenStatusRedirectionAndRedirectedOnUrlAndAddedAttributeToFlashScope() throws Exception {
5352
mockMvc.perform(get("/redirectWithRedirectAttributes")).andExpect(status().is3xxRedirection()).andExpect(flash().attribute("flashAttribute", equalTo("redirectWithRedirectAttributes")))
54-
.andExpect(model().attribute("attribute", equalTo("redirectWithRedirectAttributes"))).andExpect(model().attribute("flashAttribute", equalTo(nullValue()))).andExpect(redirectedUrl("redirectedUrl?attribute=redirectWithRedirectAttributes"));
53+
.andExpect(model().attribute("attribute", equalTo("redirectWithRedirectAttributes"))).andExpect(model().attribute("flashAttribute", equalTo(null))).andExpect(redirectedUrl("redirectedUrl?attribute=redirectWithRedirectAttributes"));
5554
}
5655

5756
@Test

0 commit comments

Comments
 (0)