Index: trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 11779)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/MapPaintStyles.java	(revision 11781)
@@ -254,4 +254,7 @@
     }
 
+    /**
+     * Reloads all styles from the preferences.
+     */
     public static void readFromPreferences() {
         styles.clear();
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 11779)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 11781)
@@ -49,4 +49,10 @@
     }
 
+    /**
+     * Get the style for a specific style. Returns the range as well.
+     * @param scale The current scale
+     * @param selected true to get the state for a selected element,
+     * @return The style and the range it is valid for.
+     */
     public Pair<StyleElementList, Range> getWithRange(double scale, boolean selected) {
         int idx = getIndex(selected);
@@ -88,4 +94,12 @@
 
     /**
+     * Clears the style cache. This should only be used for testing.
+     * It may be removed some day and replaced by a WeakReference implementation that automatically forgets old entries.
+     */
+    static void clearStyleCachePool() {
+        internPool.clear();
+    }
+
+    /**
      * Get the size of the intern pool. Only for tests!
      * @return size of the intern pool
