Source:
<code>private List<CodeGen.Converter> loadJsonMappers() { boolean loadOK = false; List<CodeGen.Converter> merged = new ArrayList<>(); for (StandardLocation loc : StandardLocation.values()) { try { FileObject file = processingEnv.getFiler().getResource(loc, "", JSON_MAPPERS_PROPERTIES_PATH); try(InputStream is = file.openInputStream()) { try { loadJsonMappers(merged, is); loadOK = true; } catch (IOException e) { <START> log.log(Level.SEVERE, COULD_NOT_LOAD_JSON_MAPPERS_PROPERTIES, e); <END> } } } catch (Exception ignore) { } } if (!loadOK) { try { Enumeration<URL> resources = getClass().getClassLoader().getResources(JSON_MAPPERS_PROPERTIES_PATH); while (resources.hasMoreElements()) { URL url = resources.nextElement(); try (InputStream is = url.openStream()) { loadJsonMappers(merged, is); processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Loaded json-mappers.properties " + url); loadOK = true; } } } catch (IOException e) { } } if (!loadOK) { Path source = fetchSourcePath().getParent().getParent().resolve("src/main/resources").resolve(JSON_MAPPERS_PROPERTIES_PATH); if (source.toFile().exists()) { try (InputStream is = source.toUri().toURL().openStream()) { loadJsonMappers(merged, is); loadOK = true; processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Loaded json-mappers.properties from '" + source + "'"); } catch (IOException e) { log.log(Level.SEVERE, COULD_NOT_LOAD_JSON_MAPPERS_PROPERTIES, e); processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, "Unable to open properties file at " + source); } } } return merged; }</code><technical_language>I instead of loadOK boolean instead IOException retained void logging it. if block checks loadOk fails log exception this time avoid logging exception in Eclipse IDE</technical_language>

Target:
private List<CodeGen.Converter> loadJsonMappers() { Exception exception = null; List<CodeGen.Converter> merged = new ArrayList<>(); for (StandardLocation loc : StandardLocation.values()) { try { FileObject file = processingEnv.getFiler().getResource(loc, "", JSON_MAPPERS_PROPERTIES_PATH); try(InputStream is = file.openInputStream()) { try { loadJsonMappers(merged, is); exception = null; } catch (IOException e) { exception = e; } } } catch (Exception ignore) { exception = ignore; } } if (exception != null) { try { Enumeration<URL> resources = getClass().getClassLoader().getResources(JSON_MAPPERS_PROPERTIES_PATH); while (resources.hasMoreElements()) { URL url = resources.nextElement(); try (InputStream is = url.openStream()) { loadJsonMappers(merged, is); exception = null; processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Loaded json-mappers.properties " + url); } } } catch (IOException e) { exception = e; } } if (exception != null) { Path source = fetchSourcePath().getParent().getParent().resolve("src/main/resources").resolve(JSON_MAPPERS_PROPERTIES_PATH); if (source.toFile().exists()) { try (InputStream is = source.toUri().toURL().openStream()) { loadJsonMappers(merged, is); processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Loaded json-mappers.properties from '" + source + "'"); } catch (IOException e) { log.log(Level.SEVERE, "Could not load json-mappers.properties", e); processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, "Unable to open properties file at " + source); } } } return merged; }