click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r917757 - in /click/trunk/click/framework/src/org/apache/click/service: ClickResourceService.java CommonsFileUploadService.java DeployUtils.java TemplateService.java VelocityTemplateService.java
Date Mon, 01 Mar 2010 22:15:58 GMT
Author: medgar
Date: Mon Mar  1 22:15:57 2010
New Revision: 917757

URL: http://svn.apache.org/viewvc?rev=917757&view=rev
Log:
CLK-633

Modified:
    click/trunk/click/framework/src/org/apache/click/service/ClickResourceService.java
    click/trunk/click/framework/src/org/apache/click/service/CommonsFileUploadService.java
    click/trunk/click/framework/src/org/apache/click/service/DeployUtils.java
    click/trunk/click/framework/src/org/apache/click/service/TemplateService.java
    click/trunk/click/framework/src/org/apache/click/service/VelocityTemplateService.java

Modified: click/trunk/click/framework/src/org/apache/click/service/ClickResourceService.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/service/ClickResourceService.java?rev=917757&r1=917756&r2=917757&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/service/ClickResourceService.java (original)
+++ click/trunk/click/framework/src/org/apache/click/service/ClickResourceService.java Mon
Mar  1 22:15:57 2010
@@ -158,36 +158,36 @@
      * <pre class="prettyprint">
      * &lt;-- The default Click *.htm mapping --&gt;
      * &lt;servlet-mapping&gt;
-         *   &lt;servlet-name&gt;ClickServlet&lt;/servlet-name&gt;
-         *   &lt;url-pattern&gt;*.htm&lt;/url-pattern&gt;
-       * &lt;/servlet-mapping&gt;
+     *   &lt;servlet-name&gt;ClickServlet&lt;/servlet-name&gt;
+     *   &lt;url-pattern&gt;*.htm&lt;/url-pattern&gt;
+     * &lt;/servlet-mapping&gt;
      *
      * &lt;-- Add a mapping to serve all resources under /click directly from
      * the JARs. --&gt;
-       * &lt;servlet-mapping&gt;
-         *   &lt;servlet-name&gt;ClickServlet&lt;/servlet-name&gt;
-         *   &lt;url-pattern&gt;/click/*&lt;/url-pattern&gt;
-       * &lt;/servlet-mapping&gt;
+     * &lt;servlet-mapping&gt;
+     *   &lt;servlet-name&gt;ClickServlet&lt;/servlet-name&gt;
+     *   &lt;url-pattern&gt;/click/*&lt;/url-pattern&gt;
+     * &lt;/servlet-mapping&gt;
      *
      * &lt;-- Add another mapping to serve all resources under /clickclick
      * from the JARs. --&gt;
-       * &lt;servlet-mapping&gt;
-         *   &lt;servlet-name&gt;ClickServlet&lt;/servlet-name&gt;
-         *   &lt;url-pattern&gt;/clickclick/*&lt;/url-pattern&gt;
-       * &lt;/servlet-mapping&gt;
+     * &lt;servlet-mapping&gt;
+     *   &lt;servlet-name&gt;ClickServlet&lt;/servlet-name&gt;
+     *   &lt;url-pattern&gt;/clickclick/*&lt;/url-pattern&gt;
+     * &lt;/servlet-mapping&gt;
      *
      * &lt;-- Add a mapping to serve all resources under /mycorp
      * from the JARs. --&gt;
-       * &lt;servlet-mapping&gt;
-         *   &lt;servlet-name&gt;ClickServlet&lt;/servlet-name&gt;
-         *   &lt;url-pattern&gt;/mycorp/*&lt;/url-pattern&gt;
-       * &lt;/servlet-mapping&gt;
+     * &lt;servlet-mapping&gt;
+     *   &lt;servlet-name&gt;ClickServlet&lt;/servlet-name&gt;
+     *   &lt;url-pattern&gt;/mycorp/*&lt;/url-pattern&gt;
+     * &lt;/servlet-mapping&gt;
      * </pre>
      *
      * @return list of directories that should be cached
      */
     protected List<String> getCacheableDirs() {
-       List list = new ArrayList();
+       List<String> list = new ArrayList<String>();
        list.add("/click");
        return list;
     }

Modified: click/trunk/click/framework/src/org/apache/click/service/CommonsFileUploadService.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/service/CommonsFileUploadService.java?rev=917757&r1=917756&r2=917757&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/service/CommonsFileUploadService.java
(original)
+++ click/trunk/click/framework/src/org/apache/click/service/CommonsFileUploadService.java
Mon Mar  1 22:15:57 2010
@@ -26,6 +26,7 @@
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.click.util.ClickUtils;
+import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.fileupload.FileItemFactory;
 import org.apache.commons.fileupload.FileUploadBase;
 import org.apache.commons.fileupload.FileUploadException;
@@ -144,7 +145,8 @@
      * @return the list of FileItem instances parsed from the request
      * @throws FileUploadException if request cannot be parsed
      */
-    public List parseRequest(HttpServletRequest request)
+    @SuppressWarnings("unchecked")
+    public List<FileItem> parseRequest(HttpServletRequest request)
             throws FileUploadException {
 
         Validate.notNull(request, "Null request parameter");

Modified: click/trunk/click/framework/src/org/apache/click/service/DeployUtils.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/service/DeployUtils.java?rev=917757&r1=917756&r2=917757&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/service/DeployUtils.java (original)
+++ click/trunk/click/framework/src/org/apache/click/service/DeployUtils.java Mon Mar  1 22:15:57
2010
@@ -500,7 +500,6 @@
      * @param test the test used to determine if the class matches
      * @param fqn the fully qualified name of a class
      */
-    @SuppressWarnings("unchecked")
     protected void addIfMatching(Test test, String fqn) {
         try {
             if (test.matches(fqn)) {
@@ -545,7 +544,6 @@
          * @return true if the resource should be included in the results, false
          * otherwise
          */
-        @SuppressWarnings("unchecked")
         public boolean matches(String resource) {
             // If a resource is found, it must be deployed
             return true;

Modified: click/trunk/click/framework/src/org/apache/click/service/TemplateService.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/service/TemplateService.java?rev=917757&r1=917756&r2=917757&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/service/TemplateService.java (original)
+++ click/trunk/click/framework/src/org/apache/click/service/TemplateService.java Mon Mar
 1 22:15:57 2010
@@ -73,7 +73,7 @@
      * @param writer the writer to send the merged template and model data to
      * @throws Exception if an error occurs
      */
-    public void renderTemplate(Page page, Map model, Writer writer) throws Exception;
+    public void renderTemplate(Page page, Map<String, Object> model, Writer writer)
throws Exception;
 
     /**
      * Render the given template and model to the writer.
@@ -83,6 +83,6 @@
      * @param writer the writer to send the merged template and model data to
      * @throws Exception if an error occurs
      */
-    public void renderTemplate(String templatePath, Map model, Writer writer) throws Exception;
+    public void renderTemplate(String templatePath, Map<String, Object> model, Writer
writer) throws Exception;
 
 }

Modified: click/trunk/click/framework/src/org/apache/click/service/VelocityTemplateService.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/src/org/apache/click/service/VelocityTemplateService.java?rev=917757&r1=917756&r2=917757&view=diff
==============================================================================
--- click/trunk/click/framework/src/org/apache/click/service/VelocityTemplateService.java
(original)
+++ click/trunk/click/framework/src/org/apache/click/service/VelocityTemplateService.java
Mon Mar  1 22:15:57 2010
@@ -311,7 +311,7 @@
      * @param writer the writer to send the merged template and model data to
      * @throws Exception if an error occurs
      */
-    public void renderTemplate(Page page, Map model, Writer writer) throws Exception {
+    public void renderTemplate(Page page, Map<String, Object> model, Writer writer)
throws Exception {
 
         final VelocityContext context = new VelocityContext(model);
 
@@ -397,7 +397,7 @@
      * @param writer the writer to send the merged template and model data to
      * @throws Exception if an error occurs
      */
-    public void renderTemplate(String templatePath, Map model, Writer writer) throws Exception
{
+    public void renderTemplate(String templatePath, Map<String, Object> model, Writer
writer) throws Exception {
 
         final VelocityContext velocityContext = new VelocityContext(model);
 
@@ -498,6 +498,7 @@
      * @return the Velocity Engine initialization properties
      * @throws MalformedURLException if a resource cannot be loaded
      */
+    @SuppressWarnings("unchecked")
     protected Properties getInitProperties() throws MalformedURLException {
 
         final Properties velProps = new Properties();



Mime
View raw message