Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7727

Replace EOL'ed pegdown by flexmark-java for Java 9 compatibility

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 6.5, 7.0
    • general/build
    • New

    Description

      The documentation tasks use a library called "pegdown" to convert Markdown to HTML. Unfortunately, the developer of pegdown EOLed it and points the users to a faster replacement: flexmark-java (https://github.com/vsch/flexmark-java).

      This would not be important for us, if pegdown would work with Java 9, but it is also affected by the usual "setAccessible into private Java APIs" issue (see my talk at FOSDEM: https://fosdem.org/2017/schedule/event/jigsaw_challenges/).

      The migration should not be too hard, its just a bit of Groovy Code rewriting and dependency changes.

      This is the pegdown problem:

      Caused by: java.lang.RuntimeException: Could not determine whether class 'org.pegdown.Parser$$parboiled' has already been loaded
              at org.parboiled.transform.AsmUtils.findLoadedClass(AsmUtils.java:213)
              at org.parboiled.transform.ParserTransformer.transformParser(ParserTransformer.java:35)
              at org.parboiled.Parboiled.createParser(Parboiled.java:54)
              ... 50 more
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) accessible: module java.base does not "opens java.lang" to unnamed module @551b6736
              at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:335)
              at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:278)
              at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:196)
              at java.base/java.lang.reflect.Method.setAccessible(Method.java:190)
              at org.parboiled.transform.AsmUtils.findLoadedClass(AsmUtils.java:206)
              ... 52 more
      

      Attachments

        1. LUCENE-7727.patch
          12 kB
          Uwe Schindler
        2. LUCENE-7727.patch
          10 kB
          Uwe Schindler

        Issue Links

          Activity

            People

              uschindler Uwe Schindler
              uschindler Uwe Schindler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: