File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
byte-buddy-dep/src/main/java/net/bytebuddy/build Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -3426,7 +3426,8 @@ public void close() {
34263426 }
34273427
34283428 /**
3429- * A sink that stores all elements in a memory map.
3429+ * A sink that stores all elements in a memory map. In case of multi-release jars, this memory
3430+ * storage aims to retain the non-versioned class file.
34303431 */
34313432 @ HashCodeAndEqualsPlugin .Enhance
34323433 class InMemory implements Target , Sink {
@@ -3482,7 +3483,10 @@ public void store(Map<TypeDescription, byte[]> binaryRepresentations) {
34823483 */
34833484 public void store (int version , Map <TypeDescription , byte []> binaryRepresentations ) throws IOException {
34843485 for (Map .Entry <TypeDescription , byte []> entry : binaryRepresentations .entrySet ()) {
3485- storage .putIfAbsent (entry .getKey ().getInternalName () + CLASS_FILE_EXTENSION , entry .getValue ());
3486+ String name = entry .getKey ().getInternalName () + CLASS_FILE_EXTENSION ;
3487+ if (!storage .containsKey (name )) {
3488+ storage .put (name , entry .getValue ());
3489+ }
34863490 }
34873491 }
34883492
You can’t perform that action at this time.
0 commit comments