Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2018-09-27 17:27:23 -0400
committerslewis2018-09-27 17:27:23 -0400
commit1f426000a4ea9569d24f64c866cc10e3144ba319 (patch)
tree535cf3be0bbf37410b3c6419431300d065896920 /framework
parente0673ed9090a25ac57c511d0458e4ff01aecce50 (diff)
downloadorg.eclipse.ecf-1f426000a4ea9569d24f64c866cc10e3144ba319.tar.gz
org.eclipse.ecf-1f426000a4ea9569d24f64c866cc10e3144ba319.tar.xz
org.eclipse.ecf-1f426000a4ea9569d24f64c866cc10e3144ba319.zip
Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=539556
Diffstat (limited to 'framework')
-rw-r--r--framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF2
-rw-r--r--framework/bundles/org.eclipse.ecf/pom.xml2
-rw-r--r--framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/OSGIObjectInputStream.java10
-rw-r--r--framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/OSGIObjectOutputStream.java12
4 files changed, 16 insertions, 10 deletions
diff --git a/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF
index 357da843b..24ab73dda 100644
--- a/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF
+++ b/framework/bundles/org.eclipse.ecf/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf;singleton:=true
Automatic-Module-Name: org.eclipse.ecf
-Bundle-Version: 3.9.1.qualifier
+Bundle-Version: 3.9.2.qualifier
Bundle-Activator: org.eclipse.ecf.internal.core.ECFPlugin
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
diff --git a/framework/bundles/org.eclipse.ecf/pom.xml b/framework/bundles/org.eclipse.ecf/pom.xml
index 374579c96..8b20f70c7 100644
--- a/framework/bundles/org.eclipse.ecf/pom.xml
+++ b/framework/bundles/org.eclipse.ecf/pom.xml
@@ -10,6 +10,6 @@
</parent>
<groupId>org.eclipse.ecf</groupId>
<artifactId>org.eclipse.ecf</artifactId>
- <version>3.9.1-SNAPSHOT</version>
+ <version>3.9.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/OSGIObjectInputStream.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/OSGIObjectInputStream.java
index c29b6ac01..fea2887e9 100644
--- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/OSGIObjectInputStream.java
+++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/OSGIObjectInputStream.java
@@ -194,7 +194,7 @@ public class OSGIObjectInputStream extends ObjectInputStream implements OSGIObje
return in.readFloat();
case C_ENUM :
trace("readEnum"); //$NON-NLS-1$
- return in.readObject();
+ return Enum.valueOf(loadClass(in.readUTF()), in.readUTF());
case C_OBJECT :
return readNonSerializedObject();
default :
@@ -227,7 +227,9 @@ public class OSGIObjectInputStream extends ObjectInputStream implements OSGIObje
m.setAccessible(true);
return m.invoke(osc, (Object[]) null);
} catch (Exception e) {
- throw new IOException("Exception creating newInstance of class=" + osc.getName()); //$NON-NLS-1$
+ IOException t = new IOException("Exception creating newInstance of class=" + osc.getName()); //$NON-NLS-1$
+ t.setStackTrace(e.getStackTrace());
+ throw t;
}
}
@@ -261,7 +263,9 @@ public class OSGIObjectInputStream extends ObjectInputStream implements OSGIObje
}
return inst;
} catch (final Exception e) {
- throw new IOException("Error while deserializing class=" + clazz.getName() + ": " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+ IOException t = new IOException("Error while deserializing class=" + clazz.getName() + ": " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
+ t.setStackTrace(e.getStackTrace());
+ throw t;
}
}
diff --git a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/OSGIObjectOutputStream.java b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/OSGIObjectOutputStream.java
index fb207aa48..f363c2aa2 100644
--- a/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/OSGIObjectOutputStream.java
+++ b/framework/bundles/org.eclipse.ecf/src/org/eclipse/ecf/core/util/OSGIObjectOutputStream.java
@@ -293,7 +293,13 @@ public class OSGIObjectOutputStream extends ObjectOutputStream implements OSGIOb
for (Object item : itr)
writeObjectOverride(item);
return;
- } else if (obj instanceof Externalizable) {
+ } else if (obj instanceof Enum) {
+ out.writeByte(C_ENUM);
+ out.writeUTF(obj.getClass().getName());
+ out.writeUTF(((Enum) obj).name());
+ return;
+ }
+ if (obj instanceof Externalizable) {
out.writeByte(C_EXTER);
writeExternalizable((Externalizable) obj, clazz);
} else if (obj instanceof Serializable) {
@@ -309,10 +315,6 @@ public class OSGIObjectOutputStream extends ObjectOutputStream implements OSGIOb
out.writeByte(C_DTO);
writeDTO(obj, clazz);
return;
- } else if (obj instanceof Enum) {
- out.writeByte(C_ENUM);
- out.writeObject(obj);
- return;
} else {
if (allowNonSerializable) {
out.writeByte(C_OBJECT);

Back to the top