Changeset 10185 in josm for trunk/src


Ignore:
Timestamp:
2016-05-11T05:16:25+02:00 (9 years ago)
Author:
Don-vip
Message:

sonar - squid:S2245 - Pseudorandom number generators (PRNGs) should not be used in secure contexts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r10181 r10185  
    55import java.io.IOException;
    66import java.net.URL;
     7import java.security.SecureRandom;
    78import java.util.HashSet;
    89import java.util.List;
    910import java.util.Map;
    10 import java.util.Random;
    1111import java.util.Set;
    1212import java.util.concurrent.ConcurrentHashMap;
     
    346346            for (int i = 0; i < 5; ++i) {
    347347                if (urlConn.getResponseCode() == HttpURLConnection.HTTP_UNAVAILABLE) {
    348                     Thread.sleep(5000L+(new Random()).nextInt(5000));
     348                    Thread.sleep(5000L+new SecureRandom().nextInt(5000));
    349349                    continue;
    350350                }
Note: See TracChangeset for help on using the changeset viewer.