update UserGuide.md (#1954)

Id Class does not have get method, we should new a instance.
This commit is contained in:
Z 2021-09-07 23:00:11 +08:00 committed by GitHub
parent 4f2aeaa288
commit 9484297fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -429,7 +429,7 @@ class IdInstanceCreator implements InstanceCreator<Id<?>> {
public Id<?> createInstance(Type type) {
Type[] typeParameters = ((ParameterizedType)type).getActualTypeArguments();
Type idType = typeParameters[0]; // Id has only one parameterized type T
return Id.get((Class)idType, 0L);
return new Id((Class)idType, 0L);
}
}
```