Skip to content

Commit 14bb522

Browse files
ahornaceVladimir Kotal
authored andcommitted
Update Java dependencies
1 parent f1835fd commit 14bb522

File tree

12 files changed

+120
-109
lines changed

12 files changed

+120
-109
lines changed

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip

opengrok-indexer/pom.xml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Portions Copyright (c) 2020-2020, Lubos Kosco <[email protected]>.
5555
<dependency>
5656
<groupId>org.apache.commons</groupId>
5757
<artifactId>commons-compress</artifactId>
58-
<version>1.19</version>
58+
<version>1.20</version>
5959
</dependency>
6060
<dependency>
6161
<groupId>org.apache.lucene</groupId>
@@ -146,25 +146,23 @@ Portions Copyright (c) 2020-2020, Lubos Kosco <[email protected]>.
146146
<dependency> <!-- TODO: remove! (moving Messages to web module) -->
147147
<groupId>org.awaitility</groupId>
148148
<artifactId>awaitility</artifactId>
149-
<version>3.1.6</version>
150149
<scope>test</scope>
151150
</dependency>
152151
<dependency>
153152
<groupId>org.mockito</groupId>
154153
<artifactId>mockito-core</artifactId>
155-
<version>2.28.2</version>
156154
<scope>test</scope>
157155
</dependency>
158156
<dependency>
159157
<groupId>com.google.jimfs</groupId>
160158
<artifactId>jimfs</artifactId>
161-
<version>1.1</version>
159+
<version>1.2</version>
162160
<scope>test</scope>
163161
</dependency>
164162
<dependency>
165163
<groupId>com.cronutils</groupId>
166164
<artifactId>cron-utils</artifactId>
167-
<version>9.1.3</version>
165+
<version>9.1.5</version>
168166
<exclusions>
169167
<exclusion>
170168
<groupId>org.glassfish</groupId>
@@ -183,14 +181,8 @@ Portions Copyright (c) 2020-2020, Lubos Kosco <[email protected]>.
183181
<version>0.4.2</version>
184182
</dependency>
185183
<dependency>
186-
<groupId>com.sun.xml.bind</groupId>
187-
<artifactId>jaxb-core</artifactId>
188-
<version>2.3.0</version>
189-
</dependency>
190-
<dependency>
191-
<groupId>com.sun.xml.bind</groupId>
192-
<artifactId>jaxb-impl</artifactId>
193-
<version>2.3.0</version>
184+
<groupId>org.glassfish.jaxb</groupId>
185+
<artifactId>jaxb-runtime</artifactId>
194186
</dependency>
195187
<dependency>
196188
<groupId>jakarta.activation</groupId>

opengrok-web/pom.xml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ information: Portions Copyright [yyyy] [name of copyright owner]
1818
1919
CDDL HEADER END
2020
21-
Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
21+
Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
2222
Portions Copyright (c) 2018, 2020, Chris Fraire <[email protected]>.
2323
2424
-->
@@ -97,19 +97,13 @@ Portions Copyright (c) 2018, 2020, Chris Fraire <[email protected]>.
9797
<version>${jersey.version}</version>
9898
</dependency>
9999
<dependency>
100-
<groupId>com.sun.xml.bind</groupId>
101-
<artifactId>jaxb-core</artifactId>
102-
<version>2.3.0</version>
103-
</dependency>
104-
<dependency>
105-
<groupId>com.sun.xml.bind</groupId>
106-
<artifactId>jaxb-impl</artifactId>
107-
<version>2.3.0</version>
100+
<groupId>org.glassfish.jaxb</groupId>
101+
<artifactId>jaxb-runtime</artifactId>
108102
</dependency>
109103
<dependency>
110104
<groupId>org.webjars</groupId>
111105
<artifactId>jquery</artifactId>
112-
<version>3.5.1</version>
106+
<version>3.6.0</version>
113107
</dependency>
114108
<dependency>
115109
<groupId>org.webjars.npm</groupId>
@@ -162,7 +156,6 @@ Portions Copyright (c) 2018, 2020, Chris Fraire <[email protected]>.
162156
<dependency>
163157
<groupId>org.mockito</groupId>
164158
<artifactId>mockito-core</artifactId>
165-
<version>2.28.2</version>
166159
<scope>test</scope>
167160
</dependency>
168161
<dependency>
@@ -173,7 +166,6 @@ Portions Copyright (c) 2018, 2020, Chris Fraire <[email protected]>.
173166
<dependency>
174167
<groupId>org.awaitility</groupId>
175168
<artifactId>awaitility</artifactId>
176-
<version>3.1.6</version>
177169
<scope>test</scope>
178170
</dependency>
179171
<dependency>
@@ -184,19 +176,25 @@ Portions Copyright (c) 2018, 2020, Chris Fraire <[email protected]>.
184176
<dependency>
185177
<groupId>cglib</groupId>
186178
<artifactId>cglib</artifactId>
187-
<version>3.2.4</version>
179+
<version>3.2.9</version>
188180
</dependency>
189181
<dependency>
190182
<groupId>org.modelmapper</groupId>
191183
<artifactId>modelmapper</artifactId>
192-
<version>2.3.0</version>
184+
<version>2.4.1</version>
193185
</dependency>
194186
<dependency>
195187
<groupId>org.hamcrest</groupId>
196188
<artifactId>hamcrest</artifactId>
197189
<version>${hamcrest.version}</version>
198190
<scope>test</scope>
199191
</dependency>
192+
<dependency>
193+
<groupId>org.mockito</groupId>
194+
<artifactId>mockito-junit-jupiter</artifactId>
195+
<version>${mockito.version}</version>
196+
<scope>test</scope>
197+
</dependency>
200198
</dependencies>
201199

202200
<build>

opengrok-web/src/test/java/org/opengrok/web/api/v1/controller/ConfigurationControllerTest.java

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,17 @@
3838
import org.glassfish.jersey.internal.inject.AbstractBinder;
3939
import org.glassfish.jersey.server.ResourceConfig;
4040
import org.junit.jupiter.api.Test;
41+
import org.junit.jupiter.api.extension.ExtendWith;
4142
import org.mockito.Mock;
42-
import org.mockito.MockitoAnnotations;
43+
import org.mockito.junit.jupiter.MockitoExtension;
4344
import org.opengrok.indexer.configuration.Configuration;
4445
import org.opengrok.indexer.configuration.RuntimeEnvironment;
4546
import org.opengrok.indexer.web.DummyHttpServletRequest;
4647
import org.opengrok.web.PageConfig;
4748
import org.opengrok.web.api.v1.suggester.provider.service.SuggesterService;
4849

49-
public class ConfigurationControllerTest extends OGKJerseyTest {
50+
@ExtendWith(MockitoExtension.class)
51+
class ConfigurationControllerTest extends OGKJerseyTest {
5052

5153
private final RuntimeEnvironment env = RuntimeEnvironment.getInstance();
5254

@@ -55,7 +57,6 @@ public class ConfigurationControllerTest extends OGKJerseyTest {
5557

5658
@Override
5759
protected Application configure() {
58-
MockitoAnnotations.initMocks(this);
5960
return new ResourceConfig(ConfigurationController.class)
6061
.register(new AbstractBinder() {
6162
@Override
@@ -66,7 +67,7 @@ protected void configure() {
6667
}
6768

6869
@Test
69-
public void testApplySetAndGetBasicConfig() {
70+
void testApplySetAndGetBasicConfig() {
7071
Configuration config = new Configuration();
7172
String srcRoot = "/foo";
7273
config.setSourceRoot(srcRoot);
@@ -87,7 +88,7 @@ public void testApplySetAndGetBasicConfig() {
8788
}
8889

8990
@Test
90-
public void testApplySetInvalidMethod() {
91+
void testApplySetInvalidMethod() {
9192
Response r = setValue("noMethodExists", "1000");
9293

9394
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), r.getStatus());
@@ -101,7 +102,7 @@ private Response setValue(final String field, final String value) {
101102
}
102103

103104
@Test
104-
public void testApplyGetInvalidMethod() {
105+
void testApplyGetInvalidMethod() {
105106
Response r = target("configuration")
106107
.path("FooBar")
107108
.request()
@@ -111,14 +112,14 @@ public void testApplyGetInvalidMethod() {
111112
}
112113

113114
@Test
114-
public void testApplySetInvalidMethodParameter() {
115+
void testApplySetInvalidMethodParameter() {
115116
Response r = setValue("setDefaultProjects", "1000"); // expecting Set
116117

117118
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), r.getStatus());
118119
}
119120

120121
@Test
121-
public void testApplySetOptionInteger() {
122+
void testApplySetOptionInteger() {
122123
assertEquals(25, env.getHitsPerPage());
123124

124125
setValue("hitsPerPage", "1000");
@@ -129,14 +130,14 @@ public void testApplySetOptionInteger() {
129130
}
130131

131132
@Test
132-
public void testApplySetOptionInvalidInteger() {
133+
void testApplySetOptionInvalidInteger() {
133134
Response r = setValue("hitsPerPage", "abcd");
134135

135136
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), r.getStatus());
136137
}
137138

138139
@Test
139-
public void testApplySetOptionBooleanTrue() {
140+
void testApplySetOptionBooleanTrue() {
140141
testSetChattyStatusPageTrue("true");
141142
testSetChattyStatusPageTrue("on");
142143
testSetChattyStatusPageTrue("1");
@@ -151,7 +152,7 @@ private void testSetChattyStatusPageTrue(final String value) {
151152
}
152153

153154
@Test
154-
public void testApplySetOptionBooleanFalse() {
155+
void testApplySetOptionBooleanFalse() {
155156
testSetChattyStatusPageFalse("false");
156157
testSetChattyStatusPageFalse("off");
157158
testSetChattyStatusPageFalse("0");
@@ -166,21 +167,21 @@ private void testSetChattyStatusPageFalse(final String value) {
166167
}
167168

168169
@Test
169-
public void testApplySetOptionInvalidBoolean1() {
170+
void testApplySetOptionInvalidBoolean1() {
170171
Response r = setValue("chattyStatusPage", "1000"); // only 1 is accepted as true
171172

172173
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), r.getStatus());
173174
}
174175

175176
@Test
176-
public void testApplySetOptionInvalidBoolean2() {
177+
void testApplySetOptionInvalidBoolean2() {
177178
Response r = setValue("chattyStatusPage", "anything");
178179

179180
assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), r.getStatus());
180181
}
181182

182183
@Test
183-
public void testApplySetOptionString() {
184+
void testApplySetOptionString() {
184185
String old = env.getUserPage();
185186

186187
setValue("userPage", "http://users.portal.com?user=");
@@ -195,7 +196,7 @@ public void testApplySetOptionString() {
195196
}
196197

197198
@Test
198-
public void testApplyGetOptionString() {
199+
void testApplyGetOptionString() {
199200
env.setSourceRoot("/foo/bar");
200201
String response = target("configuration")
201202
.path("sourceRoot")
@@ -206,7 +207,7 @@ public void testApplyGetOptionString() {
206207
}
207208

208209
@Test
209-
public void testApplyGetOptionInteger() {
210+
void testApplyGetOptionInteger() {
210211
int hitsPerPage = target("configuration")
211212
.path("hitsPerPage")
212213
.request()
@@ -216,7 +217,7 @@ public void testApplyGetOptionInteger() {
216217
}
217218

218219
@Test
219-
public void testApplyGetOptionBoolean() {
220+
void testApplyGetOptionBoolean() {
220221
boolean response = target("configuration")
221222
.path("historyCache")
222223
.request()
@@ -226,14 +227,14 @@ public void testApplyGetOptionBoolean() {
226227
}
227228

228229
@Test
229-
public void testSuggesterServiceNotifiedOnConfigurationFieldChange() {
230+
void testSuggesterServiceNotifiedOnConfigurationFieldChange() {
230231
reset(suggesterService);
231232
setValue("sourceRoot", "test");
232233
verify(suggesterService).refresh();
233234
}
234235

235236
@Test
236-
public void testSuggesterServiceNotifiedOnConfigurationChange() {
237+
void testSuggesterServiceNotifiedOnConfigurationChange() {
237238
reset(suggesterService);
238239
target("configuration")
239240
.request()
@@ -242,7 +243,7 @@ public void testSuggesterServiceNotifiedOnConfigurationChange() {
242243
}
243244

244245
@Test
245-
public void testConfigValueSetVsThread() throws InterruptedException {
246+
void testConfigValueSetVsThread() throws InterruptedException {
246247
int origValue = env.getHitsPerPage();
247248
final int[] threadValue = new int[1];
248249
final CountDownLatch startLatch = new CountDownLatch(1);

0 commit comments

Comments
 (0)