Class ActingIdentityTest
java.lang.Object
ubic.gemma.core.security.util.ActingIdentityTest
The scoping contract for the acting identity. Every property here is one that, if broken, writes a
wrong name into the permanent record of who did what — which is worse than writing none.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidIt is cleared even when the body throws — an exception must not leave the name bound.voidA nested scope RESTORES the outer name rather than clearing it.voidNot inherited by another thread: work handed to an executor is attributed to whoever ran it.voidA null or blank name binds nothing, so callers do not have to branch before opening a scope.voidtearDown()void
-
Constructor Details
-
ActingIdentityTest
public ActingIdentityTest()
-
-
Method Details
-
tearDown
@AfterEach public void tearDown() -
unsetByDefault
@Test public void unsetByDefault() -
boundInsideTheScopeAndClearedAfter
@Test public void boundInsideTheScopeAndClearedAfter() -
nullAndBlankBindNothing
@Test public void nullAndBlankBindNothing()A null or blank name binds nothing, so callers do not have to branch before opening a scope. -
clearedWhenTheBodyThrows
@Test public void clearedWhenTheBodyThrows()It is cleared even when the body throws — an exception must not leave the name bound. -
nestedScopeRestoresTheOuterName
@Test public void nestedScopeRestoresTheOuterName()A nested scope RESTORES the outer name rather than clearing it. Nesting is not expected, but clearing would silently mis-attribute the remainder of the outer call, and a wrong attribution is the one outcome worth engineering against here. -
notVisibleFromAnotherThread
-