Skip to content

Commit 0baf0a9

Browse files
committed
Format
1 parent ef3b64c commit 0baf0a9

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

weasis-core-img/src/main/java/org/weasis/opencv/natives/NativeLibrary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private NativeLibrary() {}
8989
* @throws IllegalStateException if system properties cannot be determined
9090
*/
9191
public static String getNativeLibSpecification() {
92-
// Double-checked locking pattern with volatile field
92+
// Double-checked locking pattern with a volatile field
9393
var result = cachedSpecification;
9494
if (result == null) {
9595
synchronized (NativeLibrary.class) {

weasis-core-img/src/test/java/org/weasis/opencv/natives/NativeLibraryTest.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,16 @@ void should_handle_concurrent_library_loading() throws Exception {
8484
final var threadCount = 10;
8585
ExecutorService executor = Executors.newFixedThreadPool(threadCount);
8686

87-
var tasks = Stream.generate(
88-
() -> (Callable<Void>) () -> {
89-
NativeLibrary.loadLibraryFromLibraryName();
90-
return null;
91-
})
92-
.limit(threadCount)
93-
.toList();
87+
var tasks =
88+
Stream.generate(
89+
() ->
90+
(Callable<Void>)
91+
() -> {
92+
NativeLibrary.loadLibraryFromLibraryName();
93+
return null;
94+
})
95+
.limit(threadCount)
96+
.toList();
9497

9598
var futures = executor.invokeAll(tasks);
9699

@@ -102,7 +105,6 @@ void should_handle_concurrent_library_loading() throws Exception {
102105
}
103106
}
104107

105-
106108
@Nested
107109
@DisplayNameGeneration(ReplaceUnderscores.class)
108110
class Operating_system_detection {

0 commit comments

Comments
 (0)