diff --git a/common/source/java/ch/systemsx/cisd/common/utilities/CompoundTerminable.java b/common/source/java/ch/systemsx/cisd/common/utilities/CompoundTerminable.java index 0cf0c09f4821ce646cf07c20f1dbdcf2eba10657..85d2f7c8cfb3e551ac67378d7b7f50a0b201c371 100644 --- a/common/source/java/ch/systemsx/cisd/common/utilities/CompoundTerminable.java +++ b/common/source/java/ch/systemsx/cisd/common/utilities/CompoundTerminable.java @@ -31,6 +31,15 @@ public class CompoundTerminable implements ITerminable this.terminables = terminables; } + /** + * Terminates given {@link ITerminable}. + */ + protected boolean terminate(final ITerminable terminable) + { + assert terminable != null : "Unspecified ITerminable"; + return terminable.terminate(); + } + // // ITerminable // @@ -40,7 +49,7 @@ public class CompoundTerminable implements ITerminable boolean ok = true; for (final ITerminable terminable : terminables) { - ok = ok && terminable.terminate(); + ok = ok && terminate(terminable); } return ok; }