From 1919bac082a049f96000f9b3e849ed5c543b3579 Mon Sep 17 00:00:00 2001 From: Phr00t Date: Mon, 19 May 2014 13:47:24 -0400 Subject: [PATCH] stack to deque --- .../src/main/java/com/jme3/bullet/PhysicsSpace.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java b/jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java index 6d4db3a09..ba9707cb0 100644 --- a/jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java +++ b/jme3-jbullet/src/main/java/com/jme3/bullet/PhysicsSpace.java @@ -66,13 +66,13 @@ import com.jme3.math.Transform; import com.jme3.math.Vector3f; import com.jme3.scene.Node; import com.jme3.scene.Spatial; +import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.Stack; import java.util.concurrent.Callable; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; @@ -114,7 +114,7 @@ public class PhysicsSpace { private Map collisionGroupListeners = new ConcurrentHashMap(); private ConcurrentLinkedQueue tickListeners = new ConcurrentLinkedQueue(); private ArrayList collisionListeners = new ArrayList(); - private Stack collisionEvents = new Stack(); + private ArrayDeque collisionEvents = new ArrayDeque(); private PhysicsCollisionEventFactory eventFactory = new PhysicsCollisionEventFactory(); private Vector3f worldMin = new Vector3f(-10000f, -10000f, -10000f); private Vector3f worldMax = new Vector3f(10000f, 10000f, 10000f); @@ -335,7 +335,7 @@ public class PhysicsSpace { public void distributeEvents() { //add collision callbacks int clistsize = collisionListeners.size(); - while( collisionEvents.empty() == false ) { + while( collisionEvents.isEmpty() == false ) { PhysicsCollisionEvent physicsCollisionEvent = collisionEvents.pop(); for(int i=0;i