jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r723252 - in /incubator/jspwiki/trunk/src/com/ecyrd/jspwiki: action/ attachment/ plugin/ tags/ ui/ ui/migrator/ url/
Date Thu, 04 Dec 2008 08:57:46 GMT
Author: jalkanen
Date: Thu Dec  4 00:57:46 2008
New Revision: 723252

URL: http://svn.apache.org/viewvc?rev=723252&view=rev
Log:
Fixed some minor Checkstyle issues

Modified:
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/action/ErrorActionBean.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/attachment/AttachmentServlet.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginManager.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/tags/MessagesTag.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/tags/WikiTagBase.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/Installer.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/migrator/JspParser.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/migrator/NodeType.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/url/StripesURLConstructor.java

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/action/ErrorActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/action/ErrorActionBean.java?rev=723252&r1=723251&r2=723252&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/action/ErrorActionBean.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/action/ErrorActionBean.java Thu Dec  4 00:57:46
2008
@@ -14,7 +14,8 @@
     @DefaultHandler
     @HandlesEvent("error")
     @WikiRequestContext("error")
-    public Resolution view() {
+    public Resolution view() 
+    {
         return new ForwardResolution( "/Error.jsp" );
     }
 }

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/attachment/AttachmentServlet.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/attachment/AttachmentServlet.java?rev=723252&r1=723251&r2=723252&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/attachment/AttachmentServlet.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/attachment/AttachmentServlet.java Thu Dec
 4 00:57:46 2008
@@ -806,9 +806,12 @@
                 att.setAttribute( WikiPage.CHANGENOTE, changenote );
             }
             
-            try {
-            m_engine.getAttachmentManager().storeAttachment( att, data );
-            } catch (ProviderException pe) {
+            try 
+            {
+                m_engine.getAttachmentManager().storeAttachment( att, data );
+            } 
+            catch (ProviderException pe) 
+            {
                 // this is a kludge, the exception that is caught here contains the i18n
key
                 // here we have the context available, so we can internationalize it properly
:
                 throw new ProviderException( context.getBundle( InternationalizationManager.CORE_BUNDLE
).getString( pe.getMessage() ) );

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginManager.java?rev=723252&r1=723251&r2=723252&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginManager.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginManager.java Thu Dec  4 00:57:46
2008
@@ -723,7 +723,9 @@
                 {
                     registerPlugin( pluginInfo );
                 }
-            } else {
+            } 
+            else 
+            {
                 log.debug( "Plugin class " + clazz.getName() +" not registered, it is either
an interface or it is abstract");
             }
         }

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/tags/MessagesTag.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/tags/MessagesTag.java?rev=723252&r1=723251&r2=723252&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/tags/MessagesTag.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/tags/MessagesTag.java Thu Dec  4 00:57:46
2008
@@ -108,7 +108,8 @@
 
             // Add all of the Stripes validation errors first (all fields, even global errors)
             ValidationErrors errors = m_wikiActionBean.getContext().getValidationErrors();
-            for ( List<ValidationError> fieldErrors : errors.values() ) {
+            for ( List<ValidationError> fieldErrors : errors.values() ) 
+            {
                 for ( ValidationError error : fieldErrors )
                 {
                     String message = error.getMessage( m_wikiActionBean.getContext().getLocale()
);

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/tags/WikiTagBase.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/tags/WikiTagBase.java?rev=723252&r1=723251&r2=723252&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/tags/WikiTagBase.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/tags/WikiTagBase.java Thu Dec  4 00:57:46
2008
@@ -136,7 +136,8 @@
         return EVAL_PAGE;
     }
     
-    public int doAfterBody() throws JspException {
+    public int doAfterBody() throws JspException 
+    {
         return SKIP_BODY;
     }
     

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/Installer.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/Installer.java?rev=723252&r1=723251&r2=723252&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/Installer.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/Installer.java Thu Dec  4 00:57:46 2008
@@ -342,7 +342,8 @@
         String s = m_props.getProperty( key );
         s = TextUtil.replaceString( s, "\\", "/" );
         s = s.trim();
-        if (!s.endsWith( "/" )) {
+        if (!s.endsWith( "/" )) 
+        {
             s = s+"/" ;
         }
 

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/migrator/JspParser.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/migrator/JspParser.java?rev=723252&r1=723251&r2=723252&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/migrator/JspParser.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/migrator/JspParser.java Thu Dec  4 00:57:46
2008
@@ -53,8 +53,8 @@
                 }
                 ch = ctx.getSource().charAt( ctx.position() );
                
-               switch (ch) {
-                   
+               switch (ch) 
+               {    
                    case ('<'):
                    {
                        leftAngleBrackets++;

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/migrator/NodeType.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/migrator/NodeType.java?rev=723252&r1=723251&r2=723252&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/migrator/NodeType.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ui/migrator/NodeType.java Thu Dec  4 00:57:46
2008
@@ -72,7 +72,8 @@
         return m_tagStart;
     }
     
-    public String toString() {
+    public String toString() 
+    {
         return name();
     }
     

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/url/StripesURLConstructor.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/url/StripesURLConstructor.java?rev=723252&r1=723251&r2=723252&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/url/StripesURLConstructor.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/url/StripesURLConstructor.java Thu Dec 
4 00:57:46 2008
@@ -284,28 +284,36 @@
         char[] chars = pattern.toCharArray();
         StringBuilder buf = new StringBuilder(pattern.length());
         char c = 0;
-        for (int i = 0; i < chars.length; i++) {
+        for (int i = 0; i < chars.length; i++) 
+        {
             c = chars[i];
-            if (!escape) {
-                switch (c) {
+            if (!escape) 
+            {
+                switch (c) 
+                {
                 case '{':
                     ++braceLevel;
-                    if (braceLevel == 1) {
-                        if (path == null) {
+                    if (braceLevel == 1) 
+                    {
+                        if (path == null) 
+                        {
                             // extract trailing non-alphanum chars as a literal to trim the
path
                             int end = buf.length() - 1;
                             while (end >= 0 && !Character.isJavaIdentifierPart(buf.charAt(end)))
                                 --end;
-                            if (end < 0) {
+                            if (end < 0) 
+                            {
                                 path = buf.toString();
                             }
-                            else {
+                            else 
+                            {
                                 ++end;
                                 path = buf.substring(0, end);
                                 components.add(buf.substring(end));
                             }
                         }
-                        else {
+                        else 
+                        {
                             components.add(buf.toString());
                         }
                         buf.setLength(0);
@@ -313,10 +321,12 @@
                     }
                     break;
                 case '}':
-                    if (braceLevel > 0) {
+                    if (braceLevel > 0) 
+                    {
                         --braceLevel;
                     }
-                    if (braceLevel == 0) {
+                    if (braceLevel == 0) 
+                    {
                         components.add(parseUrlBindingParameter(beanType, buf.toString()));
                         buf.setLength(0);
                         continue;
@@ -334,7 +344,8 @@
         }
 
         // handle whatever is left
-        if (buf.length() > 0) {
+        if (buf.length() > 0) 
+        {
             if (escape)
                 throw new ParseException(pattern, "Expression must not end with escape character");
             else if (braceLevel > 0)
@@ -361,23 +372,27 @@
      * @throws ParseException if the pattern cannot be parsed
      */
     protected static UrlBindingParameter parseUrlBindingParameter(
-            Class<? extends ActionBean> beanClass, String string) {
+            Class<? extends ActionBean> beanClass, String string) 
+    {
         char[] chars = string.toCharArray();
         char c = 0;
         boolean escape = false;
         StringBuilder name = new StringBuilder();
         StringBuilder defaultValue = new StringBuilder();
         StringBuilder current = name;
-        for (int i = 0; i < chars.length; i++) {
+        for (int i = 0; i < chars.length; i++) 
+        {
             c = chars[i];
-            if (!escape) {
-                switch (c) {
-                case '\\':
-                    escape = true;
-                    continue;
-                case '=':
-                    current = defaultValue;
-                    continue;
+            if (!escape) 
+            {
+                switch (c) 
+                {
+                    case '\\':
+                        escape = true;
+                        continue;
+                    case '=':
+                        current = defaultValue;
+                        continue;
                 }
             }
 
@@ -386,7 +401,9 @@
         }
 
         String dflt = defaultValue.length() < 1 ? null : defaultValue.toString();
-        if (dflt != null && UrlBindingParameter.PARAMETER_NAME_EVENT.equals(name.toString()))
{
+        
+        if (dflt != null && UrlBindingParameter.PARAMETER_NAME_EVENT.equals(name.toString()))

+        {
             throw new ParseException(string, "In ActionBean class " + beanClass.getName()
                     + ", the " + UrlBindingParameter.PARAMETER_NAME_EVENT
                     + " parameter may not be assigned a default value. Its default value
is"
@@ -394,7 +411,8 @@
         }
         return new UrlBindingParameter(beanClass, name.toString(), null, dflt) {
             @Override
-            public String getValue() {
+            public String getValue() 
+            {
                 throw new UnsupportedOperationException(
                         "getValue() is not implemented for URL parameter prototypes");
             }



Mime
View raw message