protected final FilePath preferredLocation ( ToolInstallation tool , Node node ) { if ( node == null ) { throw new IllegalArgumentException ( "must pass non-null node" ) ; } String home = Util . fixEmptyAndTrim ( tool . getHome ( ) ) ; if ( home == null ) { home = sanitize ( tool . getDescriptor ( ) . getId ( ) ) + File . separatorChar + sanitize ( tool . getName ( ) ) ; } FilePath root = node . getRootPath ( ) ; if ( root == null ) { throw new IllegalArgumentException ( "Node " + node . getDisplayName ( ) + " seems to be offline" ) ; } return root . child ( "tools" ) . child ( home ) ; }
Convenience method to find a location to install a tool .