

---

 core-dave/src/org/openstreetmap/josm/data/osm/QuadBuckets.java |   19 ++++++----
 1 file changed, 12 insertions(+), 7 deletions(-)

diff -puN src/org/openstreetmap/josm/data/osm/QuadBuckets.java~suppress-warnings src/org/openstreetmap/josm/data/osm/QuadBuckets.java
--- core/src/org/openstreetmap/josm/data/osm/QuadBuckets.java~suppress-warnings	2009-10-30 14:10:45.000000000 -0700
+++ core-dave/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	2009-10-30 14:14:04.000000000 -0700
@@ -268,6 +268,16 @@ public class QuadBuckets<T extends OsmPr
                 this.content = null;
             return ret;
         }
+        @SuppressWarnings("unchecked")
+        QBLevel[] newChildren()
+        {
+            // This is ugly and hackish.  But, it seems to work,
+            // and using an ArrayList here seems to cost us
+            // a significant performance penalty -- 50% in my
+            // testing.  Child access is one of the single
+            // hottest code paths in this entire class.
+            return (QBLevel[])Array.newInstance(this.getClass(), QuadTiling.TILES_PER_LEVEL);
+        }
         // Get the correct index for the given primitive
         // at the given level.  If the primitive can not
         // fit into a single quad at this level, return -1
@@ -326,12 +336,7 @@ public class QuadBuckets<T extends OsmPr
             if (children != null) {
                 abort("overwrote children");
             }
-            // This is ugly and hackish.  But, it seems to work,
-            // and using an ArrayList here seems to cost us
-            // a significant performance penalty -- 50% in my
-            // testing.  Child access is one of the single
-            // hottest code paths in this entire class.
-            children = (QBLevel[])Array.newInstance(this.getClass(), QuadTiling.TILES_PER_LEVEL);
+            children = newChildren();
             // deferring allocation of children until use
             // seems a bit faster
             //for (int i = 0; i < TILES_PER_LEVEL; i++)
@@ -878,9 +883,9 @@ public class QuadBuckets<T extends OsmPr
     }
     // If anyone has suggestions for how to fix
     // this properly, I'm listening :)
+    @SuppressWarnings("unchecked")
     private T convert(Object raw)
     {
-        //@SuppressWarnings("unchecked")
         return (T)raw;
     }
     public boolean remove(Object o)
_
