Changeset 10001 in josm for trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
- Timestamp:
- 2016-03-17T01:50:12+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r9949 r10001 753 753 extensions = new String[] {".png", ".svg"}; 754 754 } 755 final int ARCHIVE = 0, LOCAL = 1; 756 for (int place : new Integer[] {ARCHIVE, LOCAL}) { 755 final int typeArchive = 0; 756 final int typeLocal = 1; 757 for (int place : new Integer[] {typeArchive, typeLocal}) { 757 758 for (String ext : extensions) { 758 759 … … 777 778 778 779 switch (place) { 779 case ARCHIVE:780 case typeArchive: 780 781 if (archive != null) { 781 782 ir = getIfAvailableZip(fullName, archive, inArchiveDir, type); … … 786 787 } 787 788 break; 788 case LOCAL:789 case typeLocal: 789 790 // getImageUrl() does a ton of "stat()" calls and gets expensive 790 791 // and redundant when you have a whole ton of objects. So, … … 924 925 } 925 926 } else { 926 final String fn _md5 = Utils.md5Hex(fn);927 url = b + fn _md5.substring(0, 1) + '/' + fn_md5.substring(0, 2) + "/" + fn;927 final String fnMD5 = Utils.md5Hex(fn); 928 url = b + fnMD5.substring(0, 1) + '/' + fnMD5.substring(0, 2) + "/" + fn; 928 929 } 929 930 result = getIfAvailableHttp(url, type);
Note:
See TracChangeset
for help on using the changeset viewer.