if(log.isInfoEnabled()) log.info("mapping is:\n" + printMagicMap()); }
if(log.isDebugEnabled()) log.debug("mapping is:\n" + printMagicMap()); }
    private ClassConfigurator(boolean init) {        //populate the map        if (!init) return;        try {            // make sure we have a class for DocumentBuilderFactory            getClass().getClassLoader().loadClass("javax.xml.parsers.DocumentBuilderFactory");            MagicNumberReader reader = new MagicNumberReader();	    String mnfile = System.getProperty("org.jgroups.conf.magicNumberFile");	    if (mnfile!=null) {		if(log.isDebugEnabled()) log.debug("Using "+mnfile+" as magic number file");		reader.setFilename(mnfile);	    }            ClassMap[] mapping = reader.readMagicNumberMapping();	    if(mapping != null) {		for ( int i=0; i<mapping.length; i++ ) {		    try {			Integer m = new Integer(mapping[i].getMagicNumber());			Class clazz = mapping[i].getClassForMap();			if(clazz == null) {			    if(log.isErrorEnabled()) log.error("failed to create class " + mapping[i].getClassName());			    continue;			}			if(magicMap.containsKey(m)) {			    if(log.isErrorEnabled()) log.error("magic key " + m + " (" + clazz.getName() + ")" +					" is already in map (won't be overwritten). Please make sure that " +					"all magic keys are unique");			}			else {			    magicMap.put(m, clazz);			    classMap.put(clazz,m);			}		    }		    catch ( Exception cx ) {			if(log.isErrorEnabled()) log.error("Failed to load class:"+mapping[i].getClassName());		    }		}                    if(log.isInfoEnabled()) log.info("mapping is:\n" + printMagicMap());	    }        }        catch ( Throwable x ) {            if(log.isErrorEnabled()) log.error(ConfiguratorFactory.JAR_MISSING_ERROR + "\nstack trace:\n" + Util.print(x));        }    }