diff --git a/src/java/File.hxx b/src/java/File.hxx index a805cdad5..e7a1a5363 100644 --- a/src/java/File.hxx +++ b/src/java/File.hxx @@ -45,6 +45,8 @@ class File : public LocalObject { static jmethodID getAbsolutePath_method; public: + using LocalObject::LocalObject; + gcc_nonnull_all static void Initialise(JNIEnv *env) noexcept; diff --git a/src/java/String.hxx b/src/java/String.hxx index 3e6e682a4..715cf647b 100644 --- a/src/java/String.hxx +++ b/src/java/String.hxx @@ -44,8 +44,7 @@ namespace Java { */ class String : public LocalRef { public: - String(JNIEnv *env, jstring value) noexcept - :LocalRef(env, value) {} + using LocalRef::LocalRef; String(JNIEnv *_env, const char *_value) noexcept :LocalRef(_env, _env->NewStringUTF(_value)) {}