roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r985005 - in /roller/trunk/weblogger-web/src/main: java/org/apache/roller/weblogger/ui/rendering/servlets/CommentServlet.java webapp/WEB-INF/jsps/editor/Comments.jsp
Date Thu, 12 Aug 2010 21:59:12 GMT
Author: snoopdave
Date: Thu Aug 12 21:59:11 2010
New Revision: 985005

URL: http://svn.apache.org/viewvc?rev=985005&view=rev
Log:
Fixing comment management title bug and some warnings.

Modified:
    roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/CommentServlet.java
    roller/trunk/weblogger-web/src/main/webapp/WEB-INF/jsps/editor/Comments.jsp

Modified: roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/CommentServlet.java
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/CommentServlet.java?rev=985005&r1=985004&r2=985005&view=diff
==============================================================================
--- roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/CommentServlet.java
(original)
+++ roller/trunk/weblogger-web/src/main/java/org/apache/roller/weblogger/ui/rendering/servlets/CommentServlet.java
Thu Aug 12 21:59:11 2010
@@ -34,7 +34,6 @@ import org.apache.roller.weblogger.confi
 import org.apache.roller.weblogger.config.WebloggerRuntimeConfig;
 import org.apache.roller.weblogger.business.search.IndexManager;
 import org.apache.roller.weblogger.business.WebloggerFactory;
-import org.apache.roller.weblogger.business.UserManager;
 import org.apache.roller.weblogger.business.WeblogEntryManager;
 import org.apache.roller.weblogger.pojos.WeblogEntryComment;
 import org.apache.roller.weblogger.pojos.WeblogEntry;
@@ -79,6 +78,7 @@ public class CommentServlet extends Http
     /**
      * Initialization.
      */
+    @Override
     public void init(ServletConfig servletConfig) throws ServletException {
         
         super.init(servletConfig);
@@ -142,6 +142,7 @@ public class CommentServlet extends Http
      *
      * The CommentServlet does not support GET requests, it's a 404.
      */
+    @Override
     public void doGet(HttpServletRequest request, HttpServletResponse response)
             throws IOException, ServletException {
         response.sendError(HttpServletResponse.SC_NOT_FOUND);
@@ -153,6 +154,7 @@ public class CommentServlet extends Http
      *
      * Here we handle incoming comment postings.
      */
+    @Override
     public void doPost(HttpServletRequest request, HttpServletResponse response)
             throws IOException, ServletException {
         
@@ -232,7 +234,7 @@ public class CommentServlet extends Http
         comment.setEmail(commentRequest.getEmail());
         comment.setUrl(commentRequest.getUrl());
         comment.setContent(commentRequest.getContent());
-        comment.setNotify(new Boolean(commentRequest.isNotify()));
+        comment.setNotify(Boolean.valueOf(commentRequest.isNotify()));
         comment.setWeblogEntry(entry);
         comment.setRemoteHost(request.getRemoteHost());
         comment.setPostTime(new Timestamp(System.currentTimeMillis()));
@@ -299,7 +301,7 @@ public class CommentServlet extends Http
                     Iterator errors = messages.getErrors();
                     RollerMessage errorKey = null;
                     
-                    StringBuffer buf = new StringBuffer();
+                    StringBuilder buf = new StringBuilder();
                     buf.append("<ul>");
                     while(errors.hasNext()) {
                         errorKey = (RollerMessage)errors.next();

Modified: roller/trunk/weblogger-web/src/main/webapp/WEB-INF/jsps/editor/Comments.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/weblogger-web/src/main/webapp/WEB-INF/jsps/editor/Comments.jsp?rev=985005&r1=985004&r2=985005&view=diff
==============================================================================
--- roller/trunk/weblogger-web/src/main/webapp/WEB-INF/jsps/editor/Comments.jsp (original)
+++ roller/trunk/weblogger-web/src/main/webapp/WEB-INF/jsps/editor/Comments.jsp Thu Aug 12
21:59:11 2010
@@ -35,7 +35,7 @@
 </script>
 
 <p class="subtitle">
-    <s:if test="bean.entryId != null">
+    <s:if test="bean.entryId != null && bean.entryId !='' ">
         <s:text name="Manage comments for entry titled <span>{0}</span>">
             <s:param><s:property value="firstComment.weblogEntry.title" /></s:param>
         </s:text>



Mime
View raw message