logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r564471 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: FileLoadAction.java LogUI.java NoReceiversWarningPanel.java help/HelpManager.java plugins/PluginClassLoaderFactory.java
Date Fri, 10 Aug 2007 05:43:42 GMT
Author: sdeboy
Date: Thu Aug  9 22:43:40 2007
New Revision: 564471

URL: http://svn.apache.org/viewvc?view=rev&rev=564471
Log:
Imlemented fix for http://issues.apache.org/bugzilla/show_bug.cgi?id=41132 - 

Chainsaw cannot open log files if file name contains illegal URL characters like '#'

(applied patch provided by Kamalakar)

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileLoadAction.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/NoReceiversWarningPanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/help/HelpManager.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/plugins/PluginClassLoaderFactory.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileLoadAction.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileLoadAction.java?view=diff&rev=564471&r1=564470&r2=564471
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileLoadAction.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/FileLoadAction.java Thu
Aug  9 22:43:40 2007
@@ -108,7 +108,7 @@
             File selectedFile = chooser.getSelectedFile();
 
             try {
-                url = selectedFile.toURL();
+                url = selectedFile.toURI().toURL();
                 name = selectedFile.getName();
             } catch (Exception ex) {
                 // TODO: handle exception

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java?view=diff&rev=564471&r1=564470&r2=564471
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java Thu Aug  9 22:43:40
2007
@@ -441,7 +441,7 @@
                         try {
                             getStatusBar().setMessage("Loading " + file.getAbsolutePath()
+ "...");
                             FileLoadAction.importURL(handler, decoder, file
-                                    .getName(), file.toURL());
+                                    .getName(), file.toURI().toURL());
                         } catch (Exception e) {
                             String errorMsg = "Failed to import a file";
                             logger.error(errorMsg, e);

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/NoReceiversWarningPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/NoReceiversWarningPanel.java?view=diff&rev=564471&r1=564470&r2=564471
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/NoReceiversWarningPanel.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/NoReceiversWarningPanel.java
Thu Aug  9 22:43:40 2007
@@ -481,7 +481,7 @@
             return null;
         }
 
-        return chooser.getSelectedFile().toURL();
+        return chooser.getSelectedFile().toURI().toURL();
     }
 
     /**

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/help/HelpManager.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/help/HelpManager.java?view=diff&rev=564471&r1=564470&r2=564471
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/help/HelpManager.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/help/HelpManager.java Thu
Aug  9 22:43:40 2007
@@ -61,7 +61,7 @@
             }else if(new File("docs/api").exists()) {
             	File dir = new File("docs/api");
             	logger.info("Detected Local JavaDocs at " + dir.toString());
-            	helpLocator.installLocator(dir.toURL());
+            	helpLocator.installLocator(dir.toURI().toURL());
             } else {
             	logger.warn("Could not find any local JavaDocs, you might want to consider running
'ant javadoc'. The release version will be able to access Javadocs from the Apache website.");
             }

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/plugins/PluginClassLoaderFactory.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/plugins/PluginClassLoaderFactory.java?view=diff&rev=564471&r1=564470&r2=564471
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/plugins/PluginClassLoaderFactory.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/plugins/PluginClassLoaderFactory.java
Thu Aug  9 22:43:40 2007
@@ -72,7 +72,7 @@
         List list = new ArrayList();
         // add the plugin directory as a resource loading path
         try {
-			list.add(pluginDirectory.toURL());
+			list.add(pluginDirectory.toURI().toURL());
 		} catch (Exception e) {
 			throw new RuntimeException(e.getMessage());
 		}
@@ -81,7 +81,7 @@
 				String name = strings[i];
 				File file = new File(pluginDirectory, name);
 				try {
-					list.add(file.toURL());
+					list.add(file.toURI().toURL());
 					logger.info("Added " + file.getAbsolutePath()
 							+ " to Plugin class loader list");
 				} catch (Exception e) {



Mime
View raw message