mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-04 20:45:58 +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 = {
|
||||
val cachedInstance = provider.get()
|
||||
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)
|
||||
newInstance
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user