refactor to remove warnings from OntologyCache.java