diff --git a/rome-modules/src/main/java/com/rometools/modules/itunes/io/ITunesGenerator.java b/rome-modules/src/main/java/com/rometools/modules/itunes/io/ITunesGenerator.java index 23a8335c7..6f8d79881 100644 --- a/rome-modules/src/main/java/com/rometools/modules/itunes/io/ITunesGenerator.java +++ b/rome-modules/src/main/java/com/rometools/modules/itunes/io/ITunesGenerator.java @@ -90,7 +90,7 @@ public void generate(final Module module, final Element element) { } if (info.getComplete()) { - element.addContent(generateSimpleElement("complete", "yes")); + element.addContent(generateSimpleElement("complete", "Yes")); } if (info.getNewFeedUrl() != null) { @@ -104,7 +104,7 @@ public void generate(final Module module, final Element element) { element.addContent(generateSimpleElement("duration", info.getDuration().toString())); } if (info.getClosedCaptioned()) { - element.addContent(generateSimpleElement("isClosedCaptioned", "yes")); + element.addContent(generateSimpleElement("isClosedCaptioned", "Yes")); } if (info.getOrder() != null) { element.addContent(generateSimpleElement("order", info.getOrder().toString())); @@ -133,9 +133,9 @@ public void generate(final Module module, final Element element) { if (itunes.getExplicitNullable() != null) { if (itunes.getExplicitNullable()) { - element.addContent(generateSimpleElement("explicit", "yes")); + element.addContent(generateSimpleElement("explicit", "true")); } else { - element.addContent(generateSimpleElement("explicit", "no")); + element.addContent(generateSimpleElement("explicit", "false")); } } diff --git a/rome-modules/src/main/java/com/rometools/modules/itunes/io/ITunesParser.java b/rome-modules/src/main/java/com/rometools/modules/itunes/io/ITunesParser.java index 9b75f5d39..bf861d198 100644 --- a/rome-modules/src/main/java/com/rometools/modules/itunes/io/ITunesParser.java +++ b/rome-modules/src/main/java/com/rometools/modules/itunes/io/ITunesParser.java @@ -108,7 +108,7 @@ public com.rometools.rome.feed.module.Module parse(final Element element, final final Element complete = element.getChild("complete", ns); if (complete != null) { - feedInfo.setComplete("yes".equals(complete.getTextTrim().toLowerCase())); + feedInfo.setComplete("yes".equalsIgnoreCase(complete.getTextTrim())); } final Element newFeedUrl = element.getChild("new-feed-url", ns); @@ -140,7 +140,7 @@ public com.rometools.rome.feed.module.Module parse(final Element element, final final Element closedCaptioned = element.getChild("isClosedCaptioned", ns); - if (closedCaptioned != null && closedCaptioned.getValue() != null && closedCaptioned.getValue().trim().equalsIgnoreCase("yes")) { + if (closedCaptioned != null && closedCaptioned.getValue() != null && "yes".equalsIgnoreCase(closedCaptioned.getValue().trim())) { entryInfo.setClosedCaptioned(true); } @@ -199,7 +199,7 @@ public com.rometools.rome.feed.module.Module parse(final Element element, final // Ignore case of the value, assuming that any kind of "yes" clearly shows the intent. if (block != null && block.getValue() != null - && block.getValue().trim().equalsIgnoreCase("Yes")) { + && "yes".equalsIgnoreCase(block.getValue().trim())) { module.setBlock(true); }