Skip to content

Commit

Permalink
0003114: Update service detects new software versions
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed May 19, 2017
1 parent d3d9f09 commit 90e4900
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.StringJoiner;
import java.util.UUID;

import org.jumpmind.symmetric.ISymmetricEngine;
Expand Down Expand Up @@ -125,11 +124,12 @@ public void checkForUpdates() {
}

protected byte[] getPostData(Properties prop ) throws UnsupportedEncodingException {
StringJoiner sj = new StringJoiner("&");
StringBuilder sb = new StringBuilder();
for (Object key : prop.keySet()) {
sj.add(URLEncoder.encode(key.toString(), "UTF-8") + "=" + URLEncoder.encode(prop.get(key).toString(), "UTF-8"));
sb.append(URLEncoder.encode(key.toString(), "UTF-8")).append("=");
sb.append(URLEncoder.encode(prop.get(key).toString(), "UTF-8")).append("&");
}
return sj.toString().getBytes(StandardCharsets.UTF_8);
return sb.toString().getBytes(StandardCharsets.UTF_8);
}

protected void postDataForVersion(URL url, byte[] postData) throws IOException {
Expand Down

0 comments on commit 90e4900

Please sign in to comment.