throw an exception if unable to find MagicPermanentStatic to remove
parent
587fdd428e
commit
425eac12fb
|
@ -80,9 +80,10 @@ public class MagicPermanentStaticMap {
|
||||||
final MagicPermanentStatic permanentStatic = iterator.next();
|
final MagicPermanentStatic permanentStatic = iterator.next();
|
||||||
if (permanentStatic.getPermanent() == permanent && permanentStatic.getStatic() == mstatic) {
|
if (permanentStatic.getPermanent() == permanent && permanentStatic.getStatic() == mstatic) {
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
throw new RuntimeException("nothing to remove");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection<MagicPermanentStatic> remove(final MagicPermanent permanent, final Collection<MagicStatic> statics) {
|
public Collection<MagicPermanentStatic> remove(final MagicPermanent permanent, final Collection<MagicStatic> statics) {
|
||||||
|
|
Loading…
Reference in New Issue