October 2017
Intermediate to advanced
396 pages
10h 2m
English
This means that the same concern is spread across modules in the application. Code scattering promotes the duplicity of the concern's code across the application modules. Let's see the following code to understand more about code scattering:
public class TransferServiceImpl implements TransferService { public void transfer(Account a, Account b, Double amount) { //Security concern start here if (!hasPermission(SecurityContext.getPrincipal()) { throw new AccessDeniedException(); } //Security concern end here //Business logic start here ... } } public class AccountServiceImpl implements AccountService { public void withdrawl(Account a, Double amount) { //Security concern start here if (!hasPermission(SecurityContext.getPrincipal()) ...Read now
Unlock full access