From ab26912f60fb9cffae1a1e20d4380cf6fe9b0d8d Mon Sep 17 00:00:00 2001 From: "Kae..pl" Date: Thu, 18 Aug 2011 11:41:51 +0000 Subject: [PATCH] Adding changes pointed out by madlion. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8036 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../scene/plugins/blender/BlenderModelLoader.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/BlenderModelLoader.java b/engine/src/blender/com/jme3/scene/plugins/blender/BlenderModelLoader.java index 7e400c727..6eec532da 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/BlenderModelLoader.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/BlenderModelLoader.java @@ -33,7 +33,6 @@ package com.jme3.scene.plugins.blender; import java.io.IOException; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; @@ -134,13 +133,16 @@ public class BlenderModelLoader implements AssetLoader { } } } - inputStream.close(); + try { + inputStream.close(); + } catch(IOException e) { + LOGGER.warning(e.getLocalizedMessage()); + } List objects = loadingResults.getObjects(); if (objects.size() > 0) { Node modelNode = new Node(blenderKey.getName()); - for (Iterator it = objects.iterator(); it.hasNext();) { - Node node = it.next(); - modelNode.attachChild(node); + for(Node object : objects) { + modelNode.attachChild(object); } return modelNode; } else if (objects.size() == 1) {