- suppress most java warnings

This commit is contained in:
w.pomp
2026-07-14 12:49:16 +02:00
parent 25d2070ac3
commit 0d347b7967
2 changed files with 12 additions and 6 deletions
+10 -4
View File
@@ -106,11 +106,19 @@ fn jvm() -> Rc<Jvm> {
Jvm::attach_thread().expect("Failed to attach to JVM")
} else {
*jvm_built = true;
JvmBuilder::new()
let j = JvmBuilder::new()
.skip_setting_native_lib()
.with_base_path(class_path.to_str().unwrap())
.build()
.expect("Failed to build JVM")
.expect("Failed to build JVM");
if let Ok(e) = InvocationArg::try_from("ERROR") {
let _ = j.invoke_static(
"loci.common.DebugTools",
"setRootLevel",
&[e],
);
}
j
})
}
})
@@ -484,7 +492,6 @@ impl Reader for BioFormatsJavaReader {
where
P: AsRef<Path>,
{
DebugTools::set_root_level("ERROR")?;
let mut path = path.as_ref().to_path_buf();
if path.is_dir() {
let orig = path.clone();
@@ -562,7 +569,6 @@ impl Reader for BioFormatsJavaReader {
where
P: AsRef<Path>,
{
DebugTools::set_root_level("ERROR")?;
let mut path = path.as_ref().to_path_buf();
if path.is_dir() {
let orig = path.clone();