Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java	(revision 17405)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java	(revision 17407)
@@ -34,4 +34,8 @@
 
 public class WMSGrabber extends Grabber {
+	public static boolean isUrlWithPatterns(String url) {
+		return  url != null && url.contains("{") && url.contains("}");
+	}
+	
     protected String baseURL;
     private final boolean urlWithPatterns;
@@ -41,5 +45,5 @@
         this.baseURL = layer.baseURL;
         /* URL containing placeholders? */
-        urlWithPatterns = baseURL != null && baseURL.contains("{") && baseURL.contains("}");
+        urlWithPatterns = isUrlWithPatterns(baseURL);
     }
 
@@ -104,4 +108,9 @@
                 + getProjection(baseURL, false)
                 + "&width=" + wi + "&height=" + ht;
+        	if (!(baseURL.endsWith("&") || baseURL.endsWith("?"))) {
+        		System.out.println(tr("Warning: The base URL ''{0}'' for a WMS service doesn't have a trailing '&' or a trailing '?'.", baseURL));
+        		System.out.println(tr("Warning: Fetching WMS tiles is likely to fail. Please check you preference settings."));
+        		System.out.println(tr("Warning: The complete URL is ''{0}''.", str));
+        	}
         }
         return new URL(str.replace(" ", "%20"));
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java	(revision 17405)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java	(revision 17407)
@@ -65,4 +65,9 @@
 	private ExecutorService executor = null;
 
+	/** set to true if this layer uses an invalid base url */
+	private boolean usesInvalidUrl = false;
+	/** set to true if the user confirmed to use an potentially invalid WMS base url */
+	private boolean isInvalidUrlConfirmed = false;
+	
 	public WMSLayer() {
 		this(tr("Blank Layer"), null, null);
@@ -84,12 +89,26 @@
 
 		executor = Executors.newFixedThreadPool(3);
+		if (!baseURL.startsWith("html:") && !WMSGrabber.isUrlWithPatterns(baseURL)) {
+			if (!(baseURL.endsWith("&") || baseURL.endsWith("?"))) {
+				if (!confirmMalformedUrl(baseURL)) {
+					System.out.println(tr("Warning: WMS layer deactivated because of malformed base url ''{0}''", baseURL));
+					usesInvalidUrl = true;
+					setName(getName() + tr("(deactivated)"));
+					return;
+				} else {
+					isInvalidUrlConfirmed = true;
+				}
+			}
+		}
 	}
 
 	@Override
-	public void destroy() {
+	public void destroy() {	
 		try {
-			executor.shutdown();
+			executor.shutdownNow();
 			// Might not be initalized, so catch NullPointer as well
-		} catch(Exception x) {}
+		} catch(Exception x) {
+			x.printStackTrace();
+		}
 	}
 
@@ -138,4 +157,5 @@
 	@Override public void paint(Graphics g, final MapView mv) {
 		if(baseURL == null) return;
+		if (usesInvalidUrl && !isInvalidUrlConfirmed) return;
 
 		if( !startstop.isSelected() || (pixelPerDegree / getPPD() > minZoom) ){ //don't download when it's too outzoomed
@@ -155,5 +175,35 @@
 	}
 
+	protected boolean confirmMalformedUrl(String url) {
+		if (isInvalidUrlConfirmed)
+			return true;
+		String msg  = tr("<html>The base URL<br>"
+				        + "''{0}''<br>"
+				        + "for this WML layer does neither end with a ''&'' nor with a ''?''.<br>"
+				        + "This is likely to lead to invalid WMS request. You should check your<br>"
+				        + "preference settings.<br>"
+				        + "Do you want to fetch WMS tiles anyway?",				        
+				        url);
+		String [] options = new String[] {
+			tr("Yes, fetch images"),
+			tr("No, abort")
+		};
+		int ret = JOptionPane.showOptionDialog(
+				Main.parent, 
+				msg,
+				tr("Invalid URL?"),
+				JOptionPane.YES_NO_OPTION, 
+				JOptionPane.WARNING_MESSAGE, 
+				null, 
+				options, options[1]
+		);
+		switch(ret) {
+		case JOptionPane.YES_OPTION: return true;
+		default: return false;
+		}
+	}
 	protected void downloadAndPaintVisible(Graphics g, final MapView mv){
+		if (usesInvalidUrl)
+			return;
 		ProjectionBounds bounds = mv.getProjectionBounds();
 		int bminx= (int)Math.floor ((bounds.min.east() * pixelPerDegree ) / ImageSize );
@@ -170,6 +220,6 @@
 			);
 			return;
-		}
-
+		}		
+		
 		for(int x = bminx; x<bmaxx; ++x) {
 			for(int y = bminy; y<bmaxy; ++y){
Index: applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java
===================================================================
--- applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java	(revision 17405)
+++ applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java	(revision 17407)
@@ -28,5 +28,4 @@
 
 public class WMSPreferenceEditor implements PreferenceSetting {
-    private Map<String,String> orig;
     private DefaultTableModel model;
     private JComboBox browser;
@@ -54,5 +53,6 @@
         };
         JScrollPane scrolldef = new JScrollPane(listdef);
-        p.add(scrolldef, GBC.eol().insets(0,5,0,0).fill(GBC.BOTH));
+        // scrolldef is added after the buttons so it's clearer the buttons
+        // control the top list and not the default one
         scrolldef.setPreferredSize(new Dimension(200,200));
 
@@ -100,20 +100,40 @@
         });
 
-        JButton copy = new JButton(tr("Copy Default"));
+        JButton copy = new JButton(tr("Copy Selected Default(s)"));
         buttonPanel.add(copy, GBC.std().insets(0,5,0,0));
         copy.addActionListener(new ActionListener(){
             public void actionPerformed(ActionEvent e) {
-                Integer line = listdef.getSelectedRow();
-                if (line == -1)
+                int[] lines = listdef.getSelectedRows();
+                if (lines.length == 0) {
                     JOptionPane.showMessageDialog(
                     		gui, 
-                    		tr("Please select the row to copy."),
+                    		tr("Please select at least one row to copy."),
                     		tr("Information"),
                     		JOptionPane.INFORMATION_MESSAGE
                     		);
-                else
-                {
-                    model.addRow(new String[]{modeldef.getValueAt(line, 0).toString(),
-                    modeldef.getValueAt(line, 1).toString()});
+                    return;
+                }
+                
+                outer: for(int i = 0; i < lines.length; i++) {
+                	String c1 = modeldef.getValueAt(lines[i], 0).toString();
+                	String c2 = modeldef.getValueAt(lines[i], 1).toString();
+                	
+                	// Check if an entry with exactly the same values already
+                	// exists
+                	for(int j = 0; j < model.getRowCount(); j++) {
+                		if(c1.equals(model.getValueAt(j, 0).toString()) 
+                				&& c2.equals(model.getValueAt(j, 1).toString())) {
+                			// Select the already existing row so the user has
+                			// some feedback in case an entry exists
+                			list.getSelectionModel().setSelectionInterval(j, j);
+                			list.scrollRectToVisible(list.getCellRect(j, 0, true));
+                			continue outer;
+                		}
+                	}
+                	
+	                model.addRow(new String[] {c1, c2});
+	                int lastLine = model.getRowCount() - 1;
+	                list.getSelectionModel().setSelectionInterval(lastLine, lastLine);
+	                list.scrollRectToVisible(list.getCellRect(lastLine, 0, true));
                 }
             }
@@ -122,4 +142,7 @@
         p.add(buttonPanel);
         p.add(Box.createHorizontalGlue(), GBC.eol().fill(GBC.HORIZONTAL));
+        // Add default item list
+        p.add(scrolldef, GBC.eol().insets(0,5,0,0).fill(GBC.BOTH));       
+        
         browser = new JComboBox(new String[]{
         "webkit-image {0}",
