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:
