mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
fix deprecation warning. Class#newInstance deprecated since Java9
This commit is contained in:
@@ -127,7 +127,11 @@ object LDAPUtil {
|
|||||||
private def getSslProvider(): Provider = {
|
private def getSslProvider(): Provider = {
|
||||||
val cachedInstance = provider.get()
|
val cachedInstance = provider.get()
|
||||||
if (cachedInstance == null) {
|
if (cachedInstance == null) {
|
||||||
val newInstance = Class.forName("com.sun.net.ssl.internal.ssl.Provider").newInstance().asInstanceOf[Provider]
|
val newInstance = Class
|
||||||
|
.forName("com.sun.net.ssl.internal.ssl.Provider")
|
||||||
|
.getDeclaredConstructor()
|
||||||
|
.newInstance()
|
||||||
|
.asInstanceOf[Provider]
|
||||||
provider.compareAndSet(null, newInstance)
|
provider.compareAndSet(null, newInstance)
|
||||||
newInstance
|
newInstance
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user