cleanup / abuse system fix / prepping for a release
[mir.git] / source / mircoders / servlet / ServletModuleComment.java
index 74089d3..eff08cd 100755 (executable)
@@ -99,7 +99,7 @@ public class ServletModuleComment extends ServletModule
       HTTPRequestParser requestParser = new HTTPRequestParser(aRequest);
       Map responseData = ServletHelper.makeGenerationData(aRequest, aResponse, new Locale[] {getLocale(aRequest), getFallbackLocale(aRequest)});
       EntityAdapterModel model = MirGlobal.localizer().dataModel().adapterModel();
-      Map comment;
+      Object comment;
       URLBuilder urlBuilder = new URLBuilder();
 
       urlBuilder.setValue("module", "Comment");
@@ -114,11 +114,13 @@ public class ServletModuleComment extends ServletModule
       else {
         List fields = DatabaseComment.getInstance().getFieldNames();
         responseData.put("new", Boolean.TRUE);
-        comment = new HashMap();
+        Map emptyComment = new HashMap();
         Iterator i = fields.iterator();
         while (i.hasNext()) {
-          comment.put(i.next(), null);
+          emptyComment.put(i.next(), null);
         }
+
+        comment = emptyComment;
       }
       responseData.put("comment", comment);