Currently PB clone() wraps the (checked) CloneNotSupportedException with InternalError. As of Java 8, the following "sneaky throws" allows the code to propagate the checked exception directly.
It's also worth discussing if clone() should be suppressing at all. It's fine for but() to do this but I don't follow why we're trying to reduce the public method.
Currently PB
clone()
wraps the (checked)CloneNotSupportedException
withInternalError
. As of Java 8, the following "sneaky throws" allows the code to propagate the checked exception directly.It's also worth discussing if
clone()
should be suppressing at all. It's fine forbut()
to do this but I don't follow why we're trying to reduce the public method.