Index: trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/.settings/org.eclipse.jdt.core.prefs	(revision 7018)
+++ trunk/.settings/org.eclipse.jdt.core.prefs	(revision 7019)
@@ -7,7 +7,7 @@
 org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
 org.eclipse.jdt.core.compiler.debug.lineNumber=generate
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
@@ -111,5 +111,5 @@
 org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
Index: trunk/build.xml
===================================================================
--- trunk/build.xml	(revision 7018)
+++ trunk/build.xml	(revision 7019)
@@ -197,6 +197,13 @@
     </target>
     <target name="compile" depends="init,javacc">
-        <javac srcdir="src" includes="com/**,oauth/**,org/apache/commons/codec/**" destdir="build" target="1.7" source="1.7" debug="on" includeantruntime="false" encoding="iso-8859-1"/>
-        <javac srcdir="src" excludes="com/**,oauth/**,org/apache/commons/codec/**" destdir="build" target="1.7" source="1.7" debug="on" includeantruntime="false" encoding="UTF-8">
+    	<!-- COTS -->
+        <javac srcdir="src" includes="com/**,oauth/**,org/apache/commons/codec/**" nowarn="on"
+        	destdir="build" target="1.7" source="1.7" debug="on" includeantruntime="false" encoding="iso-8859-1">
+            <!-- get rid of "internal proprietary API" warning -->
+        	<compilerarg value="-XDignore.symbol.file"/>
+        </javac>
+        <!-- JMapViewer/JOSM -->
+        <javac srcdir="src" excludes="com/**,oauth/**,org/apache/commons/codec/**,org/openstreetmap/gui/jmapviewer/Demo.java" 
+        	destdir="build" target="1.7" source="1.7" debug="on" includeantruntime="false" encoding="UTF-8">
             <compilerarg value="-Xlint:deprecation"/>
             <compilerarg value="-Xlint:unchecked"/>
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();
     }
-    
+
 }
