Replace encodeComponent and decodeComponent
Use the deprecation replacements encodeQueryString and decodeQueryString. Change-Id: Ib3cf73741b6d3430e9348338204ab3ff07908de9
This commit is contained in:
parent
aa9a7a92ce
commit
79548f158c
|
@ -40,8 +40,8 @@ public class GitwebLink {
|
|||
ParamertizedString pattern = new ParamertizedString(type.getRevision());
|
||||
|
||||
final Map<String, String> p = new HashMap<String, String>();
|
||||
p.put("project", URL.encodeComponent(project.get()));
|
||||
p.put("commit", URL.encodeComponent(ps.getRevision().get()));
|
||||
p.put("project", URL.encodeQueryString(project.get()));
|
||||
p.put("commit", URL.encodeQueryString(ps.getRevision().get()));
|
||||
return baseUrl + pattern.replace(p);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class GitwebLink {
|
|||
ParamertizedString pattern = new ParamertizedString(type.getProject());
|
||||
|
||||
final Map<String, String> p = new HashMap<String, String>();
|
||||
p.put("project", URL.encodeComponent(project.get()));
|
||||
p.put("project", URL.encodeQueryString(project.get()));
|
||||
return baseUrl + pattern.replace(p);
|
||||
}
|
||||
|
||||
|
@ -57,8 +57,8 @@ public class GitwebLink {
|
|||
ParamertizedString pattern = new ParamertizedString(type.getBranch());
|
||||
|
||||
final Map<String, String> p = new HashMap<String, String>();
|
||||
p.put("project", URL.encodeComponent(branch.getParentKey().get()));
|
||||
p.put("branch", URL.encodeComponent(branch.get()));
|
||||
p.put("project", URL.encodeQueryString(branch.getParentKey().get()));
|
||||
p.put("branch", URL.encodeQueryString(branch.get()));
|
||||
return baseUrl + pattern.replace(p);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ public class Gerrit implements EntryPoint {
|
|||
KeyUtil.setEncoderImpl(new KeyUtil.Encoder() {
|
||||
@Override
|
||||
public String encode(String e) {
|
||||
e = URL.encodeComponent(e);
|
||||
e = URL.encodeQueryString(e);
|
||||
e = fixPathImpl(e);
|
||||
e = fixColonImpl(e);
|
||||
return e;
|
||||
|
@ -247,7 +247,7 @@ public class Gerrit implements EntryPoint {
|
|||
|
||||
@Override
|
||||
public String decode(final String e) {
|
||||
return URL.decodeComponent(e);
|
||||
return URL.decodeQueryString(e);
|
||||
}
|
||||
|
||||
private native String fixPathImpl(String path)
|
||||
|
|
Loading…
Reference in New Issue