Skip to content

Commit ef9e518

Browse files
authored
fix: add additional potential exceptions when retrieving protobuf manifest file to get version (#3315)
#3314 3314
1 parent 5e44d21 commit ef9e518

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gax-java/gax/src/main/java/com/google/api/gax/core/GaxProperties.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import java.io.File;
3737
import java.io.IOException;
3838
import java.io.InputStream;
39-
import java.net.URISyntaxException;
4039
import java.util.Optional;
4140
import java.util.Properties;
4241
import java.util.jar.Attributes;
@@ -144,7 +143,7 @@ static Optional<String> getBundleVersion(Class<?> clazz) {
144143
Attributes attributes = jar.getManifest().getMainAttributes();
145144
return Optional.ofNullable(attributes.getValue("Bundle-Version"));
146145
}
147-
} catch (URISyntaxException | IOException e) {
146+
} catch (Exception e) {
148147
// Unable to read Bundle-Version from manifest. Recover gracefully.
149148
return Optional.empty();
150149
}

0 commit comments

Comments
 (0)