Skip to content

Commit 0d0952a

Browse files
author
haileyajohnson
committed
spotless
1 parent 664ebeb commit 0d0952a

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

cdm/core/src/main/java/ucar/nc2/iosp/IospHelper.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ public static Object readData(LayoutBB layout, DataType dataType, Object arr) {
306306
while (layout.hasNext()) {
307307
LayoutBB.Chunk chunk = layout.next();
308308
ByteBuffer bb = chunk.getByteBuffer();
309+
// if chunk is empty, use fill value
309310
if (!bb.hasRemaining()) {
310311
continue;
311312
}
@@ -327,6 +328,7 @@ public static Object readData(LayoutBB layout, DataType dataType, Object arr) {
327328
while (layout.hasNext()) {
328329
LayoutBB.Chunk chunk = layout.next();
329330
ShortBuffer buff = chunk.getShortBuffer();
331+
// if chunk is empty, use fill value
330332
if (!buff.hasRemaining()) {
331333
continue;
332334
}
@@ -342,6 +344,7 @@ public static Object readData(LayoutBB layout, DataType dataType, Object arr) {
342344
while (layout.hasNext()) {
343345
LayoutBB.Chunk chunk = layout.next();
344346
IntBuffer buff = chunk.getIntBuffer();
347+
// if chunk is empty, use fill value
345348
if (!buff.hasRemaining()) {
346349
continue;
347350
}
@@ -357,6 +360,7 @@ public static Object readData(LayoutBB layout, DataType dataType, Object arr) {
357360
while (layout.hasNext()) {
358361
LayoutBB.Chunk chunk = layout.next();
359362
FloatBuffer buff = chunk.getFloatBuffer();
363+
// if chunk is empty, use fill value
360364
if (!buff.hasRemaining()) {
361365
continue;
362366
}
@@ -372,6 +376,7 @@ public static Object readData(LayoutBB layout, DataType dataType, Object arr) {
372376
while (layout.hasNext()) {
373377
LayoutBB.Chunk chunk = layout.next();
374378
DoubleBuffer buff = chunk.getDoubleBuffer();
379+
// if chunk is empty, use fill value
375380
if (!buff.hasRemaining()) {
376381
continue;
377382
}
@@ -387,6 +392,7 @@ public static Object readData(LayoutBB layout, DataType dataType, Object arr) {
387392
while (layout.hasNext()) {
388393
LayoutBB.Chunk chunk = layout.next();
389394
LongBuffer buff = chunk.getLongBuffer();
395+
// if chunk is empty, use fill value
390396
if (!buff.hasRemaining()) {
391397
continue;
392398
}
@@ -403,6 +409,7 @@ public static Object readData(LayoutBB layout, DataType dataType, Object arr) {
403409
while (layout.hasNext()) {
404410
LayoutBB.Chunk chunk = layout.next();
405411
ByteBuffer bb = chunk.getByteBuffer();
412+
// if chunk is empty, use fill value
406413
if (!bb.hasRemaining()) {
407414
continue;
408415
}
@@ -418,6 +425,7 @@ public static Object readData(LayoutBB layout, DataType dataType, Object arr) {
418425
while (layout.hasNext()) {
419426
LayoutBB.Chunk chunk = layout.next();
420427
ByteBuffer bb = chunk.getByteBuffer();
428+
// if chunk is empty, use fill value
421429
if (!bb.hasRemaining()) {
422430
continue;
423431
}
@@ -804,7 +812,6 @@ public static byte[] convertCharToByteUTF(char[] from) {
804812
}
805813

806814
// convert byte array to char array
807-
808815
public static char[] convertByteToChar(byte[] byteArray) {
809816
int size = byteArray.length;
810817
char[] cbuff = new char[size];
@@ -814,7 +821,6 @@ public static char[] convertByteToChar(byte[] byteArray) {
814821
}
815822

816823
// convert char array to byte array
817-
818824
public static byte[] convertCharToByte(char[] from) {
819825
byte[] to = null;
820826
if (from != null) {
@@ -826,6 +832,7 @@ public static byte[] convertCharToByte(char[] from) {
826832
return to;
827833
}
828834

835+
// convert byte array to boolean array
829836
public static boolean[] convertByteToBoolean(byte[] from) {
830837
boolean[] to = null;
831838
if (from != null) {

cdm/core/src/main/java/ucar/nc2/iosp/hdf5/H5tiledLayoutBB.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public class H5tiledLayoutBB implements LayoutBB {
4242
private H5header.Filter[] filters;
4343
private ByteOrder byteOrder;
4444

45-
4645
private Section want;
4746
private int[] chunkSize; // from the StorageLayout message (exclude the elemSize)
4847
private int elemSize; // last dimension of the StorageLayout message

cdm/zarr/src/main/java/ucar/nc2/iosp/zarr/ZarrFilter.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,9 @@
55

66
package ucar.nc2.iosp.zarr;
77

8-
import java.io.IOException;
9-
import java.io.InputStream;
10-
import java.io.OutputStream;
11-
128
/**
139
* To be implemented
1410
*/
1511
public abstract class ZarrFilter {
1612

17-
public abstract String getId();
18-
19-
public abstract void compress(InputStream is, OutputStream os) throws IOException;
2013
}

cdm/zarr/src/main/java/ucar/nc2/iosp/zarr/ZarrUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
public class ZarrUtils {
1111
/**
1212
* Converts subscripted chunk number to a flat index
13+
*
1314
* @param subs - chunk index in each dimension
14-
* @param nChunks number of chunks per dimension
15+
* @param nChunks number of chunks per dimension
1516
* @return chunk number as a flat index
1617
*/
1718
public static int subscriptsToIndex(int[] subs, int[] nChunks) {
@@ -27,6 +28,7 @@ public static int subscriptsToIndex(int[] subs, int[] nChunks) {
2728
/**
2829
* Get name of an file within a Zarr object, i.e. name of file
2930
* e.g. 0.0.0 or, in the case of a nested store, 0/0/0
31+
*
3032
* @param filePath
3133
* @return data path relative to Zarr object
3234
*/

cdm/zarr/src/test/java/ucar/nc2/iosp/zarr/TestZarrIosp.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ public void testReadUninitialized() throws IOException, InvalidRangeException {
202202
}
203203
}
204204

205-
// TODO: test values
206205
private void _testUninitialized(String location) throws IOException, InvalidRangeException {
207206
NetcdfFile ncfile = NetcdfFiles.open(location);
208207

0 commit comments

Comments
 (0)