Buggy code:
public class SyslogAuditLogHandler extends AuditLogHandler { private final PathManagerService pathManager ; private volatile SyslogHandler handler ; private volatile String appName = "WildFly" ; private volatile String hostName ; private volatile SyslogType syslogType = SyslogType . RFC5424 ; private volatile boolean truncate ; private volatile int maxLength ; private volatile InetAddress syslogServerAddress ; private volatile int port = 514 ; private volatile SyslogAuditLogHandler . Transport transport = SyslogAuditLogHandler . Transport . UDP ; private volatile SyslogAuditLogHandler . MessageTransfer messageTransfer = SyslogAuditLogHandler . MessageTransfer . NON_TRANSPARENT_FRAMING ; private volatile String tlsTrustStorePath ; private volatile String tlsTrustStoreRelativeTo ; private volatile String tlsTrustStorePassword ; private volatile String tlsClientCertStorePath ; private volatile String tlsClientCertStoreRelativeTo ; private volatile String tlsClientCertStorePassword ; private volatile String tlsClientCertStoreKeyPassword ; public SyslogAuditLogHandler ( String name , String formatterName , int maxFailureCount , PathManagerService pathManager ) { } public void setHostName ( String hostName ) { } public void setAppName ( String appName ) { } public void setSyslogType ( SyslogType syslogType ) { } public void setTruncate ( boolean truncate ) { } public void setMaxLength ( int maxLength ) { } public void setMessageTransfer ( SyslogAuditLogHandler . MessageTransfer messageTransfer ) { } public void setSyslogServerAddress ( InetAddress syslogServerAddress ) { } public void setPort ( int port ) { } public void setTransport ( SyslogAuditLogHandler . Transport transport ) { } public void setTlsTrustStorePath ( String tlsTrustStorePath ) { } public void setTlsTrustStoreRelativeTo ( String tlsTrustStoreRelativeTo ) { } public void setTlsTruststorePassword ( String tlsTrustStorePassword ) { } public void setTlsClientCertStorePath ( String tlsClientCertStorePath ) { } public void setTlsClientCertStoreRelativeTo ( String tlsClientCertStoreRelativeTo ) { } public void setTlsClientCertStorePassword ( String tlsClientCertStorePassword ) { } public void setTlsClientCertStoreKeyPassword ( String tlsClientCertStoreKeyPassword ) { } @ Override void initialize ( ) { try { if ( ( handler ) != null ) { return ; } final Protocol protocol ; switch ( transport ) { case UDP : protocol = Protocol . UDP ; break ; case TCP : protocol = Protocol . TCP ; break ; case TLS : protocol = Protocol . SSL_TCP ; break ; default : throw new IllegalStateException ( "Unknown<seq2seq4repair_space>protocol" ) ; } handler = new SyslogHandler ( syslogServerAddress , port , SyslogHandler . DEFAULT_FACILITY , syslogType , protocol , ( ( hostName ) == null ? InetAddress . getLocalHost ( ) . getHostName ( ) : hostName ) ) ; handler . setEscapeEnabled ( false ) ; handler . setAppName ( appName ) ; handler . setTruncate ( truncate ) ; if ( ( maxLength ) != 0 ) { handler . setMaxLength ( maxLength ) ; } handler . setSyslogType ( syslogType ) ; if ( ( transport ) != ( SyslogAuditLogHandler . Transport . UDP ) ) { if ( ( messageTransfer ) == ( SyslogAuditLogHandler . MessageTransfer . NON_TRANSPARENT_FRAMING ) ) { handler . setUseCountingFraming ( false ) ; handler . setMessageDelimiter ( "\n" ) ; handler . setUseMessageDelimiter ( true ) ; } else { handler . setUseCountingFraming ( true ) ; handler . setMessageDelimiter ( null ) ; handler . setUseMessageDelimiter ( false ) ; } if ( ( ( transport ) == ( SyslogAuditLogHandler . Transport . TLS ) ) && ( ( ( tlsClientCertStorePath ) != null ) || ( ( tlsTrustStorePath ) != null ) ) ) { final SSLContext context = SSLContext . getInstance ( "TLS" ) ; KeyManager [ ] keyManagers = null ; if ( ( tlsClientCertStorePath ) != null ) { <START_BUG> final KeyManagerFactory kmf = KeyManagerFactory . getInstance ( "SunX509" ) ; <END_BUG> final FileInputStream in = new FileInputStream ( pathManager . resolveRelativePathEntry ( tlsClientCertStorePath , tlsClientCertStoreRelativeTo ) ) ; try { final KeyStore ks = KeyStore . getInstance ( "JKS" ) ; ks . load ( in , tlsClientCertStorePassword . toCharArray ( ) ) ; kmf . init ( ks , ( ( tlsClientCertStoreKeyPassword ) != null ? tlsClientCertStoreKeyPassword . toCharArray ( ) : tlsClientCertStorePassword . toCharArray ( ) ) ) ; keyManagers = kmf . getKeyManagers ( ) ; } finally { IoUtils . safeClose ( in ) ; } } TrustManager [ ] trustManagers = null ; if ( ( tlsTrustStorePath ) != null ) { final TrustManagerFactory tmf = TrustManagerFactory . getInstance ( TrustManagerFactory . getDefaultAlgorithm ( ) ) ; final FileInputStream in = new FileInputStream ( pathManager . resolveRelativePathEntry ( tlsTrustStorePath , tlsTrustStoreRelativeTo ) ) ; try { final KeyStore ks = KeyStore . getInstance ( "JKS" ) ; ks . load ( in , tlsTrustStorePassword . toCharArray ( ) ) ; tmf . init ( ks ) ; trustManagers = tmf . getTrustManagers ( ) ; } finally { IoUtils . safeClose ( in ) ; } } context . init ( keyManagers , trustManagers , null ) ; handler . setOutputStream ( new SyslogAuditLogHandler . SSLContextOutputStream ( context , syslogServerAddress , port ) ) ; } else { handler . setProtocol ( ( ( transport ) == ( SyslogAuditLogHandler . Transport . TCP ) ? Protocol . TCP : Protocol . SSL_TCP ) ) ; } } } catch ( Exception e ) { throw new RuntimeException ( e ) ; } } @ Override void stop ( ) { } @ Override void writeLogItem ( String formattedItem ) throws IOException { } @ Override boolean isDifferent ( AuditLogHandler other ) { } private boolean compare ( Object one , Object two ) { } public enum Transport { UDP , TCP , TLS ; } public enum MessageTransfer { OCTET_COUNTING , NON_TRANSPARENT_FRAMING ; } private static class SSLContextOutputStream extends TcpOutputStream { protected SSLContextOutputStream ( SSLContext sslContext , InetAddress host , int port ) throws IOException { } } }

Fix:
final KeyManagerFactory kmf = KeyManagerFactory . getInstance ( KeyManagerFactory . getDefaultAlgorithm ( ) ) ;