Fix building with JRE 1.7

define_list_fix
Eirenliel Allier 9 years ago
parent 794932104b
commit 681b2101dc
  1. 21
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/SceneLoader.java

@ -104,7 +104,7 @@ public class SceneLoader implements AssetLoader {
loadScene(stream); loadScene(stream);
linkScene(); linkScene();
if(warnings.size() > 0) if(warnings.size() > 0)
logger.log(Level.WARNING, "Model load finished with warnings:\n" + String.join("\n", warnings)); logger.log(Level.WARNING, "Model load finished with warnings:\n" + join(warnings, "\n"));
} finally { } finally {
releaseObjects(); releaseObjects();
if(stream != null) if(stream != null)
@ -430,10 +430,6 @@ public class SceneLoader implements AssetLoader {
animControl.setAnimations(anims); animControl.setAnimations(anims);
} }
private static boolean haveAnyChannel(FbxAnimNode anims) {
return anims != null && anims.haveAnyChannel();
}
private void releaseObjects() { private void releaseObjects() {
// Reset settings // Reset settings
unitSize = 1; unitSize = 1;
@ -461,4 +457,19 @@ public class SceneLoader implements AssetLoader {
animControl = null; animControl = null;
sceneNode = null; sceneNode = null;
} }
private static boolean haveAnyChannel(FbxAnimNode anims) {
return anims != null && anims.haveAnyChannel();
}
private static String join(List<String> list, String glue) {
StringBuilder sb = new StringBuilder();
for(int i = 0; i < list.size(); ++i) {
if(sb.length() != 0)
sb.append(glue);
sb.append(list.get(i));
}
return sb.toString();
}
} }

Loading…
Cancel
Save