@Test(expected = IllegalArgumentException.class) public void testThrowsExceptionOnNullArgument() { cache.getConverter(null); }
public Converter<Object, Object> getConverter(Class<? extends Converter<?, ?>> clazz) { if (clazz == null) { throw new IllegalArgumentException("null"); } Converter<?, ?> converter = converterForClass.get(clazz); if (converter == null) { converter = ReflectionHelper.newInstance(clazz); converterForClass.put(clazz, converter); } return (Converter<Object, Object>) converter; }
ConverterCache { public Converter<Object, Object> getConverter(Class<? extends Converter<?, ?>> clazz) { if (clazz == null) { throw new IllegalArgumentException("null"); } Converter<?, ?> converter = converterForClass.get(clazz); if (converter == null) { converter = ReflectionHelper.newInstance(clazz); converterForClass.put(clazz, converter); } return (Converter<Object, Object>) converter; } }
ConverterCache { public Converter<Object, Object> getConverter(Class<? extends Converter<?, ?>> clazz) { if (clazz == null) { throw new IllegalArgumentException("null"); } Converter<?, ?> converter = converterForClass.get(clazz); if (converter == null) { converter = ReflectionHelper.newInstance(clazz); converterForClass.put(clazz, converter); } return (Converter<Object, Object>) converter; }  }
ConverterCache { public Converter<Object, Object> getConverter(Class<? extends Converter<?, ?>> clazz) { if (clazz == null) { throw new IllegalArgumentException("null"); } Converter<?, ?> converter = converterForClass.get(clazz); if (converter == null) { converter = ReflectionHelper.newInstance(clazz); converterForClass.put(clazz, converter); } return (Converter<Object, Object>) converter; }  Converter<Object, Object> getConverter(Class<? extends Converter<?, ?>> clazz); void clear(); @Override @Generated("") int hashCode(); @Override @Generated("") boolean equals(Object obj); @Override String toString(); }
ConverterCache { public Converter<Object, Object> getConverter(Class<? extends Converter<?, ?>> clazz) { if (clazz == null) { throw new IllegalArgumentException("null"); } Converter<?, ?> converter = converterForClass.get(clazz); if (converter == null) { converter = ReflectionHelper.newInstance(clazz); converterForClass.put(clazz, converter); } return (Converter<Object, Object>) converter; }  Converter<Object, Object> getConverter(Class<? extends Converter<?, ?>> clazz); void clear(); @Override @Generated("") int hashCode(); @Override @Generated("") boolean equals(Object obj); @Override String toString();  }