From 00b1d2087d0d62338e94b5b9f350be9a28368c7b Mon Sep 17 00:00:00 2001 From: Romain Deltour Date: Wed, 5 Jul 2023 17:10:29 +0200 Subject: [PATCH] fix: remove undefined `isHTML5` field from the JSON report See #1515 --- .../java/com/adobe/epubcheck/reporting/ItemMetadata.java | 7 ------- .../com/adobe/epubcheck/reporting/PublicationMetadata.java | 7 ------- src/main/java/com/adobe/epubcheck/util/FeatureEnum.java | 2 -- 3 files changed, 16 deletions(-) diff --git a/src/main/java/com/adobe/epubcheck/reporting/ItemMetadata.java b/src/main/java/com/adobe/epubcheck/reporting/ItemMetadata.java index 4bd44fc9a..ec06d6413 100644 --- a/src/main/java/com/adobe/epubcheck/reporting/ItemMetadata.java +++ b/src/main/java/com/adobe/epubcheck/reporting/ItemMetadata.java @@ -8,7 +8,6 @@ import com.adobe.epubcheck.util.FeatureEnum; -@SuppressWarnings("FieldCanBeLocal") public class ItemMetadata implements Comparable { @JsonProperty @@ -34,8 +33,6 @@ public class ItemMetadata implements Comparable @JsonProperty private Integer navigationOrder = null; @JsonProperty - private boolean isHTML5; - @JsonProperty private Boolean isFixedFormat = null; @JsonProperty private boolean isScripted; @@ -51,7 +48,6 @@ public class ItemMetadata implements Comparable private String renditionOrientation; @JsonProperty private String renditionSpread; - @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") @JsonProperty private final SortedSet referencedItems = new TreeSet(); @@ -171,9 +167,6 @@ public void handleInfo(FeatureEnum feature, String value) case SPINE_INDEX: this.spineIndex = Integer.parseInt(value.trim()); break; - case HAS_HTML5: - this.isHTML5 = true; - break; case SCRIPT: if (value.equals("inline")) { diff --git a/src/main/java/com/adobe/epubcheck/reporting/PublicationMetadata.java b/src/main/java/com/adobe/epubcheck/reporting/PublicationMetadata.java index bfdee6279..474834c45 100644 --- a/src/main/java/com/adobe/epubcheck/reporting/PublicationMetadata.java +++ b/src/main/java/com/adobe/epubcheck/reporting/PublicationMetadata.java @@ -11,7 +11,6 @@ /** * This is information about the publication in general. It is intended to be serialized into json. */ -@SuppressWarnings({"FieldCanBeLocal", "MismatchedQueryAndUpdateOfCollection"}) class PublicationMetadata { @JsonProperty @@ -131,12 +130,6 @@ public void handleInfo(String resource, FeatureEnum feature, String value) this.hasFixedFormat = true; this.isBackwardCompatible = false; break; - case HAS_HTML5: - if (resource == null) - { - this.isBackwardCompatible = false; - } - break; case IS_SPINEITEM: this.nSpines++; break; diff --git a/src/main/java/com/adobe/epubcheck/util/FeatureEnum.java b/src/main/java/com/adobe/epubcheck/util/FeatureEnum.java index c0f1ce7d2..7aeee3ee6 100644 --- a/src/main/java/com/adobe/epubcheck/util/FeatureEnum.java +++ b/src/main/java/com/adobe/epubcheck/util/FeatureEnum.java @@ -49,8 +49,6 @@ public enum FeatureEnum FORMAT_VERSION("format version"), HAS_ENCRYPTION("hasEncryption"), HAS_FIXED_LAYOUT("hasFixedLayout"), - HAS_HTML4("html 4"), - HAS_HTML5("html 5"), HAS_MICRODATA("microdata"), HAS_NCX("Has ncx file"), HAS_RDFA("RDFa"),