I have setup a small project, with a small final class ByteBufferGuard
in a ByteBufferGuard.java
file:
final class ByteBufferGuard {
@FunctionalInterface
static interface BufferCleaner {
void freeBuffer(String resourceDescription, ByteBuffer b) throws IOException;
}
}
And then another class, MMapDirectory.java
. Well, in this class I can't refer to BufferCleaner
simply by importing it, because this:
import ByteBufferGuard.BufferCleaner;
returns:
cannot resolve symbol ByteBufferGuard
But it's strange because only ByteBufferGuard
is marked red, it does see, instead, what comes next, that is BufferCleaner
.
Both classes are located under the same gradle default root package, that is src/main/java/
Looking at similar answers, I already tried to "invalidate caches/restart" and also delete .idea
folder and open the project again.. no success so far.
Let's say this is not a blocker, because I can substitute all the references of BufferCleaner
with ByteBufferGuard.BufferCleaner
, but still it bothers me, so I'd like to solve this issue.
Do you know what could be the problem?
java 1.8 u112
intellij 2017.1 eap
Another interesting fact, is that the very same import using Kotlin works like a charm..