I have a weird issue that I'm experiencing on my laptop;
Laptop: OSX Version: 10.11.6 - El Capitan
Java: java version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
I'm trying to use ClassLoader#getResource
to open a filename of the following format app-2016-08-13T22:55:00Z.1.log.gz
.
I've placed the file under /src/main/test/resources however I am always getting back null
.
If I rename the file to be anything without the colons the code works. What's going on?
@Test
public void testColonFile() throws Exception {
String resourceFilename = "app-2016-08-13T22:55:00Z.1.log.gz";
InputStream is = TestClass.class.getClassLoader().getResourceAsStream(resourceFilename);
//InputStream is null here!
}