我正在使用 JDK 15.0.1 并尝试保存记录。我在微流代码中遇到错误。语句if (declaringClass.isRecord())
中的异常抛出 text can't get field offset on a record (preview):。
在文档中,声明自 JDK 14 起支持记录(请参阅https://manual.docs.microstream.one/data-store/faq/java-features#can-microstream-handle-records)。
if (f == null) {
throw new NullPointerException();
}
Class<?> declaringClass = f.getDeclaringClass();
if (declaringClass.isHidden()) {
throw new UnsupportedOperationException("can't get field offset on a hidden class: " + f);
}
if (declaringClass.isRecord()) {
throw new UnsupportedOperationException("can't get field offset on a record (preview): " + f);
}
return theInternalUnsafe.objectFieldOffset(f);
}
我使用以下版本的微流
implementation 'one.microstream:storage.embedded:04.00.00-MS-GA'
我做错什么了吗?
真挚地