diff --git a/.travis.yml b/.travis.yml index 75f11a89c3..b6dfa23be9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,9 +18,12 @@ addons: sources: - sourceline: 'ppa:chris-lea/libsodium' - sourceline: 'ppa:maarten-fonville/protobuf' + - sourceline: 'ppa:exonum/rocksdb' packages: - build-essential - libsodium-dev + - librocksdb5.17 + - libsnappy-dev - libssl-dev - pkg-config - protobuf-compiler @@ -30,6 +33,8 @@ env: global: - RUST_COMPILER_VERSION=1.32.0 - OSX_PACKAGES="libsodium rocksdb pkg-config protobuf" + - ROCKSDB_LIB_DIR=/usr/lib + - SNAPPY_LIB_DIR=/usr/lib/x86_64-linux-gnu # REPO_TOKEN used for integration with coveralls is encoded here - secure: Fp22iaJpttsIArAyWmdCGNtljIALTYRVKO7O+H2hgBkwHHqrU7+15sbaq3xzhz4YNWNfuFMIkFUBgd/KYHgAuNDDrtm2agib13C0lQT1NFQO9ccmNCJNsXQrYrXGwpnNqPKp0YmfBfgNwzEpBerlbtvzV/T/RZukT/403XxwxU9y5tHfQokwVLibqP2jJsxdihTfCKIOs+o6hBfArmsn+e+panEv17ZrCjOmBIM/W70Rf2rEM26wFnYsfnAUTCkpl4Ong0SYNpZZxNMtw61W8ApDY8bpz7cKUxCv7SmD3kO7Y+TTHWfWYx6FNXtUpE1vCi6I7fZAY16rViTWOX55NCeFQz56XER7ArJQZtC/nC1lZ9tGKtcofu2Rq7WUoRuTwvLTaf6VzAP/CUj0DUxkV+8WUggl3s/Im7Y9rn8Aqvh8LReZmqzTY+dJ0hFG4DLoLtl71eTEnNoumi5UleBhJPaei3wPNPHg1WlOmhFyhRCsbIIGiyFtSj/faLmdc7tN/sBFANb0g4Exl0mRNvB0IfS1gM6XouEGUTlVree68p11PnsGJGs/QaUB9F9AAGVKTZ2kz7sqkCDdGmLxzbdidYDHZtYWfOIYSJCQsA09n2Txi0fwNByKfl/spdyMmtI1uGeT803rhN9vu0NGrQFG3mU7mqO33fUDEStIQ6/xn0A= @@ -76,8 +81,6 @@ before_install: # Install OSX requirements # TODO: Temporary fix, the problem is described here: https://jira.bf.local/browse/ECR-2795 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install $OSX_PACKAGES || brew install $OSX_PACKAGES; fi - # force building instead of using from apt. - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export ROCKSDB_BUILD=1; export SNAPPY_BUILD=1; fi install: true # Skip the installation step, as Maven requires # several extra properties when run on a CI server (see below). diff --git a/exonum-java-binding/CHANGELOG.md b/exonum-java-binding/CHANGELOG.md index aadb8331e4..ce6c9e4305 100644 --- a/exonum-java-binding/CHANGELOG.md +++ b/exonum-java-binding/CHANGELOG.md @@ -15,11 +15,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.5.0] - 2019-03-13 + +### Overview + +This release brings support of Exonum Time Oracle. It is based on Exonum 0.10.3. + ### Added - Support of Time oracle. Instruction on how to enable built-in services can be found - [here](https://exonum.com/doc/version/0.4/get-started/java-binding/#built-in-services). (#667) -- `com.exonum.binding.common.serialization.json.JsonSerializer` provides support for `ZonedDateTime` - JSON serialization in `java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME` format. (#762) + [here](https://exonum.com/doc/version/0.10/get-started/java-binding/#built-in-services). (#667) +- [`JsonSerializer`][json-serializer-0.5.0] provides support for `ZonedDateTime` + JSON serialization in [`ISO_ZONED_DATE_TIME`][iso-zdt-format] format. (#762) + +[json-serializer-0.5.0]: https://exonum.com/doc/api/java-binding-common/0.5.0/com/exonum/binding/common/serialization/json/JsonSerializer.html +[iso-zdt-format]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/format/DateTimeFormatter.html#ISO_ZONED_DATE_TIME ### Changed - `TransactionResult` and `TransactionLocation` classes moved to the common module. (#725) @@ -168,7 +177,8 @@ Parent module and BOM module were released as they are required dependencies to The first release of Exonum Java Binding. -[Unreleased]: https://github.com/exonum/exonum-java-binding/compare/v0.4...HEAD +[Unreleased]: https://github.com/exonum/exonum-java-binding/compare/ejb/v0.5.0...HEAD +[0.5.0]: https://github.com/exonum/exonum-java-binding/compare/v0.4...ejb/v0.5.0 [0.4]: https://github.com/exonum/exonum-java-binding/compare/v0.3...v0.4 [0.3]: https://github.com/exonum/exonum-java-binding/compare/v0.2...v0.3 [0.2]: https://github.com/exonum/exonum-java-binding/compare/v0.1.2...v0.2 diff --git a/exonum-java-binding/bom/pom.xml b/exonum-java-binding/bom/pom.xml index ed8da09e3e..9fda24454d 100644 --- a/exonum-java-binding/bom/pom.xml +++ b/exonum-java-binding/bom/pom.xml @@ -5,11 +5,11 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT exonum-java-binding-bom - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT pom Exonum Java Binding: Bill of Materials diff --git a/exonum-java-binding/common/pom.xml b/exonum-java-binding/common/pom.xml index 7ce20db5d5..c534efb532 100644 --- a/exonum-java-binding/common/pom.xml +++ b/exonum-java-binding/common/pom.xml @@ -5,11 +5,11 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT exonum-java-binding-common - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT jar Exonum Java Binding: Common diff --git a/exonum-java-binding/core/pom.xml b/exonum-java-binding/core/pom.xml index 8db4287798..f56d86c7a3 100644 --- a/exonum-java-binding/core/pom.xml +++ b/exonum-java-binding/core/pom.xml @@ -5,11 +5,11 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT exonum-java-binding-core - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT jar Exonum Java Binding: Core diff --git a/exonum-java-binding/core/rust/Cargo.lock b/exonum-java-binding/core/rust/Cargo.lock index 3f88d65c91..be010a3b34 100644 --- a/exonum-java-binding/core/rust/Cargo.lock +++ b/exonum-java-binding/core/rust/Cargo.lock @@ -587,12 +587,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ejb-app" -version = "0.5.0-SNAPSHOT" +version = "0.6.0-SNAPSHOT" dependencies = [ "exonum-btc-anchoring 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "exonum-configuration 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "exonum-time 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", - "java_bindings 0.5.0-SNAPSHOT", + "java_bindings 0.6.0-SNAPSHOT", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", "tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1183,12 +1183,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "integration_tests" -version = "0.5.0-SNAPSHOT" +version = "0.6.0-SNAPSHOT" dependencies = [ "exonum-testkit 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", - "java_bindings 0.5.0-SNAPSHOT", + "java_bindings 0.6.0-SNAPSHOT", "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.89 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1223,7 +1223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "java_bindings" -version = "0.5.0-SNAPSHOT" +version = "0.6.0-SNAPSHOT" dependencies = [ "exonum 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)", "exonum-time 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/exonum-java-binding/core/rust/Cargo.toml b/exonum-java-binding/core/rust/Cargo.toml index d3d5fdef55..8c7cd10c0d 100644 --- a/exonum-java-binding/core/rust/Cargo.toml +++ b/exonum-java-binding/core/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "java_bindings" -version = "0.5.0-SNAPSHOT" +version = "0.6.0-SNAPSHOT" authors = ["Exonum Team "] [workspace] diff --git a/exonum-java-binding/core/rust/ejb-app/Cargo.toml b/exonum-java-binding/core/rust/ejb-app/Cargo.toml index 9419e8b078..f5796caa38 100644 --- a/exonum-java-binding/core/rust/ejb-app/Cargo.toml +++ b/exonum-java-binding/core/rust/ejb-app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ejb-app" -version = "0.5.0-SNAPSHOT" +version = "0.6.0-SNAPSHOT" authors = ["Exonum team "] [dependencies] diff --git a/exonum-java-binding/core/rust/integration_tests/Cargo.toml b/exonum-java-binding/core/rust/integration_tests/Cargo.toml index 376f3a943d..ad61a2f04d 100644 --- a/exonum-java-binding/core/rust/integration_tests/Cargo.toml +++ b/exonum-java-binding/core/rust/integration_tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "integration_tests" -version = "0.5.0-SNAPSHOT" +version = "0.6.0-SNAPSHOT" authors = ["Exonum Team "] publish = false workspace = ".." diff --git a/exonum-java-binding/core/rust/integration_tests/tests/service_proxy.rs b/exonum-java-binding/core/rust/integration_tests/tests/service_proxy.rs index 7fb763e668..0245acb4f4 100644 --- a/exonum-java-binding/core/rust/integration_tests/tests/service_proxy.rs +++ b/exonum-java-binding/core/rust/integration_tests/tests/service_proxy.rs @@ -62,8 +62,6 @@ lazy_static! { } #[test] -// TODO: reenable these tests after ECR-2789 -#[cfg_attr(target_os = "linux", ignore)] fn service_id() { let service_id: u16 = 24; let service = ServiceMockBuilder::new(EXECUTOR.clone()) @@ -73,7 +71,6 @@ fn service_id() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn service_id_negative() { // Check that value is converted between rust `u16` and java `short` without loss. let service_id: u16 = -24_i16 as u16; // 65512; @@ -84,7 +81,6 @@ fn service_id_negative() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn service_name() { let service_name: &str = "test_service"; let service = ServiceMockBuilder::new(EXECUTOR.clone()) @@ -94,7 +90,6 @@ fn service_name() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn state_hash() { let db = MemoryDB::new(); let snapshot = db.snapshot(); @@ -106,7 +101,6 @@ fn state_hash() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] #[should_panic(expected = "Java exception: java.lang.OutOfMemoryError")] fn tx_from_raw_should_panic_if_java_error_occurred() { let raw = create_empty_raw_transaction(); @@ -117,7 +111,6 @@ fn tx_from_raw_should_panic_if_java_error_occurred() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn tx_from_raw_should_return_err_if_java_exception_occurred() { let raw = create_empty_raw_transaction(); let service = ServiceMockBuilder::new(EXECUTOR.clone()) @@ -132,7 +125,6 @@ fn tx_from_raw_should_return_err_if_java_exception_occurred() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn initialize_config() { let db = MemoryDB::new(); let mut fork = db.fork(); @@ -146,7 +138,6 @@ fn initialize_config() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn initialize_config_null() { let db = MemoryDB::new(); let mut fork = db.fork(); @@ -160,7 +151,6 @@ fn initialize_config_null() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn initialize_config_parse_error() { let db = MemoryDB::new(); let mut fork = db.fork(); @@ -180,7 +170,6 @@ fn initialize_config_parse_error() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] #[should_panic(expected = "Java exception: java.lang.RuntimeException")] fn initialize_should_panic_if_java_exception_occurred() { let db = MemoryDB::new(); @@ -194,7 +183,6 @@ fn initialize_should_panic_if_java_exception_occurred() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn service_can_modify_db_on_initialize() { let db = MemoryDB::new(); let service = create_test_service(EXECUTOR.clone()); @@ -216,7 +204,6 @@ fn service_can_modify_db_on_initialize() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] #[should_panic(expected = "Java exception: com.exonum.binding.fakes.mocks.TestException")] fn after_commit_throwing() { let service = ServiceMockBuilder::new(EXECUTOR.clone()) @@ -233,7 +220,6 @@ fn after_commit_throwing() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn after_commit_validator() { let (builder, interactor) = ServiceMockBuilder::new(EXECUTOR.clone()).get_mock_interaction_after_commit(); @@ -263,7 +249,6 @@ fn after_commit_validator() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn after_commit_auditor() { let (builder, interactor) = ServiceMockBuilder::new(EXECUTOR.clone()).get_mock_interaction_after_commit(); diff --git a/exonum-java-binding/core/rust/integration_tests/tests/service_runtime.rs b/exonum-java-binding/core/rust/integration_tests/tests/service_runtime.rs index 36526ac9c9..51ffcb0fd7 100644 --- a/exonum-java-binding/core/rust/integration_tests/tests/service_runtime.rs +++ b/exonum-java-binding/core/rust/integration_tests/tests/service_runtime.rs @@ -24,9 +24,7 @@ use java_bindings::{Config, JavaServiceRuntime, JvmConfig, RuntimeConfig, Servic #[test] #[ignore] -// Disabled till ECR-2999/ECR-3011 -// TODO: reenable this test after ECR-2789 -//#[cfg_attr(target_os = "linux", ignore)] +// TODO: Reenable after ECR-2999/ECR-3011 fn bootstrap() { let artifact_uri = "".to_owned(); let system_class_path = get_fakes_classpath(); diff --git a/exonum-java-binding/core/rust/integration_tests/tests/transaction_proxy.rs b/exonum-java-binding/core/rust/integration_tests/tests/transaction_proxy.rs index c368f5a9eb..590a8eeefe 100644 --- a/exonum-java-binding/core/rust/integration_tests/tests/transaction_proxy.rs +++ b/exonum-java-binding/core/rust/integration_tests/tests/transaction_proxy.rs @@ -50,8 +50,6 @@ lazy_static! { } #[test] -// TODO: reenable these tests after ECR-2789 -#[cfg_attr(target_os = "linux", ignore)] fn execute_valid_transaction() { let db = MemoryDB::new(); let snapshot = db.snapshot(); @@ -75,7 +73,6 @@ fn execute_valid_transaction() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] #[should_panic(expected = "Java exception: java.lang.OutOfMemoryError")] fn execute_should_panic_if_java_error_occurred() { let (panic_tx, raw) = create_throwing_mock_transaction_proxy(EXECUTOR.clone(), OOM_ERROR_CLASS); @@ -87,7 +84,6 @@ fn execute_should_panic_if_java_error_occurred() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] #[should_panic(expected = "Java exception: java.lang.ArithmeticException")] fn execute_should_panic_if_java_exception_occurred() { let (panic_tx, raw) = @@ -100,7 +96,6 @@ fn execute_should_panic_if_java_exception_occurred() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn execute_should_return_err_if_tx_exec_exception_occurred() { let err_code: i8 = 1; let err_message = "Expected exception"; @@ -123,7 +118,6 @@ fn execute_should_return_err_if_tx_exec_exception_occurred() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn execute_should_return_err_if_tx_exec_exception_subclass_occurred() { let err_code: i8 = 2; let err_message = "Expected exception subclass"; @@ -146,7 +140,6 @@ fn execute_should_return_err_if_tx_exec_exception_subclass_occurred() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn execute_should_return_err_if_tx_exec_exception_occurred_no_message() { let err_code: i8 = 3; let (invalid_tx, raw) = create_throwing_exec_exception_mock_transaction_proxy( @@ -168,7 +161,6 @@ fn execute_should_return_err_if_tx_exec_exception_occurred_no_message() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn execute_should_return_err_if_tx_exec_exception_subclass_occurred_no_message() { let err_code: i8 = 4; let (invalid_tx, raw) = create_throwing_exec_exception_mock_transaction_proxy( @@ -189,14 +181,12 @@ fn execute_should_return_err_if_tx_exec_exception_subclass_occurred_no_message() assert!(err.description().is_none()); } -#[cfg_attr(target_os = "linux", ignore)] #[test] fn json_serialize() { let valid_tx = create_mock_transaction_proxy(EXECUTOR.clone()); assert_eq!(serde_json::to_value(&valid_tx.0).unwrap(), *INFO_VALUE); } -#[cfg_attr(target_os = "linux", ignore)] #[test] #[should_panic(expected = "Java exception: java.lang.OutOfMemoryError")] fn json_serialize_should_panic_if_java_error_occurred() { @@ -204,7 +194,6 @@ fn json_serialize_should_panic_if_java_error_occurred() { serde_json::to_string(&panic_tx.0).unwrap(); } -#[cfg_attr(target_os = "linux", ignore)] #[test] fn json_serialize_should_return_err_if_java_exception_occurred() { let invalid_tx = @@ -217,7 +206,6 @@ fn json_serialize_should_return_err_if_java_exception_occurred() { } #[test] -#[cfg_attr(target_os = "linux", ignore)] fn passing_transaction_context() { let db = MemoryDB::new(); let keypair = crypto::gen_keypair(); diff --git a/exonum-java-binding/cryptocurrency-demo/pom.xml b/exonum-java-binding/cryptocurrency-demo/pom.xml index f0cb773079..87a493e331 100644 --- a/exonum-java-binding/cryptocurrency-demo/pom.xml +++ b/exonum-java-binding/cryptocurrency-demo/pom.xml @@ -5,11 +5,11 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT exonum-java-binding-cryptocurrency-demo - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT jar Exonum Java Binding: Cryptocurrency Java service diff --git a/exonum-java-binding/fake-service/pom.xml b/exonum-java-binding/fake-service/pom.xml index 20f663efa7..b20422b79b 100644 --- a/exonum-java-binding/fake-service/pom.xml +++ b/exonum-java-binding/fake-service/pom.xml @@ -5,7 +5,7 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT fake-service diff --git a/exonum-java-binding/fakes/pom.xml b/exonum-java-binding/fakes/pom.xml index 786d219527..7b657a0fcc 100644 --- a/exonum-java-binding/fakes/pom.xml +++ b/exonum-java-binding/fakes/pom.xml @@ -5,11 +5,11 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT exonum-java-binding-fakes - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT jar Exonum Java Binding: Fakes diff --git a/exonum-java-binding/pom.xml b/exonum-java-binding/pom.xml index fa2cf72fb8..f4d6b57b95 100644 --- a/exonum-java-binding/pom.xml +++ b/exonum-java-binding/pom.xml @@ -4,7 +4,7 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT pom Exonum Java Binding Parent @@ -324,7 +324,7 @@ - validate + check-java-code-style validate UTF-8 diff --git a/exonum-java-binding/qa-service/pom.xml b/exonum-java-binding/qa-service/pom.xml index b0d504716a..df55a1802f 100644 --- a/exonum-java-binding/qa-service/pom.xml +++ b/exonum-java-binding/qa-service/pom.xml @@ -5,11 +5,11 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT exonum-java-binding-qa-service - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT jar Exonum Java Binding: QA Java service diff --git a/exonum-java-binding/service-archetype/pom.xml b/exonum-java-binding/service-archetype/pom.xml index 03ca78a096..c47a350d0c 100644 --- a/exonum-java-binding/service-archetype/pom.xml +++ b/exonum-java-binding/service-archetype/pom.xml @@ -5,7 +5,7 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT exonum-java-binding-service-archetype diff --git a/exonum-java-binding/service-archetype/src/main/resources/archetype-resources/pom.xml b/exonum-java-binding/service-archetype/src/main/resources/archetype-resources/pom.xml index 7048e25f69..1d58982bc5 100644 --- a/exonum-java-binding/service-archetype/src/main/resources/archetype-resources/pom.xml +++ b/exonum-java-binding/service-archetype/src/main/resources/archetype-resources/pom.xml @@ -18,7 +18,7 @@ 5.4.0 2.1 2.24.0 - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT diff --git a/exonum-java-binding/testing/pom.xml b/exonum-java-binding/testing/pom.xml index c8902e4940..51a53e9449 100644 --- a/exonum-java-binding/testing/pom.xml +++ b/exonum-java-binding/testing/pom.xml @@ -5,11 +5,11 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT exonum-java-testing - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT jar Exonum Java Binding: Testing Utils diff --git a/exonum-java-binding/time-oracle/README.md b/exonum-java-binding/time-oracle/README.md index dac77a0a06..d5a33416d2 100644 --- a/exonum-java-binding/time-oracle/README.md +++ b/exonum-java-binding/time-oracle/README.md @@ -12,7 +12,7 @@ Include `exonum-time-oracle` as a dependency in your `pom.xml`: com.exonum.binding exonum-time-oracle - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT ``` @@ -25,6 +25,7 @@ services = ["time"] See more information on built-in services [here][built-in-services]. +[`TimeSchema`][time-schema-javadoc] allows to access the state of time oracle. Below is an example of a service method that uses time oracle to return the consolidated time. Note that at the time when a new blockchain is launched, the consolidated time is unknown until the transactions containing time values from at least two thirds of validator nodes are processed. @@ -55,3 +56,4 @@ See [LICENSE](../../LICENSE) for details. [exonum-time]: https://exonum.com/doc/version/0.10/advanced/time/ [built-in-services]: https://exonum.com/doc/version/0.10/get-started/java-binding/#built-in-services +[time-schema-javadoc]: https://exonum.com/doc/api/java-time-oracle/0.5.0/com/exonum/binding/time/TimeSchema.html diff --git a/exonum-java-binding/time-oracle/pom.xml b/exonum-java-binding/time-oracle/pom.xml index d1846bde07..4b84afb22d 100644 --- a/exonum-java-binding/time-oracle/pom.xml +++ b/exonum-java-binding/time-oracle/pom.xml @@ -5,11 +5,11 @@ com.exonum.binding exonum-java-binding-parent - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT exonum-time-oracle - 0.5-SNAPSHOT + 0.6.0-SNAPSHOT jar Exonum Time Oracle @@ -59,13 +59,14 @@ - org.apache.maven.plugins - maven-deploy-plugin - - true - + maven-javadoc-plugin + + + + org.apache.maven.plugins + maven-source-plugin diff --git a/exonum-java-binding/time-oracle/src/main/java/com/exonum/binding/time/TimeSchema.java b/exonum-java-binding/time-oracle/src/main/java/com/exonum/binding/time/TimeSchema.java index 12b0489b60..c98b8e4297 100644 --- a/exonum-java-binding/time-oracle/src/main/java/com/exonum/binding/time/TimeSchema.java +++ b/exonum-java-binding/time-oracle/src/main/java/com/exonum/binding/time/TimeSchema.java @@ -26,7 +26,7 @@ * Exonum time service database schema. It provides read-only access to the state * of the time oracle for a given {@linkplain View database view}. * - * @see Time oracle documentation + * @see Time oracle documentation */ public interface TimeSchema { diff --git a/exonum-java-binding/time-oracle/src/test/java/com/exonum/binding/time/UtcZonedDateTimeSerializerTest.java b/exonum-java-binding/time-oracle/src/test/java/com/exonum/binding/time/UtcZonedDateTimeSerializerTest.java index 3ea6a47269..029305a189 100644 --- a/exonum-java-binding/time-oracle/src/test/java/com/exonum/binding/time/UtcZonedDateTimeSerializerTest.java +++ b/exonum-java-binding/time-oracle/src/test/java/com/exonum/binding/time/UtcZonedDateTimeSerializerTest.java @@ -33,13 +33,13 @@ class UtcZonedDateTimeSerializerTest { - private Serializer serializer = UtcZonedDateTimeSerializer.INSTANCE; + private final Serializer SERIALIZER = UtcZonedDateTimeSerializer.INSTANCE; @ParameterizedTest @MethodSource("testSource") void roundTrip(ZonedDateTime key) { - byte[] bytes = serializer.toBytes(key); - ZonedDateTime actual = serializer.fromBytes(bytes); + byte[] bytes = SERIALIZER.toBytes(key); + ZonedDateTime actual = SERIALIZER.fromBytes(bytes); assertThat(actual, equalTo(key)); } @@ -47,13 +47,13 @@ void roundTrip(ZonedDateTime key) { @Test void deserializeInvalidValue() { byte[] invalidValue = Bytes.bytes(); - assertThrows(IllegalArgumentException.class, () -> serializer.fromBytes(invalidValue)); + assertThrows(IllegalArgumentException.class, () -> SERIALIZER.fromBytes(invalidValue)); } @Test void serializeNonUtcValue() { ZonedDateTime value = ZonedDateTime.now(ZoneId.of("Europe/Amsterdam")); - assertThrows(IllegalArgumentException.class, () -> serializer.toBytes(value)); + assertThrows(IllegalArgumentException.class, () -> SERIALIZER.toBytes(value)); } private static Stream testSource() { diff --git a/exonum-light-client/CHANGELOG.md b/exonum-light-client/CHANGELOG.md index d273cd7d34..34e87b281f 100644 --- a/exonum-light-client/CHANGELOG.md +++ b/exonum-light-client/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Versions Support - Exonum version, 0.11 + - Exonum Java Binding version, 0.5-SNAPSHOT ### Added diff --git a/exonum-light-client/pom.xml b/exonum-light-client/pom.xml index 29c82078f3..7970abe961 100644 --- a/exonum-light-client/pom.xml +++ b/exonum-light-client/pom.xml @@ -61,7 +61,7 @@ - 0.5-SNAPSHOT + 0.5.0 8 8 UTF-8 @@ -171,7 +171,7 @@ - validate + check-java-code-style validate UTF-8