Skip to content

Commit 31365ec

Browse files
committed
Using Flow API from Java, removed Flow from reactive module.
See helidon-io#1220 Javadoc no longer fails the build. See helidon-io#1223 as a follow up issue. Signed-off-by: Tomas Langer <tomas.langer@oracle.com>
1 parent d34ad1e commit 31365ec

279 files changed

Lines changed: 560 additions & 899 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55

66
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 2.0.0
9+
### Backward incompatible changes
10+
#### Common
11+
- Flow API is now used from `java.util.concurrent.Flow`, Helidon specific `Flow` class is now removed
12+
813
## [1.4.0]
914

1015
### Notes

common/common/src/test/java/io/helidon/common/InputStreamHelperTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616

1717
package io.helidon.common;
1818

19+
import java.io.ByteArrayInputStream;
20+
import java.io.IOException;
21+
import java.io.InputStream;
22+
1923
import org.junit.jupiter.api.Test;
2024

2125
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
2226
import static org.junit.jupiter.api.Assertions.assertEquals;
2327
import static org.junit.jupiter.api.Assertions.assertNotSame;
2428

25-
import java.io.ByteArrayInputStream;
26-
import java.io.IOException;
27-
import java.io.InputStream;
28-
2929
/**
3030
* Unit tests for class {@link InputStreamHelper}.
3131
*

common/configurable/src/test/java/io/helidon/common/configurable/ScheduledThreadPoolSupplierTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import java.util.concurrent.atomic.AtomicReference;
2222

2323
import io.helidon.config.Config;
24+
2425
import org.junit.jupiter.api.BeforeAll;
2526
import org.junit.jupiter.api.Test;
2627

common/http/src/main/java/io/helidon/common/http/Content.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2019 Oracle and/or its affiliates. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,11 +17,10 @@
1717
package io.helidon.common.http;
1818

1919
import java.util.concurrent.CompletionStage;
20+
import java.util.concurrent.Flow;
2021
import java.util.function.Function;
2122
import java.util.function.Predicate;
2223

23-
import io.helidon.common.reactive.Flow;
24-
2524
/**
2625
* Represents an HTTP entity as a {@link Flow.Publisher publisher} of {@link DataChunk chunks} with specific
2726
* features.

common/http/src/main/java/io/helidon/common/http/Reader.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2019 Oracle and/or its affiliates. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,10 +17,9 @@
1717
package io.helidon.common.http;
1818

1919
import java.util.concurrent.CompletionStage;
20+
import java.util.concurrent.Flow;
2021
import java.util.function.BiFunction;
2122

22-
import io.helidon.common.reactive.Flow;
23-
2423
/**
2524
* The Reader transforms a {@link DataChunk} publisher into a completion stage of the associated type.
2625
*

common/http/src/test/java/io/helidon/common/http/AsciiTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
package io.helidon.common.http;
1818

19+
import org.junit.jupiter.api.Test;
20+
1921
import static org.junit.jupiter.api.Assertions.assertEquals;
2022
import static org.junit.jupiter.api.Assertions.assertFalse;
2123
import static org.junit.jupiter.api.Assertions.assertTrue;
2224

23-
import org.junit.jupiter.api.Test;
24-
2525
/**
2626
* Unit tests for class {@link Ascii}.
2727
*

common/http/src/test/java/io/helidon/common/http/FormParamsTest.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@
1515
*/
1616
package io.helidon.common.http;
1717

18-
import io.helidon.common.CollectionsHelper;
19-
import org.hamcrest.CoreMatchers;
20-
import org.junit.jupiter.api.Assertions;
18+
import java.util.List;
19+
import java.util.Optional;
20+
2121
import org.junit.jupiter.api.Test;
2222

23-
import static org.hamcrest.CoreMatchers.*;
23+
import static org.hamcrest.CoreMatchers.equalTo;
24+
import static org.hamcrest.CoreMatchers.hasItem;
25+
import static org.hamcrest.CoreMatchers.hasItems;
26+
import static org.hamcrest.CoreMatchers.is;
2427
import static org.hamcrest.MatcherAssert.assertThat;
2528
import static org.junit.jupiter.api.Assertions.assertThrows;
2629

27-
28-
import java.util.List;
29-
import java.util.Optional;
30-
3130
public class FormParamsTest {
3231

3332
private static final String KEY1 = "key1";

common/reactive/src/main/java/io/helidon/common/reactive/BaseProcessor.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
package io.helidon.common.reactive;
1717

1818
import java.util.concurrent.ExecutionException;
19+
import java.util.concurrent.Flow.Processor;
20+
import java.util.concurrent.Flow.Publisher;
21+
import java.util.concurrent.Flow.Subscriber;
22+
import java.util.concurrent.Flow.Subscription;
1923
import java.util.concurrent.atomic.AtomicBoolean;
2024

21-
import io.helidon.common.reactive.Flow.Processor;
22-
import io.helidon.common.reactive.Flow.Publisher;
23-
import io.helidon.common.reactive.Flow.Subscriber;
24-
import io.helidon.common.reactive.Flow.Subscription;
25-
2625
/**
2726
* A generic processor used for the implementation of {@link Multi} and {@link Single}.
2827
*

common/reactive/src/main/java/io/helidon/common/reactive/EmptySubscription.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
package io.helidon.common.reactive;
1717

18-
import io.helidon.common.reactive.Flow.Subscription;
18+
import java.util.concurrent.Flow.Subscription;
1919

2020
/**
2121
* Empty subscription singleton.

common/reactive/src/main/java/io/helidon/common/reactive/FixedItemsPublisher.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
import java.util.Collection;
1919
import java.util.LinkedList;
2020
import java.util.Queue;
21+
import java.util.concurrent.Flow;
22+
import java.util.concurrent.Flow.Publisher;
23+
import java.util.concurrent.Flow.Subscriber;
2124
import java.util.concurrent.atomic.AtomicBoolean;
2225

23-
import io.helidon.common.reactive.Flow.Publisher;
24-
import io.helidon.common.reactive.Flow.Subscriber;
25-
2626
/**
2727
* Fixed items publisher implementation.
2828
*/

0 commit comments

Comments
 (0)