Skip to content

Commit

Permalink
fix: add additional potential exceptions when retrieving protobuf man…
Browse files Browse the repository at this point in the history
…ifest file to get version (#3315)

#3314 3314
  • Loading branch information
ldetmer authored Oct 25, 2024
1 parent 5e44d21 commit ef9e518
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.util.Optional;
import java.util.Properties;
import java.util.jar.Attributes;
Expand Down Expand Up @@ -144,7 +143,7 @@ static Optional<String> getBundleVersion(Class<?> clazz) {
Attributes attributes = jar.getManifest().getMainAttributes();
return Optional.ofNullable(attributes.getValue("Bundle-Version"));
}
} catch (URISyntaxException | IOException e) {
} catch (Exception e) {
// Unable to read Bundle-Version from manifest. Recover gracefully.
return Optional.empty();
}
Expand Down

0 comments on commit ef9e518

Please sign in to comment.