squid:S2293 - The diamond operator should be used
This commit is contained in:
		@@ -48,13 +48,13 @@ public class MagicServiceImpl implements MagicService {
 | 
			
		||||
  @Override
 | 
			
		||||
  public List<Wizard> findWizardsWithSpellbook(String name) {
 | 
			
		||||
    Spellbook spellbook = spellbookDao.findByName(name);
 | 
			
		||||
    return new ArrayList<Wizard>(spellbook.getWizards());
 | 
			
		||||
    return new ArrayList<>(spellbook.getWizards());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @Override
 | 
			
		||||
  public List<Wizard> findWizardsWithSpell(String name) {
 | 
			
		||||
    Spell spell = spellDao.findByName(name);
 | 
			
		||||
    Spellbook spellbook = spell.getSpellbook();
 | 
			
		||||
    return new ArrayList<Wizard>(spellbook.getWizards());
 | 
			
		||||
    return new ArrayList<>(spellbook.getWizards());
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -27,8 +27,8 @@ import com.iluwatar.servicelayer.wizard.Wizard;
 | 
			
		||||
public class Spellbook extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
  public Spellbook() {
 | 
			
		||||
    spells = new HashSet<Spell>();
 | 
			
		||||
    wizards = new HashSet<Wizard>();
 | 
			
		||||
    spells = new HashSet<>();
 | 
			
		||||
    wizards = new HashSet<>();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public Spellbook(String name) {
 | 
			
		||||
 
 | 
			
		||||
@@ -24,7 +24,7 @@ import com.iluwatar.servicelayer.spellbook.Spellbook;
 | 
			
		||||
public class Wizard extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
  public Wizard() {
 | 
			
		||||
    spellbooks = new HashSet<Spellbook>();
 | 
			
		||||
    spellbooks = new HashSet<>();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public Wizard(String name) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user