summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/BasicStream.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/IceInternal/BasicStream.java')
-rw-r--r--java/src/IceInternal/BasicStream.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/java/src/IceInternal/BasicStream.java b/java/src/IceInternal/BasicStream.java
index a08a1de1c6f..00154f06028 100644
--- a/java/src/IceInternal/BasicStream.java
+++ b/java/src/IceInternal/BasicStream.java
@@ -1271,6 +1271,15 @@ public class BasicStream
{
String id = readTypeId();
+ //
+ // If we slice all the way down to Ice::Object, we throw
+ // because Ice::Object is abstract.
+ //
+ if(id.equals(Ice.ObjectImpl.ice_staticId()))
+ {
+ throw new Ice.NoObjectFactoryException("class sliced to Ice.Object, which is abstract", id);
+ }
+
//
// Try to find a factory registered for the specific type.
//
@@ -1294,17 +1303,6 @@ public class BasicStream
}
//
- // There isn't a static factory for Ice::Object, so check
- // for that case now. We do this *after* the factory
- // inquiries above so that a factory could be registered
- // for "::Ice::Object".
- //
- if(v == null && id.equals(Ice.ObjectImpl.ice_staticId()))
- {
- v = new Ice.ObjectImpl();
- }
-
- //
// Last chance: check the table of static factories (i.e.,
// automatically generated factories for concrete
// classes).