Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixing mwiede#131 issues (mwiede#134)
* log exceptions to logger instead of STDOUT/ERR, put class under test, fixed bugs that where found in the process - fixed bug in remove(String, String, String) leading to only every second host key being removed - ensure that there is a SHA1-hash-instance to prevent NullPointerExceptions - replaced all occurrences of STDOUT/ERR outputs in case of exceptions with log entries - added a default method to Logger to allow passing the exception to be logged with the message * create the exception we expect to get the exception message of that particular JVM * use platform dependent linebreak for logging the stack trace added log-framework-specific implementations of log(int, String, Throwable) to pass the cause to the framework in a fitting way added tests for all log frameworks that can be configured in a programmatic way. * added * "normalize" line breaks * enforce \r\n when printing linebreaks * fixed test to check the line break between message and stacktrace (that actually is system dependent) * make members final use slf4j 1.x API for logging to keep backward compatibility * throw a RuntimeException (to keep the signature of KnownHost's constructor) if the HMAC-SHA1-class can't be instantiated.
- Loading branch information