Skip to content

Commit

Permalink
[addoninfp] adopt reviewer suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Fiddian-Green <[email protected]>
  • Loading branch information
andrewfg committed Nov 23, 2023
1 parent b786ac8 commit 16845c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ private void initialize() {
Stream.of(new File(folder).listFiles()).filter(f -> f.isFile() && f.getName().endsWith(".xml")).forEach(f -> {
try {
String xml = Files.readString(f.toPath());
if (!xml.isBlank()) {
if (xml != null && !xml.isBlank()) {
addonInfos.addAll(reader.readFromXML(xml).getAddons().stream().collect(Collectors.toSet()));
} else {
logger.warn("File '{}' is empty", f.getName());
logger.warn("File '{}' contents are null or empty", f.getName());
}
} catch (IOException e) {
logger.warn("File '{}' could not be read", f.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ protected void configureSecurity(XStream xstream) {
/**
* Reads the XML document containing a specific XML tag from the specified xml string and converts it to the
* according object.
* <p>
* This method returns {@code null} if the given URL is {@code null}.
*
* @param xml a string containing the XML document to be read.
* @return the conversion result object (could be null).
Expand Down

0 comments on commit 16845c5

Please sign in to comment.