Suppress unchecked warnings with arrays, because

  there's no other solution.

Increment by dmiles (on his own patch for more memory-efficient readtables).
parent 62c6630c
...@@ -16,6 +16,8 @@ public class CharHashMap<T> { ...@@ -16,6 +16,8 @@ public class CharHashMap<T> {
final public T NULL; final public T NULL;
final static int CACHE_SIZE = 256; final static int CACHE_SIZE = 256;
final HashMap<Character, T> backing; final HashMap<Character, T> backing;
@SuppressWarnings("unchecked")
public CharHashMap(Class componentType, T def) { public CharHashMap(Class componentType, T def) {
NULL = def; NULL = def;
constants = (T[]) Array.newInstance(componentType, CACHE_SIZE); constants = (T[]) Array.newInstance(componentType, CACHE_SIZE);
......
...@@ -320,6 +320,7 @@ public class Readtable extends LispObject ...@@ -320,6 +320,7 @@ public class Readtable extends LispObject
functions = new CharHashMap<LispObject>(LispObject.class,null); functions = new CharHashMap<LispObject>(LispObject.class,null);
} }
@SuppressWarnings("unchecked")
public DispatchTable(DispatchTable dt) public DispatchTable(DispatchTable dt)
{ {
functions = (CharHashMap<LispObject>) dt.functions.clone(); functions = (CharHashMap<LispObject>) dt.functions.clone();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment