Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Java9 depreciation message #1504

Merged
merged 2 commits into from
Jul 8, 2019
Merged

Conversation

mdedetrich
Copy link
Collaborator

@mdedetrich mdedetrich commented Jul 6, 2019

Problem

In JD9, the base newInstance method is deprecated, i.e.

method newInstance in class Class is deprecated: see corresponding Javadoc for more information.
[error]         getClass.getClassLoader.loadClass(cfg.getString(key)).newInstance

Solution

Use the getConstructor().newInstance() instead which is not deprecated

Checklist

  • Unit test all changes
  • Update README.md if applicable
  • Add [WIP] to the pull request title if it's work in progress
  • Squash commits that aren't meaningful changes
  • Run sbt scalariformFormat test:scalariformFormat to make sure that the source files are formatted

@getquill/maintainers

@mdedetrich
Copy link
Collaborator Author

Is it possible to merge this since its blocking quill from compiling on any machine with JDK9 or newer

@jilen jilen merged commit ef74f06 into zio:master Jul 8, 2019
@mdedetrich
Copy link
Collaborator Author

Many thanks.

@mdedetrich mdedetrich deleted the fix-java9-depreciation branch July 8, 2019 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants