jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mets...@apache.org
Subject svn commit: r1757600 - in /jspwiki/trunk: ./ jspwiki-war/src/main/java/org/apache/wiki/ jspwiki-war/src/main/java/org/apache/wiki/auth/ jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/ jspwiki-war/src/main/java/org/apache/wiki/filters/ jspwiki...
Date Thu, 25 Aug 2016 04:56:08 GMT
Author: metskem
Date: Thu Aug 25 04:56:08 2016
New Revision: 1757600

URL: http://svn.apache.org/viewvc?rev=1757600&view=rev
Log:
       * 2.10.3-svn-14

       * Fixed JSPWIKI-1031 provide stacktrace when throwing InternalWikiException, fix by
Jürgen Weber.

Modified:
    jspwiki/trunk/ChangeLog
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/InternalWikiException.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ReferenceManager.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiBackgroundThread.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/SecurityVerifier.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/WebContainerAuthorizer.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/SpamFilter.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/DefaultPluginManager.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/AbstractFileProvider.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/CommandResolver.java

Modified: jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/jspwiki/trunk/ChangeLog?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/ChangeLog (original)
+++ jspwiki/trunk/ChangeLog Thu Aug 25 04:56:08 2016
@@ -1,3 +1,9 @@
+2016-08-25  Harry Metske (metskem@apache.org)
+
+       * 2.10.3-svn-14
+
+       * Fixed JSPWIKI-1031 provide stacktrace when throwing InternalWikiException, fix by
Jürgen Weber.
+
 2016-08-18  Harry Metske (metskem@apache.org)
 
        * 2.10.3-svn-13

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/InternalWikiException.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/InternalWikiException.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/InternalWikiException.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/InternalWikiException.java Thu
Aug 25 04:56:08 2016
@@ -38,4 +38,16 @@ public class InternalWikiException exten
     {
         super( msg );
     }
+
+	public InternalWikiException(String message, Throwable cause)
+	{
+		super(message, cause);
+	}
+
+	public InternalWikiException(Throwable cause)
+	{
+		super(cause);
+	}
+    
+    
 }

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ReferenceManager.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ReferenceManager.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ReferenceManager.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ReferenceManager.java Thu Aug
25 04:56:08 2016
@@ -412,7 +412,7 @@ public class ReferenceManager
         }
         catch (UnsupportedEncodingException e)
         {
-            throw new InternalWikiException("AAAAGH!  UTF-8 is gone!  My eyes!  It burns...!");
+            throw new InternalWikiException("AAAAGH!  UTF-8 is gone!  My eyes!  It burns...!",
e);
         }
 
         return TextUtil.toHexString(dig)+".cache";

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java Thu Aug 25 04:56:08
2016
@@ -72,7 +72,7 @@ public final class Release {
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "13";
+    public static final String     BUILD         = "14";
 
     /**
      *  This is the generic version string you should use when printing out the version.
 It is of 

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiBackgroundThread.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiBackgroundThread.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiBackgroundThread.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiBackgroundThread.java Thu
Aug 25 04:56:08 2016
@@ -141,7 +141,7 @@ public abstract class WikiBackgroundThre
             shutdownTask();
         } catch( Throwable t ) {
             LOG.error( "Background thread error: (stack trace follows)", t );
-            throw new InternalWikiException( t.getMessage() );
+            throw new InternalWikiException( t.getMessage() ,t);
         }
     }
     

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/WikiEngine.java Thu Aug 25 04:56:08
2016
@@ -378,7 +378,7 @@ public class WikiEngine
             {
                 context.log( "ERROR: Failed to create a Wiki engine: "+e.getMessage() );
                 log.error( "ERROR: Failed to create a Wiki engine, stacktrace follows " ,
e);
-                throw new InternalWikiException( "No wiki engine, check logs." );
+                throw new InternalWikiException( "No wiki engine, check logs." , e);
             }
 
         }
@@ -1280,7 +1280,7 @@ public class WikiEngine
         }
         catch( UnsupportedEncodingException e )
         {
-            throw new InternalWikiException( "ISO-8859-1 not a supported encoding!?!  Your
platform is borked." );
+            throw new InternalWikiException( "ISO-8859-1 not a supported encoding!?!  Your
platform is borked." , e);
         }
     }
 
@@ -1300,7 +1300,7 @@ public class WikiEngine
         }
         catch( UnsupportedEncodingException e )
         {
-            throw new InternalWikiException("ISO-8859-1 not a supported encoding!?!  Your
platform is borked.");
+            throw new InternalWikiException("ISO-8859-1 not a supported encoding!?!  Your
platform is borked.", e);
         }
     }
 
@@ -2365,7 +2365,7 @@ public class WikiEngine
             catch ( WikiException we )
             {
                 log.fatal( "unable to instantiate class for AclManager: " + we.getMessage()
);
-                throw new InternalWikiException("Cannot instantiate AclManager, please check
logs.");
+                throw new InternalWikiException("Cannot instantiate AclManager, please check
logs.", we);
             }
         }
         return m_aclManager;

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/SecurityVerifier.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/SecurityVerifier.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/SecurityVerifier.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/SecurityVerifier.java Thu
Aug 25 04:56:08 2016
@@ -429,7 +429,7 @@ public final class SecurityVerifier
             // If we couldn't evaluate constraints it means
             // there's some sort of IO mess or parsing issue
             LOG.error( "Malformed XML in web.xml", e );
-            throw new InternalWikiException( e.getClass().getName() + ": " + e.getMessage()
);
+            throw new InternalWikiException( e.getClass().getName() + ": " + e.getMessage()
, e);
         }
 
         s.append( "</tbody>\n" );

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/WebContainerAuthorizer.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/WebContainerAuthorizer.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/WebContainerAuthorizer.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/auth/authorize/WebContainerAuthorizer.java
Thu Aug 25 04:56:08 2016
@@ -121,12 +121,12 @@ public class WebContainerAuthorizer impl
         catch ( IOException e )
         {
             log.error("Initialization failed: ",e);
-            throw new InternalWikiException( e.getClass().getName()+": "+e.getMessage() );
+            throw new InternalWikiException( e.getClass().getName()+": "+e.getMessage() ,
e);
         }
         catch ( JDOMException e )
         {
             log.error("Malformed XML in web.xml",e);
-            throw new InternalWikiException( e.getClass().getName()+": "+e.getMessage() );
+            throw new InternalWikiException( e.getClass().getName()+": "+e.getMessage() ,
e);
         }
 
         if ( m_containerRoles.length > 0 )

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/SpamFilter.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/SpamFilter.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/SpamFilter.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/SpamFilter.java Thu Aug
25 04:56:08 2016
@@ -275,7 +275,7 @@ public class SpamFilter extends BasicPag
             m_urlPattern = m_compiler.compile( URL_REGEXP );
         } catch( MalformedPatternException e ) {
             log.fatal( "Internal error: Someone put in a faulty pattern.", e );
-            throw new InternalWikiException( "Faulty pattern." );
+            throw new InternalWikiException( "Faulty pattern." , e);
         }
 
         m_akismetAPIKey = TextUtil.getStringProperty( properties,

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/JSPWikiMarkupParser.java
Thu Aug 25 04:56:08 2016
@@ -308,7 +308,7 @@ public class JSPWikiMarkupParser extends
             catch( MalformedPatternException e )
             {
                 log.fatal("Internal error: Someone put in a faulty pattern.",e);
-                throw new InternalWikiException("Faulty camelcasepattern in TranslatorReader");
+                throw new InternalWikiException("Faulty camelcasepattern in TranslatorReader",
e);
             }
             m_engine.setAttribute( CAMELCASE_PATTERN, m_camelCasePattern );
         }
@@ -1149,7 +1149,7 @@ public class JSPWikiMarkupParser extends
         catch( IOException e )
         {
             log.fatal("CleanTranslator not working", e);
-            throw new InternalWikiException("CleanTranslator not working as expected, when
cleaning title"+ e.getMessage() );
+            throw new InternalWikiException("CleanTranslator not working as expected, when
cleaning title"+ e.getMessage() , e);
         }
 
         return outTitle;

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/parser/PluginContent.java Thu
Aug 25 04:56:08 2016
@@ -270,7 +270,7 @@ public class PluginContent extends Text
             }
         } catch (ClassCastException e) {
             log.error("Invalid type offered in parsing plugin arguments.", e);
-            throw new InternalWikiException("Oops, someone offered !String!");
+            throw new InternalWikiException("Oops, someone offered !String!", e);
         } catch (NoSuchElementException e) {
             String msg = "Missing parameter in plugin definition: " + commandline;
             log.warn(msg, e);

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/DefaultPluginManager.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/DefaultPluginManager.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/DefaultPluginManager.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/DefaultPluginManager.java
Thu Aug 25 04:56:08 2016
@@ -224,7 +224,7 @@ public class DefaultPluginManager extend
             m_pluginPattern = compiler.compile( PLUGIN_INSERT_PATTERN );
         } catch( MalformedPatternException e ) {
             log.fatal( "Internal error: someone messed with pluginmanager patterns.", e );
-            throw new InternalWikiException( "PluginManager patterns are broken" );
+            throw new InternalWikiException( "PluginManager patterns are broken" , e);
         }
 
     }

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/AbstractFileProvider.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/AbstractFileProvider.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/AbstractFileProvider.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/providers/AbstractFileProvider.java
Thu Aug 25 04:56:08 2016
@@ -241,7 +241,7 @@ public abstract class AbstractFileProvid
         }
         catch( UnsupportedEncodingException e ) 
         {
-            throw new InternalWikiException("Faulty encoding; should never happen");
+            throw new InternalWikiException("Faulty encoding; should never happen", e);
         }
     }
     

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java
(original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/search/LuceneSearchProvider.java
Thu Aug 25 04:56:08 2016
@@ -767,7 +767,7 @@ public class LuceneSearchProvider implem
             }
             catch( InterruptedException e )
             {
-                throw new InternalWikiException("Interrupted while waiting to start.");
+                throw new InternalWikiException("Interrupted while waiting to start.", e);
             }
 
             m_watchdog.enterState("Full reindex");

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/CommandResolver.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/CommandResolver.java?rev=1757600&r1=1757599&r2=1757600&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/CommandResolver.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/ui/CommandResolver.java Thu Aug
25 04:56:08 2016
@@ -459,7 +459,7 @@ public final class CommandResolver
         catch( IOException e )
         {
             m_log.error( "Unable to create context", e );
-            throw new InternalWikiException( "Big internal booboo, please check logs." );
+            throw new InternalWikiException( "Big internal booboo, please check logs." ,
e);
         }
 
         // Didn't resolve; return null



Mime
View raw message