Skip to content

Commit 62d1d17

Browse files
committed
sonarqube cleanup.
1 parent 40597ff commit 62d1d17

11 files changed

Lines changed: 4 additions & 1129 deletions

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import org.hdf5javalib.dataclass.HdfFixedPoint;
44
import org.hdf5javalib.hdffile.dataobjects.messages.HdfMessage;
55
import org.hdf5javalib.hdfjava.HdfDataFile;
6-
import org.hdf5javalib.hdfjava.HdfFileAllocation;
76

87
import java.io.IOException;
98
import java.nio.ByteBuffer;
@@ -58,7 +57,7 @@ public List<HdfMessage> getHeaderMessages() {
5857
return headerMessages;
5958
}
6059

61-
public abstract void writeAsGroupToByteChannel(SeekableByteChannel seekableByteChannel, HdfFileAllocation fileAllocation) throws IOException;
60+
public abstract void writeAsGroupToByteChannel(SeekableByteChannel seekableByteChannel) throws IOException;
6261

6362
public void writeInitialMessageBlockToBuffer(ByteBuffer buffer) {
6463
}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import org.hdf5javalib.dataclass.HdfFixedPoint;
44
import org.hdf5javalib.hdffile.dataobjects.messages.HdfMessage;
55
import org.hdf5javalib.hdfjava.HdfDataFile;
6-
import org.hdf5javalib.hdfjava.HdfFileAllocation;
76

87
import java.io.IOException;
98
import java.nio.ByteBuffer;
@@ -62,12 +61,11 @@ public HdfObjectHeaderPrefixV1(int version, long objectReferenceCount, long obje
6261
* </p>
6362
*
6463
* @param seekableByteChannel the byte channel to write to
65-
* @param fileAllocation the file allocation manager
6664
* @throws IOException if an I/O error occurs
6765
* @throws IllegalStateException if the buffer overflows
6866
*/
6967
@Override
70-
public void writeAsGroupToByteChannel(SeekableByteChannel seekableByteChannel, HdfFileAllocation fileAllocation) throws IOException {
68+
public void writeAsGroupToByteChannel(SeekableByteChannel seekableByteChannel) throws IOException {
7169
int currentSize = 16;
7270
int i = 0;
7371
while (i < headerMessages.size()) {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import org.hdf5javalib.hdffile.dataobjects.messages.HdfMessage;
44
import org.hdf5javalib.hdfjava.HdfDataFile;
5-
import org.hdf5javalib.hdfjava.HdfFileAllocation;
65
import org.hdf5javalib.utils.HdfWriteUtils;
76

87
import java.io.IOException;
@@ -49,7 +48,7 @@ public HdfObjectHeaderPrefixV2(
4948
this.minDenseAttributes = minDenseAttributes;
5049
}
5150
@Override
52-
public void writeAsGroupToByteChannel(SeekableByteChannel seekableByteChannel, HdfFileAllocation fileAllocation) throws IOException {
51+
public void writeAsGroupToByteChannel(SeekableByteChannel seekableByteChannel) throws IOException {
5352
// not implemented
5453
}
5554
}

src/main/java/org/hdf5javalib/hdffile/infrastructure/HdfGlobalHeap.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package org.hdf5javalib.hdffile.infrastructure;
22

33
import org.hdf5javalib.dataclass.HdfFixedPoint;
4-
import org.hdf5javalib.hdfjava.AllocationType;
54
import org.hdf5javalib.hdfjava.HdfDataFile;
6-
import org.hdf5javalib.hdfjava.HdfFileAllocation;
75
import org.hdf5javalib.utils.HdfReadUtils;
86
import org.hdf5javalib.utils.HdfWriteUtils;
97

@@ -30,7 +28,6 @@
3028
*
3129
* @see HdfDataFile
3230
* @see HdfFixedPoint
33-
* @see HdfFileAllocation
3431
*/
3532
public class HdfGlobalHeap {
3633
private static final byte[] GLOBAL_HEAP_SIGNATURE = {'G', 'C', 'O', 'L'};
@@ -181,8 +178,6 @@ public void initializeFromSeekableByteChannel(SeekableByteChannel fileChannel, H
181178
localCollectionSize,
182179
localNextObjectId,
183180
hdfDataFile,
184-
globalHeaps.size() > 0 ? AllocationType.GLOBAL_HEAP_2 : AllocationType.GLOBAL_HEAP_1,
185-
globalHeaps.size() > 0 ? "Global Heap 2" : "Global Heap 1",
186181
hdfStartOffset
187182
);
188183
globalHeaps.put(hdfStartOffset, heapBlock);

src/main/java/org/hdf5javalib/hdffile/infrastructure/HdfGlobalHeapBlock.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package org.hdf5javalib.hdffile.infrastructure;
22

33
import org.hdf5javalib.dataclass.HdfFixedPoint;
4-
import org.hdf5javalib.hdfjava.AllocationType;
54
import org.hdf5javalib.hdfjava.HdfDataFile;
65
import org.hdf5javalib.utils.HdfWriteUtils;
76

@@ -21,17 +20,13 @@ public class HdfGlobalHeapBlock {
2120
/**
2221
* Constructs an allocation record.
2322
*
24-
* @param type the allocation type
25-
* @param name the name of the allocation
2623
* @param offset the starting offset
2724
*/
2825
public HdfGlobalHeapBlock(
2926
LinkedHashMap<Integer, GlobalHeapObject> globalHeapObjects,
3027
HdfFixedPoint collectionSize,
3128
Integer nextObjectId,
3229
HdfDataFile hdfDataFile,
33-
AllocationType type,
34-
String name,
3530
HdfFixedPoint offset
3631
) {
3732
this.hdfDataFile = hdfDataFile;

src/main/java/org/hdf5javalib/hdffile/infrastructure/HdfLocalHeap.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import org.hdf5javalib.dataclass.HdfFixedPoint;
44
import org.hdf5javalib.dataclass.HdfString;
55
import org.hdf5javalib.hdfjava.HdfDataFile;
6-
import org.hdf5javalib.hdfjava.HdfFileAllocation;
76

87
import java.io.IOException;
98
import java.nio.ByteBuffer;
@@ -24,7 +23,6 @@
2423
* @see HdfDataFile
2524
* @see HdfFixedPoint
2625
* @see HdfString
27-
* @see HdfFileAllocation
2826
*/
2927
public class HdfLocalHeap {
3028
public static final byte[] LOCAL_HEAP_SIGNATURE = new byte[]{'H', 'E', 'A', 'P'};
@@ -113,10 +111,9 @@ public String toString() {
113111
* Writes the local heap to a file channel.
114112
*
115113
* @param seekableByteChannel the file channel to write to
116-
* @param fileAllocation the file allocation manager
117114
* @throws IOException if an I/O error occurs
118115
*/
119-
public void writeToByteChannel(SeekableByteChannel seekableByteChannel, HdfFileAllocation fileAllocation) throws IOException {
116+
public void writeToByteChannel(SeekableByteChannel seekableByteChannel) throws IOException {
120117
ByteBuffer buffer = ByteBuffer.allocate(LOCAL_HEAP_HEADER_SIZE).order(ByteOrder.LITTLE_ENDIAN);
121118

122119
buffer.put(LOCAL_HEAP_SIGNATURE);

src/main/java/org/hdf5javalib/hdfjava/AllocationRecord.java

Lines changed: 0 additions & 116 deletions
This file was deleted.

src/main/java/org/hdf5javalib/hdfjava/AllocationType.java

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/main/java/org/hdf5javalib/hdfjava/HdfDataFile.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ public interface HdfDataFile {
2222
*/
2323
HdfGlobalHeap getGlobalHeap();
2424

25-
// /**
26-
// * Retrieves the file allocation manager of the HDF5 file.
27-
// *
28-
// * @return the {@link HdfFileAllocation} instance
29-
// */
30-
// HdfFileAllocation getFileAllocation();
31-
3225
/**
3326
* Retrieves the seekable byte channel for reading and writing the HDF5 file.
3427
*
@@ -45,5 +38,4 @@ public interface HdfDataFile {
4538

4639
HdfBTree getBTree();
4740

48-
void setFileAllocation(HdfFileAllocation hdfFileAllocation);
4941
}

0 commit comments

Comments
 (0)