Details
-
Improvement
-
Status: Closed
-
Low
-
Resolution: Fixed
-
None
-
None
Description
1. Optimize the use of assertions
2. Fix possible null pointer exception
SSLEngine sslEngine = null; try { // create engine sslEngine = TSSLEngineUtil.createSSLEngine(keyStorePath, trustStorePath, keyStorePassword, trustStorePassword, true, false); } catch (Throwable e) { e.printStackTrace(); } // If the above code is a field, it may cause the object sslEngine is null boolean needClientAuth = sslEngine.getNeedClientAuth();