removed the try/catch on record load that thrown a RecordNotFoundException on any exception.
@@ -224,16 +224,12 @@ public abstract class ORecordAbstract implements ORecord {
if (!getIdentity().isValid())
throw new ORecordNotFoundException(getIdentity(), "The record has no id, probably it's new or transient yet ");
- try {
final ORecord result = getDatabase().load(this);
if (result == null)
throw new ORecordNotFoundException(getIdentity());
return result;
- } catch (Exception e) {
- throw OException.wrapException(new ORecordNotFoundException(getIdentity()), e);
- }
}
public ODatabaseDocumentInternal getDatabase() {
@@ -303,8 +299,8 @@ public abstract class ORecordAbstract implements ORecord {
@Override
public void lock(final boolean iExclusive) {
- ODatabaseRecordThreadLocal.INSTANCE.get().getTransaction().lockRecord(this,
- iExclusive ? OStorage.LOCKING_STRATEGY.EXCLUSIVE_LOCK : OStorage.LOCKING_STRATEGY.SHARED_LOCK);
+ ODatabaseRecordThreadLocal.INSTANCE.get().getTransaction()
+ .lockRecord(this, iExclusive ? OStorage.LOCKING_STRATEGY.EXCLUSIVE_LOCK : OStorage.LOCKING_STRATEGY.SHARED_LOCK);
}
@Override
@@ -442,9 +438,9 @@ public abstract class ORecordAbstract implements ORecord {
/**
* Add a listener to the current document to catch all the supported events.
*
+ * @param iListener ODocumentListener implementation
+ *
* @see ORecordListener ju
- * @param iListener
- * ODocumentListener implementation
*/
protected void addListener(final ORecordListener iListener) {
if (_listeners == null)
