Norconex / jef

Job Execution Framework.
Apache License 2.0
4 stars 5 forks source link

Properties were not read from Files #15

Closed kemcon closed 3 years ago

kemcon commented 3 years ago

Hi,

a found two bugs in the following for loop:

https://github.com/Norconex/jef/blob/854064154be865b037505986220a5ba2952fd9f9/norconex-jef/src/main/java/com/norconex/jef4/status/FileJobStatusStore.java#L244

its wrong here too, i think: https://github.com/Norconex/jef/blob/91fb6acd2c8e59f8a9ffeeed160969b2d6445bbc/src/main/java/com/norconex/jef5/status/JobSuiteStatusDAO.java#L241

  1. StringUtils.removeStart("prop.", key) is used in the wrong direction, "prop." must be the second element
  2. the empty props is used with props.put(key, props.get(key)) so its always null, please use config.get(key)

thanks

essiembre commented 3 years ago

Thanks for the pull request! I have also added unit tests for it and I have applied the same fix to v5. A new snapshot release was made.