question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace "ParameterizedTypeImpl" Java class (not present in OpenJDK 11)

See original GitHub issue

Part of #6197

The problematic class is: mage.watchers.Watcher (uses the deleted class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl)

The problematic commit is https://github.com/magefree/mage/commit/1a8723697ec547f4c9659dc61a0dc876f05dcf90

According to https://winterbe.com/posts/2018/08/29/migrate-maven-projects-to-java-11-jigsaw/, it could be that PrameterizedTypeImpl could be well replaced by its interface, ParameterizedType. Finally, according to the official Migration Guide, the replacement for this class is javax.lang.model.type.DeclaredType.

@ingmargoudt Whereas I am not very experienced in this, the class switch does not seem too difficult. I could try implementing the switch myself, if I can get some mentoring.

% jdeps --jdk-internals mage-1.4.42.jar
mage-1.4.42.jar -> java.base
   mage.watchers.Watcher                              -> sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl JDK internal API (java.base)

Warning: JDK internal APIs are unsupported and private to JDK implementation that are
subject to be removed or changed incompatibly and could break your application.
Please modify your code to eliminate dependence on any JDK internal APIs.
For the most recent update on JDK internal API replacements, please check:
https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool

JDK Internal API                         Suggested Replacement
----------------                         ---------------------
sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl Removed. See http://openjdk.java.net/jeps/260

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ingmargoudtcommented, Feb 4, 2020

@allentiak @JayDi85 I am looking into it right now 😃

0reactions
jzinedinecommented, Jun 10, 2021

Thank you for the information shared on this ticket! My problem got resolved. 👍🏼

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Getting List type of class from ParameterizedTypeImpl
This is an object factory that converts autogenerated domain objects from webservices to DTO domain objects. So the below code is generalized so ......
Read more >
Migrate Maven Projects to Java 11 - winterbe
Learn how to migrate Maven projects from Java 8 to 11 (Jigsaw ... While most classes are still available without any changes, some...
Read more >
ParameterizedType (Java SE 11 & JDK 11 )
See TypeVariable for details on the creation process for type variables. Repeated creation of a parameterized type has no effect. Instances of classes...
Read more >
[JDK-6986807] TEST failure: java/beans/Introspector ...
elapsed time (seconds): 0.192. ACTION: compile -- Passed. Compilation successful. REASON: .class file out of date or does not exist
Read more >
[Java] Latest New Relic agent is broken on JDK 17
Hi, when I add the java agent to the command line, then Jetty fails to start with a cryptic JDK error. Without newrelic-agent.jar...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found