Skip to content

Commit

Permalink
Merge f35573c into 4985049
Browse files Browse the repository at this point in the history
  • Loading branch information
MakarovS committed Mar 13, 2019
2 parents 4985049 + f35573c commit e28ce15
Show file tree
Hide file tree
Showing 21 changed files with 53 additions and 44 deletions.
18 changes: 14 additions & 4 deletions exonum-java-binding/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [0.5.0] - 2019-03-TBD

### 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)
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions exonum-java-binding/bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>com.exonum.binding</groupId>
<artifactId>exonum-java-binding-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
</parent>

<artifactId>exonum-java-binding-bom</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
<packaging>pom</packaging>

<name>Exonum Java Binding: Bill of Materials</name>
Expand Down
4 changes: 2 additions & 2 deletions exonum-java-binding/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>com.exonum.binding</groupId>
<artifactId>exonum-java-binding-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
</parent>

<artifactId>exonum-java-binding-common</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
<packaging>jar</packaging>

<name>Exonum Java Binding: Common</name>
Expand Down
4 changes: 2 additions & 2 deletions exonum-java-binding/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>com.exonum.binding</groupId>
<artifactId>exonum-java-binding-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
</parent>

<artifactId>exonum-java-binding-core</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
<packaging>jar</packaging>

<name>Exonum Java Binding: Core</name>
Expand Down
10 changes: 5 additions & 5 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
@@ -1,6 +1,6 @@
[package]
name = "java_bindings"
version = "0.5.0-SNAPSHOT"
version = "0.5.0"
authors = ["Exonum Team <exonum@bitfury.com>"]

[workspace]
Expand Down
2 changes: 1 addition & 1 deletion exonum-java-binding/core/rust/ejb-app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ejb-app"
version = "0.5.0-SNAPSHOT"
version = "0.5.0"
authors = ["Exonum team <exonum@bitfury.com>"]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion exonum-java-binding/core/rust/integration_tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "integration_tests"
version = "0.5.0-SNAPSHOT"
version = "0.5.0"
authors = ["Exonum Team <exonum@bitfury.com>"]
publish = false
workspace = ".."
Expand Down
4 changes: 2 additions & 2 deletions exonum-java-binding/cryptocurrency-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>com.exonum.binding</groupId>
<artifactId>exonum-java-binding-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
</parent>

<artifactId>exonum-java-binding-cryptocurrency-demo</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
<packaging>jar</packaging>

<name>Exonum Java Binding: Cryptocurrency Java service</name>
Expand Down
4 changes: 2 additions & 2 deletions exonum-java-binding/fakes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>com.exonum.binding</groupId>
<artifactId>exonum-java-binding-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
</parent>

<artifactId>exonum-java-binding-fakes</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
<packaging>jar</packaging>

<name>Exonum Java Binding: Fakes</name>
Expand Down
2 changes: 1 addition & 1 deletion exonum-java-binding/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.exonum.binding</groupId>
<artifactId>exonum-java-binding-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
<packaging>pom</packaging>

<name>Exonum Java Binding Parent</name>
Expand Down
4 changes: 2 additions & 2 deletions exonum-java-binding/qa-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>com.exonum.binding</groupId>
<artifactId>exonum-java-binding-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
</parent>

<artifactId>exonum-java-binding-qa-service</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
<packaging>jar</packaging>

<name>Exonum Java Binding: QA Java service</name>
Expand Down
2 changes: 1 addition & 1 deletion exonum-java-binding/service-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.exonum.binding</groupId>
<artifactId>exonum-java-binding-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
</parent>

<artifactId>exonum-java-binding-service-archetype</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<junit.jupiter.version>5.4.0</junit.jupiter.version>
<hamcrest.version>2.1</hamcrest.version>
<mockito.version>2.24.0</mockito.version>
<exonum.version>0.5-SNAPSHOT</exonum.version>
<exonum.version>0.5.0</exonum.version>
</properties>

<dependencyManagement>
Expand Down
4 changes: 2 additions & 2 deletions exonum-java-binding/testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>com.exonum.binding</groupId>
<artifactId>exonum-java-binding-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
</parent>

<artifactId>exonum-java-testing</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
<packaging>jar</packaging>

<name>Exonum Java Binding: Testing Utils</name>
Expand Down
4 changes: 3 additions & 1 deletion exonum-java-binding/time-oracle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Include `exonum-time-oracle` as a dependency in your `pom.xml`:
<dependency>
<groupId>com.exonum.binding</groupId>
<artifactId>exonum-time-oracle</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
</dependency>
```

Expand All @@ -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.
Expand Down Expand Up @@ -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
10 changes: 3 additions & 7 deletions exonum-java-binding/time-oracle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>com.exonum.binding</groupId>
<artifactId>exonum-java-binding-parent</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
</parent>

<artifactId>exonum-time-oracle</artifactId>
<version>0.5-SNAPSHOT</version>
<version>0.5.0</version>
<packaging>jar</packaging>

<name>Exonum Time Oracle</name>
Expand Down Expand Up @@ -59,13 +59,9 @@
</configuration>
</plugin>

<!-- Skip the deployment of this module -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://exonum.com/doc/version/latest/advanced/time/">Time oracle documentation</a>
* @see <a href="https://exonum.com/doc/version/0.10/advanced/time/">Time oracle documentation</a>
*/
public interface TimeSchema {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@

class UtcZonedDateTimeSerializerTest {

private Serializer<ZonedDateTime> serializer = UtcZonedDateTimeSerializer.INSTANCE;
private final Serializer<ZonedDateTime> 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));
}

@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<ZonedDateTime> testSource() {
Expand Down
1 change: 1 addition & 0 deletions exonum-light-client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Versions Support
- Exonum version, 0.11
<!-- TODO: clarify during JLC release (in readme#compatibility) -->
- Exonum Java Binding version, 0.5-SNAPSHOT

### Added
Expand Down
2 changes: 1 addition & 1 deletion exonum-light-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<properties>
<!-- Project configuration -->
<ejb.version>0.5-SNAPSHOT</ejb.version>
<ejb.version>0.5.0</ejb.version>
<java.compiler.source>8</java.compiler.source>
<java.compiler.target>8</java.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down

0 comments on commit e28ce15

Please sign in to comment.