jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mets...@apache.org
Subject svn commit: r721820 - in /incubator/jspwiki/trunk: ChangeLog etc/log4j.properties src/com/ecyrd/jspwiki/Release.java src/com/ecyrd/jspwiki/plugin/PluginManager.java src/com/ecyrd/jspwiki/util/WatchDog.java
Date Sun, 30 Nov 2008 14:23:12 GMT
Author: metskem
Date: Sun Nov 30 06:23:12 2008
New Revision: 721820

URL: http://svn.apache.org/viewvc?rev=721820&view=rev
Log:
3.0.0-svn-16  * JSPWIKI-447: InstantiationException in PluginManager

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/etc/log4j.properties
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginManager.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/WatchDog.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=721820&r1=721819&r2=721820&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sun Nov 30 06:23:12 2008
@@ -1,3 +1,11 @@
+2008-11-30 Harry Metske <metskem@apache.org>
+
+        * 3.0.0-svn-16
+        
+        * JSPWIKI-447: InstantiationException in PluginManager
+        sneaked in an example log4j override in log4j.properties
+        WatchDog did not have it's Logger final.
+         
 2008-11-30 Florian Holeczek <florianh@apache.org>
 
         * 3.0.0-svn-15

Modified: incubator/jspwiki/trunk/etc/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/log4j.properties?rev=721820&r1=721819&r2=721820&view=diff
==============================================================================
--- incubator/jspwiki/trunk/etc/log4j.properties (original)
+++ incubator/jspwiki/trunk/etc/log4j.properties Sun Nov 30 06:23:12 2008
@@ -39,6 +39,11 @@
 # at least to a level of WARN.
 #
 log4j.rootCategory=INFO,FileLog
+# 
+# If you want to override one specific package (or just one class), do this as follows:
+#
+#log4j.logger.com.ecyrd.jspwiki.plugin=debug, FileLog
+#log4j.additivity.com.ecyrd.jspwiki.plugin=false
 
 # Enable if you're using mailing, above.
 #log4j.rootCategory=INFO,FileLog,mail

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java?rev=721820&r1=721819&r2=721820&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/Release.java Sun Nov 30 06:23:12 2008
@@ -77,7 +77,7 @@
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "15";
+    public static final String     BUILD         = "16";
     
     /**
      *  This is the generic version string you should use

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=721820&r1=721819&r2=721820&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginManager.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginManager.java Sun Nov 30 06:23:12
2008
@@ -21,6 +21,7 @@
 package com.ecyrd.jspwiki.plugin;
 
 import java.io.*;
+import java.lang.reflect.Modifier;
 import java.text.MessageFormat;
 import java.util.*;
 
@@ -707,16 +708,19 @@
         
         Set<Class<? extends WikiPlugin>> resultSet = resolver.getClasses();
         
-        log.debug( "Found "+resultSet.size()+" plugins" );
-        
         for( Class<? extends WikiPlugin> clazz : resultSet )
         {
-            WikiPluginInfo pluginInfo = WikiPluginInfo.newInstance( clazz );
-
-            if( pluginInfo != null )
+            if( !clazz.isInterface() & !Modifier.isAbstract( clazz.getModifiers() ) )
             {
-                registerPlugin( pluginInfo );
-            } 
+                WikiPluginInfo pluginInfo = WikiPluginInfo.newInstance( clazz );
+
+                if( pluginInfo != null )
+                {
+                    registerPlugin( pluginInfo );
+                }
+            } 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/util/WatchDog.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/WatchDog.java?rev=721820&r1=721819&r2=721820&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/WatchDog.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/util/WatchDog.java Sun Nov 30 06:23:12 2008
@@ -55,7 +55,7 @@
     private boolean   m_enabled    = true;
     private WikiEngine m_engine;
 
-    private static Logger log = LoggerFactory.getLogger(WatchDog.class.getName());
+    private static final Logger log = LoggerFactory.getLogger(WatchDog.class.getName());
 
     private static HashMap<Integer,WeakReference<WatchDog>> c_kennel = 
         new HashMap<Integer,WeakReference<WatchDog>>();



Mime
View raw message