Update of /cvsroot/freenet/freenet/src/freenet/config
In directory sc8-pr-cvs1:/tmp/cvs-serv25430/src/freenet/config

Modified Files:
        Setup.java Option.java Config.java 
Log Message:
6296:
A few more Eclipse warning fixes, slightly functional this time - use our built-in URL 
codecs, rather than the deprecated java ones, for example, and catch their exceptions.
Add support for deprecated options - which won't be written out when generating a 
config, but will be recognized if set. bandwidthLimit and averageBandwidthLimit are 
the first.
Change way we handle deprecated bandwidthLimit option, hopefully fix constant 100% 
load.
Remove unused method NGRouting.transferFailed().


Index: Setup.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/config/Setup.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -r1.10 -r1.11
--- Setup.java  30 Oct 2003 01:34:03 -0000      1.10
+++ Setup.java  1 Nov 2003 15:13:35 -0000       1.11
@@ -450,6 +450,7 @@
             };
         }
         
+        if(opt.isDeprecated) return;
         if (expert || !opt.isExpert) println("Setting: " + name);
         comment(comment, opt.isExpert, out);
         

Index: Option.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/config/Option.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -r1.6 -r1.7
--- Option.java 26 Sep 2003 09:32:45 -0000      1.6
+++ Option.java 1 Nov 2003 15:13:35 -0000       1.7
@@ -9,6 +9,7 @@
     Class defaultClass;
     Object defaultValue;
     boolean isExpert = false;
+    boolean isDeprecated = false;
     int sortOrder;
 
     String argDesc;

Index: Config.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/config/Config.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -r1.11 -r1.12
--- Config.java 30 Oct 2003 01:34:03 -0000      1.11
+++ Config.java 1 Nov 2003 15:13:35 -0000       1.12
@@ -147,6 +147,14 @@
         ((Option) options.get(name)).isExpert = isExpert;
     }
 
+       /**
+        * Allows an option to be set as deprecated, meaning it will
+        * never be written, but will be read.
+        */
+    public void setDeprecated(String name, boolean isDeprecated) {
+       ((Option) options.get(name)).isDeprecated = isDeprecated;
+    }
+    
     /**
      * Describes the argument(s) to the option.
      */

_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to