We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d3b9d3 commit b15325eCopy full SHA for b15325e
text-processing-libraries-modules/pdf-2/src/test/java/com/baeldung/detect/PdfDetectTest.java
@@ -49,7 +49,7 @@ void whenDetectPdfByFileSignature_thenCorrect() throws IOException {
49
boolean isPdf = false;
50
try (InputStream fis = new BufferedInputStream(new FileInputStream(PDF_FILE))) {
51
byte[] bytes = new byte[5];
52
- if (fis.read(bytes) >= 5) {
+ if (fis.read(bytes) == 5) {
53
String header = new String(bytes);
54
isPdf = Objects.equals(header, "%PDF-");
55
}
0 commit comments