Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 17
    Unfortunately, you will find this in lots of production code. Clean it up when you can. Commented Sep 29, 2014 at 15:22
  • 14
    This is a great design - if a developer wants to make himself indispensable for every change in business data, and has no problems to be available 24/7 ;-) Commented Sep 29, 2014 at 17:42
  • 1
    Here's a sort of related question where the OP seems to believe the opposite of conventional wisdom. programmers.stackexchange.com/questions/253612/… Commented Sep 29, 2014 at 19:18
  • 11
    Design your classes depending on behavior not data. To me the sub-classes add no new behavior to the hierarchy. Commented Sep 30, 2014 at 13:04
  • 2
    This is widely used with anonymous subclasses (such as event handlers) in Java before lambdas came to Java 8 (which is the same thing with different syntax). Commented Sep 30, 2014 at 13:32