Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
Patch
Description
We need to be sure that the base URL in this method is ending with a `/`. If not, the final URL will be wrong formatted.
Example:
public class Toto { public static void main(String []argv) throws Exception { URI uri1 = URI.create("https://www.googleapis.com/compute/v1"); URI uri2 = URI.create("projects/a-project/regions/us-east1/subnetworks/toto"); URI uri3 = URI.create("https://www.googleapis.com/compute/v1/"); System.out.println(uri1.resolve(uri2)); // output: https://www.googleapis.com/compute/projects/a-project/regions/us-east1/subnetworks/toto System.out.println(uri3.resolve(uri2)); // output: https://www.googleapis.com/compute/v1/projects/a-project/regions/us-east1/subnetworks/toto } }