Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 7018)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 7019)
@@ -179,5 +179,5 @@
         }
     });
-    
+
     /**
      * The linked preferences class (optional). If set, accessible from the title bar with a dedicated button
@@ -862,5 +862,6 @@
     }
 
-    protected Component createLayout(Component data, boolean scroll, Collection<SideButton> firstButtons, Collection<SideButton>... nextButtons) {
+    @SafeVarargs
+    protected final Component createLayout(Component data, boolean scroll, Collection<SideButton> firstButtons, Collection<SideButton>... nextButtons) {
         if (scroll) {
             data = new JScrollPane(data);
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 7018)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 7019)
@@ -126,5 +126,8 @@
     /**
      * Returns the first element from {@code items} which is non-null, or null if all elements are null.
-     */
+     * @param items the items to look for
+     * @return first non-null item if there is one
+     */
+    @SafeVarargs
     public static <T> T firstNonNull(T... items) {
         for (T i : items) {
@@ -972,22 +975,22 @@
         }
     }
-    
-    /**
-     * Fixes URL with illegal characters in the query (and fragment) part by 
+
+    /**
+     * Fixes URL with illegal characters in the query (and fragment) part by
      * percent encoding those characters.
-     * 
+     *
      * special characters like &amp; and # are not encoded
-     * 
+     *
      * @param url the URL that should be fixed
      * @return the repaired URL
      */
     public static String fixURLQuery(String url) {
-        if (url.indexOf('?') == -1) 
+        if (url.indexOf('?') == -1)
             return url;
-        
+
         String query = url.substring(url.indexOf('?') + 1);
-        
+
         StringBuilder sb = new StringBuilder(url.substring(0, url.indexOf('?') + 1));
-        
+
         for (int i=0; i<query.length(); i++) {
             String c = query.substring(i, i+1);
@@ -1004,4 +1007,4 @@
         return sb.toString();
     }
-    
+
 }
