File tree Expand file tree Collapse file tree 5 files changed +16
-5
lines changed
src/main/java/com/easypost/easyvcr/internal Expand file tree Collapse file tree 5 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 11# CHANGELOG
22
3+ ## v0.5.2 (2023-01-13)
4+
5+ - Fix a null pointer exception triggered when trying to parse and censor URL path elements.
6+
37## v0.5.1 (2023-01-13)
48
59- Removes dead and unused code
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Add this to your project's POM:
1818<dependency >
1919 <groupId >com.easypost</groupId >
2020 <artifactId >easyvcr</artifactId >
21- <version >0.5.1 </version >
21+ <version >0.5.2 </version >
2222</dependency >
2323```
2424
@@ -27,7 +27,7 @@ Add this to your project's POM:
2727Add this to your project's build file:
2828
2929``` groovy
30- implementation "com.easypost:easyvcr:0.5.1 "
30+ implementation "com.easypost:easyvcr:0.5.2 "
3131```
3232
3333## Supported HTTP Clients
Original file line number Diff line number Diff line change 1- 0.5.1
1+ 0.5.2
Original file line number Diff line number Diff line change 66 <groupId >com.easypost</groupId >
77 <artifactId >easyvcr</artifactId >
88
9- <version >0.5.1 </version >
9+ <version >0.5.2 </version >
1010 <packaging >jar</packaging >
1111
1212 <name >com.easypost:easyvcr</name >
Original file line number Diff line number Diff line change @@ -237,7 +237,14 @@ public static String extractPathFromUri(URI uri) {
237237 String uriString = uri .toString ();
238238
239239 // strip the query parameters
240- uriString = uriString .replace (uri .getQuery (), "" );
240+ // wrapping in a try-catch because getQuery might return null
241+ try {
242+ String query = uri .getQuery ();
243+ if (query != null ) {
244+ uriString = uriString .replace (query , "" );
245+ }
246+ } catch (NullPointerException ignored ) {
247+ }
241248
242249 if (uriString .endsWith ("?" )) {
243250 uriString = uriString .substring (0 , uriString .length () - 1 );
You can’t perform that action at this time.
0 commit comments