Created
February 25, 2017 05:32
-
-
Save anonymous/7e3f26d010534dc78127f6e42dee0387 to your computer and use it in GitHub Desktop.
This file contains 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