if (key instanceof helma.objectmodel.Key && value instanceof helma.objectmodel.db.Node) { helma.objectmodel.Key k = (helma.objectmodel.Key) key; helma.objectmodel.db.Node n = (helma.objectmodel.db.Node) value; helma.objectmodel.DbMapping dbm = n.getDbMapping (); String t1 = k.getType (); String t2 = dbm == null ? null: dbm.getTypeName(); if (t1 != t2 && (t1 == null || !t1.equals (t2))) { helma.objectmodel.IServer.getLogger().log ("WARNING: "+t1+" != "+t2); System.err.println ("WARNING: "+t1+" != "+t2); Thread.dumpStack (); } }
    public synchronized Object put (Object key, Object value) {	if (key instanceof helma.objectmodel.Key && value instanceof helma.objectmodel.db.Node) {	    helma.objectmodel.Key k = (helma.objectmodel.Key) key;	    helma.objectmodel.db.Node n = (helma.objectmodel.db.Node) value;	    helma.objectmodel.DbMapping dbm = n.getDbMapping ();	    String t1 = k.getType ();	    String t2 = dbm == null ? null: dbm.getTypeName();	    if (t1 != t2 && (t1 == null || !t1.equals (t2))) {	        helma.objectmodel.IServer.getLogger().log ("WARNING: "+t1+" != "+t2);	        System.err.println ("WARNING: "+t1+" != "+t2);	        Thread.dumpStack ();	    }	}	Object oldValue = newTable.put (key, value);	if (oldValue != null)	    return oldValue;	oldValue = oldTable.get (key);	if (oldValue != null)	    oldTable.remove( key );	else {	    if (size() >= threshold) {		// Rotate the tables.		oldTable = newTable;		newTable = new HashMap (eachCapacity, loadFactor);	    }	}	return oldValue;    }