try
{
result = (Boolean) new CriticalSection()
{
protected Object perform() throws DraftStorageAccessException, DraftDataAccessException
{
DraftState draftState = StatefulDraftUtil.getDraftState(draftDescriptor);
if (draftState.getStateId() == DraftState.NONE_STATE)
{
return Boolean.FALSE;
}
else
{
return Boolean.TRUE;
}
}
}.execute(draftDescriptor);
}
catch (DraftStorageAccessException e)
{
LOGGER.log(Level.SEVERE, "DraftStorageManager Internal Error. {0} {1}", new Object[] { draftDescriptor, e });
throw new IllegalStateException();
{
result = (Boolean) new CriticalSection()
{
protected Object perform() throws DraftStorageAccessException, DraftDataAccessException
{
DraftState draftState = StatefulDraftUtil.getDraftState(draftDescriptor);
if (draftState.getStateId() == DraftState.NONE_STATE)
{
return Boolean.FALSE;
}
else
{
return Boolean.TRUE;
}
}
}.execute(draftDescriptor);
}
catch (DraftStorageAccessException e)
{
LOGGER.log(Level.SEVERE, "DraftStorageManager Internal Error. {0} {1}", new Object[] { draftDescriptor, e });
throw new IllegalStateException();
}
问了宅男,才明白原来代码是这个意思
差距啊!!!