service-layer local type inference changes (#1034)

local variable type inference for service-layer design patterns
This commit is contained in:
GVSharma
2019-10-26 21:05:32 +05:30
committed by Ilkka Seppälä
parent 70ddeaa194
commit f7a53f2d17
5 changed files with 45 additions and 45 deletions

View File

@@ -70,14 +70,14 @@ public class MagicServiceImpl implements MagicService {
@Override
public List<Wizard> findWizardsWithSpellbook(String name) {
Spellbook spellbook = spellbookDao.findByName(name);
var spellbook = spellbookDao.findByName(name);
return new ArrayList<>(spellbook.getWizards());
}
@Override
public List<Wizard> findWizardsWithSpell(String name) {
Spell spell = spellDao.findByName(name);
Spellbook spellbook = spell.getSpellbook();
var spell = spellDao.findByName(name);
var spellbook = spell.getSpellbook();
return new ArrayList<>(spellbook.getWizards());
}
}