Changeset 8a4c469
- Timestamp:
- May 31, 2019 3:26:20 PM (20 months ago)
- Branches:
- master
- Children:
- 1109331
- Parents:
- b4f331e6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigKeyringHelper.java
rb4f331e6 r8a4c469 2 2 3 3 import java.io.IOException; 4 import java.io.Serializable; 4 5 import java.io.StringWriter; 6 import java.util.Collections; 7 import java.util.Comparator; 5 8 import java.util.List; 6 9 import java.util.Map; … … 90 93 if (!local) { 91 94 List<BlindData> bdata = _context.netDb().getBlindData(); 92 // TODO sort by hostname 95 if (bdata.size() > 1) 96 Collections.sort(bdata, new BDComparator()); 93 97 for (BlindData bd : bdata) { 94 98 buf.append("\n<tr><td>"); … … 142 146 buf.append("</table>\n"); 143 147 } 148 149 /** @since 0.9.41 */ 150 private static class BDComparator implements Comparator<BlindData>, Serializable { 151 public int compare(BlindData l, BlindData r) { 152 return l.toBase32().compareTo(r.toBase32()); 153 } 154 } 144 155 } -
core/java/src/net/i2p/data/BlindData.java
rb4f331e6 r8a4c469 29 29 private boolean _authRequired; 30 30 private long _date; 31 private String _b32; 31 32 32 33 /** … … 218 219 */ 219 220 public synchronized String toBase32() { 220 return Blinding.encode(_clearSPK, _secret != null, _authKey != null); 221 } 222 223 /** 224 * @since 0.9.41 225 */ 226 public void setSecretRequired() { 221 if (_b32 == null) 222 _b32 = Blinding.encode(_clearSPK, _secretRequired, _authRequired); 223 return _b32; 224 } 225 226 /** 227 * @since 0.9.41 228 */ 229 public synchronized void setSecretRequired() { 227 230 _secretRequired = true; 231 _b32 = null; 228 232 } 229 233 … … 238 242 * @since 0.9.41 239 243 */ 240 public void setAuthRequired() {244 public synchronized void setAuthRequired() { 241 245 _authRequired = true; 246 _b32 = null; 242 247 } 243 248
Note: See TracChangeset
for help on using the changeset viewer.