[Minor] Don't allow to call Activity.ensureModifiable() no a sub activity
This commit is contained in:
parent
1ce5411888
commit
256ab666b3
|
@ -740,6 +740,8 @@ public class Activity extends AbstractStrolchRootElement
|
|||
|
||||
@Override
|
||||
public Activity ensureModifiable() {
|
||||
if (!this.isRootElement())
|
||||
throw new IllegalStateException("Only call this method on the root element!");
|
||||
if (isReadOnly())
|
||||
return getClone(true);
|
||||
return this;
|
||||
|
|
Loading…
Reference in New Issue