79080769

Date: 2024-10-12 10:15:54
Score: 0.5
Natty:
Report link

You might want to use Thread.currentThread().getContextClassLoader():

public static void dummymethod(String file1, String file2) {
  try (InputStream xsdStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(file1)) {
     // do something with file2
  }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Andrey Smelik