fixed a potential NPE in SSLSocketAppenderBase
If the appender configuration did not specify an SSL configuration, an NPE would occur in method start when creating the SSLContext. This NPE would be trapped and logged, but subsequently the getSocketFactory method would be called and would return null, potentially causing an NPE further up the stack. The fix is to ensure that the appender always has a default SSL configuration, even if one is not specified in the Joran configuration. Unit tests for the SSLConfiguration already validate that an SSLContext can be successfully created from an SSLConfiguration that is merely instantiated, but has none of its properties configured.
parent
2c15bc5b
Please register or sign in to comment