Title: [2091] trunk/xstream/src/test/com/thoughtworks/xstream/converters/extended/FontConverterTest.java: TextAttributeConverter is used because of Font problem in pure mode, so setup the test accordingly.
Revision
2091
Author
joehni
Date
2013-07-04 17:18:43 -0500 (Thu, 04 Jul 2013)

Log Message

TextAttributeConverter is used because of Font problem in pure mode, so setup the test accordingly. Identify Java 1.4 problem.

Modified Paths

Diff

Modified: trunk/xstream/src/test/com/thoughtworks/xstream/converters/extended/FontConverterTest.java (2090 => 2091)


--- trunk/xstream/src/test/com/thoughtworks/xstream/converters/extended/FontConverterTest.java	2013-07-04 20:53:28 UTC (rev 2090)
+++ trunk/xstream/src/test/com/thoughtworks/xstream/converters/extended/FontConverterTest.java	2013-07-04 22:18:43 UTC (rev 2091)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2004 Joe Walnes.
- * Copyright (C) 2006, 2007 XStream Committers.
+ * Copyright (C) 2006, 2007, 2013 XStream Committers.
  * All rights reserved.
  *
  * The software in this package is published under the terms of the BSD
@@ -12,6 +12,8 @@
 package com.thoughtworks.xstream.converters.extended;
 
 import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider;
+import com.thoughtworks.xstream.core.JVM;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
@@ -38,7 +40,7 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        xstream = new XStream();
+        xstream = new XStream(new PureJavaReflectionProvider());
         in = new Font("Arial", Font.BOLD, 20);
     }
 
@@ -59,8 +61,10 @@
         Map outAttributes = out.getAttributes();
 
         // these attributes don't have a valid .equals() method (bad Sun!), so we can't use them in the test.
-        inAttributes.remove(TextAttribute.TRANSFORM);
-        outAttributes.remove(TextAttribute.TRANSFORM);
+        if (!JVM.is15()) {
+            inAttributes.remove(TextAttribute.TRANSFORM);
+            outAttributes.remove(TextAttribute.TRANSFORM);
+        }
 
         assertEquals(inAttributes, outAttributes);
     }

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to