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

Method getUpdateID

app/src/processing/app/UpdateCheck.java:91–103  ·  view source on GitHub ↗

Turned into a separate method so that anyone needed update.id will get a legit answer. Had a problem with the contribs script where the id wouldn't be set so a null id would be sent to the contribs server.

()

Source from the content-addressed store, hash-verified

89 * wouldn't be set so a null id would be sent to the contribs server.
90 */
91 static public long getUpdateID() {
92 // generate a random id in case none exists yet
93 Random r = new Random();
94 long id = r.nextLong();
95
96 String idString = Preferences.get("update.id");
97 if (idString != null) {
98 id = Long.parseLong(idString);
99 } else {
100 Preferences.set("update.id", String.valueOf(id));
101 }
102 return id;
103 }
104
105
106 public void updateCheck() throws IOException, InterruptedException {

Callers 2

updateCheckMethod · 0.95

Calls 2

getMethod · 0.95
setMethod · 0.95

Tested by

no test coverage detected