Changeset 8345 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2015-05-11T10:52:33+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
r8318 r8345 52 52 File cacheDir = new File(Main.pref.getCacheDirectory(), "jcs"); 53 53 54 if ( (!cacheDir.exists() && !cacheDir.mkdirs()))54 if (!cacheDir.exists() && !cacheDir.mkdirs()) 55 55 throw new IOException("Cannot access cache directory"); 56 56 -
trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
r8344 r8345 439 439 urlConn.setRequestMethod("HEAD"); 440 440 long lastModified = urlConn.getLastModified(); 441 return ( 442 (attributes.getEtag() != null && attributes.getEtag().equals(urlConn.getRequestProperty("ETag"))) || 443 (lastModified != 0 && lastModified <= attributes.getLastModification()) 444 ); 441 return (attributes.getEtag() != null && attributes.getEtag().equals(urlConn.getRequestProperty("ETag"))) || 442 (lastModified != 0 && lastModified <= attributes.getLastModification()); 445 443 } 446 444 -
trunk/src/org/openstreetmap/josm/data/coor/EastNorth.java
r8308 r8345 132 132 */ 133 133 public boolean equalsEpsilon(EastNorth other, double e) { 134 return (Math.abs(x - other.x) < e && Math.abs(y - other.y) < e);134 return Math.abs(x - other.x) < e && Math.abs(y - other.y) < e; 135 135 } 136 136 } -
trunk/src/org/openstreetmap/josm/data/coor/QuadTiling.java
r7509 r8345 9 9 10 10 public static final int NR_LEVELS = 24; 11 public static final double WORLD_PARTS = (1 << NR_LEVELS);11 public static final double WORLD_PARTS = 1 << NR_LEVELS; 12 12 13 13 public static final int TILES_PER_LEVEL_SHIFT = 2; // Has to be 2. Other parts of QuadBuckets code rely on it … … 53 53 for (i = NR_LEVELS-1; i >= 0; i--) 54 54 { 55 long xbit = ( (x >> i) & 1);56 long ybit = ( (y >> i) & 1);55 long xbit = (x >> i) & 1; 56 long ybit = (y >> i) & 1; 57 57 tile <<= 2; 58 58 // Note that x is the MSB -
trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java
r8308 r8345 360 360 public synchronized boolean hasExactMatch(Projection projection, double pixelPerDegree, double east, double north) { 361 361 ProjectionEntries projectionEntries = getProjectionEntries(projection); 362 CacheEntry entry = findEntry(projectionEntries, pixelPerDegree, east, north); 363 return (entry != null); 362 return findEntry(projectionEntries, pixelPerDegree, east, north) != null; 364 363 } 365 364 -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r8338 r8345 519 519 */ 520 520 public boolean isDisabledAndHidden() { 521 return (( (flags & FLAG_DISABLED) != 0) && ((flags & FLAG_HIDE_IF_DISABLED) != 0));521 return ((flags & FLAG_DISABLED) != 0) && ((flags & FLAG_HIDE_IF_DISABLED) != 0); 522 522 } 523 523 -
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r8338 r8345 363 363 boolean locked = writeLock(); 364 364 try { 365 boolean closed = (lastNode() == n && firstNode() == n);365 boolean closed = lastNode() == n && firstNode() == n; 366 366 int i; 367 367 List<Node> copy = getNodes(); … … 391 391 boolean locked = writeLock(); 392 392 try { 393 boolean closed = (lastNode() == firstNode() && selection.contains(lastNode()));393 boolean closed = lastNode() == firstNode() && selection.contains(lastNode()); 394 394 List<Node> copy = new ArrayList<>(); 395 395 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java
r8291 r8345 184 184 double xd = Math.abs(p1.getX()-p2.getX()); 185 185 double yd = Math.abs(p1.getY()-p2.getY()); 186 return (xd+yd > space);186 return xd + yd > space; 187 187 } 188 188 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r8342 r8345 866 866 return; 867 867 g.setColor(highlightColorTransparent); 868 float w = (line.getLineWidth() + highlightLineWidth);868 float w = line.getLineWidth() + highlightLineWidth; 869 869 if (useWiderHighlight) w+=widerHighlight; 870 870 while(w >= line.getLineWidth()) { … … 995 995 */ 996 996 double distanceFromVia=14; 997 double dx = (pFrom.x >= pVia.x) ? (pFrom.x - pVia.x) : (pVia.x - pFrom.x);998 double dy = (pFrom.y >= pVia.y) ? (pFrom.y - pVia.y) : (pVia.y - pFrom.y);997 double dx = pFrom.x >= pVia.x ? pFrom.x - pVia.x : pVia.x - pFrom.x; 998 double dy = pFrom.y >= pVia.y ? pFrom.y - pVia.y : pVia.y - pFrom.y; 999 999 1000 1000 double fromAngle; -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
r8325 r8345 264 264 } 265 265 266 final int size = max( (ds.isSelected(n) ? selectedNodeSize : 0),267 (isNodeTagged(n) ? taggedNodeSize : 0),268 (n.isConnectionNode() ? connectionNodeSize : 0),266 final int size = max(ds.isSelected(n) ? selectedNodeSize : 0, 267 isNodeTagged(n) ? taggedNodeSize : 0, 268 n.isConnectionNode() ? connectionNodeSize : 0, 269 269 unselectedNodeSize); 270 270 -
trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java
r8332 r8345 276 276 277 277 public boolean isLoaded() { 278 return (topLevelSubGrid != null);278 return topLevelSubGrid != null; 279 279 } 280 280 -
trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java
r6883 r8345 129 129 protected double t(double lat_rad) { 130 130 return tan(PI/4 - lat_rad / 2.0) 131 / pow(( (1.0 - e * sin(lat_rad)) / (1.0 + e * sin(lat_rad))), e/2);131 / pow((1.0 - e * sin(lat_rad)) / (1.0 + e * sin(lat_rad)), e/2); 132 132 } 133 133 -
trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
r6362 r8345 229 229 230 230 /* Precalculate epsilon */ 231 double epsilon = (315.0 * pow(n, 4.0) / 512.0);231 double epsilon = 315.0 * pow(n, 4.0) / 512.0; 232 232 233 233 /* Now calculate the sum of the series and return */ … … 276 276 277 277 /* Precalculate epsilon_ (Eq. 10.22) */ 278 double epsilon_ = (1097.0 * pow(n, 4.0) / 512.0);278 double epsilon_ = 1097.0 * pow(n, 4.0) / 512.0; 279 279 280 280 /* Now calculate the sum of the series (Eq. 10.21) */ … … 284 284 + (epsilon_ * sin(8.0 * y_)); 285 285 } 286 287 286 } -
trunk/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
r8290 r8345 170 170 */ 171 171 public boolean isValidInfrastructureTld(String iTld) { 172 return Arrays.binarySearch(INFRASTRUCTURE_TLDS, (chompLeadingDot(iTld.toLowerCase()))) >= 0;172 return Arrays.binarySearch(INFRASTRUCTURE_TLDS, chompLeadingDot(iTld.toLowerCase())) >= 0; 173 173 } 174 174 -
trunk/src/org/openstreetmap/josm/data/validation/routines/RegexValidator.java
r7937 r8345 107 107 } 108 108 patterns = new Pattern[regexs.length]; 109 int flags = (caseSensitive ? 0: Pattern.CASE_INSENSITIVE);109 int flags = caseSensitive ? 0: Pattern.CASE_INSENSITIVE; 110 110 for (int i = 0; i < regexs.length; i++) { 111 111 if (regexs[i] == null || regexs[i].length() == 0) { -
trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java
r8342 r8345 237 237 public boolean isFixable(TestError testError) { 238 238 if (testError.getTester() instanceof Coastlines) 239 return (testError.getCode() == REVERSED_COASTLINE);239 return testError.getCode() == REVERSED_COASTLINE; 240 240 241 241 return false; -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
r8338 r8345 309 309 } 310 310 } 311 return (relationsWithRelations <= 1);311 return relationsWithRelations <= 1; 312 312 } 313 313 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
r8338 r8345 323 323 } 324 324 } 325 return (waysWithRelations <= 1);325 return waysWithRelations <= 1; 326 326 } 327 327 }
Note:
See TracChangeset
for help on using the changeset viewer.