krickert commented on code in PR #1003:
URL: https://github.com/apache/opennlp/pull/1003#discussion_r3059028744


##########
opennlp-core/opennlp-runtime/src/main/java/opennlp/tools/util/featuregen/CachedFeatureGenerator.java:
##########
@@ -91,24 +119,21 @@ public void clearAdaptiveData() {
   }
 
   /**
-   * @return Retrieves the number of times a cache hit occurred.
+   * @return Retrieves the number of cache hits for the current thread.
+   * @deprecated Cache statistics are no longer tracked.
    */
+  @Deprecated(since = "3.0.0")
   public long getNumberOfCacheHits() {
-    return numberOfCacheHits;
+    return 0;

Review Comment:
   Implemented the `UnsupportedOperationException` idea for 
`getNumberOfCacheHits()` in 3a43f71. Returning zero really was lying to callers 
after we stopped counting.
   
   @rzo1 on renaming: I agree the class name is a bit historical now. I would 
rather not rename in this PR unless you want that API break bundled here; happy 
to open a follow-up or a separate small PR for a better name if the PMC prefers 
that split.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to