kopia lustrzana https://github.com/onthegomap/planetiler
				
				
				
			Error when EOF prematurely reached (#1238)
* error when EOF prematurely reached * point at official sourcespull/1236/head
							rodzic
							
								
									b28e1ea555
								
							
						
					
					
						commit
						faf557be2d
					
				| 
						 | 
				
			
			@ -296,6 +296,9 @@ public class Downloader {
 | 
			
		|||
            offset += written;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (offset < range.end && range.end != Long.MAX_VALUE) {
 | 
			
		||||
          throw new IllegalStateException("Unexpected EOF at " + offset + " expecting " + range.end);
 | 
			
		||||
        }
 | 
			
		||||
      } finally {
 | 
			
		||||
        perFileLimiter.release();
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,6 +20,7 @@ import java.util.Locale;
 | 
			
		|||
import java.util.Map;
 | 
			
		||||
import java.util.stream.Stream;
 | 
			
		||||
import org.openmaptiles.OpenMapTilesMain;
 | 
			
		||||
import org.openmaptiles.OpenMapTilesProfile;
 | 
			
		||||
import org.openmaptiles.util.VerifyMonaco;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			@ -37,10 +38,23 @@ public class Main {
 | 
			
		|||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  private static final EntryPoint DEFAULT_TASK = OpenMapTilesMain::main;
 | 
			
		||||
  private static final EntryPoint OPENMAPTILES = args -> {
 | 
			
		||||
    // override default sources to fix download issues with maptiler URLs
 | 
			
		||||
    String[] withDefaultArgs = Stream.concat(
 | 
			
		||||
      Stream.of(
 | 
			
		||||
        "--" + OpenMapTilesProfile.LAKE_CENTERLINE_SOURCE + "-url",
 | 
			
		||||
        "https://github.com/acalcutt/osm-lakelines/releases/download/v12/lake_centerline.shp.zip",
 | 
			
		||||
        "--" + OpenMapTilesProfile.NATURAL_EARTH_SOURCE + "-url",
 | 
			
		||||
        "https://naciscdn.org/naturalearth/packages/natural_earth_vector.sqlite.zip"
 | 
			
		||||
      ),
 | 
			
		||||
      Stream.of(args)
 | 
			
		||||
    ).toArray(String[]::new);
 | 
			
		||||
    OpenMapTilesMain.main(withDefaultArgs);
 | 
			
		||||
  };
 | 
			
		||||
  private static final EntryPoint DEFAULT_TASK = OPENMAPTILES;
 | 
			
		||||
  private static final Map<String, EntryPoint> ENTRY_POINTS = Map.ofEntries(
 | 
			
		||||
    entry("generate-openmaptiles", OpenMapTilesMain::main),
 | 
			
		||||
    entry("openmaptiles", OpenMapTilesMain::main),
 | 
			
		||||
    entry("generate-openmaptiles", OPENMAPTILES),
 | 
			
		||||
    entry("openmaptiles", OPENMAPTILES),
 | 
			
		||||
 | 
			
		||||
    entry("generate-custom", ConfiguredMapMain::main),
 | 
			
		||||
    entry("custom", ConfiguredMapMain::main),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue