I am attempting to use JDK 7\'s \"try-catch with resources\" statement; IntelliJ highlights my resource line, saying
Try-with-resources are not supp
Also check your code. You might have accidentally did something like this:
try (HttpClients.createMinimal().execute(new HttpGet(String.format(
"http://127.0.0.1:%s/extra/LifecycleServlet?action=shutdown",
runningPort)))) {
instead of
try (CloseableHttpResponse response = HttpClients.createMinimal().execute(new HttpGet(String.format(
"http://127.0.0.1:%s/extra/LifecycleServlet?action=shutdown",
runningPort)))) {
easy mistake to make when you don't intend on using the result of your closeable resource. yet it will have that misleading error.