[java] fixes module resolve results caching