protected boolean writeEnvironmentReport ( Hashtable h ) { if ( null == h ) { logMsg ( "# ERROR: writeEnvironmentReport called with null Hashtable" ) ; return false ; } boolean errors = false ; logMsg ( "#---- BEGIN writeEnvironmentReport($Revision: 468646 $): Useful stuff found: ----" ) ; // Fake the Properties-like output for ( Enumeration keys = h . keys ( ) ; keys . hasMoreElements ( ) ; /* no increment portion */ ) { Object key = keys . nextElement ( ) ; String keyStr = ( String ) key ; try { // Special processing for classes found.. if ( keyStr . startsWith ( FOUNDCLASSES ) ) { Vector v = ( Vector ) h . get ( keyStr ) ; errors |= logFoundJars ( v , keyStr ) ; } // ..normal processing for all other entries else { // Note: we could just check for the ERROR key by itself, // since we now set that, but since we have to go // through the whole hash anyway, do it this way, // which is safer for maintenance if ( keyStr . startsWith ( ERROR ) ) { errors = true ; } logMsg ( keyStr + "=" + h . get ( keyStr ) ) ; } } catch ( Exception e ) { logMsg ( "Reading-" + key + "= threw: " + e . toString ( ) ) ; } } logMsg ( "#----- END writeEnvironmentReport: Useful properties found: -----" ) ; return errors ; }
Dump a basic Xalan environment report to outWriter .