portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msnickl...@apache.org
Subject [16/30] portals-pluto git commit: Cleaned up V2AddlResponseTests from extraneous logging and imports
Date Wed, 22 Jun 2016 13:14:00 GMT
Cleaned up V2AddlResponseTests from extraneous logging and imports


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/e5860d9e
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/e5860d9e
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/e5860d9e

Branch: refs/heads/master
Commit: e5860d9e9a7e925c654bd195ac599edaea427701
Parents: cac339f
Author: ahmed <mahmedk91@gmail.com>
Authored: Tue Jun 21 12:12:45 2016 +0200
Committer: ahmed <mahmedk91@gmail.com>
Committed: Tue Jun 21 12:12:45 2016 +0200

----------------------------------------------------------------------
 .../AddlResponseTests_SPEC2_12_Action.java      |  68 +--
 .../AddlResponseTests_SPEC2_12_Event.java       | 224 +++++-----
 .../AddlResponseTests_SPEC2_12_Event_event.java | 441 ++++++++++---------
 .../AddlResponseTests_SPEC2_12_Render.java      |  76 ++--
 .../AddlResponseTests_SPEC2_12_Resource.java    |  64 +--
 5 files changed, 446 insertions(+), 427 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/e5860d9e/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Action.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Action.java b/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Action.java
index 0223953..f07dd3a 100644
--- a/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Action.java
+++ b/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Action.java
@@ -15,21 +15,45 @@
 
 package javax.portlet.tck.portlets;
 
-import java.io.*;
-import java.util.*;
-import java.util.logging.*;
-import static java.util.logging.Logger.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.EventPortlet;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.ResourceServingPortlet;
+import javax.portlet.ResourceURL;
+import javax.portlet.tck.beans.JSR286SpecTestCaseDetails;
+import javax.portlet.tck.beans.TestButton;
+import javax.portlet.tck.beans.TestResult;
+import javax.portlet.tck.beans.TestSetupLink;
+import javax.servlet.http.Cookie;
 import javax.xml.namespace.QName;
-import javax.portlet.*;
-import javax.portlet.filter.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
-import javax.portlet.tck.beans.*;
-import javax.portlet.tck.constants.*;
-import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.*;
-import static javax.portlet.tck.constants.Constants.*;
-import static javax.portlet.PortletSession.*;
-import static javax.portlet.ResourceURL.*;
+
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_ACTION_COOKIE4;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_ACTION_COOKIE2;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_ACTION_COOKIE1;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_ACTION_REDIRECT1;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_ACTION_REDIRECT12;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_ACTION_REDIRECT14;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_ACTION_COOKIE3;
+import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
+import static javax.portlet.tck.constants.Constants.RESULT_ATTR_PREFIX;
+import static javax.portlet.tck.constants.Constants.TCKNAMESPACE;
+import static javax.portlet.PortletSession.APPLICATION_SCOPE;
+import static javax.portlet.ResourceURL.PAGE;
 
 /**
  * This portlet implements several test cases for the JSR 362 TCK. The test case names are defined
@@ -44,15 +68,9 @@ import static javax.portlet.ResourceURL.*;
  */
 public class AddlResponseTests_SPEC2_12_Action
     implements Portlet, ResourceServingPortlet, EventPortlet {
-  private static final String LOG_CLASS = AddlResponseTests_SPEC2_12_Action.class.getName();
-  private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
-
-  private PortletConfig portletConfig = null;
 
   @Override
-  public void init(PortletConfig config) throws PortletException {
-    this.portletConfig = config;
-  }
+  public void init(PortletConfig config) throws PortletException {}
 
   @Override
   public void destroy() {}
@@ -60,7 +78,6 @@ public class AddlResponseTests_SPEC2_12_Action
   @Override
   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
       throws PortletException, IOException {
-    LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
 
     // portletResp.setRenderParameters(portletReq.getParameterMap());
     long tid = Thread.currentThread().getId();
@@ -167,7 +184,7 @@ public class AddlResponseTests_SPEC2_12_Action
       }
 
       portletReq.getPortletSession().setAttribute(
-          Constants.RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Action", writer.toString(),
+          RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Action", writer.toString(),
           APPLICATION_SCOPE);
     }
   }
@@ -175,7 +192,6 @@ public class AddlResponseTests_SPEC2_12_Action
   @Override
   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
       throws PortletException, IOException {
-    LOGGER.entering(LOG_CLASS, "main portlet serveResource entry");
 
     JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
 
@@ -215,7 +231,6 @@ public class AddlResponseTests_SPEC2_12_Action
   @Override
   public void render(RenderRequest portletReq, RenderResponse portletResp)
       throws PortletException, IOException {
-    LOGGER.entering(LOG_CLASS, "main portlet render entry");
 
     JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
 
@@ -383,7 +398,6 @@ public class AddlResponseTests_SPEC2_12_Action
   @Override
   public void processEvent(EventRequest portletReq, EventResponse portletResp)
       throws PortletException, IOException {
-    LOGGER.entering(LOG_CLASS, "main portlet processEvent entry");
 
     long tid = Thread.currentThread().getId();
     portletReq.setAttribute(THREADID_ATTR, tid);
@@ -418,7 +432,7 @@ public class AddlResponseTests_SPEC2_12_Action
       writer.append(txt.toString());
     }
     portletReq.getPortletSession().setAttribute(
-        Constants.RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Action_event", writer.toString(),
+        RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Action_event", writer.toString(),
         APPLICATION_SCOPE);
   }
 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/e5860d9e/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Event.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Event.java b/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Event.java
index 6d580f2..cd517b7 100644
--- a/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Event.java
+++ b/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Event.java
@@ -1,139 +1,113 @@
-/*  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
  *
- *    http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
  */
 
 package javax.portlet.tck.portlets;
 
-import java.io.*;
-import java.util.*;
-import java.util.logging.*;
-import static java.util.logging.Logger.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.tck.beans.TestButton;
+import javax.portlet.tck.beans.TestSetupLink;
 import javax.xml.namespace.QName;
-import javax.portlet.*;
-import javax.portlet.filter.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
-import javax.portlet.tck.beans.*;
-import javax.portlet.tck.constants.*;
-import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.*;
-import static javax.portlet.tck.constants.Constants.*;
-import static javax.portlet.PortletSession.*;
-import static javax.portlet.ResourceURL.*;
+
+import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
+import static javax.portlet.tck.constants.Constants.TCKNAMESPACE;
 
 /**
- * This portlet implements several test cases for the JSR 362 TCK. The test case names
- * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
- * file. The build process will integrate the test case names defined in the 
- * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names are defined
+ * in the /src/main/resources/xml-resources/additionalTCs.xml file. The build process will integrate
+ * the test case names defined in the additionalTCs.xml file into the complete list of test case
+ * names for execution by the driver.
  *
- * This is the main portlet for the test cases. If the test cases call for events, this portlet
- * will initiate the events, but not process them. The processing is done in the companion 
- * portlet AddlResponseTests_SPEC2_12_Event_event
+ * This is the main portlet for the test cases. If the test cases call for events, this portlet will
+ * initiate the events, but not process them. The processing is done in the companion portlet
+ * AddlResponseTests_SPEC2_12_Event_event
  *
  */
-public class AddlResponseTests_SPEC2_12_Event implements Portlet, ResourceServingPortlet {
-   private static final String LOG_CLASS = 
-         AddlResponseTests_SPEC2_12_Event.class.getName();
-   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
-   
-   private PortletConfig portletConfig = null;
-
-   @Override
-   public void init(PortletConfig config) throws PortletException {
-      this.portletConfig = config;
-   }
-
-   @Override
-   public void destroy() {
-   }
-
-   @Override
-   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
-
-      portletResp.setRenderParameters(portletReq.getParameterMap());
-      long tid = Thread.currentThread().getId();
-      portletReq.setAttribute(THREADID_ATTR, tid);
-
-      StringWriter writer = new StringWriter();
-      portletResp.setRenderParameter("tr2", "true");
-      QName eventQName = new QName(TCKNAMESPACE,
-             "AddlResponseTests_SPEC2_12_Event");
-      portletResp.setEvent(eventQName, "Hi!");
-   }
-
-   @Override
-   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "main portlet serveResource entry");
-
-      long tid = Thread.currentThread().getId();
-      portletReq.setAttribute(THREADID_ATTR, tid);
-
-      PrintWriter writer = portletResp.getWriter();
-
-   }
-
-   @Override
-   public void render(RenderRequest portletReq, RenderResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "main portlet render entry");
-
-      long tid = Thread.currentThread().getId();
-      portletReq.setAttribute(THREADID_ATTR, tid);
-
-      PrintWriter writer = portletResp.getWriter();
-
-      /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie5                 */
-      /* Details: "Cookies set during the Event phase should be available     */
-      /* to the portlet during the Render phase"                              */
-      {
-         PortletURL aurl = portletResp.createActionURL();
-         aurl.setParameters(portletReq.getPrivateParameterMap());
-         TestButton tb = new TestButton("V2AddlResponseTests_SPEC2_12_Event_cookie5", aurl);
-         tb.writeTo(writer);
-      }
-
-      /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie6                 */
-      /* Details: "Cookies set during the Event phase should be available     */
-      /* to the portlet during the Resource phase"                            */
-      {
-         PortletURL aurl = portletResp.createActionURL();
-         aurl.setParameters(portletReq.getPrivateParameterMap());
-         TestButton tb = new TestButton("V2AddlResponseTests_SPEC2_12_Event_cookie6", aurl);
-         tb.writeTo(writer);
-      }
-
-      /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie7                 */
-      /* Details: "Cookies set during the Event phase should be available     */
-      /* to the portlet during a subsequent request triggered by a URL"       */
-      if(portletReq.getParameter("tr2")!=null && portletReq.getParameter("tr2").equals("true")){
-         PortletURL aurl = portletResp.createActionURL();
-         aurl.setParameters(portletReq.getPrivateParameterMap());
-         TestButton tb = new TestButton("V2AddlResponseTests_SPEC2_12_Event_cookie7", aurl);
-         tb.writeTo(writer);
-      } else {
-        PortletURL aurl = portletResp.createActionURL();
-        aurl.setParameters(portletReq.getPrivateParameterMap());
-        TestSetupLink tb = new TestSetupLink("V2AddlResponseTests_SPEC2_12_Event_cookie7", aurl);
-        tb.writeTo(writer);
-      }
-
-   }
+public class AddlResponseTests_SPEC2_12_Event implements Portlet {
+
+  @Override
+  public void init(PortletConfig config) throws PortletException {}
+
+  @Override
+  public void destroy() {}
+
+  @Override
+  public void processAction(ActionRequest portletReq, ActionResponse portletResp)
+      throws PortletException, IOException {
+
+    portletResp.setRenderParameters(portletReq.getParameterMap());
+    long tid = Thread.currentThread().getId();
+    portletReq.setAttribute(THREADID_ATTR, tid);
+    portletResp.setRenderParameter("tr2", "true");
+    QName eventQName = new QName(TCKNAMESPACE, "AddlResponseTests_SPEC2_12_Event");
+    portletResp.setEvent(eventQName, "Hi!");
+  }
+
+  @Override
+  public void render(RenderRequest portletReq, RenderResponse portletResp)
+      throws PortletException, IOException {
+
+    long tid = Thread.currentThread().getId();
+    portletReq.setAttribute(THREADID_ATTR, tid);
+
+    PrintWriter writer = portletResp.getWriter();
+
+    /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie5 */
+    /* Details: "Cookies set during the Event phase should be available */
+    /* to the portlet during the Render phase" */
+    {
+      PortletURL aurl = portletResp.createActionURL();
+      aurl.setParameters(portletReq.getPrivateParameterMap());
+      TestButton tb = new TestButton("V2AddlResponseTests_SPEC2_12_Event_cookie5", aurl);
+      tb.writeTo(writer);
+    }
+
+    /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie6 */
+    /* Details: "Cookies set during the Event phase should be available */
+    /* to the portlet during the Resource phase" */
+    {
+      PortletURL aurl = portletResp.createActionURL();
+      aurl.setParameters(portletReq.getPrivateParameterMap());
+      TestButton tb = new TestButton("V2AddlResponseTests_SPEC2_12_Event_cookie6", aurl);
+      tb.writeTo(writer);
+    }
+
+    /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie7 */
+    /* Details: "Cookies set during the Event phase should be available */
+    /* to the portlet during a subsequent request triggered by a URL" */
+    if (portletReq.getParameter("tr2") != null && portletReq.getParameter("tr2").equals("true")) {
+      PortletURL aurl = portletResp.createActionURL();
+      aurl.setParameters(portletReq.getPrivateParameterMap());
+      TestButton tb = new TestButton("V2AddlResponseTests_SPEC2_12_Event_cookie7", aurl);
+      tb.writeTo(writer);
+    } else {
+      PortletURL aurl = portletResp.createActionURL();
+      aurl.setParameters(portletReq.getPrivateParameterMap());
+      TestSetupLink tb = new TestSetupLink("V2AddlResponseTests_SPEC2_12_Event_cookie7", aurl);
+      tb.writeTo(writer);
+    }
+
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/e5860d9e/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Event_event.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Event_event.java b/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Event_event.java
index c5a9e22..aa31c3d 100644
--- a/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Event_event.java
+++ b/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Event_event.java
@@ -1,236 +1,239 @@
-/*  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
  *
- *    http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
  */
 
 package javax.portlet.tck.portlets;
 
-import java.io.*;
-import java.util.*;
-import java.util.logging.*;
-import static java.util.logging.Logger.*;
-import javax.xml.namespace.QName;
-import javax.portlet.*;
-import javax.portlet.filter.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
-import javax.portlet.tck.beans.*;
-import javax.portlet.tck.constants.*;
-import static javax.portlet.tck.constants.Constants.*;
-import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.*;
-import static javax.portlet.PortletSession.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.logging.Logger;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.EventPortlet;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.ResourceServingPortlet;
+import javax.portlet.ResourceURL;
+import javax.portlet.tck.beans.JSR286SpecTestCaseDetails;
+import javax.portlet.tck.beans.TestResult;
+import javax.servlet.http.Cookie;
+
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_EVENT_COOKIE5;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_EVENT_COOKIE6;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_EVENT_COOKIE7;
+import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
+import static javax.portlet.tck.constants.Constants.RESULT_ATTR_PREFIX;
+import static javax.portlet.PortletSession.APPLICATION_SCOPE;
 import static javax.portlet.ResourceURL.PAGE;
 
 /**
- * This is the event processing portlet for the test cases. This portlet processes events, 
- * but does not publish them. Events are published in the main portlet for the test cases. 
+ * This is the event processing portlet for the test cases. This portlet processes events, but does
+ * not publish them. Events are published in the main portlet for the test cases.
  */
-public class AddlResponseTests_SPEC2_12_Event_event implements Portlet, EventPortlet, ResourceServingPortlet {
-   private static final String LOG_CLASS = 
-         AddlResponseTests_SPEC2_12_Event_event.class.getName();
-   private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
-   
-   private PortletConfig portletConfig = null;
-
-   @Override
-   public void init(PortletConfig config) throws PortletException {
-      this.portletConfig = config;
-   }
-
-   @Override
-   public void destroy() {
-   }
-
-   @Override
-   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "event companion processAction - ERROR!!");
-   }
-
-   @Override
-   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
-         throws PortletException, IOException {
-     JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
-     PrintWriter writer = portletResp.getWriter();
-     /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie6                 */
-     /* Details: "Cookies set during the Event phase should be available     */
-     /* to the portlet during the Resource phase"                            */
-     if (portletReq.getParameter("tr1") != null && portletReq.getParameter("tr1").equals("true")) {
-       Cookie[] cookies = portletReq.getCookies();
-
-       StringBuilder txt = new StringBuilder(128);
-       txt.append("<p>Debug info:");
-       txt.append("<br>");
-       txt.append("# Cookies: ").append(cookies.length).append("<br>");
-       TestResult tr1 = tcd.getTestResultFailed(V2ADDLRESPONSETESTS_SPEC2_12_EVENT_COOKIE6);
-       for (Cookie c : cookies) {
-         txt.append("Name: ").append(c.getName());
-         txt.append(", Value: ").append(c.getValue()).append("<br>");
-         if (c.getName().equals("event_tr1_cookie") && c.getValue().equals("true")) {
-           txt.append("<br>").append("Found my cookie!").append("<br>");
-           c.setMaxAge(0);
-           c.setValue("");
-           tr1.setTcSuccess(true);
-         }
-       }
-       tr1.writeTo(writer);
-       txt.append("</p>");
-       writer.append(txt.toString());
-     }
-   }
-
-   @Override
-   public void processEvent(EventRequest portletReq, EventResponse portletResp)
-         throws PortletException, IOException {
-      LOGGER.entering(LOG_CLASS, "event companion processEvent");
-
-
-      portletResp.setRenderParameters(portletReq);
-
-      long tid = Thread.currentThread().getId();
-      portletReq.setAttribute(THREADID_ATTR, tid);
-
-      StringWriter writer = new StringWriter();
-
-      JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
-
-      // Create result objects for the tests
-
-      /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie5                 */
-      /* Details: "Cookies set during the Event phase should be available     */
-      /* to the portlet during the Render phase"                              */
-      {
-        Cookie c = new Cookie("event_tr0_cookie", "true");
-        c.setMaxAge(100);
-        c.setPath("/");
-        portletResp.addProperty(c);
-        portletResp.setRenderParameter("tr0", "true");
-      }
-
-      /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie6                 */
-      /* Details: "Cookies set during the Event phase should be available     */
-      /* to the portlet during the Resource phase"                            */
-      {
-        Cookie c = new Cookie("event_tr1_cookie", "true");
-        c.setMaxAge(100);
-        c.setPath("/");
-        portletResp.addProperty(c);
-        portletResp.setRenderParameter("tr1", "true");
-      }
-
-      /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie7                 */
-      /* Details: "Cookies set during the Event phase should be available     */
-      /* to the portlet during a subsequent request triggered by a URL"       */
-      if (portletReq.getParameter("tr2") != null && portletReq.getParameter("tr2").equals("true")) {
-        Cookie[] cookies = portletReq.getCookies();
-
-        StringBuilder txt = new StringBuilder(128);
-        txt.append("<p>Debug info:");
-        txt.append("<br>");
-
-        txt.append("# Cookies: ").append(cookies.length).append("<br>");
-        TestResult tr2 = tcd.getTestResultFailed(V2ADDLRESPONSETESTS_SPEC2_12_EVENT_COOKIE7);
-        for (Cookie c : cookies) {
-          txt.append("Name: ").append(c.getName());
-          txt.append(", Value: ").append(c.getValue()).append("<br>");
-          if (c.getName().equals("event_tr2_cookie") && c.getValue().equals("true")) {
-            txt.append("<br>").append("Found my cookie!").append("<br>");
-            c.setMaxAge(0);
-            c.setValue("");
-            tr2.setTcSuccess(true);
-          }
+public class AddlResponseTests_SPEC2_12_Event_event
+    implements Portlet, EventPortlet, ResourceServingPortlet {
+  private static final String LOG_CLASS = AddlResponseTests_SPEC2_12_Event_event.class.getName();
+  private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
+
+  @Override
+  public void init(PortletConfig config) throws PortletException {}
+
+  @Override
+  public void destroy() {}
+
+  @Override
+  public void processAction(ActionRequest portletReq, ActionResponse portletResp)
+      throws PortletException, IOException {
+    LOGGER.entering(LOG_CLASS, "event companion processAction - ERROR!!");
+  }
+
+  @Override
+  public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
+      throws PortletException, IOException {
+    JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
+    PrintWriter writer = portletResp.getWriter();
+    /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie6 */
+    /* Details: "Cookies set during the Event phase should be available */
+    /* to the portlet during the Resource phase" */
+    if (portletReq.getParameter("tr1") != null && portletReq.getParameter("tr1").equals("true")) {
+      Cookie[] cookies = portletReq.getCookies();
+
+      StringBuilder txt = new StringBuilder(128);
+      txt.append("<p>Debug info:");
+      txt.append("<br>");
+      txt.append("# Cookies: ").append(cookies.length).append("<br>");
+      TestResult tr1 = tcd.getTestResultFailed(V2ADDLRESPONSETESTS_SPEC2_12_EVENT_COOKIE6);
+      for (Cookie c : cookies) {
+        txt.append("Name: ").append(c.getName());
+        txt.append(", Value: ").append(c.getValue()).append("<br>");
+        if (c.getName().equals("event_tr1_cookie") && c.getValue().equals("true")) {
+          txt.append("<br>").append("Found my cookie!").append("<br>");
+          c.setMaxAge(0);
+          c.setValue("");
+          tr1.setTcSuccess(true);
         }
-        tr2.writeTo(writer);
-        txt.append("</p>");
-        writer.append(txt.toString());
-      } else {
-        Cookie c = new Cookie("event_tr2_cookie", "true");
-        c.setMaxAge(100);
-        c.setPath("/");
-        portletResp.addProperty(c);
-        portletResp.setRenderParameter("tr2", "true");
       }
-
-      portletReq.getPortletSession().setAttribute(
-                   Constants.RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Event",
-                   writer.toString(), APPLICATION_SCOPE);
-
-   }
-
-   @Override
-   public void render(RenderRequest portletReq, RenderResponse portletResp)
-         throws PortletException, IOException {
-      
-      LOGGER.entering(LOG_CLASS, "event companion render");
-      
-      JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
-
-      portletResp.setContentType("text/html");
-      PrintWriter writer = portletResp.getWriter();
-      writer.write("<h3>Event Companion Portlet </h3>\n");
-      writer.write("<p>AddlResponseTests_SPEC2_12_Event_event</p>\n");
-
-      String msg = (String) portletReq.getPortletSession()
-            .getAttribute(RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Event", APPLICATION_SCOPE);
-      msg = (msg==null) ? "Not ready. click test case link." : msg;
-      writer.write("<p>" + msg + "</p>\n");
-      
-      if (portletReq.getParameter("tr0") != null && portletReq.getParameter("tr0").equals("true")) {
-        Cookie[] cookies = portletReq.getCookies();
-
-        StringBuilder txt = new StringBuilder(128);
-        txt.append("<p>Debug info:");
-        txt.append("<br>");
-
-        txt.append("# Cookies: ").append(cookies.length).append("<br>");
-        TestResult tr0 = tcd.getTestResultFailed(V2ADDLRESPONSETESTS_SPEC2_12_EVENT_COOKIE5);
-        for (Cookie c : cookies) {
-          txt.append("Name: ").append(c.getName());
-          txt.append(", Value: ").append(c.getValue()).append("<br>");
-          if (c.getName().equals("event_tr0_cookie") && c.getValue().equals("true")) {
-            txt.append("<br>").append("Found my cookie!").append("<br>");
-            c.setMaxAge(0);
-            c.setValue("");
-            tr0.setTcSuccess(true);
-          }
+      tr1.writeTo(writer);
+      txt.append("</p>");
+      writer.append(txt.toString());
+    }
+  }
+
+  @Override
+  public void processEvent(EventRequest portletReq, EventResponse portletResp)
+      throws PortletException, IOException {
+
+    portletResp.setRenderParameters(portletReq);
+
+    long tid = Thread.currentThread().getId();
+    portletReq.setAttribute(THREADID_ATTR, tid);
+
+    StringWriter writer = new StringWriter();
+
+    JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
+
+    // Create result objects for the tests
+
+    /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie5 */
+    /* Details: "Cookies set during the Event phase should be available */
+    /* to the portlet during the Render phase" */
+    {
+      Cookie c = new Cookie("event_tr0_cookie", "true");
+      c.setMaxAge(100);
+      c.setPath("/");
+      portletResp.addProperty(c);
+      portletResp.setRenderParameter("tr0", "true");
+    }
+
+    /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie6 */
+    /* Details: "Cookies set during the Event phase should be available */
+    /* to the portlet during the Resource phase" */
+    {
+      Cookie c = new Cookie("event_tr1_cookie", "true");
+      c.setMaxAge(100);
+      c.setPath("/");
+      portletResp.addProperty(c);
+      portletResp.setRenderParameter("tr1", "true");
+    }
+
+    /* TestCase: V2AddlResponseTests_SPEC2_12_Event_cookie7 */
+    /* Details: "Cookies set during the Event phase should be available */
+    /* to the portlet during a subsequent request triggered by a URL" */
+    if (portletReq.getParameter("tr2") != null && portletReq.getParameter("tr2").equals("true")) {
+      Cookie[] cookies = portletReq.getCookies();
+
+      StringBuilder txt = new StringBuilder(128);
+      txt.append("<p>Debug info:");
+      txt.append("<br>");
+
+      txt.append("# Cookies: ").append(cookies.length).append("<br>");
+      TestResult tr2 = tcd.getTestResultFailed(V2ADDLRESPONSETESTS_SPEC2_12_EVENT_COOKIE7);
+      for (Cookie c : cookies) {
+        txt.append("Name: ").append(c.getName());
+        txt.append(", Value: ").append(c.getValue()).append("<br>");
+        if (c.getName().equals("event_tr2_cookie") && c.getValue().equals("true")) {
+          txt.append("<br>").append("Found my cookie!").append("<br>");
+          c.setMaxAge(0);
+          c.setValue("");
+          tr2.setTcSuccess(true);
         }
-        tr0.writeTo(writer);
-        txt.append("</p>");
-        writer.append(txt.toString());
       }
-
-      if(portletReq.getParameter("tr1")!=null && portletReq.getParameter("tr1").equals("true")){
-        writer.write("<div id=\"AddlResponseTests_SPEC2_11_Event\">no resource output.</div>\n");
-        ResourceURL resurl = portletResp.createResourceURL();
-        resurl.setCacheability(PAGE);
-        writer.write("<script>\n");
-        writer.write("(function () {\n");
-        writer.write("   var xhr = new XMLHttpRequest();\n");
-        writer.write("   xhr.onreadystatechange=function() {\n");
-        writer.write("      if (xhr.readyState==4 && xhr.status==200) {\n");
-        writer.write(
-            "         document.getElementById(\"AddlResponseTests_SPEC2_11_Event\").innerHTML=xhr.responseText;\n");
-        writer.write("      }\n");
-        writer.write("   };\n");
-        writer.write("   xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
-        writer.write("   xhr.send();\n");
-        writer.write("})();\n");
-        writer.write("</script>\n");
+      tr2.writeTo(writer);
+      txt.append("</p>");
+      writer.append(txt.toString());
+    } else {
+      Cookie c = new Cookie("event_tr2_cookie", "true");
+      c.setMaxAge(100);
+      c.setPath("/");
+      portletResp.addProperty(c);
+      portletResp.setRenderParameter("tr2", "true");
+    }
+
+    portletReq.getPortletSession().setAttribute(
+        RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Event", writer.toString(),
+        APPLICATION_SCOPE);
+
+  }
+
+  @Override
+  public void render(RenderRequest portletReq, RenderResponse portletResp)
+      throws PortletException, IOException {
+
+    JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
+
+    portletResp.setContentType("text/html");
+    PrintWriter writer = portletResp.getWriter();
+    writer.write("<h3>Event Companion Portlet </h3>\n");
+    writer.write("<p>AddlResponseTests_SPEC2_12_Event_event</p>\n");
+
+    String msg = (String) portletReq.getPortletSession()
+        .getAttribute(RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Event", APPLICATION_SCOPE);
+    msg = (msg == null) ? "Not ready. click test case link." : msg;
+    writer.write("<p>" + msg + "</p>\n");
+
+    if (portletReq.getParameter("tr0") != null && portletReq.getParameter("tr0").equals("true")) {
+      Cookie[] cookies = portletReq.getCookies();
+
+      StringBuilder txt = new StringBuilder(128);
+      txt.append("<p>Debug info:");
+      txt.append("<br>");
+
+      txt.append("# Cookies: ").append(cookies.length).append("<br>");
+      TestResult tr0 = tcd.getTestResultFailed(V2ADDLRESPONSETESTS_SPEC2_12_EVENT_COOKIE5);
+      for (Cookie c : cookies) {
+        txt.append("Name: ").append(c.getName());
+        txt.append(", Value: ").append(c.getValue()).append("<br>");
+        if (c.getName().equals("event_tr0_cookie") && c.getValue().equals("true")) {
+          txt.append("<br>").append("Found my cookie!").append("<br>");
+          c.setMaxAge(0);
+          c.setValue("");
+          tr0.setTcSuccess(true);
+        }
       }
-      
-   }
+      tr0.writeTo(writer);
+      txt.append("</p>");
+      writer.append(txt.toString());
+    }
+
+    if (portletReq.getParameter("tr1") != null && portletReq.getParameter("tr1").equals("true")) {
+      writer.write("<div id=\"AddlResponseTests_SPEC2_11_Event\">no resource output.</div>\n");
+      ResourceURL resurl = portletResp.createResourceURL();
+      resurl.setCacheability(PAGE);
+      writer.write("<script>\n");
+      writer.write("(function () {\n");
+      writer.write("   var xhr = new XMLHttpRequest();\n");
+      writer.write("   xhr.onreadystatechange=function() {\n");
+      writer.write("      if (xhr.readyState==4 && xhr.status==200) {\n");
+      writer.write(
+          "         document.getElementById(\"AddlResponseTests_SPEC2_11_Event\").innerHTML=xhr.responseText;\n");
+      writer.write("      }\n");
+      writer.write("   };\n");
+      writer.write("   xhr.open(\"GET\",\"" + resurl.toString() + "\",true);\n");
+      writer.write("   xhr.send();\n");
+      writer.write("})();\n");
+      writer.write("</script>\n");
+    }
+
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/e5860d9e/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Render.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Render.java b/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Render.java
index 45cbc72..3e7724c 100644
--- a/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Render.java
+++ b/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Render.java
@@ -15,21 +15,41 @@
 
 package javax.portlet.tck.portlets;
 
-import java.io.*;
-import java.util.*;
-import java.util.logging.*;
-import static java.util.logging.Logger.*;
-import javax.xml.namespace.QName;
-import javax.portlet.*;
-import javax.portlet.filter.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
-import javax.portlet.tck.beans.*;
-import javax.portlet.tck.constants.*;
-import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.*;
-import static javax.portlet.tck.constants.Constants.*;
-import static javax.portlet.PortletSession.*;
-import static javax.portlet.ResourceURL.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Locale;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.ResourceURL;
+import javax.portlet.tck.beans.JSR286SpecTestCaseDetails;
+import javax.portlet.tck.beans.TestButton;
+import javax.portlet.tck.beans.TestResult;
+import javax.servlet.http.Cookie;
+
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RENDER_COOKIE9;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RENDER_COOKIE8;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RENDER_COOKIE10;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RENDER_COOKIE11;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RENDER_CONTENTTYPE5;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RENDER_CHARACTERENCODING4;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RENDER_CHARACTERENCODING2;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RENDER_CHARACTERENCODING3;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RENDER_COOKIE12;
+import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
+import static javax.portlet.tck.constants.Constants.RESULT_ATTR_PREFIX;
+import static javax.portlet.PortletSession.APPLICATION_SCOPE;
+import static javax.portlet.ResourceURL.PAGE;
 
 /**
  * This portlet implements several test cases for the JSR 362 TCK. The test case names are defined
@@ -43,13 +63,10 @@ import static javax.portlet.ResourceURL.*;
  *
  */
 public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
-  private static final String LOG_CLASS = AddlResponseTests_SPEC2_12_Render.class.getName();
-  private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
 
   @Override
   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
       throws PortletException, IOException {
-    LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
 
     JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
 
@@ -84,7 +101,7 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
     writer.append(txt.toString());
 
     portletReq.getPortletSession().setAttribute(
-        Constants.RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Render", writer.toString(),
+        RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Render", writer.toString(),
         APPLICATION_SCOPE);
 
   }
@@ -128,7 +145,6 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
   @Override
   public void render(RenderRequest portletReq, RenderResponse portletResp)
       throws PortletException, IOException {
-    LOGGER.entering(LOG_CLASS, "main portlet render entry");
 
     long tid = Thread.currentThread().getId();
     portletReq.setAttribute(THREADID_ATTR, tid);
@@ -137,7 +153,7 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
 
     StringWriter writer = new StringWriter();
 
-    if (portletReq.getAttribute(portletReq.RENDER_PART).equals("RENDER_MARKUP")) {
+    if (portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_MARKUP")) {
       PortletSession ps = portletReq.getPortletSession();
       String msg =
           (String) ps.getAttribute(RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Render",
@@ -154,7 +170,7 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
     /* Details: "Cookies set during the Render phase should be available */
     /* to the portlet during the Resource phase" */
     {
-      if (portletReq.getAttribute(portletReq.RENDER_PART).equals("RENDER_HEADERS")) {
+      if (portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_HEADERS")) {
         Cookie c = new Cookie("render_tr0_cookie", "true");
         c.setMaxAge(100);
         c.setPath("/");
@@ -183,7 +199,7 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
     /* Details: "Cookies set during the Render phase should be available */
     /* to the portlet during a subsequent Action phase" */
     {
-      if (portletReq.getAttribute(portletReq.RENDER_PART).equals("RENDER_HEADERS")) {
+      if (portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_HEADERS")) {
         Cookie c = new Cookie("render_tr1_cookie", "true");
         c.setMaxAge(100);
         c.setPath("/");
@@ -199,7 +215,7 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
     /* TestCase: V2AddlResponseTests_SPEC2_12_Render_cookie10 */
     /* Details: "Cookies set during the Render phase should be available */
     /* to the portlet during a subsequent Render phase" */
-    if (portletReq.getAttribute(portletReq.RENDER_PART).equals("RENDER_MARKUP")
+    if (portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_MARKUP")
         && portletReq.getParameter("tr2") != null
         && portletReq.getParameter("tr2").equals("true")) {
       Cookie[] cookies = portletReq.getCookies();
@@ -223,7 +239,7 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
       txt.append("</p>");
       writer.append(txt.toString());
     } else {
-      if (portletReq.getAttribute(portletReq.RENDER_PART).equals("RENDER_HEADERS")) {
+      if (portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_HEADERS")) {
         Cookie c = new Cookie("render_tr2_cookie", "true");
         c.setMaxAge(100);
         c.setPath("/");
@@ -240,7 +256,7 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
     /* TestCase: V2AddlResponseTests_SPEC2_12_Render_cookie11 */
     /* Details: "Cookies set during the Render phase should be available */
     /* to the portlet during a subsequent request triggered by a URL" */
-    if (portletReq.getAttribute(portletReq.RENDER_PART).equals("RENDER_MARKUP")
+    if (portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_MARKUP")
         && portletReq.getParameter("tr3") != null
         && portletReq.getParameter("tr3").equals("true")) {
       Cookie[] cookies = portletReq.getCookies();
@@ -264,7 +280,7 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
       txt.append("</p>");
       writer.append(txt.toString());
     } else {
-      if (portletReq.getAttribute(portletReq.RENDER_PART).equals("RENDER_HEADERS")) {
+      if (portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_HEADERS")) {
         Cookie c = new Cookie("render_tr3_cookie", "true");
         c.setMaxAge(100);
         c.setPath("/");
@@ -341,14 +357,14 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
     tr7.writeTo(writer);
 
     PrintWriter printWriter = portletResp.getWriter();
-    if (portletReq.getAttribute(portletReq.RENDER_PART).equals("RENDER_MARKUP")) {
+    if (portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_MARKUP")) {
       printWriter.write(writer.toString());
     }
 
     /* TestCase: V2AddlResponseTests_SPEC2_12_Render_cookie12 */
     /* Details: "Cookies set during the Render phase after the response */
     /* has been committed are ignored" */
-    if (portletReq.getAttribute(portletReq.RENDER_PART).equals("RENDER_MARKUP")
+    if (portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_MARKUP")
         && portletReq.getParameter("tr4") != null
         && portletReq.getParameter("tr4").equals("true")) {
       Cookie[] cookies = portletReq.getCookies();
@@ -372,7 +388,7 @@ public class AddlResponseTests_SPEC2_12_Render extends GenericPortlet {
       txt.append("</p>");
       printWriter.append(txt.toString());
     } else {
-      if (portletReq.getAttribute(portletReq.RENDER_PART).equals("RENDER_MARKUP")) {
+      if (portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_MARKUP")) {
         Cookie c = new Cookie("tr4_cookie", "true");
         c.setMaxAge(100);
         c.setPath("/");

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/e5860d9e/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Resource.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Resource.java b/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Resource.java
index eb553de..aa159a6 100644
--- a/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Resource.java
+++ b/portlet-tck_3.0/V2AddlResponseTests/src/main/java/javax/portlet/tck/portlets/AddlResponseTests_SPEC2_12_Resource.java
@@ -15,21 +15,42 @@
 
 package javax.portlet.tck.portlets;
 
-import java.io.*;
-import java.util.*;
-import java.util.logging.*;
-import static java.util.logging.Logger.*;
-import javax.xml.namespace.QName;
-import javax.portlet.*;
-import javax.portlet.filter.*;
-import javax.servlet.*;
-import javax.servlet.http.*;
-import javax.portlet.tck.beans.*;
-import javax.portlet.tck.constants.*;
-import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.*;
-import static javax.portlet.tck.constants.Constants.*;
-import static javax.portlet.PortletSession.*;
-import static javax.portlet.ResourceURL.*;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Locale;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSession;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.ResourceServingPortlet;
+import javax.portlet.ResourceURL;
+import javax.portlet.tck.beans.JSR286SpecTestCaseDetails;
+import javax.portlet.tck.beans.TestButton;
+import javax.portlet.tck.beans.TestResult;
+import javax.servlet.http.Cookie;
+
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RESOURCE_COOKIE13;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RESOURCE_COOKIE14;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RESOURCE_COOKIE16;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RESOURCE_CONTENTTYPE5;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RESOURCE_CHARACTERENCODING4;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RESOURCE_CHARACTERENCODING2;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RESOURCE_CHARACTERENCODING3;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RESOURCE_COOKIE17;
+import static javax.portlet.tck.beans.JSR286SpecTestCaseDetails.V2ADDLRESPONSETESTS_SPEC2_12_RESOURCE_COOKIE15;
+import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
+import static javax.portlet.tck.constants.Constants.RESULT_ATTR_PREFIX;
+import static javax.portlet.PortletSession.APPLICATION_SCOPE;
+import static javax.portlet.ResourceURL.PAGE;
 
 /**
  * This portlet implements several test cases for the JSR 362 TCK. The test case names are defined
@@ -43,15 +64,9 @@ import static javax.portlet.ResourceURL.*;
  *
  */
 public class AddlResponseTests_SPEC2_12_Resource implements Portlet, ResourceServingPortlet {
-  private static final String LOG_CLASS = AddlResponseTests_SPEC2_12_Resource.class.getName();
-  private final Logger LOGGER = Logger.getLogger(LOG_CLASS);
-
-  private PortletConfig portletConfig = null;
 
   @Override
-  public void init(PortletConfig config) throws PortletException {
-    this.portletConfig = config;
-  }
+  public void init(PortletConfig config) throws PortletException {}
 
   @Override
   public void destroy() {}
@@ -59,7 +74,6 @@ public class AddlResponseTests_SPEC2_12_Resource implements Portlet, ResourceSer
   @Override
   public void processAction(ActionRequest portletReq, ActionResponse portletResp)
       throws PortletException, IOException {
-    LOGGER.entering(LOG_CLASS, "main portlet processAction entry");
 
     JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
 
@@ -93,14 +107,13 @@ public class AddlResponseTests_SPEC2_12_Resource implements Portlet, ResourceSer
     writer.append(txt.toString());
 
     portletReq.getPortletSession().setAttribute(
-        Constants.RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Resource", writer.toString(),
+        RESULT_ATTR_PREFIX + "AddlResponseTests_SPEC2_12_Resource", writer.toString(),
         APPLICATION_SCOPE);
   }
 
   @Override
   public void serveResource(ResourceRequest portletReq, ResourceResponse portletResp)
       throws PortletException, IOException {
-    LOGGER.entering(LOG_CLASS, "main portlet serveResource entry");
     long tid = Thread.currentThread().getId();
     portletReq.setAttribute(THREADID_ATTR, tid);
 
@@ -289,7 +302,6 @@ public class AddlResponseTests_SPEC2_12_Resource implements Portlet, ResourceSer
   @Override
   public void render(RenderRequest portletReq, RenderResponse portletResp)
       throws PortletException, IOException {
-    LOGGER.entering(LOG_CLASS, "main portlet render entry");
 
     JSR286SpecTestCaseDetails tcd = new JSR286SpecTestCaseDetails();
 


Mime
View raw message