Skip to content

Commit

Permalink
Remove Executor and update jni-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Bogdanov committed Jul 10, 2019
1 parent e2ce7ec commit 96022ca
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 273 deletions.
8 changes: 4 additions & 4 deletions exonum-java-binding/core/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion exonum-java-binding/core/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exonum-testkit = "0.11"
chrono = "0.4.7"
failure = "0.1.1"
toml = "0.4.6"
jni = { git = "https://github.com/jni-rs/jni-rs", branch = "auto-detach-threads", version = "0.12.3", features = ["invocation"] }
jni = { version = "0.13.0", features = ["invocation"] }
lazy_static = "1.3.0"
log = "0.4.1"
parking_lot = "0.6"
Expand Down
106 changes: 0 additions & 106 deletions exonum-java-binding/core/rust/integration_tests/src/executor.rs

This file was deleted.

1 change: 0 additions & 1 deletion exonum-java-binding/core/rust/integration_tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ extern crate lazy_static;
extern crate tempfile;

pub mod example_proxy;
pub mod executor;
pub mod fake_service;
pub mod mock;
pub mod test_service;
Expand Down
48 changes: 0 additions & 48 deletions exonum-java-binding/core/rust/integration_tests/tests/executor.rs

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions exonum-java-binding/core/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ pub use storage::*;
pub use testkit::*;

pub use jni::errors::{Error as JniError, ErrorKind as JniErrorKind, Result as JniResult};
pub use jni::Executor;
71 changes: 0 additions & 71 deletions exonum-java-binding/core/rust/src/proxy/executor.rs

This file was deleted.

2 changes: 0 additions & 2 deletions exonum-java-binding/core/rust/src/proxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

mod executor;
mod node;
mod service;
mod transaction;

pub use self::executor::*;
pub use self::node::*;
pub use self::service::*;
pub use self::transaction::*;
2 changes: 1 addition & 1 deletion exonum-java-binding/core/rust/src/proxy/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ use exonum::{
use failure;
use jni::objects::JClass;
use jni::sys::{jbyteArray, jshort};
use jni::Executor;
use jni::JNIEnv;

use std::{panic, ptr};

use handle::{cast_handle, drop_handle, to_handle, Handle};
use proxy::Executor;
use storage::View;
use utils::{unwrap_exc_or, unwrap_exc_or_default, unwrap_jni_verbose};
use JniResult;
Expand Down
3 changes: 2 additions & 1 deletion exonum-java-binding/core/rust/src/proxy/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use exonum::storage::{Fork, Snapshot};
use failure;
use jni::objects::{GlobalRef, JObject, JValue};
use jni::signature::JavaType;
use jni::Executor;
use serde_json;
use serde_json::value::Value;
use std::fmt;
Expand All @@ -34,7 +35,7 @@ use utils::{
check_error_on_exception, convert_to_hash, convert_to_string, jni_cache::service_adapter,
panic_on_exception, unwrap_jni,
};
use {Executor, TransactionProxy};
use TransactionProxy;

/// A proxy for `Service`s.
#[derive(Clone)]
Expand Down
3 changes: 2 additions & 1 deletion exonum-java-binding/core/rust/src/proxy/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use exonum::blockchain::{ExecutionError, ExecutionResult, Transaction, TransactionContext};
use jni::objects::{GlobalRef, JObject, JValue};
use jni::signature::{JavaType, Primitive};
use jni::Executor;
use jni::JNIEnv;
use serde::{self, ser};

Expand All @@ -33,7 +34,7 @@ use utils::{
},
unwrap_jni,
};
use {Executor, JniErrorKind, JniResult};
use {JniErrorKind, JniResult};

const RETVAL_TYPE_STRING: &str = "java/lang/String";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ use jni::{
self,
errors::{Error, ErrorKind},
objects::{GlobalRef, JObject},
InitArgs, InitArgsBuilder, JavaVM, Result as JniResult,
Executor, InitArgs, InitArgsBuilder, JavaVM, Result as JniResult,
};

use proxy::ServiceProxy;
use runtime::config::{self, Config, InternalConfig, JvmConfig, RuntimeConfig};
use std::{path::Path, sync::Arc};
use utils::{convert_to_string, panic_on_exception, unwrap_jni};
use Executor;

const SERVICE_RUNTIME_BOOTSTRAP_PATH: &str = "com/exonum/binding/app/ServiceRuntimeBootstrap";
const CREATE_RUNTIME_SIGNATURE: &str = "(I)Lcom/exonum/binding/core/runtime/ServiceRuntime;";
Expand Down
4 changes: 2 additions & 2 deletions exonum-java-binding/core/rust/src/testkit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ use handle::{cast_handle, drop_handle, to_handle, Handle};
use jni::{
objects::{JObject, JValue},
sys::{jboolean, jbyteArray, jobjectArray, jshort},
JNIEnv,
Executor, JNIEnv,
};
use proxy::{Executor, ServiceProxy};
use proxy::ServiceProxy;
use std::{panic, sync::Arc};
use storage::View;
use utils::{unwrap_exc_or, unwrap_exc_or_default};
Expand Down
Loading

0 comments on commit 96022ca

Please sign in to comment.