Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmudd committed Aug 8, 2024
1 parent 895e5ec commit b16ff43
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion jhdf/src/main/java/io/jhdf/api/WritableAttributeImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
package io.jhdf.api;

import io.jhdf.Utils;
import io.jhdf.object.datatype.DataType;
import io.jhdf.object.message.DataSpace;

Expand Down
2 changes: 1 addition & 1 deletion jhdf/src/main/java/io/jhdf/object/datatype/DataType.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static DataType fromObject(Object data) {
} else if (type == double.class || type == Double.class) {
return FloatingPoint.DOUBLE;
} else if (type == String.class) {
return StringData.create(data); // TODO
return StringData.create(data);
} else {
throw new HdfException("Could not create DataType for: " + type);
}
Expand Down
4 changes: 4 additions & 0 deletions jhdf/src/test/java/io/jhdf/writing/StringWritingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ void writeStrings() throws Exception {
Map<String, Node> datasets = hdfFile.getChildren();
assertThat(datasets).hasSize(4);

String[] proseReadBackArray = (String[]) hdfFile.getDatasetByPath("prose").getData();
String proseReadback = StringUtils.joinWith(" ", proseReadBackArray);
assertThat(proseReadback).isEqualTo(prose);

// Just check thw whole file is readable
TestAllFilesBase.verifyAttributes(hdfFile);
TestAllFilesBase.recurseGroup(hdfFile);
Expand Down

0 comments on commit b16ff43

Please sign in to comment.