wro4j-core/src/main/java/ro/isdc/wro/model/resource/Resource.java
private static String cleanUri(final String uri) {
    String result = uri.trim();
    //handle empty uri
    if (!StringUtils.isEmpty(uri)) {
      final int endIndex = result.length() - 1;
      if (result.lastIndexOf('/') == endIndex) {
        result = result.substring(0, endIndex);
      }
    }
    return result;
  }
private static String cleanUri(final String uri) {
    String result = uri.trim();
    //handle empty uri
    if (!StringUtils.isEmpty(uri)) {
      final int endIndex = result.length() - 1;
      if (result.lastIndexOf('/') == endIndex) {
        result = result.substring(0, endIndex);
      }
    }
    return result;
  }
private static String cleanUri ( final String uri ) { String result = uri . trim ( ) ; //handle empty uri
 if ( ! StringUtils . isEmpty ( uri ) ) { final int endIndex = result . length ( ) - 1 ; if ( result . lastIndexOf ( ' ' ) == endIndex ) { result = result . substring ( 0 , endIndex ) ; } } return result ; }
Perform a cleaning of the uri by trimming it and removing last '/' character if exists.

@param uri to clean.
@return cleaned uri.
Perform a cleaning of the uri by trimming it and removing last / character if exists .