Skip to content

Commit 0c4d6bb

Browse files
committed
Version 0.2 refactor
1 parent f99f0dc commit 0c4d6bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/hdf5javalib/utils/HdfWriteUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public static <T> void writeCompoundTypeToBuffer(T instance, CompoundDatatype co
113113
if (fieldType != String.class) {
114114
throw new IllegalArgumentException("Field " + member.getName() + " must be String for VariableLengthDatatype, got " + fieldType.getName());
115115
}
116-
Charset charset = membertyped.getCharacterSet() == VariableLengthDatatype.CharacterSet.ASCII
116+
Charset charset = membertyped.getCharacterSet() == StringDatatype.CharacterSet.ASCII
117117
? StandardCharsets.US_ASCII : StandardCharsets.UTF_8;
118118
byte[] bytes = ((String) value).getBytes(charset);
119119
HdfGlobalHeap hdfGlobalHeap = membertyped.getGlobalHeap();

0 commit comments

Comments
 (0)