Created
February 25, 2017 05:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Controller { | |
ApplicationService service; | |
void method(String potentialNull) { | |
// stuff | |
if (potentialNull == null) { | |
service.method(); | |
} else { | |
service.method(potentialNull); | |
} | |
// stuff | |
} | |
} | |
class ApplicationService { | |
DomainService service; | |
void method() { | |
// stuff | |
service.method(); | |
// stuff | |
} | |
void method(String argument) { | |
// stuff | |
service.method(argument); | |
// stuff | |
} | |
} | |
class DomainService { | |
void method() { | |
// stuff | |
DomainObject object = ... | |
object.method(); | |
// stuff | |
} | |
void method(String argument) { | |
// stuff | |
DomainObject object = ... | |
object.method(argument); | |
// stuff | |
} | |
} | |
class DomainObject { | |
void method() { | |
method("reasonable default"); | |
} | |
void method(String argument) { | |
// stuff | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment