about summary refs log tree commit diff
path: root/pkgs/development/compilers/openjdk/ignore-LegalNoticeFilePlugin-jdk17.patch
blob: 3bb610ee35c0907fb507a47584de2873d7725e32 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/LegalNoticeFilePlugin.java
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/LegalNoticeFilePlugin.java
@@ -112,18 +112,6 @@
             .filter(e -> Arrays.equals(e.contentBytes(), entry.contentBytes()))
             .findFirst();
         if (!otarget.isPresent()) {
-            if (errorIfNotSameContent) {
-                // all legal notices of the same file name are expected
-                // to contain the same content
-                Optional<ResourcePoolEntry> ores =
-                    entries.stream().filter(e -> e.linkedTarget() == null)
-                           .findAny();
-
-                if (ores.isPresent()) {
-                    throw new PluginException(ores.get().path() + " " +
-                        entry.path() + " contain different content");
-                }
-            }
             entries.add(entry);
         } else {
             entries.add(ResourcePoolEntry.createSymLink(entry.path(),