-
Notifications
You must be signed in to change notification settings - Fork 344
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
warning: [deprecation] getPackage(String) in ClassLoader has been deprecated #71
Comments
Simplest solution would be just to annotate the override method with The overridden method is being called in here: jpf-core/src/tests/gov/nasa/jpf/test/java/net/URLClassLoaderTest.java Lines 482 to 497 in 18a0c42
Another possible solution would be to refactor |
Perhaps the test still passes when using |
Thanks for the info. Is it okay that we keep the test name as |
Gayan Weerakutti wrote:
Thanks for the info. Is it okay that we keep the test name as
|testGetPackage| as we no longer be calling |getPackage| but
|getDefinedPackage|.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#71 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG9eRwg68wd9TKkAmE4F1Tfir6noIRBuks5t5o-ogaJpZM4UU1pO>.
I see; please change the test name to testGetDefinedPackage for consistency.
--
Regards,
Cyrille Artho - http://artho.com/
No problem is so formidable that you can't just walk away from it.
-- C. Schulz
|
ClassLoader.getPackage(String) is deprecated. This refactors URLClassLoaderTest to use ClassLoader.getDefinedPackage(String) instead. gov.nasa.jpf.test.java.net.URLClassLoaderTest.TestClassLoader is only used within gov.nasa.jpf.test.java.net.URLClassLoaderTest. gov.nasa.jpf.test.java.net.URLClassLoaderTest.TestClassLoader#getPackage is being removed as it is no longer being used once the test being refactored. Fixes: javapathfinder#71
Deprecation warning 'getPackage(String) in ClassLoader has been deprecated' when build with JDK 9 and later:
jpf-core/src/tests/gov/nasa/jpf/test/java/net/URLClassLoaderTest.java
Lines 67 to 70 in 18a0c42
Travis log:
https://travis-ci.org/javapathfinder/jpf-core/builds/385707808#L2456-L2461
References:
cr.openjdk.java.net/~iris/se/10/latestSpec/api/java/lang/ClassLoader.html#getPackage(java.lang.String)
The text was updated successfully, but these errors were encountered: