Source:
<code>static ConfigDef getConfigDefFromTransformation(String key, Class<?> transformationCls) { if (transformationCls == null || !Transformation.class.isAssignableFrom(transformationCls)) { throw new ConfigException(key, String.valueOf(transformationCls), "Not a Transformation"); } if (Modifier.isAbstract(transformationCls.getModifiers())) { String[] childClasses = Stream.of(transformationCls.getClasses()) .filter(transformationCls::isAssignableFrom) .filter(c -> !Modifier.isAbstract(c.getModifiers())) .filter(c -> Modifier.isPublic(c.getModifiers())) .map(Class::getName) <START> .toArray(String[]::new); <END> String message = childClasses.length > 0 ? "Transformation is abstract and cannot be created. Did you mean " + String.join(", ", childClasses) + "?" : "Transformation is abstract and cannot be created."; throw new ConfigException(key, String.valueOf(transformationCls), message); } Transformation transformation; try { transformation = transformationCls.asSubclass(Transformation.class).newInstance(); } catch (Exception e) { ConfigException exception = new ConfigException(key, String.valueOf(transformationCls), "Error getting config definition from Transformation: " + e.getMessage()); exception.initCause(e); throw exception; } ConfigDef configDef = transformation.config(); if (null == configDef) { throw new ConnectException( String.format( "%s.config() must return a ConfigDef that is not null.", transformationCls.getName() ) ); } return configDef; }</code><technical_language>making childClasses a Set<String>, String.join(...) takes Iterable? Arguably different, more in line other of String.join. Or, yet, joining stream? like: String childClassNames = Stream.of(transformationCls.getClasses()) .filter(transformationCls::isAssignableFrom) .filter(c -> !Modifier.isAbstract(c.getModifiers())) .filter(c -> Modifier.isPublic(c.getModifiers())) .map(Class::getName) .collect(Collectors.joining(", ")); String message = childClassNames.trim().isEmpty() ? "Transformation is abstract created." : "Transformation is abstract created. " + childClassNames + "?";</technical_language>

Target:
static ConfigDef getConfigDefFromTransformation(String key, Class<?> transformationCls) { if (transformationCls == null || !Transformation.class.isAssignableFrom(transformationCls)) { throw new ConfigException(key, String.valueOf(transformationCls), "Not a Transformation"); } if (Modifier.isAbstract(transformationCls.getModifiers())) { String childClassNames = Stream.of(transformationCls.getClasses()) .filter(transformationCls::isAssignableFrom) .filter(c -> !Modifier.isAbstract(c.getModifiers())) .filter(c -> Modifier.isPublic(c.getModifiers())) .map(Class::getName) .collect(Collectors.joining(", ")); String message = childClassNames.trim().isEmpty() ? "Transformation is abstract and cannot be created." : "Transformation is abstract and cannot be created. Did you mean " + childClassNames + "?"; throw new ConfigException(key, String.valueOf(transformationCls), message); } Transformation transformation; try { transformation = transformationCls.asSubclass(Transformation.class).newInstance(); } catch (Exception e) { ConfigException exception = new ConfigException(key, String.valueOf(transformationCls), "Error getting config definition from Transformation: " + e.getMessage()); exception.initCause(e); throw exception; } ConfigDef configDef = transformation.config(); if (null == configDef) { throw new ConnectException( String.format( "%s.config() must return a ConfigDef that is not null.", transformationCls.getName() ) ); } return configDef; }