if ( extensionsFile.exists() ) appendKernelExtensionsList( extensionsFile, result, separator + " + " );
private static void appendKernelExtensionsList( File file, StringBuilder to, String separator ) { try ( BufferedReader reader = new BufferedReader( new FileReader( file ) ) ) { String line; while ( (line = reader.readLine()) != null ) { boolean exists = tryLoadClass( line ); to.append( separator ).append( line ).append( " (" ).append( exists ? "exists" : "DOES NOT exist" ).append( ')' ); } } catch ( IOException e ) { to.append( "Couldn't read due to " ).append( e.getMessage() ); } }
private static void appendKernelExtensionsList( File file, StringBuilder to, String separator ) { try ( BufferedReader reader = new BufferedReader( new FileReader( file ) ) ) { String line; while ( (line = reader.readLine()) != null ) { boolean exists = tryLoadClass( line ); to.append( separator ).append( line ).append( " (" ).append( exists ? "exists" : "DOES NOT exist" ).append( ')' ); } } catch ( IOException e ) { to.append( "Couldn't read due to " ).append( e.getMessage() ); } }
if ( extensionsFile.exists() ) appendKernelExtensionsList( extensionsFile, result, separator + " + " );