HCOLL-271 added test JSON<->Map fails for data generated inner classes

This commit is contained in:
Rob Austin
2014-12-23 13:57:10 +00:00
parent 9dfecce021
commit 271a1f8f03
2 changed files with 51 additions and 7 deletions
@@ -728,16 +728,16 @@ class VanillaChronicleMap<K, KI, MKI extends MetaBytesInterop<K, ? super KI>,
try {
return isKey ? DataValueClasses.newInstance(aClass) :
DataValueClasses.newDirectInstance(aClass);
} catch (Exception e) {
if (aClass.isInterface()) {
} catch (Exception e) {
if (e.getCause() instanceof IllegalStateException)
throw e;
if (aClass.isInterface())
throw new IllegalStateException("It not possible to create a instance from " +
"interface=" + aClass.getSimpleName() + " we recommend you create an " +
"instance in the usual way.", e);
}
try {
return (T) aClass.newInstance();
} catch (Exception e1) {