Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes committed Jan 22, 2024
1 parent 0474bb4 commit ea927bd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Source/com/drew/metadata/bmp/BmpReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.drew.lang.Charsets;
import com.drew.lang.SequentialReader;
import com.drew.lang.annotations.NotNull;
import com.drew.metadata.Directory;
import com.drew.metadata.ErrorDirectory;
import com.drew.metadata.Metadata;
import com.drew.metadata.MetadataException;
Expand Down Expand Up @@ -121,7 +120,7 @@ protected void readFileHeader(@NotNull final SequentialReader reader, final @Not
return;
}

Directory directory = null;
BmpHeaderDirectory directory = null;
try {
switch (magicNumber) {
case OS2_BITMAP_ARRAY:
Expand Down Expand Up @@ -153,11 +152,11 @@ protected void readFileHeader(@NotNull final SequentialReader reader, final @Not
directory.setInt(BmpHeaderDirectory.TAG_BITMAP_TYPE, magicNumber);
// skip past the rest of the file header
reader.skip(4 + 2 + 2 + 4);
readBitmapHeader(reader, (BmpHeaderDirectory) directory, metadata);
readBitmapHeader(reader, directory, metadata);
break;
default:
metadata.addDirectory(new ErrorDirectory("Invalid BMP magic number 0x" + Integer.toHexString(magicNumber)));
return;
break;
}
} catch (IOException e) {
if (directory == null) {
Expand Down

0 comments on commit ea927bd

Please sign in to comment.