src/share/classes/sun/rmi/transport/ObjectTable.java
Print this page
*** 173,189 ****
if (DGCImpl.dgcLog.isLoggable(Log.VERBOSE)) {
DGCImpl.dgcLog.log(Log.VERBOSE, "add object " + oe);
}
- Remote impl = target.getImpl();
- if (impl == null) {
- throw new ExportException(
- "internal error: attempt to export collected object");
- }
-
synchronized (tableLock) {
if (objTable.containsKey(oe)) {
throw new ExportException(
"internal error: ObjID already in use");
} else if (implTable.containsKey(weakImpl)) {
throw new ExportException("object already exported");
--- 173,184 ----
if (DGCImpl.dgcLog.isLoggable(Log.VERBOSE)) {
DGCImpl.dgcLog.log(Log.VERBOSE, "add object " + oe);
}
synchronized (tableLock) {
+ if (target.getImpl() != null) {
if (objTable.containsKey(oe)) {
throw new ExportException(
"internal error: ObjID already in use");
} else if (implTable.containsKey(weakImpl)) {
throw new ExportException("object already exported");
*** 194,203 ****
--- 189,199 ----
if (!target.isPermanent()) {
incrementKeepAliveCount();
}
}
+ }
}
/**
* Remove target from object table.
*