Skip to content

Commit

Permalink
Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
Zheaoli committed Nov 2, 2023
1 parent ff62e61 commit fb8647f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions bindings/java/src/operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,11 @@ pub extern "system" fn Java_org_apache_opendal_Operator_constructor(
fn intern_constructor(env: &mut JNIEnv, scheme: JString, map: JObject) -> Result<jlong> {
let scheme = Scheme::from_str(jstring_to_string(env, &scheme)?.as_str())?;
let map = jmap_to_hashmap(env, &map)?;

let mut op = Operator::via_map(scheme, map)?;
if !op.info().full_capability().blocking {
let _guard = unsafe { get_global_runtime() }.enter();
op = op.layer(BlockingLayer::create()?);
}
#[cfg(feature = "test-retry")]
let op = {
use opendal::layers::RetryLayer;
op.layer(RetryLayer::new().with_max_times(4))
};

Ok(Box::into_raw(Box::new(op)) as jlong)
}
Expand Down

0 comments on commit fb8647f

Please sign in to comment.