-
-
Notifications
You must be signed in to change notification settings - Fork 136
Description
When creating my own custom Casting, I would like to re-use a lot of the logic from the DefaultCasting, but overwrite some methods. For example, I want custom boolean parsing logic that handles y|n, but want to keep everything else the same. I managed to get around this issue by putting a type check in the castValue method that calls super.castValue for everything except a boolean, but in my opinion, the primitive* methods should be protected instead of private.
A worse issue is that the constructor of DefaultCastingError is package-private, meaning I cannot instantiate the class in my custom Casting. The class is also final so I can't inherit it. It would be much better if I could reuse this class instead of making my own copy of it and calling two versions of the getErrors method.
If you agree with these changes, I could even work on the code.