Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-186297

Mojang mappings contains a lot of lambda$null, maybe adapt proguard

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 20w22a
    • None
    • Confirmed
    • (Unassigned)

      It seems that the current mappings produce a lot of lambda$null reference for synthetic and anonymous methods, if possible it would be great to keep the name of those methods or have them in the mappings.

      Proguard example website even have a paragraph about it. (https://www.guardsquare.com/en/products/proguard/manual/examples

      In the rare event that you are serializing lambda expressions in Java 8 or higher, you need to preserve some methods and adapt the hard-coded names of the classes in which they occur:
       
      -keepclassmembers class * {
          private static synthetic java.lang.Object $deserializeLambda$(java.lang.invoke.SerializedLambda);
      }
      
      -keepclassmembernames class * {
          private static synthetic *** lambda$*(...);
      }
      
      -adaptclassstrings com.example.Test
      
      This should satisfy the reflection in the deserialization code of the Java run-time.
      

       

            Unassigned Unassigned
            Neilcaffrei Neilcaffrei
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: