|
@@ -34,6 +34,7 @@ package com.jme3.export;
|
|
|
import com.jme3.animation.Animation;
|
|
|
import com.jme3.effect.shapes.*;
|
|
|
import com.jme3.material.MatParamTexture;
|
|
|
+
|
|
|
import java.io.IOException;
|
|
|
import java.lang.reflect.Field;
|
|
|
import java.util.ArrayList;
|
|
@@ -187,16 +188,21 @@ public class SavableClassUtil {
|
|
|
if (loaders == null) {
|
|
|
return fromName(className);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
String newClassName = remapClass(className);
|
|
|
- synchronized(loaders) {
|
|
|
- for (ClassLoader classLoader : loaders){
|
|
|
+ synchronized (loaders) {
|
|
|
+ for (ClassLoader classLoader : loaders) {
|
|
|
+ final Class<?> loadedClass;
|
|
|
try {
|
|
|
- return (Savable) classLoader.loadClass(newClassName).newInstance();
|
|
|
+ loadedClass = classLoader.loadClass(newClassName);
|
|
|
+ } catch (final ClassNotFoundException e) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ return (Savable) loadedClass.newInstance();
|
|
|
} catch (InstantiationException e) {
|
|
|
} catch (IllegalAccessException e) {
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|