dockerzhang / incubator-inlong

Apache InLong - a one-stop data streaming platform
https://inlong.apache.org/
Apache License 2.0
0 stars 0 forks source link

[INLONG-138] Optimize core module test case code #138

Closed dockerzhang closed 3 years ago

dockerzhang commented 3 years ago

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();

JIRA link - [INLONG-138] created by viviel