Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c6617fa

Browse files
committed
Migrate to Java 21
* migrate to Java 21 * upgrade maven dependencies * update CrazyOptionalsTest
1 parent b9a7749 commit c6617fa

File tree

3 files changed

+31
-30
lines changed

3 files changed

+31
-30
lines changed

‎5-0-functional-programming/5-3-1-crazy-optionals/src/test/java/com/bobocode/fp/CrazyOptionalsTest.java‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ void retrieveBalanceShouldUseNullSafeMapping() {
201201
CrazyOptionals.retrieveBalance(() -> optionalAccountSpy);
202202

203203
verify(optionalAccountSpy, never()).get();
204-
verify(optionalAccountSpy, never()).isEmpty();
205-
verify(optionalAccountSpy, times(1)).isPresent();
206204
verify(optionalAccountSpy, never()).orElse(any());
207205
verify(optionalAccountSpy, never()).orElseGet(any());
208206
verify(optionalAccountSpy, times(1)).map(any());
@@ -264,8 +262,6 @@ void retrieveCreditBalanceShouldUseNullSafeMapping() {
264262
CrazyOptionals.retrieveCreditBalance(() -> optionalCreditAccountSpy);
265263

266264
verify(optionalCreditAccountSpy, never()).get();
267-
verify(optionalCreditAccountSpy, never()).isEmpty();
268-
verify(optionalCreditAccountSpy, times(1)).isPresent();
269265
verify(optionalCreditAccountSpy, never()).orElse(any());
270266
verify(optionalCreditAccountSpy, never()).orElseGet(any());
271267
verify(optionalCreditAccountSpy, times(1)).flatMap(any());
@@ -311,8 +307,6 @@ void retrieveAccountGmailShouldUseNullSafeFiltering() {
311307
CrazyOptionals.retrieveAccountGmail(() -> optionalAccountSpy);
312308

313309
verify(optionalAccountSpy, never()).get();
314-
verify(optionalAccountSpy, times(1)).isPresent();
315-
verify(optionalAccountSpy, never()).isEmpty();
316310
verify(optionalAccountSpy, never()).orElse(any());
317311
verify(optionalAccountSpy, times(1)).filter(any());
318312
}

‎java-fundamentals-util/pom.xml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
<modelVersion>4.0.0</modelVersion>
1111

1212
<artifactId>java-fundamentals-util</artifactId>
13-
14-
<properties>
15-
<maven.compiler.source>17</maven.compiler.source>
16-
<maven.compiler.target>17</maven.compiler.target>
17-
</properties>
1813

1914
<dependencies>
2015
<dependency>

‎pom.xml‎

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<packaging>pom</packaging>
1111

1212
<properties>
13-
<maven.compiler.source>17</maven.compiler.source>
14-
<maven.compiler.target>17</maven.compiler.target>
13+
<maven.compiler.source>21</maven.compiler.source>
14+
<maven.compiler.target>21</maven.compiler.target>
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1616
</properties>
1717

@@ -31,31 +31,25 @@
3131
<dependency>
3232
<groupId>org.junit.jupiter</groupId>
3333
<artifactId>junit-jupiter-engine</artifactId>
34-
<version>5.8.2</version>
34+
<version>5.10.0</version>
3535
<scope>test</scope>
3636
</dependency>
3737
<dependency>
3838
<groupId>org.junit.jupiter</groupId>
3939
<artifactId>junit-jupiter-params</artifactId>
40-
<version>5.8.2</version>
40+
<version>5.10.0</version>
4141
<scope>test</scope>
4242
</dependency>
4343
<dependency>
4444
<groupId>org.assertj</groupId>
4545
<artifactId>assertj-core</artifactId>
46-
<version>3.22.0</version>
47-
<scope>test</scope>
48-
</dependency>
49-
<dependency>
50-
<groupId>org.hamcrest</groupId>
51-
<artifactId>hamcrest-library</artifactId>
52-
<version>2.2</version>
46+
<version>3.24.2</version>
5347
<scope>test</scope>
5448
</dependency>
5549
<dependency>
5650
<groupId>org.projectlombok</groupId>
5751
<artifactId>lombok</artifactId>
58-
<version>1.18.24</version>
52+
<version>1.18.30</version>
5953
</dependency>
6054
<dependency>
6155
<groupId>com.google.code.findbugs</groupId>
@@ -65,19 +59,39 @@
6559
<dependency>
6660
<groupId>org.mockito</groupId>
6761
<artifactId>mockito-core</artifactId>
68-
<version>4.5.1</version>
62+
<version>5.6.0</version>
6963
<scope>test</scope>
64+
<exclusions>
65+
<exclusion>
66+
<groupId>net.bytebuddy</groupId>
67+
<artifactId>byte-buddy</artifactId>
68+
</exclusion>
69+
<exclusion>
70+
<groupId>net.bytebuddy</groupId>
71+
<artifactId>byte-buddy-agent</artifactId>
72+
</exclusion>
73+
</exclusions>
74+
</dependency>
75+
<dependency>
76+
<groupId>net.bytebuddy</groupId>
77+
<artifactId>byte-buddy</artifactId>
78+
<version>1.14.9</version>
79+
</dependency>
80+
<dependency>
81+
<groupId>net.bytebuddy</groupId>
82+
<artifactId>byte-buddy-agent</artifactId>
83+
<version>1.14.9</version>
7084
</dependency>
7185
<dependency>
7286
<groupId>org.mockito</groupId>
7387
<artifactId>mockito-inline</artifactId>
74-
<version>4.5.1</version>
88+
<version>5.2.0</version>
7589
<scope>test</scope>
7690
</dependency>
7791
<dependency>
7892
<groupId>org.slf4j</groupId>
7993
<artifactId>slf4j-simple</artifactId>
80-
<version>1.7.36</version>
94+
<version>2.0.9</version>
8195
</dependency>
8296
</dependencies>
8397

@@ -87,7 +101,7 @@
87101
<plugin>
88102
<groupId>org.apache.maven.plugins</groupId>
89103
<artifactId>maven-compiler-plugin</artifactId>
90-
<version>3.10.1</version>
104+
<version>3.11.0</version>
91105
<configuration>
92106
<compilerArgs>
93107
<arg>-parameters</arg>
@@ -97,11 +111,9 @@
97111
<plugin>
98112
<groupId>org.apache.maven.plugins</groupId>
99113
<artifactId>maven-surefire-plugin</artifactId>
100-
<version>3.0.0-M6</version>
114+
<version>3.1.2</version>
101115
</plugin>
102116
</plugins>
103117
</pluginManagement>
104118
</build>
105-
106-
107119
</project>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /