@Test public void testExitNotMatchCurEntry() { String contextName = "context-rpc"; ContextUtil.enter(contextName); Context context = ContextUtil.getContext(); CtEntry entry1 = null; CtEntry entry2 = null; try { entry1 = new CtEntry(new StringResourceWrapper("res1", EntryType.IN), null, ContextUtil.getContext()); assertSame(entry1, context.getCurEntry()); entry2 = new CtEntry(new StringResourceWrapper("res2", EntryType.IN), null, ContextUtil.getContext()); assertSame(entry2, context.getCurEntry()); entry1.exit(); } catch (ErrorEntryFreeException ex) { assertNotNull(entry1); assertNotNull(entry2); assertNull(entry1.context); assertNull(entry2.context); assertNull(context.getCurEntry()); return; } finally { ContextUtil.exit(); } fail("Mismatch entry-exit should throw an ErrorEntryFreeException"); }
@Override public void exit(int count, Object... args) throws ErrorEntryFreeException { trueExit(count, args); }
CtEntry extends Entry { @Override public void exit(int count, Object... args) throws ErrorEntryFreeException { trueExit(count, args); } }
CtEntry extends Entry { @Override public void exit(int count, Object... args) throws ErrorEntryFreeException { trueExit(count, args); } CtEntry(ResourceWrapper resourceWrapper, ProcessorSlot<Object> chain, Context context); }
CtEntry extends Entry { @Override public void exit(int count, Object... args) throws ErrorEntryFreeException { trueExit(count, args); } CtEntry(ResourceWrapper resourceWrapper, ProcessorSlot<Object> chain, Context context); @Override void exit(int count, Object... args); @Override Node getLastNode(); }
CtEntry extends Entry { @Override public void exit(int count, Object... args) throws ErrorEntryFreeException { trueExit(count, args); } CtEntry(ResourceWrapper resourceWrapper, ProcessorSlot<Object> chain, Context context); @Override void exit(int count, Object... args); @Override Node getLastNode();  }