Revision 43868 branches/org.gvsig.desktop-2018a/org.gvsig.desktop.library/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.buffer.impl/src/main/java/org/gvsig/raster/lib/buffer/impl/statistics/DefaultStatisticsBand.java

View differences:

DefaultStatisticsBand.java
85 85

  
86 86
            for (int row = 0; row < band.getRows(); row++) {
87 87
                status.setCurValue(cont++);
88
                if (status.isCancelled()) {
89
                    status.abort();
88
                if (status.isCancellationRequested()) {
89
                    status.cancel();
90 90
                    return;
91 91
                }
92 92
                for (int column = 0; column < band.getColumns(); column++) {
......
119 119
            histogramOperation.pre();
120 120
            for (int row = 0; row < band.getRows(); row++) {
121 121
                status.setCurValue(cont++);
122
                if (status.isCancelled()) {
123
                    status.abort();
122
                if (status.isCancellationRequested()) {
123
                    status.cancel();
124 124
                    return;
125 125
                }
126 126
                for (int column = 0; column < band.getColumns(); column++) {
......
137 137
            this.histogramBand = ((HistogramBand) histogramOperation.getResult());
138 138
            this.variance = ((Number) varianceOperation.getResult()).doubleValue();
139 139

  
140
            calculated = true;
141
        } catch (Exception e) {
142
            status.abort();
143
            throw e;
144
        } finally {
140 145
            if (isMyStatus) {
141 146
                status.terminate();
142 147
            } else {
143 148
                status.pop();
144
            }
145
            calculated = true;
146
        } catch (Exception e) {
147
            status.abort();
148
            throw e;
149
            }            
149 150
        }
150 151
    }
151 152

  

Also available in: Unified diff