Skip to content

Commit d897cca

Browse files
authored
Merge pull request eugenp#11546 from chaos2418/JAVA-8736
JAVA-8736: updating JDK version for the jdk9-and-above Jenkins jobs - W48
2 parents daa102c + 081e056 commit d897cca

12 files changed

Lines changed: 65 additions & 71 deletions

File tree

core-java-modules/core-java-11-2/pom.xml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<groupId>com.baeldung</groupId>
1313
<artifactId>parent-modules</artifactId>
1414
<version>1.0.0-SNAPSHOT</version>
15+
<relativePath>../../pom.xml</relativePath>
1516
</parent>
1617

1718
<dependencies>
@@ -35,18 +36,6 @@
3536
<artifactId>jakarta.xml.ws-api</artifactId>
3637
<version>${jakarta.ws-api.version}</version>
3738
</dependency>
38-
<dependency>
39-
<groupId>com.sun.xml.ws</groupId>
40-
<artifactId>jaxws-rt</artifactId>
41-
<version>${jaxws-rt.version}</version>
42-
<scope>runtime</scope>
43-
</dependency>
44-
<dependency>
45-
<groupId>com.sun.xml.ws</groupId>
46-
<artifactId>jaxws-ri</artifactId>
47-
<version>${jaxws-ri.version}</version>
48-
<type>pom</type>
49-
</dependency>
5039
</dependencies>
5140

5241
<build>
@@ -82,10 +71,8 @@
8271
<maven.compiler.target.version>11</maven.compiler.target.version>
8372
<guava.version>29.0-jre</guava.version>
8473
<mockserver.version>5.11.1</mockserver.version>
85-
<jakarta.ws-api.version>3.0.0</jakarta.ws-api.version>
86-
<jaxws-rt.version>3.0.0</jaxws-rt.version>
87-
<jaxws-ri.version>2.3.1</jaxws-ri.version>
88-
<jaxws-maven-plugin.version>2.3.2</jaxws-maven-plugin.version>
74+
<jakarta.ws-api.version>3.0.1</jakarta.ws-api.version>
75+
<jaxws-maven-plugin.version>3.0.2</jaxws-maven-plugin.version>
8976
</properties>
9077

9178
</project>

core-java-modules/core-java-11-2/src/main/java/com/baeldung/soap/ws/client/generated/Country.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

22
package com.baeldung.soap.ws.client.generated;
33

4-
import javax.xml.bind.annotation.XmlAccessType;
5-
import javax.xml.bind.annotation.XmlAccessorType;
6-
import javax.xml.bind.annotation.XmlSchemaType;
7-
import javax.xml.bind.annotation.XmlType;
4+
import jakarta.xml.bind.annotation.XmlAccessType;
5+
import jakarta.xml.bind.annotation.XmlAccessorType;
6+
import jakarta.xml.bind.annotation.XmlSchemaType;
7+
import jakarta.xml.bind.annotation.XmlType;
88

99

1010
/**

core-java-modules/core-java-11-2/src/main/java/com/baeldung/soap/ws/client/generated/CountryService.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11

22
package com.baeldung.soap.ws.client.generated;
33

4-
import javax.jws.WebMethod;
5-
import javax.jws.WebParam;
6-
import javax.jws.WebResult;
7-
import javax.jws.WebService;
8-
import javax.jws.soap.SOAPBinding;
9-
import javax.xml.bind.annotation.XmlSeeAlso;
10-
import javax.xml.ws.Action;
4+
import jakarta.jws.WebMethod;
5+
import jakarta.jws.WebParam;
6+
import jakarta.jws.WebResult;
7+
import jakarta.jws.WebService;
8+
import jakarta.jws.soap.SOAPBinding;
9+
import jakarta.xml.bind.annotation.XmlSeeAlso;
10+
import jakarta.xml.ws.Action;
1111

1212

1313
/**
1414
* This class was generated by the JAX-WS RI.
15-
* JAX-WS RI 2.3.2
16-
* Generated source version: 2.2
15+
* JAX-WS RI 3.0.2
16+
* Generated source version: 3.0
1717
*
1818
*/
1919
@WebService(name = "CountryService", targetNamespace = "http://server.ws.soap.baeldung.com/")

core-java-modules/core-java-11-2/src/main/java/com/baeldung/soap/ws/client/generated/CountryServiceImplService.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
import java.net.MalformedURLException;
55
import java.net.URL;
66
import javax.xml.namespace.QName;
7-
import javax.xml.ws.Service;
8-
import javax.xml.ws.WebEndpoint;
9-
import javax.xml.ws.WebServiceClient;
10-
import javax.xml.ws.WebServiceException;
11-
import javax.xml.ws.WebServiceFeature;
7+
import jakarta.xml.ws.Service;
8+
import jakarta.xml.ws.WebEndpoint;
9+
import jakarta.xml.ws.WebServiceClient;
10+
import jakarta.xml.ws.WebServiceException;
11+
import jakarta.xml.ws.WebServiceFeature;
1212

1313

1414
/**
1515
* This class was generated by the JAX-WS RI.
16-
* JAX-WS RI 2.3.2
17-
* Generated source version: 2.2
16+
* JAX-WS RI 3.0.2
17+
* Generated source version: 3.0
1818
*
1919
*/
2020
@WebServiceClient(name = "CountryServiceImplService", targetNamespace = "http://server.ws.soap.baeldung.com/", wsdlLocation = "http://localhost:8888/ws/country?wsdl")
@@ -75,7 +75,7 @@ public CountryService getCountryServiceImplPort() {
7575
/**
7676
*
7777
* @param features
78-
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
78+
* A list of {@link jakarta.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
7979
* @return
8080
* returns CountryService
8181
*/

core-java-modules/core-java-11-2/src/main/java/com/baeldung/soap/ws/client/generated/Currency.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11

22
package com.baeldung.soap.ws.client.generated;
33

4-
import javax.xml.bind.annotation.XmlEnum;
5-
import javax.xml.bind.annotation.XmlType;
4+
import jakarta.xml.bind.annotation.XmlEnum;
5+
import jakarta.xml.bind.annotation.XmlType;
66

77

88
/**
99
* <p>Java class for currency.
1010
*
1111
* <p>The following schema fragment specifies the expected content contained within this class.
12-
* <p>
1312
* <pre>
1413
* &lt;simpleType name="currency"&gt;
1514
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt;

core-java-modules/core-java-11-2/src/main/java/com/baeldung/soap/ws/client/generated/ObjectFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
package com.baeldung.soap.ws.client.generated;
33

4-
import javax.xml.bind.annotation.XmlRegistry;
4+
import jakarta.xml.bind.annotation.XmlRegistry;
55

66

77
/**
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
@javax.xml.bind.annotation.XmlSchema(namespace = "http://server.ws.soap.baeldung.com/")
1+
@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://server.ws.soap.baeldung.com/")
22
package com.baeldung.soap.ws.client.generated;

core-java-modules/core-java-11/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
<groupId>com.baeldung</groupId>
1414
<artifactId>parent-modules</artifactId>
1515
<version>1.0.0-SNAPSHOT</version>
16+
17+
<relativePath>../../pom.xml</relativePath>
1618
</parent>
1719

1820
<dependencies>

core-java-modules/core-java-time-measurements/pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@
3838
<version>${asspectj.version}</version>
3939
</dependency>
4040
<dependency>
41-
<groupId>org.powermock</groupId>
42-
<artifactId>powermock-module-junit4</artifactId>
43-
<version>${powermock.version}</version>
41+
<groupId>org.mockito</groupId>
42+
<artifactId>mockito-inline</artifactId>
43+
<version>${mockito-inline.version}</version>
4444
<scope>test</scope>
4545
</dependency>
4646
<dependency>
47-
<groupId>org.powermock</groupId>
48-
<artifactId>powermock-api-mockito2</artifactId>
49-
<version>${powermock.version}</version>
47+
<groupId>org.mockito</groupId>
48+
<artifactId>mockito-core</artifactId>
49+
<version>${mockito-inline.version}</version>
5050
<scope>test</scope>
5151
</dependency>
5252
<dependency>
@@ -82,10 +82,10 @@
8282
<properties>
8383
<commons-math3.version>3.6.1</commons-math3.version>
8484
<joda.version>2.10</joda.version>
85-
<lombok.version>1.18.12</lombok.version>
85+
<lombok.version>1.18.22</lombok.version>
8686
<asspectj.version>1.8.9</asspectj.version>
87-
<powermock.version>2.0.7</powermock.version>
8887
<jmockit.version>1.44</jmockit.version>
88+
<mockito-inline.version>4.0.0</mockito-inline.version>
8989
</properties>
9090

9191
</project>

core-java-modules/core-java-time-measurements/src/test/java/com/baeldung/time/InstantUnitTest.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,28 @@
11
package com.baeldung.time;
22

33
import org.junit.Test;
4-
import org.junit.runner.RunWith;
5-
import org.powermock.core.classloader.annotations.PrepareForTest;
6-
import org.powermock.modules.junit4.PowerMockRunner;
4+
import org.mockito.MockedStatic;
75

86
import java.time.Clock;
97
import java.time.Instant;
108
import java.time.ZoneId;
119

1210
import static org.assertj.core.api.Assertions.assertThat;
13-
import static org.powermock.api.mockito.PowerMockito.mockStatic;
14-
import static org.powermock.api.mockito.PowerMockito.when;
11+
import static org.mockito.Mockito.mockStatic;
1512

16-
@RunWith(PowerMockRunner.class)
17-
@PrepareForTest({ Instant.class })
1813
public class InstantUnitTest {
1914

2015
@Test
2116
public void givenInstantMock_whenNow_thenGetFixedInstant() {
2217
String instantExpected = "2014-12-22T10:15:30Z";
2318
Clock clock = Clock.fixed(Instant.parse(instantExpected), ZoneId.of("UTC"));
2419
Instant instant = Instant.now(clock);
25-
mockStatic(Instant.class);
26-
when(Instant.now()).thenReturn(instant);
2720

28-
Instant now = Instant.now();
29-
30-
assertThat(now.toString()).isEqualTo(instantExpected);
21+
try (MockedStatic<Instant> mockedStatic = mockStatic(Instant.class)) {
22+
mockedStatic.when(Instant::now).thenReturn(instant);
23+
Instant now = Instant.now();
24+
assertThat(now.toString()).isEqualTo(instantExpected);
25+
}
3126
}
3227

3328
@Test

0 commit comments

Comments
 (0)