Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
Examples of errors detected by the...

Examples of errors detected by the V6127 diagnostic

V6127. Closeable object is not closed. This may lead to a resource leak.


LanguageTool

V6127 The 'metadata' Closeable object is not closed. This may lead to a resource leak. MorfologikMultiSpeller.java 320


private Dictionary getDictionary(
  Supplier<List<byte[]>> lines,
  String dictPath,
  String infoPath,
  boolean isUserDict,
  int userDictSize
){
  ....
  InputStream metadata;
  if (new File(infoPath).exists()) {
    metadata = new FileInputStream(infoPath);  // <=
  } else {
    metadata = getDataBroker().getFromResourceDirAsStream(infoPath);
  }
  Dictionary dict = Dictionary.read(fsaInStream, metadata);
  if (!isUserDict) {
    dicPathToDict.put(cacheKey, dict);
  } else if (userDictCacheSize != null) {
    getUserDictCache().put(userDictName, dict);
  }
  return dict;
}