PL-7376 UnsupportedOperationException while using RuntimePropertiesFrame

This commit is contained in:
Andrey Subbotin 2016-06-20 18:25:23 +04:00
parent 7aa043f76c
commit 8607dd888f
2 changed files with 2 additions and 10 deletions

View File

@ -63,7 +63,7 @@ public class DynamicAttributesMetaClass extends MetadataObjectImpl implements Me
@Override @Override
public Class getJavaClass() { public Class getJavaClass() {
return getClass(); return Object.class;
} }
@Override @Override

View File

@ -375,15 +375,7 @@ public class MetadataTools {
* Determine whether the given metaclass is embeddable. * Determine whether the given metaclass is embeddable.
*/ */
public boolean isEmbeddable(MetaClass metaClass) { public boolean isEmbeddable(MetaClass metaClass) {
Class javaClass; return metaClass.getJavaClass().isAnnotationPresent(javax.persistence.Embeddable.class);
try {
// RuntimePropertiesMetaClass can throw UnsupportedOperationException
javaClass = metaClass.getJavaClass();
} catch (UnsupportedOperationException e) {
return false;
}
return javaClass.isAnnotationPresent(javax.persistence.Embeddable.class);
} }
public boolean isCacheable(MetaClass metaClass) { public boolean isCacheable(MetaClass metaClass) {