by buerkle · 1y ago · 0 comments
MyType extends String;
void foo(String s);
foo(new MyType()); // is valid
Leading to the original problem. I don't want to represent MyType as a String because it's not. StringUtils.trim(String foo);
but myApp.doSomething(AnotherMyType amt);
The latter is saying "I need not any string but a specific kind of string". StringUtils.trim(MyType.toString());