2003/11/13 07:46:42
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:41:16 +0000 (07:41 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:41:16 +0000 (07:41 +0000)
darcs-hash:20040130074116-2ba56-a45a654e95b7fccb886b2c8363b4bf95e1995926.gz

src/org/xwt/util/Hash.java
src/org/xwt/util/Log.java

index 8256152..a7524cd 100644 (file)
@@ -21,7 +21,7 @@ public class Hash {
     private int usedslots = 0;
 
     /** the number of entries with non-null values */
-    private int size = 0;
+    protected int size = 0;
 
     /** when num_slots < loadFactor * size, rehash into a bigger table */
     private final int loadFactor;
index 424e056..fbed19c 100644 (file)
@@ -17,7 +17,7 @@ public class Log {
 
     /** log a message with the current JavaScript sourceName/line */
     public static void logJS(Object o, Object message) { logJS(message); }
-    public static void logJS(Object message) { log(JSContext.getSource() + ":" + JSContext.getLine(), message); }
+    public static void logJS(Object message) { log(JSContext.getSourceName() + ":" + JSContext.getLine(), message); }
 
     /** message can be a String or a Throwable */
     public static synchronized void log(Object o, Object message) {
@@ -68,7 +68,7 @@ public class Log {
         }
     }
 
-    public static void recurseiveLog(String indent, String name, Object o) {
+    public static void recursiveLog(String indent, String name, Object o) {
         if (!name.equals("")) name += " : ";
 
         if (o == null) {
@@ -78,7 +78,7 @@ public class Log {
             Log.logJS(indent + name + "<array>");
             JSArray na = (JSArray)o;
             for(int i=0; i<na.length(); i++)
-                recurse(indent + "  ", i + "", na.elementAt(i));
+                recursiveLog(indent + "  ", i + "", na.elementAt(i));
 
         } else if (o instanceof JS) {
             Log.logJS(indent + name + "<object>");
@@ -87,9 +87,9 @@ public class Log {
             while(e.hasMoreElements()) {
                 Object key = e.nextElement();
                 if (key != null)
-                    recurse(indent + "  ", key.toString(),
-                            (key instanceof Integer) ?
-                            s.get(((Integer)key)) : s.get(key.toString()));
+                    recursiveLog(indent + "  ", key.toString(),
+                                 (key instanceof Integer) ?
+                                 s.get(((Integer)key)) : s.get(key.toString()));
             }
         } else {
             Log.logJS(indent + name + o);