fix(Tacking): check if uri is hierarchical

Checks if the given uri is hierarchical, as otherwise the
`getQueryParameterNames` function will throw an exception.
This commit is contained in:
FineFindus 2024-08-01 14:07:38 +02:00
parent 43afbb7523
commit f1d40f8963
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ public class Tracking{
@NonNull
public static String removeTrackingParameters(@NonNull String url){
Uri uri=Uri.parse(url);
if(uri==null)
if(uri==null || !uri.isHierarchical())
return url;
Uri.Builder uriBuilder=uri.buildUpon().clearQuery();