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() {
3426
3426
}
3427
3427
3428
3428
/**
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.
3430
3431
*/
3431
3432
@ HashCodeAndEqualsPlugin .Enhance
3432
3433
class InMemory implements Target , Sink {
@@ -3482,7 +3483,10 @@ public void store(Map<TypeDescription, byte[]> binaryRepresentations) {
3482
3483
*/
3483
3484
public void store (int version , Map <TypeDescription , byte []> binaryRepresentations ) throws IOException {
3484
3485
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
+ }
3486
3490
}
3487
3491
}
3488
3492
You can’t perform that action at this time.
0 commit comments