question: protected String buildResourcePath ( String basePath , String resourcePath ) { if ( basePath == null ) { basePath = "" ; } String base = trimSlashes ( basePath ) ; if ( ! base . equals ( "" ) ) { base = "/" + base ; } String result = StringUtils . removeEnd ( base + "/" + trimSlashes ( resourcePath ) , "/" ) ; if ( result . equals ( "" ) ) { result = "/" ; } return result ; }
target:  Build the full resource path, including base path, add any missing leading '/', remove any trailing '/', and remove any double '/'