Symptoms
CausesThis can happen when one part of an object has an algorithm that passes around information through the fields rather than through parameters; the fields are valid or used only when the algorithm is active. That the fields are sometimes used and sometimes not suggests that there may be a missing object whose life cycle differs from that of the object holding it. What to Do
PayoffImproves communication and clarity. May reduce duplication, especially if other places can make use of the new class. ContraindicationsIt may not be worth the trouble of creating a new object if it doesn't represent a useful abstraction. |