Browse files

Tag 1.3.0.CR1

  • Loading branch information...
2 parents 1c9b9e8 + 8c3636c commit d94193ea8f929f8fee18cc20f85c88910cc714b7 @dmlloyd dmlloyd committed Mar 1, 2010
View
5 tests/pom.xml
@@ -54,11 +54,6 @@
<version>${jbmar.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.marshalling</groupId>
- <artifactId>serialization-java</artifactId>
- <version>${jbmar.version}</version>
- </dependency>
- <dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<classifier>jdk15</classifier>
View
10 tests/src/test/java/org/jboss/test/marshalling/SimpleMarshallerTestFactory.java
@@ -25,7 +25,6 @@
import org.testng.annotations.Factory;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
-import org.jboss.marshalling.serialization.java.JavaSerializationMarshallerFactory;
import org.jboss.marshalling.MarshallingConfiguration;
import org.jboss.marshalling.MarshallerFactory;
import org.jboss.marshalling.Marshalling;
@@ -61,10 +60,6 @@
final TestMarshallerProvider serialTestMarshallerProvider = new MarshallerFactoryTestMarshallerProvider(serialMarshallerFactory);
final TestUnmarshallerProvider serialTestUnmarshallerProvider = new MarshallerFactoryTestUnmarshallerProvider(serialMarshallerFactory);
- final MarshallerFactory javaSerializationMarshallerFactory = new JavaSerializationMarshallerFactory();
- final TestMarshallerProvider javaTestMarshallerProvider = new MarshallerFactoryTestMarshallerProvider(javaSerializationMarshallerFactory);
- final TestUnmarshallerProvider javaTestUnmarshallerProvider = new MarshallerFactoryTestUnmarshallerProvider(javaSerializationMarshallerFactory);
-
final TestMarshallerProvider oosTestMarshallerProvider = new ObjectOutputStreamTestMarshallerProvider();
final TestUnmarshallerProvider oisTestUnmarshallerProvider = new ObjectInputStreamTestUnmarshallerProvider();
@@ -87,16 +82,11 @@
create(serialTestMarshallerProvider, serialTestUnmarshallerProvider),
create(serialTestMarshallerProvider, oisTestUnmarshallerProvider),
create(oosTestMarshallerProvider, serialTestUnmarshallerProvider),
- // reflection java serialization
- create(javaTestMarshallerProvider, javaTestUnmarshallerProvider),
- create(javaTestMarshallerProvider, oisTestUnmarshallerProvider),
- create(oosTestMarshallerProvider, javaTestUnmarshallerProvider),
null
);
final Collection<Object[]> c = new ArrayList<Object[]>();
final MarshallingConfiguration configuration = new MarshallingConfiguration();
- configuration.setCreator(new SunReflectiveCreator());
for (Pair<TestMarshallerProvider, TestUnmarshallerProvider> pair : marshallerProviderPairs) {
if (pair == null) continue;
// Add this combination
View
29 tests/src/test/java/org/jboss/test/marshalling/SimpleMarshallerTests.java
@@ -42,7 +42,6 @@
import org.jboss.marshalling.AnnotationClassExternalizerFactory;
import org.jboss.marshalling.FieldSetter;
import org.jboss.marshalling.river.RiverUnmarshaller;
-import org.jboss.marshalling.serialization.java.JavaSerializationMarshaller;
import org.jboss.marshalling.reflect.ReflectiveCreator;
import org.testng.annotations.Test;
import static org.testng.AssertJUnit.*;
@@ -74,7 +73,6 @@
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
-import java.lang.reflect.Field;
/**
*
@@ -1082,7 +1080,6 @@ public void testExternalizer() throws Throwable {
map.put("34890fdu90uq09rdewq", "wqeioqwdias90ifd0adfw");
map.put("dsajkljwqej21309ejjfdasfda", "dsajkdqwoid");
map.put("nczxm,ncoijd0q93wjdwdwq", " dsajkldwqj9edwqu");
- final AtomicBoolean javaSerializationMarshaller = new AtomicBoolean();
runReadWriteTest(new ReadWriteTest() {
public void configure(final MarshallingConfiguration configuration) throws Throwable {
configuration.setClassExternalizerFactory(new ClassExternalizerFactory() {
@@ -1097,17 +1094,11 @@ public Externalizer getExternalizer(final Class<?> type) {
}
public void runWrite(final Marshaller marshaller) throws Throwable {
- if (marshaller instanceof JavaSerializationMarshaller) {
- javaSerializationMarshaller.set(true);
- }
marshaller.writeObject(map);
marshaller.writeObject(map);
}
public void runRead(final Unmarshaller unmarshaller) throws Throwable {
- if ((unmarshaller instanceof ObjectInputStreamUnmarshaller) && javaSerializationMarshaller.get()) {
- throw new SkipException("JavaSerializationMarshaller does not support writing Externalizable objects to regular ObjectInputStream");
- }
final Object m1 = unmarshaller.readObject();
assertEquals(map, m1);
assertSame(m1, unmarshaller.readObject());
@@ -1170,10 +1161,6 @@ public void runRead(final Unmarshaller unmarshaller) throws Throwable {
@Test
public void testInnerClass() throws Throwable {
- if (configuration.getCreator().getClass() == ReflectiveCreator.class) {
- System.out.println("Skipping inner class test with reflective creator, which cannot create inner classes");
- return;
- }
final OuterClass outerClass = new OuterClass();
outerClass.inner = outerClass.new InnerClass();
final OuterClass.InnerClass innerClass = new OuterClass().new InnerClass();
@@ -1406,9 +1393,6 @@ public void configure(final MarshallingConfiguration configuration) throws Throw
}
public void runWrite(final Marshaller marshaller) throws Throwable {
- if (marshaller instanceof JavaSerializationMarshaller) {
- throw new SkipException("JavaSerializationMarshaller does not support Externalizer annotation");
- }
marshaller.writeObject(subject);
marshaller.writeObject(subject);
}
@@ -1496,9 +1480,6 @@ public void runWrite(final Marshaller marshaller) throws Throwable {
if (marshaller instanceof ObjectOutputStreamMarshaller) {
throw new SkipException("Test not relevant for " + marshaller);
}
- if (marshaller instanceof JavaSerializationMarshaller) {
- throw new SkipException("JavaSerializationMarshaller does not support class renaming");
- }
marshaller.writeObject(orig);
marshaller.writeObject(orig);
}
@@ -1532,9 +1513,6 @@ public void runWrite(final Marshaller marshaller) throws Throwable {
if (marshaller instanceof ObjectOutputStreamMarshaller) {
throw new SkipException("Test not relevant for " + marshaller);
}
- if (marshaller instanceof JavaSerializationMarshaller) {
- throw new SkipException("JavaSerializationMarshaller does not support class renaming");
- }
marshaller.writeObject(orig);
marshaller.writeObject(orig);
}
@@ -2332,7 +2310,6 @@ public void testExternalizablePlusExternalizer() throws Throwable {
map.put("34890fdu90uq09rdewq", ext2);
map.put("nczxm,ncoijd0q93wjdwdwq", ext3);
final AtomicInteger version = new AtomicInteger();
- final AtomicBoolean javaSerializationMarshaller = new AtomicBoolean();
runReadWriteTest(new ReadWriteTest() {
public void configure(final MarshallingConfiguration configuration) throws Throwable {
configuration.setClassExternalizerFactory(new ClassExternalizerFactory() {
@@ -2348,9 +2325,6 @@ public Externalizer getExternalizer(final Class<?> type) {
}
public void runWrite(final Marshaller marshaller) throws Throwable {
- if (marshaller instanceof JavaSerializationMarshaller) {
- javaSerializationMarshaller.set(true);
- }
marshaller.writeObject(map);
marshaller.writeObject(map);
}
@@ -2359,9 +2333,6 @@ public void runRead(final Unmarshaller unmarshaller) throws Throwable {
if ((unmarshaller instanceof RiverUnmarshaller) && version.get() < 1) {
throw new SkipException("River v0 can't detect eof on each object");
}
- if ((unmarshaller instanceof ObjectInputStreamUnmarshaller) && javaSerializationMarshaller.get()) {
- throw new SkipException("JavaSerializationMarshaller does not support writing Externalizer objects to regular ObjectInputStream");
- }
final Object m1 = unmarshaller.readObject();
assertEquals(HashMap.class, m1.getClass());
assertSame(m1, unmarshaller.readObject());

0 comments on commit d94193e

Please sign in to comment.