### Question:
DefaultUriAdapter implements URIAdapter { @NonNull @Override public Uri rewrite(WXSDKInstance instance, String type, Uri uri) { if (TextUtils.isEmpty(instance.getBundleUrl())) { return uri; } Uri base = Uri.parse(instance.getBundleUrl()); Uri.Builder resultBuilder = uri.buildUpon(); if (uri.isRelative()) { if(uri.getEncodedPath().length() == 0){ if(URIAdapter.IMAGE.equals(type)){ if(TextUtils.isEmpty(uri.toString())){ return uri; } } return base; } else { resultBuilder = buildRelativeURI(resultBuilder, base, uri); return resultBuilder.build(); } } return uri; }  @NonNull @Override Uri rewrite(WXSDKInstance instance, String type, Uri uri);  }### Answer:
@Test public void testRewrite() throws Exception { final String host = "http: final String base = host + "/test/123/"; final String bundleWithSlash = base + "?arg=value"; final String bundle = base + "bundle.js?arg=value"; instance.renderByUrl("", bundle, null, null, 0, 0, WXRenderStrategy.APPEND_ONCE); testRelative(host, base, bundle); instance.renderByUrl("", bundleWithSlash, null, null, 0, 0, WXRenderStrategy.APPEND_ONCE); testRelative(host, base, bundleWithSlash); }