java - Is there a risk in new clazz(this) from Clazz.clone? -
After a build break, a developer had complained that the available
Clazz.clone () (not the actual name of the class)) has been removed, Therefore, his call is breaking the clz.clone () on which the author of the clause advises the client code to be new clause (CLJ) to be used . \ What is the risk to implement the method new Clazz (this) to return the clone? What could be wrong?
I do not think there is a risk to do this, but it is unnecessary. One of your developers changes their function call.
// This is the same var myClazz = thatClazz.clone (); // This var = my new Clazz (thatClazz) as myClazz; The use of the new method is called a copy maker which is clearly in my opinion using the clone.
Further, there should be discussion about modifying a code with your development team, which are dependent on other modules. Any manner or quality that is not private, should be checked before the change.
Comments
Post a Comment