[FELIX-4363] Fix NPE when setting a variable to null

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1574745 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/CommandSessionImpl.java b/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/CommandSessionImpl.java
index 3f6d435..63e4f98 100644
--- a/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/CommandSessionImpl.java
+++ b/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/CommandSessionImpl.java
@@ -53,7 +53,7 @@
     PrintStream err;
     
     private final CommandProcessorImpl processor;
-    protected final Map<String, Object> variables = new ConcurrentHashMap<String, Object>();
+    protected final Map<String, Object> variables = new HashMap<String, Object>();
     private boolean closed;
 
     protected CommandSessionImpl(CommandProcessorImpl shell, InputStream in, PrintStream out, PrintStream err)
@@ -153,7 +153,10 @@
 
     public void put(String name, Object value)
     {
-        variables.put(name, value);
+        synchronized (variables)
+        {
+            variables.put(name, value);
+        }
     }
 
     public PrintStream getConsole()