Skip to main content

New answers tagged

0 votes

Java 21 Support for Spring Boot 2.7

At my work place, I recently moved the spring boot 2.7.0 application running on Java 17 to spring boot 2.7.17 over JDK 21. So, yes, spring boot 2.7 does support JDK 21.
Binita Bharati's user avatar
Best practices
0 votes
0 replies
0 views

Replace parallelStream() with Executor

For the sake of precision, costly as long as we are talking platform threads (classic Java Thread objects). Which we probably are here, and which newFixedThreadPool() uses. (Virtual threads are cheap ...
Anonymous's user avatar
  • 87.6k
Best practices
1 vote
0 replies
0 views

Replace parallelStream() with Executor

+2 for caching. Creating and destroying an executor service involves creating and destroying threads. That is costly. You should avoid doing it repeatedly.
Stephen C's user avatar
  • 724k
Best practices
0 votes
0 replies
0 views

Replace parallelStream() with Executor

In the 2nd code fragment, the field should be private (obviously). The more important issue is whether the field should be static. There is no "best practice" for this. Rather there are ...
Stephen C's user avatar
  • 724k
Best practices
2 votes
0 replies
0 views

Replace parallelStream() with Executor

Always cache your executor service for reuse. NewFixedThreadPool() is a good place to start. But dont forget to cleanup and shutdown the executor service when you are really done with it
pebble unit's user avatar
  • 1,439
0 votes

oracle.jdbc.driver.OracleConnection from JBOSS EAP 8 datasource

you should use oracle.jdbc.OracleConnection instead of oracle.jdbc.driver.OracleConnection.
Saurabh Verma's user avatar

Top 50 recent answers are included