Details
Description
In
org.apache.commons.cli.Option
public method clone is implemented by creating a new instance through one of
the class Constructors, and then assigning values as required through the
setter methods.
This means that any subclasses of the Option class will not return a true
clone, but a new Option instance instead.
A proper implementation of clone should use super.clone() to create a new
instance, rather than calling the class constructor. This allows shallows
clones to propogate correctly down to subclasses.