continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r393760 - in /maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool: ContinuumStateContentGenerator.java RequestUtil.java
Date Thu, 13 Apr 2006 08:25:10 GMT
Author: evenisse
Date: Thu Apr 13 01:25:02 2006
New Revision: 393760

URL: http://svn.apache.org/viewcvs?rev=393760&view=rev
Log:
Remove references on RunData so object will can remove by garbage collector

Modified:
    maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
    maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/RequestUtil.java

Modified: maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java?rev=393760&r1=393759&r2=393760&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/ContinuumStateContentGenerator.java
Thu Apr 13 01:25:02 2006
@@ -32,7 +32,7 @@
     extends AbstractLogEnabled
     implements ContentGenerator, RequestTool
 {
-    private RunData data;
+    private String contextPath;
 
     public String generate( Object item )
     {
@@ -55,27 +55,33 @@
         }
         else if ( state == ContinuumProjectState.OK )
         {
-            return "<img src=\"" + data.getContextPath() + "/images/icon_success_sml.gif\"
alt=\"Success\" title=\"Success\" border=\"0\" />";
+            return "<img src=\"" + contextPath +
+                "/images/icon_success_sml.gif\" alt=\"Success\" title=\"Success\" border=\"0\"
/>";
         }
         else if ( state == ContinuumProjectState.FAILED )
         {
-            return "<img src=\"" + data.getContextPath() + "/images/icon_warning_sml.gif\"
alt=\"Failed\" title=\"Failed\" border=\"0\" />";
+            return "<img src=\"" + contextPath +
+                "/images/icon_warning_sml.gif\" alt=\"Failed\" title=\"Failed\" border=\"0\"
/>";
         }
         else if ( state == ContinuumProjectState.ERROR )
         {
-            return "<img src=\"" + data.getContextPath() + "/images/icon_error_sml.gif\"
alt=\"Error\" title=\"Error\" border=\"0\" />";
+            return "<img src=\"" + contextPath +
+                "/images/icon_error_sml.gif\" alt=\"Error\" title=\"Error\" border=\"0\"
/>";
         }
         else if ( state == ContinuumProjectState.BUILDING )
         {
-            return "<img src=\"" + data.getContextPath() + "/images/building.gif\" alt=\"Building\"
title=\"Building\" border=\"0\">";
+            return "<img src=\"" + contextPath +
+                "/images/building.gif\" alt=\"Building\" title=\"Building\" border=\"0\">";
         }
         else if ( state == ContinuumProjectState.UPDATING )
         {
-            return "<img src=\"" + data.getContextPath() + "/images/checkingout.gif\"
alt=\"Checking Out sources\" title=\"Checking Out sources\" border=\"0\">";
+            return "<img src=\"" + contextPath +
+                "/images/checkingout.gif\" alt=\"Checking Out sources\" title=\"Checking
Out sources\" border=\"0\">";
         }
         else if ( state == ContinuumProjectState.CHECKING_OUT )
         {
-            return "<img src=\"" + data.getContextPath() + "/images/checkingout.gif\"
alt=\"Updating sources\" title=\"Updating sources\" border=\"0\">";
+            return "<img src=\"" + contextPath +
+                "/images/checkingout.gif\" alt=\"Updating sources\" title=\"Updating sources\"
border=\"0\">";
         }
         else
         {
@@ -87,7 +93,7 @@
 
     public void setRunData( RunData data )
     {
-        this.data = data;
+        contextPath = data.getContextPath();
     }
 
     public void refresh()

Modified: maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/RequestUtil.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/RequestUtil.java?rev=393760&r1=393759&r2=393760&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/RequestUtil.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-web/src/main/java/org/apache/maven/continuum/web/tool/RequestUtil.java
Thu Apr 13 01:25:02 2006
@@ -28,7 +28,9 @@
 public class RequestUtil
     implements RequestTool
 {
-    private RunData data;
+    private String contextPath;
+
+    private HttpServletRequest request;
 
     public String getParameter( String paramName )
     {
@@ -37,17 +39,19 @@
 
     public HttpServletRequest getRequest()
     {
-        return data.getRequest();
+        return request;
     }
 
     public String getContextPath()
     {
-        return data.getContextPath();
+        return contextPath;
     }
 
     public void setRunData( RunData data )
     {
-        this.data = data;
+        contextPath = data.getContextPath();
+
+        request = data.getRequest();
     }
 
     public void refresh()



Mime
View raw message