Author: jalkanen
Date: Sat Jun  7 03:57:00 2008
New Revision: 664317

URL: http://svn.apache.org/viewvc?rev=664317&view=rev
Log:
Various Javadoc, Java5, checkstyle, and comment fixes.

Modified:
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormInfo.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormOutput.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormSet.java
    
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/htmltowiki/PropertiesUtils.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/CommentedProperties.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/CryptoUtil.java

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormInfo.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormInfo.java?rev=664317&r1=664316&r2=664317&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormInfo.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormInfo.java Sat Jun  
7 03:57:00 2008
@@ -206,6 +206,7 @@
      * Copies the given values into the handler parameter map using 
Map.putAll().
      * @param val parameter name-value pairs for a Form handler WikiPlugin
      */
+    @SuppressWarnings("unchecked")
     public void setSubmission( Map val )
     {
         m_submission = new HashMap();
@@ -216,6 +217,7 @@
      * Adds the given values into the handler parameter map.
      * @param val parameter name-value pairs for a Form handler WikiPlugin
      */
+    @SuppressWarnings("unchecked")
     public void addSubmission( Map val )
     {
         if( m_submission == null )

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormOutput.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormOutput.java?rev=664317&r1=664316&r2=664317&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormOutput.java 
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormOutput.java Sat Jun 
 7 03:57:00 2008
@@ -55,6 +55,7 @@
      * @return [EMAIL PROTECTED]
      * @throws [EMAIL PROTECTED]
      */
+    @SuppressWarnings("unchecked")
     public String execute( WikiContext ctx, Map params )
         throws PluginException
     {

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormSet.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormSet.java?rev=664317&r1=664316&r2=664317&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormSet.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/forms/FormSet.java Sat Jun  7 
03:57:00 2008
@@ -62,6 +62,7 @@
     /**
      *  [EMAIL PROTECTED]
      */
+    @SuppressWarnings("unchecked")
     public String execute( WikiContext ctx, Map params )
         throws PluginException
     {

Modified: 
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/htmltowiki/PropertiesUtils.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/htmltowiki/PropertiesUtils.java?rev=664317&r1=664316&r2=664317&view=diff
==============================================================================
--- 
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/htmltowiki/PropertiesUtils.java 
(original)
+++ 
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/htmltowiki/PropertiesUtils.java 
Sat Jun  7 03:57:00 2008
@@ -49,6 +49,7 @@
      * @param properties the properties object
      * @return String the properties, nicely formatted 
      */
+    @SuppressWarnings("unchecked")
     public static String toSortedString( Properties properties )
     {
         TreeMap treemap = new TreeMap( properties );

Modified: 
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/CommentedProperties.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/CommentedProperties.java?rev=664317&r1=664316&r2=664317&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/CommentedProperties.java 
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/CommentedProperties.java 
Sat Jun  7 03:57:00 2008
@@ -75,6 +75,9 @@
 
     /**
      *  Loads properties from a file opened by a supplied Reader.
+     *  
+     *  @param in [EMAIL PROTECTED]
+     *  @throws [EMAIL PROTECTED]
      */
     public synchronized void load( Reader in ) throws IOException
     {
@@ -117,10 +120,11 @@
     /**
      * [EMAIL PROTECTED]
      */
+    @SuppressWarnings("unchecked")
     public synchronized void putAll( Map arg0 )
     {
         // Shove all of the entries into the property string
-        for ( Iterator it = arg0.entrySet().iterator(); it.hasNext(); )
+        for( Iterator it = arg0.entrySet().iterator(); it.hasNext(); )
         {
             Entry entry = (Entry)it.next();
             writeProperty( entry.getKey(), entry.getValue() );

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/CryptoUtil.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/CryptoUtil.java?rev=664317&r1=664316&r2=664317&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/CryptoUtil.java 
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/CryptoUtil.java Sat Jun  
7 03:57:00 2008
@@ -1,3 +1,23 @@
+/* 
+    JSPWiki - a JSP-based WikiWiki clone.
+
+    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
+
+    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 com.ecyrd.jspwiki.util;
 
 import java.io.UnsupportedEncodingException;
@@ -59,7 +79,7 @@
      * @param args arguments for this method as described above
      * @throws Exception Catches nothing; throws everything up.
      */
-    public static void main( String[] args ) throws Exception
+    public static void main( final String[] args ) throws Exception
     {
         // Print help if the user requested it, or if no arguments
         if( args.length == 0 || (args.length == 1 && HELP.equals( args[0] )) )
@@ -77,7 +97,7 @@
             {
                 throw new IllegalArgumentException( "Error: --hash requires a 
'password' argument." );
             }
-            String password = args[1].trim();
+            final String password = args[1].trim();
             System.out.println( CryptoUtil.getSaltedPassword( 
password.getBytes("UTF-8") ) );
         }
 
@@ -88,8 +108,8 @@
             {
                 throw new IllegalArgumentException( "Error: --hash requires 
'password' and 'digest' arguments." );
             }
-            String password = args[1].trim();
-            String digest = args[2].trim();
+            final String password = args[1].trim();
+            final String digest = args[2].trim();
             System.out.println( CryptoUtil.verifySaltedPassword( 
password.getBytes("UTF-8"), digest ) );
         }
 


Reply via email to