private static < W extends Writable > void verifyWritableClass ( Class < W > writableClass , boolean isKeyClass , WritableConverter < W > writableConverter ) { Preconditions . checkNotNull ( writableClass , "%s Writable class is undefined;" + " WritableConverter of type '%s' does not define default Writable type," + " and no type was specified by user" , isKeyClass ? "Key" : "Value" , writableConverter . getClass ( ) . getName ( ) ) ; }
Tests validity of Writable class ensures consistent error message for both key and value tests .