Skip to content

Commit e077f94

Browse files
committedJan 31, 2025
Fix warn issues of build
1 parent 7e4bec1 commit e077f94

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed
 

‎pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
2626
<sonar.language>java</sonar.language>
2727
<sonar.java.source>${java-version}</sonar.java.source>
28-
<sonar.test.exclusions>src/test/**/*</sonar.test.exclusions>
28+
<sonar.exclusions>**/src/test/**</sonar.exclusions>
2929
<!--suppress UnresolvedMavenProperty -->
3030
<sonar.coverage.jacoco.xmlReportPaths>${maven.multiModuleProjectDirectory}/tests/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
3131
</properties>

‎weasis-base/weasis-base-explorer/src/main/java/org/weasis/base/explorer/JIThumbnailCache.java

+8-15
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,14 @@ public final class JIThumbnailCache {
4747
queue,
4848
ThreadUtil.getThreadFactory("Thumbnail Cache")); // NON-NLS
4949

50-
private final Map<URI, ThumbnailIcon> cachedThumbnails;
51-
52-
public JIThumbnailCache() {
53-
this.cachedThumbnails =
54-
Collections.synchronizedMap(
55-
new LinkedHashMap<>(80) {
56-
57-
private static final int MAX_ENTRIES = 100;
58-
59-
@Override
60-
protected boolean removeEldestEntry(final Map.Entry eldest) {
61-
return size() > MAX_ENTRIES;
62-
}
63-
});
64-
}
50+
private final Map<URI, ThumbnailIcon> cachedThumbnails =
51+
Collections.synchronizedMap(
52+
new LinkedHashMap<>(80) {
53+
@Override
54+
protected boolean removeEldestEntry(final Map.Entry eldest) {
55+
return size() > 100;
56+
}
57+
});
6558

6659
public synchronized void invalidate() {
6760
this.cachedThumbnails.clear();

0 commit comments

Comments
 (0)