mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 02:24:40 +02:00
8211295: DriverManager.getConnection fails when called from com.sun.rowset.JdbcRowSetImpl
Reviewed-by: mchung, alanb
This commit is contained in:
parent
4374820705
commit
c925556ec4
3 changed files with 85 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -652,7 +652,7 @@ public class DriverManager {
|
|||
* can be loaded from here.
|
||||
*/
|
||||
ClassLoader callerCL = caller != null ? caller.getClassLoader() : null;
|
||||
if (callerCL == null) {
|
||||
if (callerCL == null || callerCL == ClassLoader.getPlatformClassLoader()) {
|
||||
callerCL = Thread.currentThread().getContextClassLoader();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue