From a704f0258aea2a5582078e2a2d3acbe20ed5405d Mon Sep 17 00:00:00 2001 From: Sam Alloing Date: Wed, 15 Nov 2023 16:45:22 +0100 Subject: [PATCH 1/8] making the parsing of broken PDFs more robust An extra test to see if a token is numeric before using the value. --- .../java/edu/harvard/hul/ois/jhove/module/PdfModule.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java b/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java index 4fe9475e9..34d563296 100644 --- a/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java +++ b/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java @@ -1531,7 +1531,10 @@ protected boolean readXRefTables(RepInfo info) throws IOException { // (Most likely we've hit the keyword "trailer". break; } - _objCount = ((Numeric) _parser.getNext()).getIntegerValue(); + token = _parser.getNext(); + if (token instanceof Numeric) { + _objCount = ((Numeric) token).getIntegerValue(); + } if (_xref == null) { _xref = new long[_objCount]; } From fb9e5686388ef3d73f693cbd898dd1983d56ac0b Mon Sep 17 00:00:00 2001 From: Robert Stephan Date: Fri, 19 Jan 2024 20:09:23 +0100 Subject: [PATCH 2/8] =?UTF-8?q?update=20ErrorMessages=20f=C3=BCr=20ASCII,?= =?UTF-8?q?=20JPEG=20and=20XML=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ascii/ErrorMessages_de.properties | 2 +- .../module/jpeg/ErrorMessages_de.properties | 17 +++++++++++ .../module/jpeg/ErrorMessages_en.properties | 6 ++-- .../module/xml/ErrorMessages_de.properties | 30 +++++++++---------- 4 files changed, 35 insertions(+), 20 deletions(-) create mode 100644 jhove-modules/jpeg-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/jpeg/ErrorMessages_de.properties diff --git a/jhove-modules/ascii-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/ascii/ErrorMessages_de.properties b/jhove-modules/ascii-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/ascii/ErrorMessages_de.properties index ffecfa8f4..14b9f925d 100644 --- a/jhove-modules/ascii-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/ascii/ErrorMessages_de.properties +++ b/jhove-modules/ascii-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/ascii/ErrorMessages_de.properties @@ -1,4 +1,4 @@ ASCII-HUL-1 = Ungültiges Zeichen ASCII-HUL-1-SUB = "Zeichen = %c (0x%2X)"; ASCII-HUL-2 = Leere Datei -ASCII-HUL-3 = Nicht druckbare Zeichen \ No newline at end of file +ASCII-HUL-3 = Nicht druckbare Zeichen diff --git a/jhove-modules/jpeg-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/jpeg/ErrorMessages_de.properties b/jhove-modules/jpeg-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/jpeg/ErrorMessages_de.properties new file mode 100644 index 000000000..0f555624c --- /dev/null +++ b/jhove-modules/jpeg-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/jpeg/ErrorMessages_de.properties @@ -0,0 +1,17 @@ +JPEG-HUL-1 = DDT Segment ohne vorhergehendes DTI +JPEG-HUL-2 = Unerwartetes Dateiende +JPEG-HUL-3 = I/O Ausnahme bei der Bearbeitung von Exif Metadaten: +JPEG-HUL-4 = Ungültiger JPEG Header +JPEG-HUL-5 = JFIF APP0 Marker nicht am Anfang der Datei +JPEG-HUL-6 = Marker nicht valide in diesem Kontext +JPEG-HUL-7 = Erwartetes Marker-Byte 255 +JPEG-HUL-7-SUB = Lese Marker-Byte Wert %d +JPEG-HUL-8 = SPIFF Marker nicht am Anfang der Datei +JPEG-HUL-9 = Datei beginnt nicht mit SPIFF, Exif oder JFIF Segment +JPEG-HUL-10 = Nichterkannte Kacheldaten +JPEG-HUL-11 = Nicht zulässiges ICCProfil in APP2 Segment; Meldung +JPEG-HUL-12 = Adobe Marker Segment, unzulässiger transformFlag Wert %d +JPEG-HUL-13 = Unbekannter Farbraum mit Komponentenanzahl: %d +JPEG-HUL-14 = TIFF-HUL module benötigt, um Exif-Daten auszuwerten + +JHOVE-SYS-1 = Fehler beim Erstellen einer temporären Datei. Kontrolliere die Konfiguration: diff --git a/jhove-modules/jpeg-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/jpeg/ErrorMessages_en.properties b/jhove-modules/jpeg-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/jpeg/ErrorMessages_en.properties index 6b21246b0..ee673ddf3 100644 --- a/jhove-modules/jpeg-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/jpeg/ErrorMessages_en.properties +++ b/jhove-modules/jpeg-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/jpeg/ErrorMessages_en.properties @@ -10,8 +10,8 @@ JPEG-HUL-8 = SPIFF marker not at beginning of file JPEG-HUL-9 = File does not begin with SPIFF, Exif or JFIF segment JPEG-HUL-10 = Unrecognized tiling data JPEG-HUL-11 = Invalid ICCProfile in APP2 segment; message -JPEG-HUL-12=Adobe marker segment, bad transformFlag value %d -JPEG-HUL-13=Unknown colorspace with number of components of %d +JPEG-HUL-12 = Adobe marker segment, bad transformFlag value %d +JPEG-HUL-13 = Unknown colorspace with number of components of %d JPEG-HUL-14 = TIFF-HUL module required to report Exif data -JHOVE-1 = Error creating temporary file. Check your configuration: +JHOVE-SYS-1 = Error creating temporary file. Check your configuration: diff --git a/jhove-modules/xml-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/xml/ErrorMessages_de.properties b/jhove-modules/xml-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/xml/ErrorMessages_de.properties index 7da08ad74..bf222c7d2 100644 --- a/jhove-modules/xml-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/xml/ErrorMessages_de.properties +++ b/jhove-modules/xml-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/xml/ErrorMessages_de.properties @@ -1,16 +1,14 @@ -JPEG-HUL-1 = DDT Segment ohne vorhergehendes DTI -JPEG-HUL-2 = Unerwartetes Dateiende -JPEG-HUL-3 = I/O Ausnahme bei der Bearbeitung von Exif metada: -JPEG-HUL-4 = Invalider JPEG Header -JPEG-HUL-5 = JFIF APP0 Marker nicht am Anfang der Datei -JPEG-HUL-6 = Marker nicht valide in diesem Kontext -JPEG-HUL-7 = Erwartetes Marker-Byte 255 -JPEG-HUL-7-SUB = Lese Marker-Byte Wert %d -JPEG-HUL-8 = SPIFF Marker nicht am Anfang der Datei -JPEG-HUL-9 = Datei beginnt nicht mit SPIFF, Exif oder JFIF Segment -JPEG-HUL-10 = Nichterkannte Kacheldaten -JPEG-HUL-11 = Nicht zulässiges ICCProfil in APP2 Segment; Meldung -JPEG-HUL-12=Adobe Marker Segment, unzulässiger transformFlag Wert %d -JPEG-HUL-13=Unbekannter Farbraum mit Komponentenanzahl: %d - -JHOVE-1 = Fehler bei erstellen einer temporären Datei. Kontrolliere die Konfiguration: +XML-HUL-1 = SAXParseException +XML-HUL-1-SUB = {0} Zeile = {1,number,integer}, Spalte = {2,number,integer}. +XML-HUL-2 = Maximalanzahl {0,number,integer} für Fehlermeldungen erreicht. Weitere Fehler werden nicht mehr angezeigt. +XML-HUL-3 = SAXException: {0} +XML-HUL-4 = Typ des Zeilenendes konnte nicht erkannt werden. +XML-HUL-5 = LexicalHandler-Interface wird durch die XML-Implementierung nicht unterstützt. Dadurch werden eventuell einige Eigenschaften nicht angezeigt. +XML-HUL-6 = DeclHandler-Interface wird durch die XML-Implementierung nicht unterstützt. Dadurch werden eventuell einige Eigenschaften nicht angezeigt. +XML-HUL-7 = Dieser SAX-Parser unterstützt keine XML-Namespaces. +XML-HUL-8 = Dieser SAX-Parser unterstützt keine Validierung. +XML-HUL-9 = Die XML-Implementierung unterstützt keine Identifizierung des XML-Schemas. Dadurch können Dokumente mit XML-Schema als ungültig dargestellt werden. +XML-HUL-10 = Datei nicht gefunden. +XML-HUL-11 = Ungültige Zeichenkodierung. +XML-HUL-12 = Grund für SAXException: {0} +XML-HUL-13 = Kein Grund für SAXException gemeldet. From ce9ea8308b87329977165b1eecd9fbe2c026e635 Mon Sep 17 00:00:00 2001 From: Robert Stephan Date: Tue, 23 Jan 2024 13:07:50 +0100 Subject: [PATCH 3/8] TIFF-HUL: German error messages --- .../module/tiff/ErrorMessages_de.properties | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 jhove-modules/tiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/tiff/ErrorMessages_de.properties diff --git a/jhove-modules/tiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/tiff/ErrorMessages_de.properties b/jhove-modules/tiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/tiff/ErrorMessages_de.properties new file mode 100644 index 000000000..425078264 --- /dev/null +++ b/jhove-modules/tiff-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/tiff/ErrorMessages_de.properties @@ -0,0 +1,76 @@ +# Error messages +TIFF-HUL-1 = Vorzeitiges Dateiende (EOF) +TIFF-HUL-2 = Tag {0,number,#} ist nicht an der richtigen Position +TIFF-HUL-3 = Unbekannter Datentyp +TIFF-HUL-3-SUB = Typ = {0,number,#}, Tag = {1,number,#} +TIFF-HUL-4 = Offset des Wertes beginnt nicht an einer Word-Grenze: {0,number,#} +TIFF-HUL-5 = Lesefehler +TIFF-HUL-6 = Abweichende Anzahl f�r Tag {0,number,#}; erwartet {1,number,#}, gefunden {2,number,#} +TIFF-HUL-7 = Abweichender Typ f�r Tag {0,number,#}; erwartet {1,number,#}, gefunden {2,number,#} +TIFF-HUL-8 = Abweichender Typ f�r Tag {0,number,#}; erwartet {1,number,#} oder {2,number,#}, gefunden {3,number,#} +TIFF-HUL-9 = Ung�ltiges GeoKeyDirectory Tag +TIFF-HUL-10 = GeoKey {0,number,#} nicht an der richtigen Position +TIFF-HUL-11 = Undokumentiertes TIFF Tag +TIFF-HUL-11-SUB = ShadowScale (50739) +TIFF-HUL-12 = Unbekanntes TIFF IFD Tag: {0,number,#} +TIFF-HUL-13 = Lesefehler f�r Tag {0,number,#} +TIFF-HUL-14 = Ung�ltige oder nicht-wohlgeformte XMP Metadaten +TIFF-HUL-15 = Unbekanntes Exif Interoperability IFD Tag +TIFF-HUL-15-SUB = Tag = {0,number,#}; +TIFF-HUL-16 = Lesefehler f�r Tag {0,number,#} +TIFF-HUL-17 = Unbekanntes GPSInfo IFD Tag +TIFF-HUL-17-SUB = Tag = {0,number,#}; +TIFF-HUL-18 = Lesefehler f�r Tag {0,number,#} +TIFF-HUL-19 = Lesefehler f�r Tag {0,number,#} +TIFF-HUL-20 = Kein TIFF Header: {0}{1} +TIFF-HUL-21 = Keine TIFF Magic Number: {0,number,#} +TIFF-HUL-22 = Kein TIFF Header: {0}{1} +TIFF-HUL-23 = Keine TIFF Magic Number: {0,number,#} +TIFF-HUL-24 = Streifen (strips) und Kacheln (tiles) wurden gemeinsam definiert +TIFF-HUL-25 = Weder Streifen (strips) noch Kacheln (tiles) wurden definiert +TIFF-HUL-26 = StripOffsets nicht definiert +TIFF-HUL-27 = StripByteCounts nicht definiert +TIFF-HUL-28 = StripOffsets inkonsistent zu StripByteCounts: {0,number,#} != {1,number,#} +TIFF-HUL-29 = Ung�ltiger Strip Offset +TIFF-HUL-30 = TileWidth nicht definiert +TIFF-HUL-31 = TileLength nicht definiert +TIFF-HUL-32 = TileOffsets nicht definiert +TIFF-HUL-33 = TileByteCounts nicht definiert +TIFF-HUL-34 = TileWidth nicht durch 16 teilbar: {0,number,#} +TIFF-HUL-35 = TileLength nicht durch 16 teilbar: {0,number,#} +TIFF-HUL-36 = Unzureichende Werte f�r TileOffsets: {0,number,#} < {1,number,#} +TIFF-HUL-37 = Unzureichende Werte f�r TileByteCounts: {0,number,#} < {1,number,#} +TIFF-HUL-38 = Unzureichende Werte f�r TileOffsets: {0,number,#} < {1,number,#} +TIFF-HUL-39 = Unzureichende Werte f�r TileByteCounts: {0,number,#} < {1,number,#} +TIFF-HUL-40 = PhotometricInterpretation und NewSubfileType m�ssen die gleiche Transparency Mask verwenden +TIFF-HUL-41 = F�r die Transparency Mask gilt: BitsPerSample muss gleich 1 sein +TIFF-HUL-42 = F�r PhotometricInterpretation gilt: SamplesPerPixel muss >= 1 sein, entspricht: {0,number,#} +TIFF-HUL-43 = For PhotometricInterpretation gilt: SamplesPerPixel muss >= 3, sein, entspricht: {0,number,#} +TIFF-HUL-44 = ColorMap ist nicht f�r Farbe einer Farbpalette definiert +TIFF-HUL-45 = F�r Farbe einer Farbpalette gilt: SamplesPerPixel muss gleich 1 sein: {0,number,#} +TIFF-HUL-46 = Unzureichende ColorMap Werte f�r Farbe einer Farbpalette: {0,number,#} < {1,number,#} +TIFF-HUL-47 = CellLength Tag nicht erlaubt, wenn Threshholding nicht 2 ist +TIFF-HUL-48 = DotRange �berschreitet Wertebereich, definiert in BitsPerSample +TIFF-HUL-49 = JPEGProc nicht definiert f�r JPEG Komprimierung +TIFF-HUL-50 = SamplesPerPixel-ExtraSamples entsprechen nicht 1 oder 3:{0,number,#}-{1,number,#} +TIFF-HUL-51 = BitsPerSample entsprechen nicht 8 oder 16 f�r CIE L*a*b* +TIFF-HUL-52 = XClipPathUnits sind nicht definiert f�r ClipPath +TIFF-HUL-53 = Ung�ltige L�nge f�r DateTime: {0} +TIFF-HUL-54 = Ung�tliger Trenner f�r DateTime: {0} +TIFF-HUL-55 = Ung�ltige Ziffer f�r DateTime: {0} +TIFF-HUL-56 = Ung�ltige Ziffer f�r DateTime: {0} +TIFF-HUL-57 = Vorzeitiges Dateiende (EOF) +TIFF-HUL-58 = Kein IFD in Datei +TIFF-HUL-59 = Offset von IFD beginnt nicht an einer Word-Grenze: {0,number,#} +TIFF-HUL-60 = Mehr als 50 IFDs zu verarbeiten, wahrscheinlich in einer Endlos-Schleife +TIFF-HUL-61 = TIFF Komprimierungsschema 6 ist veraltet +TIFF-HUL-62 = ImageWidth ist nicht definiert +TIFF-HUL-63 = PhotometricInterpretation ist nicht definiert +TIFF-HUL-64 = ImageLength ist nicht definiert +TIFF-HUL-65 = Undokumentiertes TIFF Tag +TIFF-HUL-66 = {0} Wert au�erhalb des Wertebereiches: {1,number,#} +TIFF-HUL-67 = Datei ist zu kurz +TIFF-HUL-68 = Unerwarteter Fehler: {0} +TIFF-HUL-69 = Unerwarteter Fehler: {0} +TIFF-HUL-70 = Eingebetteter Exif Block ist zu kurz +TIFF-HUL-71 = Ung�ltiges ICCProfile in Tag {0,number,#}; Nachricht: {1} From f7c6e9155b0c75e3c6a26911f6bf754aebff7c53 Mon Sep 17 00:00:00 2001 From: Sam Alloing Date: Fri, 2 Feb 2024 16:18:16 +0100 Subject: [PATCH 4/8] Error when Image Height and Width is null --- .../edu/harvard/hul/ois/jhove/module/PdfModule.java | 13 ++++++++++--- .../ois/jhove/module/pdf/ErrorMessages.properties | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java b/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java index 4fe9475e9..be16a7688 100644 --- a/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java +++ b/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/PdfModule.java @@ -2367,13 +2367,20 @@ protected void findImages(RepInfo info) throws IOException { .get(DICT_KEY_WIDTH); PdfSimpleObject widObj = (PdfSimpleObject) resolveIndirectObject( widthBase); - niso.setImageWidth(widObj.getIntValue()); PdfObject heightBase = xobdict .get(DICT_KEY_HEIGHT); PdfSimpleObject htObj = (PdfSimpleObject) resolveIndirectObject( heightBase); - niso.setImageLength(htObj.getIntValue()); - + if(widObj != null || htObj != null ) { + niso.setImageWidth(widObj.getIntValue()); + niso.setImageLength(htObj.getIntValue()); + } else { + info.setWellFormed(false); + JhoveMessage message = JhoveMessages.getMessageInstance( + MessageConstants.PDF_HUL_159.getId(), + MessageConstants.PDF_HUL_159.getMessage()); + info.setMessage(new ErrorMessage(message)); // PDF-HUL-159 + } // Check for filters to add to the filter // list Filter[] filters = ((PdfStream) xob) diff --git a/jhove-modules/pdf-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/pdf/ErrorMessages.properties b/jhove-modules/pdf-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/pdf/ErrorMessages.properties index 9858a72fd..71544d09d 100644 --- a/jhove-modules/pdf-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/pdf/ErrorMessages.properties +++ b/jhove-modules/pdf-hul/src/main/resources/edu/harvard/hul/ois/jhove/module/pdf/ErrorMessages.properties @@ -160,3 +160,4 @@ PDF-HUL-155 = Error parsing mandatory version number from PDF header. PDF-HUL-156 = Extension can't be defined as an indirect reference PDF-HUL-157 = Unexpected exception {0} PDF-HUL-158 = Unexpected exception {0} +PDF-HUL-159 = Image height and width are manditory properties \ No newline at end of file From 9e9b4479f09c1c6bd4ac9945eeb7fe892ccf30c1 Mon Sep 17 00:00:00 2001 From: Sam Alloing Date: Fri, 2 Feb 2024 17:29:11 +0100 Subject: [PATCH 5/8] Forgot to update MessageConstants --- .../edu/harvard/hul/ois/jhove/module/pdf/MessageConstants.java | 1 + 1 file changed, 1 insertion(+) diff --git a/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/pdf/MessageConstants.java b/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/pdf/MessageConstants.java index 91ed35d40..e8cea88e4 100644 --- a/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/pdf/MessageConstants.java +++ b/jhove-modules/pdf-hul/src/main/java/edu/harvard/hul/ois/jhove/module/pdf/MessageConstants.java @@ -197,6 +197,7 @@ public enum MessageConstants { public static final JhoveMessage PDF_HUL_156 = messageFactory.getMessage("PDF-HUL-156"); public static final JhoveMessage PDF_HUL_157 = messageFactory.getMessage("PDF-HUL-157"); public static final JhoveMessage PDF_HUL_158 = messageFactory.getMessage("PDF-HUL-158"); + public static final JhoveMessage PDF_HUL_159 = messageFactory.getMessage("PDF-HUL-159"); /** * Logger Messages From 58a19b1f54719d302c345c2db26d52e59739f458 Mon Sep 17 00:00:00 2001 From: Sam Alloing Date: Fri, 16 Feb 2024 09:14:43 +0100 Subject: [PATCH 6/8] Change in GUI MIX field name from mimetype to format name The GUI shows Mimetype for MIX image data, according to the specifications this should be Format Name. The export in txt and XML show the correct field, but the GUI of jHove showed the wrong field name. This pull request fixes https://github.com/openpreserve/jhove/issues/896 --- .../main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java b/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java index 280798df0..d5be94124 100644 --- a/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java +++ b/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java @@ -889,7 +889,7 @@ private DefaultMutableTreeNode nisoToNode(NisoImageMetadata niso) { "NisoImageMetadata", true); String s = niso.getMimeType(); if (s != null) { - val.add(new DefaultMutableTreeNode("MIMEType: " + s, false)); + val.add(new DefaultMutableTreeNode("FormatName: " + s, false)); } s = niso.getByteOrder(); if (s != null) { From 4021afde4b571d8805c2a944813ba61e2382842a Mon Sep 17 00:00:00 2001 From: Sam Alloing Date: Fri, 16 Feb 2024 15:02:17 +0100 Subject: [PATCH 7/8] add BitPerSampleUnit to the GUI The BitsPerSampleUnit is missing in the GUI. It is hard-coded as Integer, because this is how it is also done in the other handlers. According to the specification of MIX, it can also be float. but this is not supported by jhove --- .../java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java b/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java index 280798df0..3fa3d8af6 100644 --- a/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java +++ b/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java @@ -1274,6 +1274,10 @@ private DefaultMutableTreeNode nisoToNode(NisoImageMetadata niso) { for (int i = 0; i < iarray.length; i++) { nod.add(new DefaultMutableTreeNode(Integer.toString(iarray[i]), false)); + //BitsPerSampleUnit Integer is assumed, because of BitsPerSample + // According to the specification, it can also be float. + // This is currently not supported by jHove + nod.add(new DefaultMutableTreeNode("Integer")); } } if ((n = niso.getSamplesPerPixel()) != NisoImageMetadata.NULL) { From 39630bac8a001f4006021f5091438be9ba623c1b Mon Sep 17 00:00:00 2001 From: Carl Wilson Date: Mon, 4 Mar 2024 10:57:48 +0000 Subject: [PATCH 8/8] MAINT: Upgrade Maven build - removed some redundant plugin declarations; and - bumped versions of various dependencies: - Izpack -> 5.2; - maven-clean-plugin -> 3.3.2; - maven-compiler-plugin -> 3.12.1; - maven-dependency-plugin -> 3.6.1; - maven-site-plugin -> 4.0.0-M13; - maven-javadoc-plugin -> 3.6.3; - maven-surefire-plugin -> 3.2.5; - maven-jacoco-plugin -> 0.8.11; - jaxb -> 1.4; - junit -> 5.10.2 via vintage engine. --- jhove-apps/pom.xml | 5 ---- jhove-bbt/scripts/bbt-jhove.sh | 2 +- jhove-core/pom.xml | 10 +++++-- jhove-ext-modules/pom.xml | 4 +-- jhove-installer/pom.xml | 2 +- jhove-modules/pom.xml | 4 +-- pom.xml | 50 ++++++++++++++++++---------------- 7 files changed, 39 insertions(+), 38 deletions(-) diff --git a/jhove-apps/pom.xml b/jhove-apps/pom.xml index f473d897e..1ef75da71 100644 --- a/jhove-apps/pom.xml +++ b/jhove-apps/pom.xml @@ -60,11 +60,6 @@ jhove-core ${project.version} - - - junit - junit - diff --git a/jhove-bbt/scripts/bbt-jhove.sh b/jhove-bbt/scripts/bbt-jhove.sh index e90847ae8..83b9d9b12 100755 --- a/jhove-bbt/scripts/bbt-jhove.sh +++ b/jhove-bbt/scripts/bbt-jhove.sh @@ -127,7 +127,7 @@ showHelp() { checkParams "$@" candidate="${paramOutputLoc:?}/${MAJOR_MINOR_VER}" tempInstallLoc="/tmp/to-test" -sed -i 's/^java.*/java -javaagent:${HOME}\/\.m2\/repository\/org\/jacoco\/org\.jacoco\.agent\/0.8.10\/org\.jacoco.agent-0\.8\.10-runtime\.jar=destfile=jhove-apps\/target\/jacoco\.exec -Xss2048k -classpath "$CP" edu.harvard.hul.ois.jhove.Jhove -c "${CONFIG}" "${@}"/g' "${tempInstallLoc}/jhove" +sed -i 's/^java.*/java -javaagent:${HOME}\/\.m2\/repository\/org\/jacoco\/org\.jacoco\.agent\/0.8.11\/org\.jacoco.agent-0\.8\.11-runtime\.jar=destfile=jhove-apps\/target\/jacoco\.exec -Xss2048k -classpath "$CP" edu.harvard.hul.ois.jhove.Jhove -c "${CONFIG}" "${@}"/g' "${tempInstallLoc}/jhove" bash "$SCRIPT_DIR/baseline-jhove.sh" -j "${tempInstallLoc}" -c "${paramCorpusLoc}" -o "${candidate}" if [[ -f "${SCRIPT_DIR}/create-${MAJOR_MINOR_VER}-target.sh" ]] diff --git a/jhove-core/pom.xml b/jhove-core/pom.xml index 7d804ace5..a47b55767 100644 --- a/jhove-core/pom.xml +++ b/jhove-core/pom.xml @@ -35,13 +35,17 @@ 1.1.3 - junit - junit + org.junit.jupiter + junit-jupiter-engine + + + org.junit.vintage + junit-vintage-engine nl.jqno.equalsverifier equalsverifier - 3.14 + 3.15.8 test diff --git a/jhove-ext-modules/pom.xml b/jhove-ext-modules/pom.xml index ad1923f8c..af3c83052 100644 --- a/jhove-ext-modules/pom.xml +++ b/jhove-ext-modules/pom.xml @@ -58,8 +58,8 @@ ${project.version} - junit - junit + org.junit.vintage + junit-vintage-engine diff --git a/jhove-installer/pom.xml b/jhove-installer/pom.xml index 19129ffe7..96ce9bf64 100644 --- a/jhove-installer/pom.xml +++ b/jhove-installer/pom.xml @@ -14,7 +14,7 @@ jhove-xplt-installer-${project.version}.jar - 5.1.3 + 5.2.0 ${project.build.directory}/staging ${project.build.directory} ${project.build.scriptSourceDirectory} diff --git a/jhove-modules/pom.xml b/jhove-modules/pom.xml index 17b65bb02..f941986b6 100644 --- a/jhove-modules/pom.xml +++ b/jhove-modules/pom.xml @@ -21,8 +21,8 @@ 1.29.0-SNAPSHOT - junit - junit + org.junit.vintage + junit-vintage-engine javax.xml.bind diff --git a/pom.xml b/pom.xml index f18aa3994..87c508146 100644 --- a/pom.xml +++ b/pom.xml @@ -68,28 +68,27 @@ UTF-8 UTF-8 - 3.1.0 3.6.0 - 3.2.0 - 3.11.0 - 3.6.0 + 3.3.2 + 3.12.1 + 3.6.1 3.1.1 3.1.1 3.3.1 - 4.0.0-M8 + 4.0.0-M13 3.1.0 3.3.0 - 3.5.0 + 3.6.3 3.3.0 - 3.1.2 + 3.2.5 3.0.1 - 0.8.10 + 0.8.11 1.8 1.8 2.4.0-b180830.0359 - 4.0.3 - 4.0.3 - 4.13.2 + 4.0.4 + 4.0.4 + 5.10.2 8 ${maven.build.timestamp} yyyy-MM-dd HH:mm:ss @@ -98,11 +97,6 @@ - - org.apache.maven.plugins - maven-antrun-plugin - ${mvn.antrun.version} - org.apache.maven.plugins maven-assembly-plugin @@ -224,9 +218,16 @@ + + + org.junit.jupiter + junit-jupiter-engine + ${junit.version} + test + - junit - junit + org.junit.vintage + junit-vintage-engine ${junit.version} test @@ -302,12 +303,13 @@ - - org.codehaus.sonar-plugins.java - sonar-jacoco-listeners - 1.2 - test - + + + org.sonarsource.java + sonar-jacoco-listeners + 5.14.0.18788 + test +