compilation result depends on compilation order

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: 23
    • Component/s: tools
    • None
    • b26

        The JDK rebuild fails if ClassRemapperImpl is rebuilt and RecordComponentInfo is not.

        Failure message:
        src/java.base/share/classes/jdk/internal/classfile/impl/ClassRemapperImpl.java:306: error: no suitable method found for of(String,ClassDesc,List<Attribute<? extends Attribute<?>>>)
                return RecordComponentInfo.of(component.name().stringValue(),
                                          ^
            method RecordComponentInfo.of(Utf8Entry,Utf8Entry,List<Attribute<?>>) is not applicable
              (argument mismatch; String cannot be converted to Utf8Entry)
            method RecordComponentInfo.of(Utf8Entry,Utf8Entry,Attribute<?>...) is not applicable
              (argument mismatch; String cannot be converted to Utf8Entry)
            method RecordComponentInfo.of(String,ClassDesc,List<Attribute<?>>) is not applicable
              (argument mismatch; List<Attribute<? extends Attribute<?>>> cannot be converted to List<Attribute<?>>)
            method RecordComponentInfo.of(String,ClassDesc,Attribute<?>...) is not applicable
              (varargs mismatch; List<Attribute<? extends Attribute<?>>> cannot be converted to Attribute<?>)
        1 error

        To reproduce:
        - make
        - touch src/java.base/share/classes/jdk/internal/classfile/impl/ClassRemapperImpl.java
        - make

        Workaround:
        - touch src/java.base/share/classes/java/lang/classfile/attribute/RecordComponentInfo.java

              Assignee:
              Vicente Arturo Romero Zaldivar
              Reporter:
              Daniel Jelinski
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: