/** * Returns the right type converter based on the context. * * @param context context * @return type converter */ public ConnectorTypeConverter get(@Nullable final String context) { if (context == null) { return this.getDefaultConverter(); } final ConnectorTypeConverter result = this.registry.get(context); if (result == null) { throw new IllegalArgumentException("No handler for " + context); } return result; }
/** * Returns the right type converter based on the context. * * @param context context * @return type converter */ public ConnectorTypeConverter get(@Nullable final String context) { if (context == null) { return this.getDefaultConverter(); } final ConnectorTypeConverter result = this.registry.get(context); if (result == null) { throw new IllegalArgumentException("No handler for " + context); } return result; }