cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r171367 - in /cocoon/trunk/src: java/org/apache/cocoon/core/CoreUtil.java test/org/apache/cocoon/core/TestBootstrapEnvironment.java
Date Sun, 22 May 2005 20:07:29 GMT
Author: cziegeler
Date: Sun May 22 13:07:28 2005
New Revision: 171367

URL: http://svn.apache.org/viewcvs?rev=171367&view=rev
Log:
Add NP check

Modified:
    cocoon/trunk/src/java/org/apache/cocoon/core/CoreUtil.java
    cocoon/trunk/src/test/org/apache/cocoon/core/TestBootstrapEnvironment.java

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/CoreUtil.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/CoreUtil.java?rev=171367&r1=171366&r2=171367&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/CoreUtil.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/CoreUtil.java Sun May 22 13:07:28 2005
@@ -386,7 +386,9 @@
         final Hierarchy defaultHierarchy = Hierarchy.getDefaultHierarchy();
         final ErrorHandler errorHandler = new DefaultErrorHandler();
         defaultHierarchy.setErrorHandler(errorHandler);
-        defaultHierarchy.setDefaultLogTarget(this.env.getDefaultLogTarget());
+        if ( this.env.getDefaultLogTarget() != null ) {
+            defaultHierarchy.setDefaultLogTarget(this.env.getDefaultLogTarget());
+        }
         defaultHierarchy.setDefaultPriority(logPriority);
         final Logger logger = new LogKitLogger(Hierarchy.getDefaultHierarchy().getLoggerFor(""));
 

Modified: cocoon/trunk/src/test/org/apache/cocoon/core/TestBootstrapEnvironment.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/test/org/apache/cocoon/core/TestBootstrapEnvironment.java?rev=171367&r1=171366&r2=171367&view=diff
==============================================================================
--- cocoon/trunk/src/test/org/apache/cocoon/core/TestBootstrapEnvironment.java (original)
+++ cocoon/trunk/src/test/org/apache/cocoon/core/TestBootstrapEnvironment.java Sun May 22
13:07:28 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -98,7 +98,7 @@
     }
 
     public void configureLoggingContext(DefaultContext context) {
-        throw new UnsupportedOperationException();
+        // simply do nothing
     }
 
     public void configure(DefaultContext context) {
@@ -129,7 +129,7 @@
     }
 
     public LogTarget getDefaultLogTarget() {
-        throw new UnsupportedOperationException();
+        return null;
     }
 
     /**
@@ -144,6 +144,6 @@
     }
 
     public String getClassPath(Settings settings) {
-        throw new UnsupportedOperationException();
+        return null;
     }
 }



Mime
View raw message