diff --git a/src/java/Ref.hxx b/src/java/Ref.hxx index bd62b17d7..e19ebb930 100644 --- a/src/java/Ref.hxx +++ b/src/java/Ref.hxx @@ -43,10 +43,12 @@ namespace Java { */ template class LocalRef { - JNIEnv *const env; - const T value; + JNIEnv *env; + T value = nullptr; public: + LocalRef() noexcept = default; + /** * The local reference is obtained by the caller. May * be nullptr.