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