Security issues: public static collections
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
package appeng.client.render;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -48,7 +49,7 @@ public class BusRenderer implements IItemRenderer
|
||||
public static final BusRenderer INSTANCE = new BusRenderer();
|
||||
|
||||
public final RenderBlocksWorkaround renderer = new RenderBlocksWorkaround();
|
||||
public static final HashMap<Integer, IPart> RENDER_PART = new HashMap<Integer, IPart>();
|
||||
private static final Map<Integer, IPart> RENDER_PART = new HashMap<Integer, IPart>();
|
||||
|
||||
public IPart getRenderer(ItemStack is, IPartItem c)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ import appeng.tile.AEBaseTile;
|
||||
public class TileItemGen extends AEBaseTile implements IInventory
|
||||
{
|
||||
|
||||
public static final Queue<ItemStack> POSSIBLE_ITEMS = new LinkedList<ItemStack>();
|
||||
private static final Queue<ItemStack> POSSIBLE_ITEMS = new LinkedList<ItemStack>();
|
||||
|
||||
public TileItemGen() {
|
||||
if ( POSSIBLE_ITEMS.isEmpty() )
|
||||
|
||||
+3
-2
@@ -19,6 +19,7 @@
|
||||
package appeng.me.cache;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Deque;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map.Entry;
|
||||
@@ -64,7 +65,7 @@ public class NetworkMonitor<T extends IAEStack<T>> extends MEMonitorHandler<T>
|
||||
this.myChannel = chan;
|
||||
}
|
||||
|
||||
final static public LinkedList DEPTH = new LinkedList();
|
||||
private final static Deque<NetworkMonitor<?>> DEPTH = new LinkedList<NetworkMonitor<?>>();
|
||||
|
||||
@Override
|
||||
protected void postChangesToListeners(Iterable<T> changes, BaseActionSource src)
|
||||
@@ -113,7 +114,7 @@ public class NetworkMonitor<T extends IAEStack<T>> extends MEMonitorHandler<T>
|
||||
}
|
||||
}
|
||||
|
||||
Object last = DEPTH.pop();
|
||||
NetworkMonitor<?> last = DEPTH.pop();
|
||||
if ( last != this )
|
||||
throw new RuntimeException( "Invalid Access to Networked Storage API detected." );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user