notify-dpml AT lists.ibiblio.org
Subject: DPML Notify
List archive
svn commit: r2586 - development/main/transit/core/handler/src/main/net/dpml/transit
- From: mcconnell AT dpml.net
- To: notify-dpml AT lists.ibiblio.org
- Subject: svn commit: r2586 - development/main/transit/core/handler/src/main/net/dpml/transit
- Date: Tue, 17 May 2005 20:21:57 +0000
Author: mcconnell AT dpml.net
Date: Tue May 17 20:21:54 2005
New Revision: 2586
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
Log:
improve reset handling
Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
==============================================================================
--- development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
(original)
+++ development/main/transit/core/handler/src/main/net/dpml/transit/Main.java
Tue May 17 20:21:54 2005
@@ -181,22 +181,27 @@
for( int i=0; i < args.length; i++ )
{
String arg = args[i];
- if( arg.equals( "-Xreset" ) )
+ if( arg.equals( "-reset" ) )
{
try
{
- Preferences usr = Preferences.userNodeForPackage(
Transit.class );
- logger.info( "resetting preferences: " + usr );
- usr.removeNode();
- usr.flush();
- Preferences sys = Preferences.systemNodeForPackage(
Transit.class );
- logger.info( "resetting preferences: " + sys );
- sys.removeNode();
- sys.flush();
+ Preferences prefs = Preferences.systemNodeForPackage(
Main.class );
+ logger.info( "Resetting: " + prefs );
+ prefs.removeNode();
}
catch( Throwable e )
{
- logger.log( Level.SEVERE, "preference rest failed", e );
+ logger.log( Level.SEVERE, "System preferences reset
failure.", e );
+ }
+ try
+ {
+ Preferences prefs = Preferences.userNodeForPackage(
Main.class );
+ logger.info( "Resetting: " + prefs );
+ prefs.removeNode();
+ }
+ catch( Throwable e )
+ {
+ logger.log( Level.SEVERE, "User preferences reset
failure.", e );
}
}
}
@@ -314,7 +319,6 @@
String arg = args[i];
if( "-Xdebug".equals( arg )
|| arg.startsWith( "-Xbootstrap=" )
- || arg.startsWith( "-Xreset" )
|| arg.startsWith( "-prefs" )
)
{
- svn commit: r2586 - development/main/transit/core/handler/src/main/net/dpml/transit, mcconnell, 05/17/2005
Archive powered by MHonArc 2.6.24.