Update of /cvsroot/freenet/freenet/src/freenet/client/metadata
In directory sc8-pr-cvs1:/tmp/cvs-serv644/src/freenet/client/metadata

Modified Files:
        Metadata.java 
Log Message:
Fix all Core.logger.{DEBUG,etc} uses to be Logger.{DEBUG,etc}. Kills tons of eclipse 
warnings, total down to 872 now (started a little under 2300).

Index: Metadata.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/client/metadata/Metadata.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -w -r1.10 -r1.11
--- Metadata.java       30 Oct 2003 01:34:01 -0000      1.10
+++ Metadata.java       31 Oct 2003 18:13:15 -0000      1.11
@@ -10,6 +10,7 @@
 import freenet.Core;
 import freenet.FieldSet;
 import freenet.support.ArrayBucket;
+import freenet.support.Logger;
 import freenet.support.io.ReadInputStream;
 import freenet.support.io.WriteOutputStream;
 /**
@@ -94,8 +95,8 @@
     protected void parse(InputStream metadata) 
         throws InvalidPartException, IOException {
 
-       boolean logDEBUG = Core.logger.shouldLog(Core.logger.DEBUG);
-       if(logDEBUG) Core.logger.log(this, "Parsing metadata", Core.logger.DEBUG);
+       boolean logDEBUG = Core.logger.shouldLog(Logger.DEBUG);
+       if(logDEBUG) Core.logger.log(this, "Parsing metadata", Logger.DEBUG);
        
         ReadInputStream in = new ReadInputStream(metadata);
        
@@ -104,7 +105,7 @@
             name = in.readTo('\n', '\r');
         } catch (EOFException e) {
            if(logDEBUG)
-               Core.logger.log(this, "Completely empty metadata", Core.logger.DEBUG);
+               Core.logger.log(this, "Completely empty metadata", Logger.DEBUG);
             version = new VersionCommand(this);
             return; // I'm tolerating completely empty metadata 
         }
@@ -113,11 +114,11 @@
         FieldSet fs = new FieldSet();
         String end = fs.parseFields(in);
        if(logDEBUG)
-           Core.logger.log(this, "end is "+end, Core.logger.DEBUG);
+           Core.logger.log(this, "end is "+end, Logger.DEBUG);
         version = new VersionCommand(this, fs);
        
         while (end.equals("EndPart")) {
-           if(logDEBUG) Core.logger.log(this, "Got a Part", Core.logger.DEBUG);
+           if(logDEBUG) Core.logger.log(this, "Got a Part", Logger.DEBUG);
             fs = new FieldSet();
             name = in.readTo('\n','\r');
 
@@ -127,31 +128,31 @@
             end = fs.parseFields(in);
            if(logDEBUG)
                Core.logger.log(this, "Document end = "+end+", fieldset: "+
-                               fs.toString(), Core.logger.DEBUG);
+                               fs.toString(), Logger.DEBUG);
             DocumentCommand d = new DocumentCommand(fs, settings);
            if(logDEBUG)
-               Core.logger.log(this, "Got DocumentCommand: "+d, Core.logger.DEBUG);
+               Core.logger.log(this, "Got DocumentCommand: "+d, Logger.DEBUG);
             commands.put(d.getName(), d);
         }
         if (!end.equals("End")) {
             throw new InvalidPartException("Malformed endstring: " + end);
         }
        if(logDEBUG)
-           Core.logger.log(this, "Got End", Core.logger.DEBUG);
+           Core.logger.log(this, "Got End", Logger.DEBUG);
         ArrayBucket ab = new ArrayBucket();
         ab.read(in);
         if (ab.size() > 0)
             this.trailing = ab;
        if(logDEBUG)
-           Core.logger.log(this, "Got Trailing", Core.logger.DEBUG);
+           Core.logger.log(this, "Got Trailing", Logger.DEBUG);
     }
 
     public void writeTo(OutputStream rout) throws IOException {
         WriteOutputStream out = new WriteOutputStream(rout);
-       if(Core.logger.shouldLog(Core.logger.DEBUG))
+       if(Core.logger.shouldLog(Logger.DEBUG))
            Core.logger.log(this, "Metadata.WriteOutputStream()", 
                            new Exception("debug"), 
-                           Core.logger.DEBUG);
+                           Logger.DEBUG);
         //System.err.println("LALA got to writeto");
         out.writeUTF("Version", '\n');
         FieldSet fs = version.toFieldSet();
@@ -184,7 +185,7 @@
        } catch (IOException e) {
            Core.logger.log(this, "IMPOSSIBLE - got IOException writing to a "+
                            "ByteArrayOutputStream", e, 
-                           Core.logger.ERROR);
+                           Logger.ERROR);
            return null;
        }
        return os.toString();

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

Reply via email to