You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paranamer hasn't been updated for a very long time and is now causing all kinds of trouble in later Java versions, its time to finally drop it and uses the much more stable Java reflection for the same purpose.
When running the following code:
case class TimeWrapper(time: Date)
val clazz = classOf[TimeWrapper]
val tors = clazz.getConstructors
val ctor = tors.head
val exe = new Executable(ctor)
val names = ParanamerReader.lookupParameterNames(exe)
require(names.size == 1)
Paranamer throw the following error:
Parameter names not found for <init>
com.thoughtworks.paranamer.ParameterNamesNotFoundException: Parameter names not found for <init>
at com.thoughtworks.paranamer.BytecodeReadingParanamer$TypeCollector.getParameterNamesForMethod(BytecodeReadingParanamer.java:241)
at com.thoughtworks.paranamer.BytecodeReadingParanamer$TypeCollector.access$300(BytecodeReadingParanamer.java:144)
at com.thoughtworks.paranamer.BytecodeReadingParanamer.lookupParameterNames(BytecodeReadingParanamer.java:104)
at com.thoughtworks.paranamer.CachingParanamer.lookupParameterNames(CachingParanamer.java:90)
at com.thoughtworks.paranamer.CachingParanamer.lookupParameterNames(CachingParanamer.java:83)
at org.json4s.reflect.package$ParanamerReader$.lookupParameterNames(package.scala:92)
at org.apache.spark.ml.dsl.utils.messaging.MessageReaderSuite.$anonfun$new$3(MessageReaderSuite.scala:34)
...
Test was conducted on Java 8, it is unknown whether it can be triggered reliably
json4s version
4.0.4
scala version
2.12.16
jdk version
OpenJDK 8
The text was updated successfully, but these errors were encountered:
Thanks a lot! Turns out that the old paranamer depends on metadata from the "-g:vars" compiler argument to work, but this is a huge reduction of vulnerability!
Paranamer hasn't been updated for a very long time and is now causing all kinds of trouble in later Java versions, its time to finally drop it and uses the much more stable Java reflection for the same purpose.
When running the following code:
Paranamer throw the following error:
Test was conducted on Java 8, it is unknown whether it can be triggered reliably
json4s version
4.0.4
scala version
2.12.16
jdk version
OpenJDK 8
The text was updated successfully, but these errors were encountered: