public static boolean resourceExists ( String name ) { Objects . requireNonNull ( name , Required . NAME . toString ( ) ) ; URL resource = null ; try { resource = Resources . getResource ( name ) ; } catch ( IllegalArgumentException e ) { // NOSONAR Intentionally not logging or throwing this exception // Intentionally left blank } return resource != null ; }
Checks if a resource exists in the classpath