@Test public void testConvertNull() { NamingConventionConverter namingConventionConverter = new NamingConventionConverter(); NamingConvention namingConvention = namingConventionConverter.convert(null); assertNull(namingConvention); }
@Override public NamingConvention convert(String s) { NamingConvention namingConvention = null; if (s != null) { try { namingConvention = (NamingConvention) NamingConvention.class.getField(s).get(null); } catch (NoSuchFieldException | IllegalAccessException e) { throw new RuntimeException("Name convention not valid: " + s); } } return namingConvention; }
NamingConventionConverter implements Converter<String, NamingConvention> { @Override public NamingConvention convert(String s) { NamingConvention namingConvention = null; if (s != null) { try { namingConvention = (NamingConvention) NamingConvention.class.getField(s).get(null); } catch (NoSuchFieldException | IllegalAccessException e) { throw new RuntimeException("Name convention not valid: " + s); } } return namingConvention; } }
NamingConventionConverter implements Converter<String, NamingConvention> { @Override public NamingConvention convert(String s) { NamingConvention namingConvention = null; if (s != null) { try { namingConvention = (NamingConvention) NamingConvention.class.getField(s).get(null); } catch (NoSuchFieldException | IllegalAccessException e) { throw new RuntimeException("Name convention not valid: " + s); } } return namingConvention; }  }
NamingConventionConverter implements Converter<String, NamingConvention> { @Override public NamingConvention convert(String s) { NamingConvention namingConvention = null; if (s != null) { try { namingConvention = (NamingConvention) NamingConvention.class.getField(s).get(null); } catch (NoSuchFieldException | IllegalAccessException e) { throw new RuntimeException("Name convention not valid: " + s); } } return namingConvention; }  @Override NamingConvention convert(String s); }
NamingConventionConverter implements Converter<String, NamingConvention> { @Override public NamingConvention convert(String s) { NamingConvention namingConvention = null; if (s != null) { try { namingConvention = (NamingConvention) NamingConvention.class.getField(s).get(null); } catch (NoSuchFieldException | IllegalAccessException e) { throw new RuntimeException("Name convention not valid: " + s); } } return namingConvention; }  @Override NamingConvention convert(String s);  }