MCPcopy Index your code
hub / github.com/processing/processing / getInstalledContribsInfo

Method getInstalledContribsInfo

app/src/processing/app/Base.java:920–949  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

918
919
920 public byte[] getInstalledContribsInfo() {
921 List<Contribution> contribs = getInstalledContribs();
922 StringList entries = new StringList();
923 for (Contribution c : contribs) {
924 String entry = c.getTypeName() + "=" +
925 PApplet.urlEncode(String.format("name=%s\nurl=%s\nrevision=%d\nversion=%s",
926 c.getName(), c.getUrl(),
927 c.getVersion(), c.getBenignVersion()));
928 entries.append(entry);
929 }
930 String joined =
931 "id=" + UpdateCheck.getUpdateID() + "&" + entries.join("&");
932// StringBuilder sb = new StringBuilder();
933// try {
934// // Truly ridiculous attempt to shove everything into a GET request.
935// // More likely to be seen as part of a grand plot.
936// ByteArrayOutputStream baos = new ByteArrayOutputStream();
937// GZIPOutputStream output = new GZIPOutputStream(baos);
938// PApplet.saveStream(output, new ByteArrayInputStream(joined.getBytes()));
939// output.close();
940// byte[] b = baos.toByteArray();
941// for (int i = 0; i < b.length; i++) {
942// sb.append(PApplet.hex(b[i], 2));
943// }
944// } catch (IOException e) {
945// e.printStackTrace();
946// }
947// return sb.toString();
948 return joined.getBytes();
949 }
950
951
952 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Callers 1

runMethod · 0.80

Calls 11

getInstalledContribsMethod · 0.95
urlEncodeMethod · 0.95
appendMethod · 0.95
getUpdateIDMethod · 0.95
joinMethod · 0.95
getUrlMethod · 0.80
getVersionMethod · 0.80
getBenignVersionMethod · 0.80
formatMethod · 0.65
getTypeNameMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected