jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r740106 - in /incubator/jspwiki/trunk: .externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch .project src/java/org/apache/wiki/content/WikiName.java src/java/org/apache/wiki/log/LoggerFactory.java
Date Mon, 02 Feb 2009 21:14:41 GMT
Author: jalkanen
Date: Mon Feb  2 21:14:40 2009
New Revision: 740106

URL: http://svn.apache.org/viewvc?rev=740106&view=rev
Log:
Removed some checkstyle warnings; disabled Javascript validation (which was borking pretty
badly on some files).

Added:
    incubator/jspwiki/trunk/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
Modified:
    incubator/jspwiki/trunk/.project
    incubator/jspwiki/trunk/src/java/org/apache/wiki/content/WikiName.java
    incubator/jspwiki/trunk/src/java/org/apache/wiki/log/LoggerFactory.java

Added: incubator/jspwiki/trunk/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch?rev=740106&view=auto
==============================================================================
--- incubator/jspwiki/trunk/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
(added)
+++ incubator/jspwiki/trunk/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
Mon Feb  2 21:14:40 2009
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.wst.jsdt.core.javascriptValidator"/>
+<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>

Modified: incubator/jspwiki/trunk/.project
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/.project?rev=740106&r1=740105&r2=740106&view=diff
==============================================================================
--- incubator/jspwiki/trunk/.project (original)
+++ incubator/jspwiki/trunk/.project Mon Feb  2 21:14:40 2009
@@ -6,8 +6,13 @@
 	</projects>
 	<buildSpec>
 		<buildCommand>
-			<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>full,incremental,</triggers>
 			<arguments>
+				<dictionary>
+					<key>LaunchConfigHandle</key>
+					<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/content/WikiName.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/content/WikiName.java?rev=740106&r1=740105&r2=740106&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/content/WikiName.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/content/WikiName.java Mon Feb  2 21:14:40
2009
@@ -29,7 +29,7 @@
  *  
  *  @since 3.0
  */
-public class WikiName implements Serializable, Comparable
+public class WikiName implements Serializable, Comparable<WikiName>
 {
     private static final long serialVersionUID = 1L;
     private String m_space;
@@ -131,16 +131,34 @@
         return m_space+":"+m_path;
     }
 
+    /**
+     *  @{inheritDoc}
+     *  
+     *  @return {@inheritDoc}
+     */
     public int hashCode()
     {
         return m_space.hashCode() ^ m_path.hashCode();
     }
     
-    public int compareTo( Object o ) throws ClassCastException
+    /**
+     *  A WikiName is compared using it's toString() method.
+     *  
+     *  @param o The Object to compare against.
+     *  @return {@inheritDoc}
+     */
+    public int compareTo( WikiName o )
     {
-        return toString().compareTo( ((WikiName)o).toString() );
+        return toString().compareTo( o.toString() );
     }
     
+    /**
+     *  A WikiName is equal to another WikiName if the space and the path
+     *  match.
+     *  
+     *  @param o The Object to compare against.
+     *  @return True, if this WikiName is equal to another WikiName.
+     */
     public boolean equals( Object o )
     {
         if( o instanceof WikiName )

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/log/LoggerFactory.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/log/LoggerFactory.java?rev=740106&r1=740105&r2=740106&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/log/LoggerFactory.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/log/LoggerFactory.java Mon Feb  2 21:14:40
2009
@@ -97,7 +97,7 @@
      *  @param clazz The Class to find a Logger for.
      *  @return A Logger instance.
      */
-    public static final Logger getLogger( Class clazz )
+    public static final Logger getLogger( Class<?> clazz )
     {
         return getLogger( clazz.getName() );
     }
@@ -150,9 +150,9 @@
             @SuppressWarnings("unused")
             Object slf4jLog4jImpl = Class.forName( SLF4J_LOG4J_ADAPTER_CLASS);
             //
-            Object log4jLogger = Class.forName(LOG4J_LOGGER_CLASS );
-            Class loggerClass = Class.forName(LOG4J_LOGGER_CLASS  );
-            Class[] parms = new Class[1];
+            Object log4jLogger = Class.forName( LOG4J_LOGGER_CLASS );
+            Class<?> loggerClass  = Class.forName( LOG4J_LOGGER_CLASS );
+            Class<?>[] parms = new Class[1];
             parms[0] = new String().getClass();
             Method getLoggerMethod = loggerClass.getMethod( "getLogger", parms );
             log4jLogger = getLoggerMethod.invoke( log4jLogger, loggerName );
@@ -163,8 +163,8 @@
             //
             Object[] arglist = new Object[1];
             arglist[0] = log4jLogger;
-            Class mbeanClass = Class.forName( "org.apache.log4j.jmx.LoggerDynamicMBean" );
-            Constructor constr = mbeanClass.getConstructor( loggerClass );
+            Class<?> mbeanClass = Class.forName( "org.apache.log4j.jmx.LoggerDynamicMBean"
);
+            Constructor<?> constr = mbeanClass.getConstructor( loggerClass );
             Object dynMBean = constr.newInstance( arglist );
             ObjectName mbeanName = new ObjectName( getObjectNamePrefix() + loggerName );
             MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();



Mime
View raw message