Title: [2023] trunk/xstream/src/test/com/thoughtworks/xstream/converters/reflection/Sun14ReflectionProviderTest.java: Ensure Sun14ReflectionProvider does not call any initializer or constructor to create an instance.
Revision
2023
Author
joehni
Date
2013-02-27 17:28:39 -0600 (Wed, 27 Feb 2013)

Log Message

Ensure Sun14ReflectionProvider does not call any initializer or constructor to create an instance.

Modified Paths

Diff

Modified: trunk/xstream/src/test/com/thoughtworks/xstream/converters/reflection/Sun14ReflectionProviderTest.java (2022 => 2023)


--- trunk/xstream/src/test/com/thoughtworks/xstream/converters/reflection/Sun14ReflectionProviderTest.java	2013-02-27 19:10:49 UTC (rev 2022)
+++ trunk/xstream/src/test/com/thoughtworks/xstream/converters/reflection/Sun14ReflectionProviderTest.java	2013-02-27 23:28:39 UTC (rev 2023)
@@ -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
@@ -77,4 +77,23 @@
 
     }
 
+    public void testCanInstantiateWithoutInitializer() {
+        assertCanCreate(Unistantiatable.class);
+    }
+    
+    static class Unistantiatable {
+        {
+            if (true) {
+                throw new IllegalStateException("<init>");
+            }
+        }
+        
+        public Unistantiatable() {
+            throw new IllegalStateException("ctor");
+        }
+        
+        public Unistantiatable(String s) {
+            throw new IllegalStateException("ctor(String)");
+        }
+    }
 }
\ No newline at end of file

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to