package org.helioviewer.jhv.viewmodel.imagecache;

public class ImageCacheStatusInitial implements ImageCacheStatus {

    private CacheStatus imageStatus;

    @Override
    public CacheStatus getImageStatus(int compositionLayer) {
        assert (compositionLayer == 0);
        return imageStatus;
    }

    @Override
    public void setImageStatus(int compositionLayer, CacheStatus newStatus) {
        assert (compositionLayer == 0);
        imageStatus = newStatus;
    }

    @Override
    public void downgradeImageStatus(int compositionLayer) {
    }

    @Override
    public int getImageCachedPartiallyUntil() {
        return -1;
    }

}

@@ -226,38 +226,34 @@
 ayer) %7B%0A        
-assert
+if
  (compositionLay
@@ -247,37 +247,86 @@
 ompositionLayer 
-=
+!
 = 0)
+%0A            throw new IllegalArgumentException()
 ;%0A        return
@@ -450,14 +450,10 @@
     
-assert
+if
  (co
@@ -471,13 +471,62 @@
 yer 
-=
+!
 = 0)
+%0A            throw new IllegalArgumentException()
 ;%0A  

Remove assert