Skip to content

Commit 01f57ec

Browse files
committed
sonarqube cleanup.
1 parent f7fe286 commit 01f57ec

4 files changed

Lines changed: 5 additions & 7 deletions

File tree

src/main/java/org/hdf5javalib/examples/read/FixedPointRead.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ void tryMatrixSpliterator(SeekableByteChannel fileChannel, HdfDataFile hdfDataFi
166166
for (int c = 0; c < shape[1]; c++) {
167167
row.append(FlattenedArrayUtils.getElement(flattenedData, shape, r, c).setScale(2, RoundingMode.HALF_UP)).append(" ");
168168
}
169-
log.info(row.toString().trim());
169+
log.info("{}", row.toString().trim());
170170
}
171171

172172
log.info("FlattenedData Streamed = ");
@@ -176,7 +176,7 @@ void tryMatrixSpliterator(SeekableByteChannel fileChannel, HdfDataFile hdfDataFi
176176
for (int c = 0; c < shape[1]; c++) {
177177
row.append(bdMatrix[r][c].setScale(2, RoundingMode.HALF_UP)).append(" ");
178178
}
179-
log.info(row.toString().trim());
179+
log.info("{}", row.toString().trim());
180180
}
181181

182182
BigDecimal[] bdReduced = (BigDecimal[]) FlattenedArrayUtils.reduceAlongAxis(dataSource.streamFlattened(), shape, 0, BigDecimal::max, BigDecimal.class);

src/main/java/org/hdf5javalib/examples/read/TwentyScalarRead.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ private void run() throws Exception {
4545
}
4646
}
4747
log.debug("Superblock: {} ", reader.getSuperblock());
48-
// try (HdfDataset ds = reader.getRootGroup().findDataset("dataset_14")) {
49-
// HdfDisplayUtils.displayScalarData(channel, ds, Long.class, reader);
50-
// }
5148
}
5249
}
5350
}

src/main/java/org/hdf5javalib/hdffile/dataobjects/HdfObjectHeaderPrefixV1.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ public void writeAsGroupToByteChannel(SeekableByteChannel seekableByteChannel) t
125125
*
126126
* @param buffer the ByteBuffer to write to
127127
*/
128+
@Override
128129
public void writeInitialMessageBlockToBuffer(ByteBuffer buffer) {
129130
// Write version (1 byte)
130131
buffer.put((byte) version);

src/main/java/org/hdf5javalib/hdffile/dataobjects/messages/DataLayoutMessage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public static HdfBTreeV1 readBTreeFromSeekableByteChannel(
214214
int dimensions,
215215
FixedPointDatatype eightByteFixedPointType,
216216
HdfDataFile hdfDataFile
217-
) throws Exception {
217+
) throws IOException, InvocationTargetException, InstantiationException, IllegalAccessException {
218218
return readFromSeekableByteChannelRecursive(fileChannel, btreeAddress, dimensions, eightByteFixedPointType, hdfDataFile, new LinkedHashMap<>());
219219
}
220220

@@ -234,7 +234,7 @@ private static HdfBTreeV1 readFromSeekableByteChannelRecursive(SeekableByteChann
234234
FixedPointDatatype eightByteFixedPointType,
235235
HdfDataFile hdfDataFile,
236236
Map<Long, HdfBTreeV1> visitedNodes
237-
) throws Exception {
237+
) throws IOException, InvocationTargetException, InstantiationException, IllegalAccessException {
238238
if (visitedNodes.containsKey(nodeAddress)) {
239239
throw new IllegalStateException("Cycle detected or node re-visited: BTree node address "
240240
+ nodeAddress + " encountered again during recursive read.");

0 commit comments

Comments
 (0)