Skip to content

Commit 67462aa

Browse files
second call failed also with JDK17, fix to make test succeed
1 parent 57b8916 commit 67462aa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sqldev/src/test/java/org/utplsql/sqldev/test/runner/UtplsqlRunnerTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ public void setupDefaultPreferences() {
4646
preferences = PreferenceModel.getInstance(null);
4747
// the second call will call will succeed and use preferences from user.home
4848
// this ensures that the test and the runner use the same preferences
49-
preferences = PreferenceModel.getInstance(Preferences.getPreferences());
49+
try {
50+
preferences = PreferenceModel.getInstance(Preferences.getPreferences());
51+
} catch (NoClassDefFoundError e2) {
52+
// the second call also failed. no other option left (new behavior with Java17)
53+
preferences = PreferenceModel.getInstance(null);
54+
}
5055
} finally {
5156
// set defaults manually, since all tests are using the same preference store
5257
preferences.setShowSuccessfulTests(true);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy