owner
owner copied to clipboard
How to get a single element list of strings containing `\n` ?
How to get a single element list of Strings that contains \n
from a configuration?
Example code:
public static void main(String[] args) {
WithSingleElementList conf = ConfigFactory.create(WithSingleElementList.class);
List<String> list = conf.getList();
System.out.println(conf.getList().size()); // Expected to be 1 but is 0
System.out.println(list);
}
public static interface WithSingleElementList extends Config {
@DefaultValue("\n")
List<String> getList();
}
Are there any workarounds that would make above code return a one element List, instead of an empty list?