TencentBlueKing/bk-repo

编译部署时依赖的jdk8版本兼容问题

Opened this issue · 0 comments

tswst commented

jdk版本:1.8.0_202
gradle: 7.4.2
问题:在低版本中SSLSocket类的部分方法是没有的,代码中重写的方法在编译时会失败,需使用高版本的jdk,测试了下最新1.8.0_421版本可以顺利编译。
因为jdk8在202版本之后就开始商用收费了,为了避免遇到这种版权费用的问题是否考虑兼容低版本的jdk
编译异常信息

Task :common:common-service:service-servlet:compileKotlin FAILED
e: /data/code/bk-repo-1.5.3-rc.1/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/util/okhttp/UnsafeSSLSocketImpl.kt: (172, 5): 'getApplicationProtocol' overrides nothing
e: /data/code/bk-repo-1.5.3-rc.1/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/util/okhttp/UnsafeSSLSocketImpl.kt: (173, 25): Unresolved reference: applicationProtocol
e: /data/code/bk-repo-1.5.3-rc.1/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/util/okhttp/UnsafeSSLSocketImpl.kt: (176, 5): 'setHandshakeApplicationProtocolSelector' overrides nothing
e: /data/code/bk-repo-1.5.3-rc.1/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/util/okhttp/UnsafeSSLSocketImpl.kt: (182, 18): Unresolved reference: handshakeApplicationProtocolSelector
e: /data/code/bk-repo-1.5.3-rc.1/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/util/okhttp/UnsafeSSLSocketImpl.kt: (185, 5): 'getHandshakeApplicationProtocolSelector' overrides nothing
e: /data/code/bk-repo-1.5.3-rc.1/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/util/okhttp/UnsafeSSLSocketImpl.kt: (186, 25): Unresolved reference: getHandshakeApplicationProtocolSelector
e: /data/code/bk-repo-1.5.3-rc.1/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/util/okhttp/UnsafeSSLSocketImpl.kt: (189, 5): 'getHandshakeApplicationProtocol' overrides nothing
e: /data/code/bk-repo-1.5.3-rc.1/src/backend/common/common-service/service-servlet/src/main/kotlin/com/tencent/bkrepo/common/service/util/okhttp/UnsafeSSLSocketImpl.kt: (190, 25): Unresolved reference: handshakeApplicationProtocol