From eeeeb3c02b0e0c578eb36c08d80cf2bf400067fc Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sat, 14 Oct 2017 12:41:27 +0800 Subject: [PATCH] Reverts change to use JSR 305 dependency, due to problems w/OSGi, Java 9 Before, we optimized to drop our source-retention Nullable in favor of JSR 305. In doing so, we got null analysis from Intellij. However, in doing so, we entered a swamp of dependency conflicts, which started with OSGi (hence switch to service mix bundle) and now with Java 9 (conflict with apps using jax-ws. Since we are a core dependency, and particularly not a user-api, this change caused more problems than it fixed. Hence, this reverts to the safer model of using internal source-retention nullable (which allows things like AutoValue to work, but don't introduce any chance of runtime class conflicts). See #1703 See https://github.com/openzipkin/brave/issues/451 --- pom.xml | 13 ------------- .../collector/kafka10/package-info.java | 15 --------------- .../collector/rabbitmq/package-info.java | 15 --------------- .../collector/scribe/package-info.java | 15 --------------- .../autoconfigure/metrics/package-info.java | 15 --------------- .../storage/cassandra/brave/package-info.java | 15 --------------- .../storage/cassandra/package-info.java | 15 --------------- .../storage/cassandra3/brave/package-info.java | 15 --------------- .../storage/cassandra3/package-info.java | 15 --------------- .../storage/elasticsearch/aws/AWSCredentials.java | 2 +- .../storage/elasticsearch/aws/package-info.java | 15 --------------- .../elasticsearch/http/brave/package-info.java | 15 --------------- .../storage/elasticsearch/http/package-info.java | 15 --------------- .../storage/mysql/brave/package-info.java | 15 --------------- .../autoconfigure/storage/mysql/package-info.java | 15 --------------- .../zipkin/autoconfigure/ui/package-info.java | 15 --------------- .../java/zipkin/collector/kafka/package-info.java | 15 --------------- .../zipkin/collector/kafka10/package-info.java | 15 --------------- .../zipkin/collector/rabbitmq/package-info.java | 15 --------------- .../collector/scribe/ScribeSpanConsumer.java | 2 +- .../zipkin/collector/scribe/package-info.java | 15 --------------- .../java/zipkin/storage/guava/GuavaSpanStore.java | 2 +- .../storage/guava/InternalForwardingCallback.java | 2 +- .../guava/InternalGuavaSpanConsumerAdapter.java | 2 +- .../guava/InternalGuavaSpanStoreAdapter.java | 2 +- .../InternalGuavaToAsyncSpanStoreAdapter.java | 2 +- .../java/zipkin/storage/guava/package-info.java | 15 --------------- .../main/java/zipkin/junit/ZipkinDispatcher.java | 2 +- .../src/main/java/zipkin/junit/package-info.java | 15 --------------- .../src/test/java/zipkin/junit/HttpSpanStore.java | 2 +- .../java/zipkin/junit/v2/HttpV2SpanStore.java | 2 +- .../zipkin/server/ActuateCollectorMetrics.java | 9 ++++----- .../java/zipkin/server/ZipkinHttpCollector.java | 2 +- .../main/java/zipkin/server/ZipkinQueryApiV2.java | 2 +- .../zipkin/server/brave/BraveConfiguration.java | 2 +- .../server/brave/TracedAsyncSpanConsumer.java | 2 +- .../java/zipkin/server/brave/TracedSpanStore.java | 2 +- .../java/zipkin/server/brave/package-info.java | 15 --------------- .../src/main/java/zipkin/server/package-info.java | 15 --------------- .../storage/cassandra/CassandraSpanConsumer.java | 2 +- .../storage/cassandra/CassandraSpanStore.java | 2 +- .../storage/cassandra/CassandraStorage.java | 2 +- .../zipkin/storage/cassandra/CassandraUtil.java | 2 +- .../storage/cassandra/CompositeIndexer.java | 2 +- .../storage/cassandra/DeduplicatingExecutor.java | 2 +- .../java/zipkin/storage/cassandra/Indexer.java | 2 +- .../zipkin/storage/cassandra/package-info.java | 15 --------------- .../storage/cassandra3/Cassandra3Storage.java | 2 +- .../storage/cassandra3/CassandraSpanStore.java | 2 +- .../zipkin/storage/cassandra3/CassandraUtil.java | 2 +- .../zipkin/storage/cassandra3/package-info.java | 15 --------------- .../cassandra3/integration/package-info.java | 15 --------------- .../http/ElasticsearchHttpStorage.java | 2 +- .../http/LegacyElasticsearchHttpSpanStore.java | 2 +- .../elasticsearch/http/LegacyJsonAdapters.java | 12 ++++-------- .../storage/elasticsearch/http/package-info.java | 15 --------------- .../http/integration/package-info.java | 15 --------------- .../elasticsearch/ElasticsearchSpanConsumer.java | 2 +- .../elasticsearch/ElasticsearchStorage.java | 2 +- .../java/zipkin2/elasticsearch/JsonAdapters.java | 13 +++++-------- .../elasticsearch/PseudoAddressRecordSet.java | 2 +- .../elasticsearch/internal/HttpBulkIndexer.java | 2 +- .../internal/IndexNameFormatter.java | 2 +- .../elasticsearch/internal/JsonReaders.java | 2 +- .../internal/client/SearchCallFactory.java | 2 +- .../internal/client/SearchRequest.java | 2 +- .../internal/client/package-info.java | 15 --------------- .../ElasticsearchSpanConsumerTest.java | 2 +- .../internal/client/HttpCallTest.java | 2 +- .../java/zipkin/storage/mysql/DSLContexts.java | 2 +- .../mysql/DependencyLinkV2SpanIterator.java | 4 ++-- .../java/zipkin/storage/mysql/MySQLSpanStore.java | 4 ++-- .../java/zipkin/storage/mysql/MySQLStorage.java | 2 +- .../mysql/internal/generated/package-info.java | 15 --------------- .../internal/generated/tables/package-info.java | 15 --------------- .../java/zipkin/storage/mysql/package-info.java | 15 --------------- .../zookeeper/ZooKeeperCollectorSampler.java | 2 +- .../zipkin/collector/zookeeper/package-info.java | 15 --------------- zipkin/src/main/java/zipkin/Annotation.java | 2 +- zipkin/src/main/java/zipkin/BinaryAnnotation.java | 2 +- zipkin/src/main/java/zipkin/Component.java | 2 +- zipkin/src/main/java/zipkin/Endpoint.java | 2 +- zipkin/src/main/java/zipkin/Span.java | 2 +- .../java/zipkin/collector/CollectorSampler.java | 2 +- .../main/java/zipkin/collector/package-info.java | 15 --------------- .../main/java/zipkin/internal/CallbackCaptor.java | 1 - .../src/main/java/zipkin/internal/Collector.java | 1 - .../java/zipkin/internal/CorrectForClockSkew.java | 1 - .../main/java/zipkin/internal/InetAddresses.java | 1 - .../zipkin/internal/LenientDoubleCallback.java | 1 - .../LenientDoubleCallbackAsyncSpanStore.java | 1 - .../internal/{package-info.java => Nullable.java} | 11 ++++++++++- zipkin/src/main/java/zipkin/internal/Util.java | 1 - .../java/zipkin/internal/V2CallbackAdapter.java | 1 - .../main/java/zipkin/internal/V2Collector.java | 1 - .../java/zipkin/internal/V2SpanConverter.java | 1 - .../java/zipkin/internal/V2SpanStoreAdapter.java | 1 - .../java/zipkin/internal/V2StorageComponent.java | 1 - zipkin/src/main/java/zipkin/package-info.java | 15 --------------- .../main/java/zipkin/storage/AsyncSpanStore.java | 2 +- zipkin/src/main/java/zipkin/storage/Callback.java | 2 +- .../java/zipkin/storage/InMemorySpanStore.java | 2 +- .../InternalAsyncToBlockingSpanStoreAdapter.java | 2 +- .../InternalBlockingToAsyncSpanStoreAdapter.java | 2 +- .../main/java/zipkin/storage/QueryRequest.java | 2 +- .../src/main/java/zipkin/storage/SpanStore.java | 2 +- .../main/java/zipkin/storage/package-info.java | 15 --------------- zipkin2/src/main/java/zipkin2/Annotation.java | 3 +-- zipkin2/src/main/java/zipkin2/Call.java | 2 +- zipkin2/src/main/java/zipkin2/Callback.java | 2 +- zipkin2/src/main/java/zipkin2/CheckResult.java | 5 ++--- zipkin2/src/main/java/zipkin2/DependencyLink.java | 3 +-- zipkin2/src/main/java/zipkin2/Endpoint.java | 5 ++--- zipkin2/src/main/java/zipkin2/Span.java | 5 ++--- .../src/main/java/zipkin2/codec/BytesDecoder.java | 2 +- .../zipkin2/codec/DependencyLinkBytesDecoder.java | 2 +- .../main/java/zipkin2/codec/SpanBytesDecoder.java | 2 +- .../main/java/zipkin2/codec/SpanBytesEncoder.java | 3 +-- .../src/main/java/zipkin2/codec/package-info.java | 15 --------------- .../java/zipkin2/internal/DependencyLinker.java | 1 - .../src/main/java/zipkin2/internal/JsonCodec.java | 1 - zipkin2/src/main/java/zipkin2/internal/Node.java | 1 - .../src/main/java/zipkin2/internal/Nullable.java | 13 +++++++++++-- .../main/java/zipkin2/internal/V1SpanWriter.java | 4 +--- .../main/java/zipkin2/internal/V2SpanWriter.java | 4 +--- zipkin2/src/main/java/zipkin2/package-info.java | 15 --------------- .../main/java/zipkin2/storage/QueryRequest.java | 2 +- .../main/java/zipkin2/storage/package-info.java | 15 --------------- zipkin2/src/test/java/zipkin2/CallTest.java | 2 +- .../zipkin2/internal/DependencyLinkerTest.java | 1 - 130 files changed, 109 insertions(+), 708 deletions(-) delete mode 100644 zipkin-autoconfigure/collector-kafka10/src/main/java/zipkin/autoconfigure/collector/kafka10/package-info.java delete mode 100644 zipkin-autoconfigure/collector-rabbitmq/src/main/java/zipkin/autoconfigure/collector/rabbitmq/package-info.java delete mode 100644 zipkin-autoconfigure/collector-scribe/src/main/java/zipkin/autoconfigure/collector/scribe/package-info.java delete mode 100644 zipkin-autoconfigure/metrics-prometheus/src/main/java/zipkin/autoconfigure/metrics/package-info.java delete mode 100644 zipkin-autoconfigure/storage-cassandra/src/main/java/zipkin/autoconfigure/storage/cassandra/brave/package-info.java delete mode 100644 zipkin-autoconfigure/storage-cassandra/src/main/java/zipkin/autoconfigure/storage/cassandra/package-info.java delete mode 100644 zipkin-autoconfigure/storage-cassandra3/src/main/java/zipkin/autoconfigure/storage/cassandra3/brave/package-info.java delete mode 100644 zipkin-autoconfigure/storage-cassandra3/src/main/java/zipkin/autoconfigure/storage/cassandra3/package-info.java delete mode 100644 zipkin-autoconfigure/storage-elasticsearch-aws/src/main/java/zipkin/autoconfigure/storage/elasticsearch/aws/package-info.java delete mode 100644 zipkin-autoconfigure/storage-elasticsearch-http/src/main/java/zipkin/autoconfigure/storage/elasticsearch/http/brave/package-info.java delete mode 100644 zipkin-autoconfigure/storage-elasticsearch-http/src/main/java/zipkin/autoconfigure/storage/elasticsearch/http/package-info.java delete mode 100644 zipkin-autoconfigure/storage-mysql/src/main/java/zipkin/autoconfigure/storage/mysql/brave/package-info.java delete mode 100644 zipkin-autoconfigure/storage-mysql/src/main/java/zipkin/autoconfigure/storage/mysql/package-info.java delete mode 100644 zipkin-autoconfigure/ui/src/main/java/zipkin/autoconfigure/ui/package-info.java delete mode 100644 zipkin-collector/kafka/src/main/java/zipkin/collector/kafka/package-info.java delete mode 100644 zipkin-collector/kafka10/src/main/java/zipkin/collector/kafka10/package-info.java delete mode 100644 zipkin-collector/rabbitmq/src/main/java/zipkin/collector/rabbitmq/package-info.java delete mode 100644 zipkin-collector/scribe/src/main/java/zipkin/collector/scribe/package-info.java delete mode 100644 zipkin-guava/src/main/java/zipkin/storage/guava/package-info.java delete mode 100644 zipkin-junit/src/main/java/zipkin/junit/package-info.java delete mode 100644 zipkin-server/src/main/java/zipkin/server/brave/package-info.java delete mode 100644 zipkin-server/src/main/java/zipkin/server/package-info.java delete mode 100644 zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/package-info.java delete mode 100644 zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/package-info.java delete mode 100644 zipkin-storage/cassandra3/src/test/java/zipkin/storage/cassandra3/integration/package-info.java delete mode 100644 zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/package-info.java delete mode 100644 zipkin-storage/elasticsearch-http/src/test/java/zipkin/storage/elasticsearch/http/integration/package-info.java delete mode 100644 zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/package-info.java delete mode 100644 zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/internal/generated/package-info.java delete mode 100644 zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/internal/generated/tables/package-info.java delete mode 100644 zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/package-info.java delete mode 100644 zipkin-zookeeper/src/main/java/zipkin/collector/zookeeper/package-info.java delete mode 100644 zipkin/src/main/java/zipkin/collector/package-info.java rename zipkin/src/main/java/zipkin/internal/{package-info.java => Nullable.java} (61%) delete mode 100644 zipkin/src/main/java/zipkin/package-info.java delete mode 100644 zipkin/src/main/java/zipkin/storage/package-info.java delete mode 100644 zipkin2/src/main/java/zipkin2/codec/package-info.java rename zipkin-autoconfigure/collector-kafka/src/main/java/zipkin/autoconfigure/collector/kafka/package-info.java => zipkin2/src/main/java/zipkin2/internal/Nullable.java (59%) delete mode 100644 zipkin2/src/main/java/zipkin2/package-info.java delete mode 100644 zipkin2/src/main/java/zipkin2/storage/package-info.java diff --git a/pom.xml b/pom.xml index 1003f574504..70c3ffc2bef 100755 --- a/pom.xml +++ b/pom.xml @@ -434,19 +434,6 @@ - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.jsr305 - 3.0.2_1 - - provided - - junit junit diff --git a/zipkin-autoconfigure/collector-kafka10/src/main/java/zipkin/autoconfigure/collector/kafka10/package-info.java b/zipkin-autoconfigure/collector-kafka10/src/main/java/zipkin/autoconfigure/collector/kafka10/package-info.java deleted file mode 100644 index 252d3874239..00000000000 --- a/zipkin-autoconfigure/collector-kafka10/src/main/java/zipkin/autoconfigure/collector/kafka10/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.collector.kafka10; diff --git a/zipkin-autoconfigure/collector-rabbitmq/src/main/java/zipkin/autoconfigure/collector/rabbitmq/package-info.java b/zipkin-autoconfigure/collector-rabbitmq/src/main/java/zipkin/autoconfigure/collector/rabbitmq/package-info.java deleted file mode 100644 index 8f64a721f67..00000000000 --- a/zipkin-autoconfigure/collector-rabbitmq/src/main/java/zipkin/autoconfigure/collector/rabbitmq/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.collector.rabbitmq; diff --git a/zipkin-autoconfigure/collector-scribe/src/main/java/zipkin/autoconfigure/collector/scribe/package-info.java b/zipkin-autoconfigure/collector-scribe/src/main/java/zipkin/autoconfigure/collector/scribe/package-info.java deleted file mode 100644 index d9837f234f1..00000000000 --- a/zipkin-autoconfigure/collector-scribe/src/main/java/zipkin/autoconfigure/collector/scribe/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.collector.scribe; diff --git a/zipkin-autoconfigure/metrics-prometheus/src/main/java/zipkin/autoconfigure/metrics/package-info.java b/zipkin-autoconfigure/metrics-prometheus/src/main/java/zipkin/autoconfigure/metrics/package-info.java deleted file mode 100644 index baa2f56b31e..00000000000 --- a/zipkin-autoconfigure/metrics-prometheus/src/main/java/zipkin/autoconfigure/metrics/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.metrics; diff --git a/zipkin-autoconfigure/storage-cassandra/src/main/java/zipkin/autoconfigure/storage/cassandra/brave/package-info.java b/zipkin-autoconfigure/storage-cassandra/src/main/java/zipkin/autoconfigure/storage/cassandra/brave/package-info.java deleted file mode 100644 index c5c8d74b4d9..00000000000 --- a/zipkin-autoconfigure/storage-cassandra/src/main/java/zipkin/autoconfigure/storage/cassandra/brave/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.storage.cassandra.brave; diff --git a/zipkin-autoconfigure/storage-cassandra/src/main/java/zipkin/autoconfigure/storage/cassandra/package-info.java b/zipkin-autoconfigure/storage-cassandra/src/main/java/zipkin/autoconfigure/storage/cassandra/package-info.java deleted file mode 100644 index 7a96a7d78bf..00000000000 --- a/zipkin-autoconfigure/storage-cassandra/src/main/java/zipkin/autoconfigure/storage/cassandra/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.storage.cassandra; diff --git a/zipkin-autoconfigure/storage-cassandra3/src/main/java/zipkin/autoconfigure/storage/cassandra3/brave/package-info.java b/zipkin-autoconfigure/storage-cassandra3/src/main/java/zipkin/autoconfigure/storage/cassandra3/brave/package-info.java deleted file mode 100644 index 590a827294b..00000000000 --- a/zipkin-autoconfigure/storage-cassandra3/src/main/java/zipkin/autoconfigure/storage/cassandra3/brave/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.storage.cassandra3.brave; diff --git a/zipkin-autoconfigure/storage-cassandra3/src/main/java/zipkin/autoconfigure/storage/cassandra3/package-info.java b/zipkin-autoconfigure/storage-cassandra3/src/main/java/zipkin/autoconfigure/storage/cassandra3/package-info.java deleted file mode 100644 index 2ee8f92af0b..00000000000 --- a/zipkin-autoconfigure/storage-cassandra3/src/main/java/zipkin/autoconfigure/storage/cassandra3/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.storage.cassandra3; diff --git a/zipkin-autoconfigure/storage-elasticsearch-aws/src/main/java/zipkin/autoconfigure/storage/elasticsearch/aws/AWSCredentials.java b/zipkin-autoconfigure/storage-elasticsearch-aws/src/main/java/zipkin/autoconfigure/storage/elasticsearch/aws/AWSCredentials.java index eade685aea3..f6cff6ff977 100644 --- a/zipkin-autoconfigure/storage-elasticsearch-aws/src/main/java/zipkin/autoconfigure/storage/elasticsearch/aws/AWSCredentials.java +++ b/zipkin-autoconfigure/storage-elasticsearch-aws/src/main/java/zipkin/autoconfigure/storage/elasticsearch/aws/AWSCredentials.java @@ -13,7 +13,7 @@ */ package zipkin.autoconfigure.storage.elasticsearch.aws; -import javax.annotation.Nullable; +import zipkin.internal.Nullable; import static zipkin.internal.Util.checkNotNull; diff --git a/zipkin-autoconfigure/storage-elasticsearch-aws/src/main/java/zipkin/autoconfigure/storage/elasticsearch/aws/package-info.java b/zipkin-autoconfigure/storage-elasticsearch-aws/src/main/java/zipkin/autoconfigure/storage/elasticsearch/aws/package-info.java deleted file mode 100644 index d4d230307c4..00000000000 --- a/zipkin-autoconfigure/storage-elasticsearch-aws/src/main/java/zipkin/autoconfigure/storage/elasticsearch/aws/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.storage.elasticsearch.aws; diff --git a/zipkin-autoconfigure/storage-elasticsearch-http/src/main/java/zipkin/autoconfigure/storage/elasticsearch/http/brave/package-info.java b/zipkin-autoconfigure/storage-elasticsearch-http/src/main/java/zipkin/autoconfigure/storage/elasticsearch/http/brave/package-info.java deleted file mode 100644 index 76bd5cb1d86..00000000000 --- a/zipkin-autoconfigure/storage-elasticsearch-http/src/main/java/zipkin/autoconfigure/storage/elasticsearch/http/brave/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.storage.elasticsearch.http.brave; diff --git a/zipkin-autoconfigure/storage-elasticsearch-http/src/main/java/zipkin/autoconfigure/storage/elasticsearch/http/package-info.java b/zipkin-autoconfigure/storage-elasticsearch-http/src/main/java/zipkin/autoconfigure/storage/elasticsearch/http/package-info.java deleted file mode 100644 index a051bc2decf..00000000000 --- a/zipkin-autoconfigure/storage-elasticsearch-http/src/main/java/zipkin/autoconfigure/storage/elasticsearch/http/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.storage.elasticsearch.http; diff --git a/zipkin-autoconfigure/storage-mysql/src/main/java/zipkin/autoconfigure/storage/mysql/brave/package-info.java b/zipkin-autoconfigure/storage-mysql/src/main/java/zipkin/autoconfigure/storage/mysql/brave/package-info.java deleted file mode 100644 index def6568c195..00000000000 --- a/zipkin-autoconfigure/storage-mysql/src/main/java/zipkin/autoconfigure/storage/mysql/brave/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.storage.mysql.brave; diff --git a/zipkin-autoconfigure/storage-mysql/src/main/java/zipkin/autoconfigure/storage/mysql/package-info.java b/zipkin-autoconfigure/storage-mysql/src/main/java/zipkin/autoconfigure/storage/mysql/package-info.java deleted file mode 100644 index e22063c447d..00000000000 --- a/zipkin-autoconfigure/storage-mysql/src/main/java/zipkin/autoconfigure/storage/mysql/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.storage.mysql; diff --git a/zipkin-autoconfigure/ui/src/main/java/zipkin/autoconfigure/ui/package-info.java b/zipkin-autoconfigure/ui/src/main/java/zipkin/autoconfigure/ui/package-info.java deleted file mode 100644 index 97fe14744c9..00000000000 --- a/zipkin-autoconfigure/ui/src/main/java/zipkin/autoconfigure/ui/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.ui; diff --git a/zipkin-collector/kafka/src/main/java/zipkin/collector/kafka/package-info.java b/zipkin-collector/kafka/src/main/java/zipkin/collector/kafka/package-info.java deleted file mode 100644 index 83689b9488d..00000000000 --- a/zipkin-collector/kafka/src/main/java/zipkin/collector/kafka/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.collector.kafka; diff --git a/zipkin-collector/kafka10/src/main/java/zipkin/collector/kafka10/package-info.java b/zipkin-collector/kafka10/src/main/java/zipkin/collector/kafka10/package-info.java deleted file mode 100644 index d6ada9523c2..00000000000 --- a/zipkin-collector/kafka10/src/main/java/zipkin/collector/kafka10/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.collector.kafka10; diff --git a/zipkin-collector/rabbitmq/src/main/java/zipkin/collector/rabbitmq/package-info.java b/zipkin-collector/rabbitmq/src/main/java/zipkin/collector/rabbitmq/package-info.java deleted file mode 100644 index db17a9b17e9..00000000000 --- a/zipkin-collector/rabbitmq/src/main/java/zipkin/collector/rabbitmq/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.collector.rabbitmq; diff --git a/zipkin-collector/scribe/src/main/java/zipkin/collector/scribe/ScribeSpanConsumer.java b/zipkin-collector/scribe/src/main/java/zipkin/collector/scribe/ScribeSpanConsumer.java index 9ae79b6c50d..577773fe8bf 100644 --- a/zipkin-collector/scribe/src/main/java/zipkin/collector/scribe/ScribeSpanConsumer.java +++ b/zipkin-collector/scribe/src/main/java/zipkin/collector/scribe/ScribeSpanConsumer.java @@ -20,11 +20,11 @@ import java.util.Base64; import java.util.List; import java.util.stream.Collectors; -import javax.annotation.Nullable; import zipkin.Span; import zipkin.SpanDecoder; import zipkin.collector.Collector; import zipkin.collector.CollectorMetrics; +import zipkin.internal.Nullable; import zipkin.storage.Callback; final class ScribeSpanConsumer implements Scribe { diff --git a/zipkin-collector/scribe/src/main/java/zipkin/collector/scribe/package-info.java b/zipkin-collector/scribe/src/main/java/zipkin/collector/scribe/package-info.java deleted file mode 100644 index 92fb8c1eda4..00000000000 --- a/zipkin-collector/scribe/src/main/java/zipkin/collector/scribe/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.collector.scribe; diff --git a/zipkin-guava/src/main/java/zipkin/storage/guava/GuavaSpanStore.java b/zipkin-guava/src/main/java/zipkin/storage/guava/GuavaSpanStore.java index 93ed814dfd9..e8718aecf8b 100755 --- a/zipkin-guava/src/main/java/zipkin/storage/guava/GuavaSpanStore.java +++ b/zipkin-guava/src/main/java/zipkin/storage/guava/GuavaSpanStore.java @@ -15,9 +15,9 @@ import com.google.common.util.concurrent.ListenableFuture; import java.util.List; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.storage.QueryRequest; import zipkin.storage.SpanStore; diff --git a/zipkin-guava/src/main/java/zipkin/storage/guava/InternalForwardingCallback.java b/zipkin-guava/src/main/java/zipkin/storage/guava/InternalForwardingCallback.java index d3f33044f36..317810ea81c 100644 --- a/zipkin-guava/src/main/java/zipkin/storage/guava/InternalForwardingCallback.java +++ b/zipkin-guava/src/main/java/zipkin/storage/guava/InternalForwardingCallback.java @@ -14,7 +14,7 @@ package zipkin.storage.guava; import com.google.common.util.concurrent.FutureCallback; -import javax.annotation.Nullable; +import zipkin.internal.Nullable; import zipkin.storage.Callback; import static zipkin.internal.Util.checkNotNull; diff --git a/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaSpanConsumerAdapter.java b/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaSpanConsumerAdapter.java index 31cb3ed667c..dae4549ecf4 100644 --- a/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaSpanConsumerAdapter.java +++ b/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaSpanConsumerAdapter.java @@ -16,8 +16,8 @@ import com.google.common.util.concurrent.AbstractFuture; import com.google.common.util.concurrent.ListenableFuture; import java.util.List; -import javax.annotation.Nullable; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.storage.AsyncSpanConsumer; import zipkin.storage.Callback; diff --git a/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaSpanStoreAdapter.java b/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaSpanStoreAdapter.java index 15b0640c088..9cf5dc0805c 100644 --- a/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaSpanStoreAdapter.java +++ b/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaSpanStoreAdapter.java @@ -16,9 +16,9 @@ import com.google.common.util.concurrent.AbstractFuture; import com.google.common.util.concurrent.ListenableFuture; import java.util.List; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.storage.AsyncSpanStore; import zipkin.storage.Callback; import zipkin.storage.QueryRequest; diff --git a/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaToAsyncSpanStoreAdapter.java b/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaToAsyncSpanStoreAdapter.java index 4540715383e..864f3752511 100644 --- a/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaToAsyncSpanStoreAdapter.java +++ b/zipkin-guava/src/main/java/zipkin/storage/guava/InternalGuavaToAsyncSpanStoreAdapter.java @@ -14,9 +14,9 @@ package zipkin.storage.guava; import java.util.List; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.storage.AsyncSpanStore; import zipkin.storage.Callback; import zipkin.storage.QueryRequest; diff --git a/zipkin-guava/src/main/java/zipkin/storage/guava/package-info.java b/zipkin-guava/src/main/java/zipkin/storage/guava/package-info.java deleted file mode 100644 index dd249d69da7..00000000000 --- a/zipkin-guava/src/main/java/zipkin/storage/guava/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.storage.guava; diff --git a/zipkin-junit/src/main/java/zipkin/junit/ZipkinDispatcher.java b/zipkin-junit/src/main/java/zipkin/junit/ZipkinDispatcher.java index 93426898138..93626c4d6c5 100644 --- a/zipkin-junit/src/main/java/zipkin/junit/ZipkinDispatcher.java +++ b/zipkin-junit/src/main/java/zipkin/junit/ZipkinDispatcher.java @@ -15,7 +15,6 @@ import java.io.IOException; import java.util.List; -import javax.annotation.Nullable; import okhttp3.HttpUrl; import okhttp3.mockwebserver.Dispatcher; import okhttp3.mockwebserver.MockResponse; @@ -29,6 +28,7 @@ import zipkin.SpanDecoder; import zipkin.collector.Collector; import zipkin.collector.CollectorMetrics; +import zipkin.internal.Nullable; import zipkin.internal.V2JsonSpanDecoder; import zipkin.internal.V2StorageComponent; import zipkin.storage.Callback; diff --git a/zipkin-junit/src/main/java/zipkin/junit/package-info.java b/zipkin-junit/src/main/java/zipkin/junit/package-info.java deleted file mode 100644 index 10a65e69d88..00000000000 --- a/zipkin-junit/src/main/java/zipkin/junit/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.junit; diff --git a/zipkin-junit/src/test/java/zipkin/junit/HttpSpanStore.java b/zipkin-junit/src/test/java/zipkin/junit/HttpSpanStore.java index 1a4895ce322..9da836cffdf 100644 --- a/zipkin-junit/src/test/java/zipkin/junit/HttpSpanStore.java +++ b/zipkin-junit/src/test/java/zipkin/junit/HttpSpanStore.java @@ -15,7 +15,6 @@ import java.io.IOException; import java.util.List; -import javax.annotation.Nullable; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; import okhttp3.Request; @@ -23,6 +22,7 @@ import zipkin.Codec; import zipkin.DependencyLink; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.internal.Util; import zipkin.storage.QueryRequest; import zipkin.storage.SpanStore; diff --git a/zipkin-junit/src/test/java/zipkin/junit/v2/HttpV2SpanStore.java b/zipkin-junit/src/test/java/zipkin/junit/v2/HttpV2SpanStore.java index 6dfbc210e11..b9dafc85e38 100644 --- a/zipkin-junit/src/test/java/zipkin/junit/v2/HttpV2SpanStore.java +++ b/zipkin-junit/src/test/java/zipkin/junit/v2/HttpV2SpanStore.java @@ -20,10 +20,10 @@ import java.util.Collections; import java.util.LinkedList; import java.util.List; -import javax.annotation.Nullable; import okhttp3.HttpUrl; import okhttp3.OkHttpClient; import okhttp3.Request; +import zipkin.internal.Nullable; import zipkin2.Call; import zipkin2.DependencyLink; import zipkin2.Span; diff --git a/zipkin-server/src/main/java/zipkin/server/ActuateCollectorMetrics.java b/zipkin-server/src/main/java/zipkin/server/ActuateCollectorMetrics.java index f360b4b716c..bdbeeff77fa 100644 --- a/zipkin-server/src/main/java/zipkin/server/ActuateCollectorMetrics.java +++ b/zipkin-server/src/main/java/zipkin/server/ActuateCollectorMetrics.java @@ -13,17 +13,16 @@ */ package zipkin.server; -import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; import org.springframework.boot.actuate.endpoint.PublicMetrics; import org.springframework.boot.actuate.metrics.Metric; import org.springframework.boot.actuate.metrics.buffer.BufferMetricReader; import org.springframework.boot.actuate.metrics.buffer.CounterBuffers; import org.springframework.boot.actuate.metrics.buffer.GaugeBuffers; import zipkin.collector.CollectorMetrics; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; +import zipkin.internal.Nullable; import static zipkin.internal.Util.checkNotNull; diff --git a/zipkin-server/src/main/java/zipkin/server/ZipkinHttpCollector.java b/zipkin-server/src/main/java/zipkin/server/ZipkinHttpCollector.java index 6ef810e3df4..440905add90 100644 --- a/zipkin-server/src/main/java/zipkin/server/ZipkinHttpCollector.java +++ b/zipkin-server/src/main/java/zipkin/server/ZipkinHttpCollector.java @@ -17,7 +17,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.zip.GZIPInputStream; -import javax.annotation.Nullable; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.http.ResponseEntity; @@ -32,6 +31,7 @@ import zipkin.collector.Collector; import zipkin.collector.CollectorMetrics; import zipkin.collector.CollectorSampler; +import zipkin.internal.Nullable; import zipkin.internal.V2JsonSpanDecoder; import zipkin.storage.Callback; import zipkin.storage.StorageComponent; diff --git a/zipkin-server/src/main/java/zipkin/server/ZipkinQueryApiV2.java b/zipkin-server/src/main/java/zipkin/server/ZipkinQueryApiV2.java index 12ef2a8b608..42afb34c7cc 100644 --- a/zipkin-server/src/main/java/zipkin/server/ZipkinQueryApiV2.java +++ b/zipkin-server/src/main/java/zipkin/server/ZipkinQueryApiV2.java @@ -17,7 +17,6 @@ import java.nio.charset.Charset; import java.util.List; import java.util.concurrent.TimeUnit; -import javax.annotation.Nullable; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.http.CacheControl; @@ -32,6 +31,7 @@ import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.context.request.WebRequest; +import zipkin.internal.Nullable; import zipkin.internal.V2StorageComponent; import zipkin2.Call; import zipkin2.DependencyLink; diff --git a/zipkin-server/src/main/java/zipkin/server/brave/BraveConfiguration.java b/zipkin-server/src/main/java/zipkin/server/brave/BraveConfiguration.java index e60eab84d4d..8d03fd5693a 100644 --- a/zipkin-server/src/main/java/zipkin/server/brave/BraveConfiguration.java +++ b/zipkin-server/src/main/java/zipkin/server/brave/BraveConfiguration.java @@ -27,7 +27,6 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.TimeUnit; -import javax.annotation.Nullable; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; @@ -39,6 +38,7 @@ import zipkin.Endpoint; import zipkin.Span; import zipkin.collector.CollectorMetrics; +import zipkin.internal.Nullable; import zipkin.reporter.AsyncReporter; import zipkin.reporter.Callback; import zipkin.reporter.Encoding; diff --git a/zipkin-server/src/main/java/zipkin/server/brave/TracedAsyncSpanConsumer.java b/zipkin-server/src/main/java/zipkin/server/brave/TracedAsyncSpanConsumer.java index f309474fef4..6ffbde0f844 100644 --- a/zipkin-server/src/main/java/zipkin/server/brave/TracedAsyncSpanConsumer.java +++ b/zipkin-server/src/main/java/zipkin/server/brave/TracedAsyncSpanConsumer.java @@ -15,8 +15,8 @@ import com.github.kristofa.brave.Brave; import java.util.List; -import javax.annotation.Nullable; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.storage.AsyncSpanConsumer; import zipkin.storage.Callback; diff --git a/zipkin-server/src/main/java/zipkin/server/brave/TracedSpanStore.java b/zipkin-server/src/main/java/zipkin/server/brave/TracedSpanStore.java index b58abf9f3c2..c7a737823ca 100644 --- a/zipkin-server/src/main/java/zipkin/server/brave/TracedSpanStore.java +++ b/zipkin-server/src/main/java/zipkin/server/brave/TracedSpanStore.java @@ -15,9 +15,9 @@ import com.github.kristofa.brave.LocalTracer; import java.util.List; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.storage.QueryRequest; import zipkin.storage.SpanStore; import zipkin.storage.StorageComponent; diff --git a/zipkin-server/src/main/java/zipkin/server/brave/package-info.java b/zipkin-server/src/main/java/zipkin/server/brave/package-info.java deleted file mode 100644 index 0bd5d60bcb5..00000000000 --- a/zipkin-server/src/main/java/zipkin/server/brave/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.server.brave; diff --git a/zipkin-server/src/main/java/zipkin/server/package-info.java b/zipkin-server/src/main/java/zipkin/server/package-info.java deleted file mode 100644 index 5f0d4e3e21a..00000000000 --- a/zipkin-server/src/main/java/zipkin/server/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.server; diff --git a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraSpanConsumer.java b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraSpanConsumer.java index 36b59c6b409..080bbf713aa 100644 --- a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraSpanConsumer.java +++ b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraSpanConsumer.java @@ -29,11 +29,11 @@ import com.google.common.util.concurrent.ListenableFuture; import java.nio.ByteBuffer; import java.util.List; -import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import zipkin.Codec; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.internal.Pair; import zipkin.storage.guava.GuavaSpanConsumer; diff --git a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraSpanStore.java b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraSpanStore.java index cdf39a4f400..5647ba1b632 100644 --- a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraSpanStore.java +++ b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraSpanStore.java @@ -43,7 +43,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import zipkin.Codec; @@ -54,6 +53,7 @@ import zipkin.internal.DependencyLinker; import zipkin.internal.GroupByTraceId; import zipkin.internal.MergeById; +import zipkin.internal.Nullable; import zipkin.storage.QueryRequest; import zipkin.storage.guava.GuavaSpanStore; diff --git a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraStorage.java b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraStorage.java index e94ca12eb61..01ec103a6a7 100644 --- a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraStorage.java +++ b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraStorage.java @@ -24,7 +24,7 @@ import java.util.LinkedList; import java.util.List; import java.util.concurrent.TimeUnit; -import javax.annotation.Nullable; +import zipkin.internal.Nullable; import zipkin.storage.QueryRequest; import zipkin.storage.StorageComponent; import zipkin.storage.guava.LazyGuavaStorageComponent; diff --git a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraUtil.java b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraUtil.java index 20847246dbc..07f1f274a4f 100644 --- a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraUtil.java +++ b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CassandraUtil.java @@ -26,11 +26,11 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.annotation.Nullable; import zipkin.Annotation; import zipkin.BinaryAnnotation; import zipkin.Constants; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.storage.QueryRequest; import static zipkin.internal.Util.UTF_8; diff --git a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CompositeIndexer.java b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CompositeIndexer.java index 04093090d26..ba008e86207 100644 --- a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CompositeIndexer.java +++ b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/CompositeIndexer.java @@ -21,8 +21,8 @@ import java.util.List; import java.util.Set; import java.util.concurrent.ConcurrentMap; -import javax.annotation.Nullable; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.internal.Pair; final class CompositeIndexer { diff --git a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/DeduplicatingExecutor.java b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/DeduplicatingExecutor.java index 7723b3f5f4f..fbf27f42b54 100644 --- a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/DeduplicatingExecutor.java +++ b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/DeduplicatingExecutor.java @@ -27,7 +27,7 @@ import com.google.common.util.concurrent.UncheckedExecutionException; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -import javax.annotation.Nullable; +import zipkin.internal.Nullable; import static zipkin.internal.Util.checkNotNull; diff --git a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/Indexer.java b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/Indexer.java index 951e4f5714e..5b3435cded2 100644 --- a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/Indexer.java +++ b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/Indexer.java @@ -27,10 +27,10 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentMap; -import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.internal.Pair; import zipkin.storage.QueryRequest; diff --git a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/package-info.java b/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/package-info.java deleted file mode 100644 index f97895f0c19..00000000000 --- a/zipkin-storage/cassandra/src/main/java/zipkin/storage/cassandra/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.storage.cassandra; diff --git a/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/Cassandra3Storage.java b/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/Cassandra3Storage.java index 4413114c027..55fc0a6d6ef 100644 --- a/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/Cassandra3Storage.java +++ b/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/Cassandra3Storage.java @@ -18,8 +18,8 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import java.io.IOException; -import javax.annotation.Nullable; import zipkin.internal.LazyCloseable; +import zipkin.internal.Nullable; import zipkin.storage.QueryRequest; import zipkin.storage.StorageComponent; import zipkin.storage.guava.LazyGuavaStorageComponent; diff --git a/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/CassandraSpanStore.java b/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/CassandraSpanStore.java index 6f1ad3c22cc..7aa72314fd2 100644 --- a/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/CassandraSpanStore.java +++ b/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/CassandraSpanStore.java @@ -46,7 +46,6 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ExecutionException; -import javax.annotation.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import zipkin.Codec; @@ -56,6 +55,7 @@ import zipkin.internal.DependencyLinker; import zipkin.internal.GroupByTraceId; import zipkin.internal.MergeById; +import zipkin.internal.Nullable; import zipkin.storage.QueryRequest; import zipkin.storage.cassandra3.Schema.AnnotationUDT; import zipkin.storage.cassandra3.Schema.BinaryAnnotationUDT; diff --git a/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/CassandraUtil.java b/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/CassandraUtil.java index a92637734cb..a7eb783632c 100644 --- a/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/CassandraUtil.java +++ b/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/CassandraUtil.java @@ -27,11 +27,11 @@ import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; -import javax.annotation.Nullable; import zipkin.Annotation; import zipkin.BinaryAnnotation; import zipkin.Constants; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.storage.QueryRequest; import zipkin.storage.cassandra3.Schema.TraceIdUDT; diff --git a/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/package-info.java b/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/package-info.java deleted file mode 100644 index 0ecbaa10980..00000000000 --- a/zipkin-storage/cassandra3/src/main/java/zipkin/storage/cassandra3/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.storage.cassandra3; diff --git a/zipkin-storage/cassandra3/src/test/java/zipkin/storage/cassandra3/integration/package-info.java b/zipkin-storage/cassandra3/src/test/java/zipkin/storage/cassandra3/integration/package-info.java deleted file mode 100644 index c67008ff029..00000000000 --- a/zipkin-storage/cassandra3/src/test/java/zipkin/storage/cassandra3/integration/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.storage.cassandra3.integration; diff --git a/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/ElasticsearchHttpStorage.java b/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/ElasticsearchHttpStorage.java index e44f43553a2..dcb9321cb72 100644 --- a/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/ElasticsearchHttpStorage.java +++ b/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/ElasticsearchHttpStorage.java @@ -15,8 +15,8 @@ import java.io.IOException; import java.util.List; -import javax.annotation.Nullable; import okhttp3.OkHttpClient; +import zipkin.internal.Nullable; import zipkin.internal.V2StorageComponent; import zipkin.storage.AsyncSpanStore; import zipkin2.elasticsearch.ElasticsearchStorage; diff --git a/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/LegacyElasticsearchHttpSpanStore.java b/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/LegacyElasticsearchHttpSpanStore.java index b15f5749952..45b0ad5cf24 100644 --- a/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/LegacyElasticsearchHttpSpanStore.java +++ b/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/LegacyElasticsearchHttpSpanStore.java @@ -21,7 +21,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import javax.annotation.Nullable; import okhttp3.Response; import okio.BufferedSource; import zipkin.DependencyLink; @@ -29,6 +28,7 @@ import zipkin.internal.CorrectForClockSkew; import zipkin.internal.GroupByTraceId; import zipkin.internal.MergeById; +import zipkin.internal.Nullable; import zipkin.internal.Util; import zipkin.storage.AsyncSpanStore; import zipkin.storage.Callback; diff --git a/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/LegacyJsonAdapters.java b/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/LegacyJsonAdapters.java index 68fb2f74d50..36d5a1d5cc6 100644 --- a/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/LegacyJsonAdapters.java +++ b/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/LegacyJsonAdapters.java @@ -19,8 +19,6 @@ import com.squareup.moshi.JsonWriter; import java.io.IOException; import java.nio.charset.Charset; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import okio.Buffer; import okio.ByteString; import zipkin.Annotation; @@ -28,6 +26,7 @@ import zipkin.DependencyLink; import zipkin.Endpoint; import zipkin.Span; +import zipkin.internal.Nullable; import static zipkin.internal.Util.lowerHexToUnsignedLong; @@ -183,8 +182,7 @@ public void toJson(JsonWriter writer, @Nullable BinaryAnnotation value) throws I }; static final JsonAdapter ANNOTATION_ADAPTER = new JsonAdapter() { - @Override @Nonnull - public Annotation fromJson(JsonReader reader) throws IOException { + @Override public Annotation fromJson(JsonReader reader) throws IOException { Annotation.Builder result = Annotation.builder(); reader.beginObject(); while (reader.hasNext()) { @@ -213,8 +211,7 @@ public void toJson(JsonWriter writer, @Nullable Annotation value) throws IOExcep }; static final JsonAdapter ENDPOINT_ADAPTER = new JsonAdapter() { - @Override @Nonnull - public Endpoint fromJson(JsonReader reader) throws IOException { + @Override public Endpoint fromJson(JsonReader reader) throws IOException { Endpoint.Builder result = Endpoint.builder().serviceName(""); reader.beginObject(); while (reader.hasNext()) { @@ -249,8 +246,7 @@ public void toJson(JsonWriter writer, @Nullable Endpoint value) throws IOExcepti }.nullSafe(); static final JsonAdapter LINK_ADAPTER = new JsonAdapter() { - @Override @Nonnull - public DependencyLink fromJson(JsonReader reader) throws IOException { + @Override public DependencyLink fromJson(JsonReader reader) throws IOException { DependencyLink.Builder result = DependencyLink.builder(); reader.beginObject(); while (reader.hasNext()) { diff --git a/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/package-info.java b/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/package-info.java deleted file mode 100644 index 979bd56ccde..00000000000 --- a/zipkin-storage/elasticsearch-http/src/main/java/zipkin/storage/elasticsearch/http/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.storage.elasticsearch.http; diff --git a/zipkin-storage/elasticsearch-http/src/test/java/zipkin/storage/elasticsearch/http/integration/package-info.java b/zipkin-storage/elasticsearch-http/src/test/java/zipkin/storage/elasticsearch/http/integration/package-info.java deleted file mode 100644 index 1c0e9ad8e07..00000000000 --- a/zipkin-storage/elasticsearch-http/src/test/java/zipkin/storage/elasticsearch/http/integration/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.storage.elasticsearch.http.integration; diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/ElasticsearchSpanConsumer.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/ElasticsearchSpanConsumer.java index 2d766b57204..09da27d9178 100644 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/ElasticsearchSpanConsumer.java +++ b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/ElasticsearchSpanConsumer.java @@ -20,7 +20,6 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; -import javax.annotation.Nullable; import okio.Buffer; import okio.ByteString; import zipkin2.Annotation; @@ -30,6 +29,7 @@ import zipkin2.elasticsearch.internal.HttpBulkIndexer; import zipkin2.elasticsearch.internal.IndexNameFormatter; import zipkin2.elasticsearch.internal.client.HttpCall; +import zipkin2.internal.Nullable; import zipkin2.storage.SpanConsumer; class ElasticsearchSpanConsumer implements SpanConsumer { // not final for testing diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/ElasticsearchStorage.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/ElasticsearchStorage.java index 4c6dbe5aea4..9521a505a3f 100644 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/ElasticsearchStorage.java +++ b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/ElasticsearchStorage.java @@ -21,7 +21,6 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; -import javax.annotation.Nullable; import okhttp3.HttpUrl; import okhttp3.MediaType; import okhttp3.OkHttpClient; @@ -31,6 +30,7 @@ import zipkin2.CheckResult; import zipkin2.elasticsearch.internal.IndexNameFormatter; import zipkin2.elasticsearch.internal.client.HttpCall; +import zipkin2.internal.Nullable; import zipkin2.internal.Platform; import zipkin2.storage.SpanConsumer; import zipkin2.storage.SpanStore; diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/JsonAdapters.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/JsonAdapters.java index c70b8962270..9b665355f32 100644 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/JsonAdapters.java +++ b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/JsonAdapters.java @@ -17,12 +17,11 @@ import com.squareup.moshi.JsonReader; import com.squareup.moshi.JsonWriter; import java.io.IOException; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import zipkin2.Annotation; import zipkin2.DependencyLink; import zipkin2.Endpoint; import zipkin2.Span; +import zipkin2.internal.Nullable; /** * Read-only json adapters resurrected from before we switched to Java 6 as storage components can @@ -30,8 +29,7 @@ */ final class JsonAdapters { static final JsonAdapter SPAN_ADAPTER = new JsonAdapter() { - @Override @Nonnull - public Span fromJson(JsonReader reader) throws IOException { + @Override public Span fromJson(JsonReader reader) throws IOException { Span.Builder result = Span.newBuilder(); reader.beginObject(); while (reader.hasNext()) { @@ -104,7 +102,7 @@ public void toJson(JsonWriter writer, @Nullable Span value) throws IOException { }; static final JsonAdapter ANNOTATION_ADAPTER = new JsonAdapter() { - @Override @Nonnull public Annotation fromJson(JsonReader reader) throws IOException { + @Override public Annotation fromJson(JsonReader reader) throws IOException { reader.beginObject(); Long timestamp = null; String value = null; @@ -134,7 +132,7 @@ public void toJson(JsonWriter writer, @Nullable Annotation value) throws IOExcep }; static final JsonAdapter ENDPOINT_ADAPTER = new JsonAdapter() { - @Override @Nonnull public Endpoint fromJson(JsonReader reader) throws IOException { + @Override public Endpoint fromJson(JsonReader reader) throws IOException { reader.beginObject(); String serviceName = null, ipv4 = null, ipv6 = null; Integer port = null; @@ -175,8 +173,7 @@ public void toJson(JsonWriter writer, @Nullable Endpoint value) throws IOExcepti }.nullSafe(); static final JsonAdapter DEPENDENCY_LINK_ADAPTER = new JsonAdapter() { - @Override @Nonnull - public DependencyLink fromJson(JsonReader reader) throws IOException { + @Override public DependencyLink fromJson(JsonReader reader) throws IOException { DependencyLink.Builder result = DependencyLink.newBuilder(); reader.beginObject(); while (reader.hasNext()) { diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/PseudoAddressRecordSet.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/PseudoAddressRecordSet.java index 34610ac8926..ec8058e7233 100644 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/PseudoAddressRecordSet.java +++ b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/PseudoAddressRecordSet.java @@ -20,9 +20,9 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; -import javax.annotation.Nullable; import okhttp3.Dns; import okhttp3.HttpUrl; +import zipkin2.internal.Nullable; /** * This returns a Dns provider that combines the IPv4 or IPv6 addresses from a supplied list of diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/HttpBulkIndexer.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/HttpBulkIndexer.java index ad25cef0f58..3d486bedbe9 100644 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/HttpBulkIndexer.java +++ b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/HttpBulkIndexer.java @@ -17,7 +17,6 @@ import java.util.Iterator; import java.util.LinkedHashSet; import java.util.Set; -import javax.annotation.Nullable; import okhttp3.HttpUrl; import okhttp3.MediaType; import okhttp3.Request; @@ -25,6 +24,7 @@ import okio.Buffer; import zipkin2.elasticsearch.ElasticsearchStorage; import zipkin2.elasticsearch.internal.client.HttpCall; +import zipkin2.internal.Nullable; import static zipkin2.internal.JsonEscaper.jsonEscape; diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/IndexNameFormatter.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/IndexNameFormatter.java index 109c9e15c2a..a6431bb8fd7 100644 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/IndexNameFormatter.java +++ b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/IndexNameFormatter.java @@ -23,7 +23,7 @@ import java.util.GregorianCalendar; import java.util.List; import java.util.TimeZone; -import javax.annotation.Nullable; +import zipkin2.internal.Nullable; @AutoValue public abstract class IndexNameFormatter { diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/JsonReaders.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/JsonReaders.java index c9bb33172fc..fb643d14aa7 100644 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/JsonReaders.java +++ b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/JsonReaders.java @@ -20,7 +20,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; -import javax.annotation.Nullable; +import zipkin2.internal.Nullable; public final class JsonReaders { diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/SearchCallFactory.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/SearchCallFactory.java index 511e8d090df..1157c972df6 100644 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/SearchCallFactory.java +++ b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/SearchCallFactory.java @@ -16,11 +16,11 @@ import com.squareup.moshi.JsonAdapter; import com.squareup.moshi.Moshi; import java.util.List; -import javax.annotation.Nullable; import okhttp3.HttpUrl; import okhttp3.MediaType; import okhttp3.Request; import okhttp3.RequestBody; +import zipkin2.internal.Nullable; public class SearchCallFactory { static final MediaType APPLICATION_JSON = MediaType.parse("application/json"); diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/SearchRequest.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/SearchRequest.java index b89de0dcc2e..0e92db4f2b1 100644 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/SearchRequest.java +++ b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/SearchRequest.java @@ -20,7 +20,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; -import javax.annotation.Nullable; +import zipkin2.internal.Nullable; public final class SearchRequest { diff --git a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/package-info.java b/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/package-info.java deleted file mode 100644 index c6d75e8a839..00000000000 --- a/zipkin-storage/elasticsearch/src/main/java/zipkin2/elasticsearch/internal/client/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin2.elasticsearch.internal.client; diff --git a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/ElasticsearchSpanConsumerTest.java b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/ElasticsearchSpanConsumerTest.java index ced9a4beb23..3562ee4d336 100644 --- a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/ElasticsearchSpanConsumerTest.java +++ b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/ElasticsearchSpanConsumerTest.java @@ -16,7 +16,6 @@ import java.io.IOException; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import javax.annotation.Nullable; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; @@ -30,6 +29,7 @@ import zipkin2.Span.Kind; import zipkin2.codec.SpanBytesDecoder; import zipkin2.codec.SpanBytesEncoder; +import zipkin2.internal.Nullable; import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; diff --git a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/internal/client/HttpCallTest.java b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/internal/client/HttpCallTest.java index 71bc67e24a9..fce8aaa480c 100644 --- a/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/internal/client/HttpCallTest.java +++ b/zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/internal/client/HttpCallTest.java @@ -18,7 +18,6 @@ import java.io.IOException; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; -import javax.annotation.Nullable; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.mockwebserver.MockResponse; @@ -28,6 +27,7 @@ import org.junit.Test; import zipkin2.Call; import zipkin2.Callback; +import zipkin2.internal.Nullable; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.failBecauseExceptionWasNotThrown; diff --git a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/DSLContexts.java b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/DSLContexts.java index 0c1b4087732..e976df3f73f 100644 --- a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/DSLContexts.java +++ b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/DSLContexts.java @@ -14,13 +14,13 @@ package zipkin.storage.mysql; import java.sql.Connection; -import javax.annotation.Nullable; import org.jooq.DSLContext; import org.jooq.ExecuteListenerProvider; import org.jooq.SQLDialect; import org.jooq.conf.Settings; import org.jooq.impl.DSL; import org.jooq.impl.DefaultConfiguration; +import zipkin.internal.Nullable; import static zipkin.internal.Util.checkNotNull; diff --git a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/DependencyLinkV2SpanIterator.java b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/DependencyLinkV2SpanIterator.java index b0854b5ddbe..4696a182c66 100644 --- a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/DependencyLinkV2SpanIterator.java +++ b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/DependencyLinkV2SpanIterator.java @@ -14,15 +14,15 @@ package zipkin.storage.mysql; import java.util.Iterator; -import javax.annotation.Nullable; import org.jooq.Record; import org.jooq.TableField; import zipkin.BinaryAnnotation.Type; import zipkin.Constants; +import zipkin.internal.Nullable; import zipkin.internal.PeekingIterator; +import zipkin.storage.mysql.internal.generated.tables.ZipkinSpans; import zipkin2.Endpoint; import zipkin2.Span; -import zipkin.storage.mysql.internal.generated.tables.ZipkinSpans; import static zipkin.Constants.CLIENT_ADDR; import static zipkin.Constants.CLIENT_SEND; diff --git a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/MySQLSpanStore.java b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/MySQLSpanStore.java index 91c40291103..55091349f08 100644 --- a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/MySQLSpanStore.java +++ b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/MySQLSpanStore.java @@ -23,7 +23,6 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import javax.annotation.Nullable; import javax.sql.DataSource; import org.jooq.Condition; import org.jooq.Cursor; @@ -42,11 +41,12 @@ import zipkin.Endpoint; import zipkin.internal.DependencyLinker; import zipkin.internal.GroupByTraceId; +import zipkin.internal.Nullable; import zipkin.internal.Pair; -import zipkin2.Span; import zipkin.storage.QueryRequest; import zipkin.storage.SpanStore; import zipkin.storage.mysql.internal.generated.tables.ZipkinAnnotations; +import zipkin2.Span; import static java.util.Collections.emptyList; import static java.util.stream.Collectors.groupingBy; diff --git a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/MySQLStorage.java b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/MySQLStorage.java index 09a92f00efb..7c84113c88f 100644 --- a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/MySQLStorage.java +++ b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/MySQLStorage.java @@ -16,11 +16,11 @@ import java.sql.Connection; import java.sql.SQLException; import java.util.concurrent.Executor; -import javax.annotation.Nullable; import javax.sql.DataSource; import org.jooq.ExecuteListenerProvider; import org.jooq.conf.Settings; import zipkin.internal.Lazy; +import zipkin.internal.Nullable; import zipkin.storage.AsyncSpanConsumer; import zipkin.storage.AsyncSpanStore; import zipkin.storage.SpanStore; diff --git a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/internal/generated/package-info.java b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/internal/generated/package-info.java deleted file mode 100644 index 65d1115244d..00000000000 --- a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/internal/generated/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.storage.mysql.internal.generated; diff --git a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/internal/generated/tables/package-info.java b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/internal/generated/tables/package-info.java deleted file mode 100644 index b65de086bed..00000000000 --- a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/internal/generated/tables/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.storage.mysql.internal.generated.tables; diff --git a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/package-info.java b/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/package-info.java deleted file mode 100644 index 5287a043b9f..00000000000 --- a/zipkin-storage/mysql/src/main/java/zipkin/storage/mysql/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.storage.mysql; diff --git a/zipkin-zookeeper/src/main/java/zipkin/collector/zookeeper/ZooKeeperCollectorSampler.java b/zipkin-zookeeper/src/main/java/zipkin/collector/zookeeper/ZooKeeperCollectorSampler.java index 86327a25e72..2f8d8ecff73 100644 --- a/zipkin-zookeeper/src/main/java/zipkin/collector/zookeeper/ZooKeeperCollectorSampler.java +++ b/zipkin-zookeeper/src/main/java/zipkin/collector/zookeeper/ZooKeeperCollectorSampler.java @@ -24,7 +24,6 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; -import javax.annotation.Nullable; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.imps.CuratorFrameworkState; import org.apache.curator.framework.recipes.cache.NodeCache; @@ -33,6 +32,7 @@ import org.slf4j.LoggerFactory; import zipkin.Span; import zipkin.collector.CollectorSampler; +import zipkin.internal.Nullable; import static com.google.common.base.Preconditions.checkState; import static zipkin.internal.Util.UTF_8; diff --git a/zipkin-zookeeper/src/main/java/zipkin/collector/zookeeper/package-info.java b/zipkin-zookeeper/src/main/java/zipkin/collector/zookeeper/package-info.java deleted file mode 100644 index 179790d283a..00000000000 --- a/zipkin-zookeeper/src/main/java/zipkin/collector/zookeeper/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.collector.zookeeper; diff --git a/zipkin/src/main/java/zipkin/Annotation.java b/zipkin/src/main/java/zipkin/Annotation.java index 69bfbfe684d..1ec5fe5d270 100644 --- a/zipkin/src/main/java/zipkin/Annotation.java +++ b/zipkin/src/main/java/zipkin/Annotation.java @@ -14,8 +14,8 @@ package zipkin; import java.io.Serializable; -import javax.annotation.Nullable; import zipkin.internal.JsonCodec; +import zipkin.internal.Nullable; import static zipkin.internal.Util.UTF_8; import static zipkin.internal.Util.checkNotNull; diff --git a/zipkin/src/main/java/zipkin/BinaryAnnotation.java b/zipkin/src/main/java/zipkin/BinaryAnnotation.java index c24bedf4a30..21fb12511e3 100644 --- a/zipkin/src/main/java/zipkin/BinaryAnnotation.java +++ b/zipkin/src/main/java/zipkin/BinaryAnnotation.java @@ -14,8 +14,8 @@ package zipkin; import java.util.Arrays; -import javax.annotation.Nullable; import zipkin.internal.JsonCodec; +import zipkin.internal.Nullable; import zipkin.internal.Util; import static zipkin.internal.Util.UTF_8; diff --git a/zipkin/src/main/java/zipkin/Component.java b/zipkin/src/main/java/zipkin/Component.java index b8b7390922d..fd7fca99e8e 100644 --- a/zipkin/src/main/java/zipkin/Component.java +++ b/zipkin/src/main/java/zipkin/Component.java @@ -15,7 +15,7 @@ import java.io.Closeable; import java.io.IOException; -import javax.annotation.Nullable; +import zipkin.internal.Nullable; import static zipkin.internal.Util.checkNotNull; diff --git a/zipkin/src/main/java/zipkin/Endpoint.java b/zipkin/src/main/java/zipkin/Endpoint.java index baa7eb5ab15..fb9d43713c6 100644 --- a/zipkin/src/main/java/zipkin/Endpoint.java +++ b/zipkin/src/main/java/zipkin/Endpoint.java @@ -20,9 +20,9 @@ import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Locale; -import javax.annotation.Nullable; import zipkin.internal.InetAddresses; import zipkin.internal.JsonCodec; +import zipkin.internal.Nullable; import zipkin.internal.Util; import static zipkin.internal.Util.UTF_8; diff --git a/zipkin/src/main/java/zipkin/Span.java b/zipkin/src/main/java/zipkin/Span.java index da690f23ec3..dcaffdac72e 100644 --- a/zipkin/src/main/java/zipkin/Span.java +++ b/zipkin/src/main/java/zipkin/Span.java @@ -22,7 +22,7 @@ import java.util.List; import java.util.Locale; import java.util.Set; -import javax.annotation.Nullable; +import zipkin.internal.Nullable; import zipkin.storage.StorageComponent; import static zipkin.internal.Util.UTF_8; diff --git a/zipkin/src/main/java/zipkin/collector/CollectorSampler.java b/zipkin/src/main/java/zipkin/collector/CollectorSampler.java index b2b50811a56..bf9e83928f1 100644 --- a/zipkin/src/main/java/zipkin/collector/CollectorSampler.java +++ b/zipkin/src/main/java/zipkin/collector/CollectorSampler.java @@ -13,8 +13,8 @@ */ package zipkin.collector; -import javax.annotation.Nullable; import zipkin.Span; +import zipkin.internal.Nullable; import static zipkin.internal.Util.checkArgument; diff --git a/zipkin/src/main/java/zipkin/collector/package-info.java b/zipkin/src/main/java/zipkin/collector/package-info.java deleted file mode 100644 index ea1b939e416..00000000000 --- a/zipkin/src/main/java/zipkin/collector/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.collector; diff --git a/zipkin/src/main/java/zipkin/internal/CallbackCaptor.java b/zipkin/src/main/java/zipkin/internal/CallbackCaptor.java index 4ef62dfb5dd..484f12c77af 100644 --- a/zipkin/src/main/java/zipkin/internal/CallbackCaptor.java +++ b/zipkin/src/main/java/zipkin/internal/CallbackCaptor.java @@ -15,7 +15,6 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicReference; -import javax.annotation.Nullable; import zipkin.storage.Callback; public final class CallbackCaptor implements Callback { diff --git a/zipkin/src/main/java/zipkin/internal/Collector.java b/zipkin/src/main/java/zipkin/internal/Collector.java index f6c4683e080..16f53a4534f 100644 --- a/zipkin/src/main/java/zipkin/internal/Collector.java +++ b/zipkin/src/main/java/zipkin/internal/Collector.java @@ -17,7 +17,6 @@ import java.util.Iterator; import java.util.List; import java.util.logging.Logger; -import javax.annotation.Nullable; import zipkin.collector.CollectorMetrics; import zipkin.storage.Callback; diff --git a/zipkin/src/main/java/zipkin/internal/CorrectForClockSkew.java b/zipkin/src/main/java/zipkin/internal/CorrectForClockSkew.java index 87cbae64060..0a4b1cebc1a 100644 --- a/zipkin/src/main/java/zipkin/internal/CorrectForClockSkew.java +++ b/zipkin/src/main/java/zipkin/internal/CorrectForClockSkew.java @@ -20,7 +20,6 @@ import java.util.List; import java.util.Map; import java.util.logging.Logger; -import javax.annotation.Nullable; import zipkin.Annotation; import zipkin.BinaryAnnotation; import zipkin.Constants; diff --git a/zipkin/src/main/java/zipkin/internal/InetAddresses.java b/zipkin/src/main/java/zipkin/internal/InetAddresses.java index 7783e9902f6..e8f10b3be0f 100644 --- a/zipkin/src/main/java/zipkin/internal/InetAddresses.java +++ b/zipkin/src/main/java/zipkin/internal/InetAddresses.java @@ -15,7 +15,6 @@ import java.net.InetAddress; import java.nio.ByteBuffer; -import javax.annotation.Nullable; /** Utilities for working with IP Addresses. */ public final class InetAddresses { diff --git a/zipkin/src/main/java/zipkin/internal/LenientDoubleCallback.java b/zipkin/src/main/java/zipkin/internal/LenientDoubleCallback.java index 685d6e4306d..ef1d9d1fe9c 100644 --- a/zipkin/src/main/java/zipkin/internal/LenientDoubleCallback.java +++ b/zipkin/src/main/java/zipkin/internal/LenientDoubleCallback.java @@ -15,7 +15,6 @@ import java.util.logging.Level; import java.util.logging.Logger; -import javax.annotation.Nullable; import zipkin.storage.Callback; /** Callback that succeeds if at least one value does. The first error is logged. */ diff --git a/zipkin/src/main/java/zipkin/internal/LenientDoubleCallbackAsyncSpanStore.java b/zipkin/src/main/java/zipkin/internal/LenientDoubleCallbackAsyncSpanStore.java index ad41694cd1a..6ecd92ae887 100644 --- a/zipkin/src/main/java/zipkin/internal/LenientDoubleCallbackAsyncSpanStore.java +++ b/zipkin/src/main/java/zipkin/internal/LenientDoubleCallbackAsyncSpanStore.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.Set; import java.util.logging.Logger; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.Span; import zipkin.storage.AsyncSpanStore; diff --git a/zipkin/src/main/java/zipkin/internal/package-info.java b/zipkin/src/main/java/zipkin/internal/Nullable.java similarity index 61% rename from zipkin/src/main/java/zipkin/internal/package-info.java rename to zipkin/src/main/java/zipkin/internal/Nullable.java index 2baf57e18ff..b58c3f77240 100644 --- a/zipkin/src/main/java/zipkin/internal/package-info.java +++ b/zipkin/src/main/java/zipkin/internal/Nullable.java @@ -11,5 +11,14 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -@javax.annotation.ParametersAreNonnullByDefault package zipkin.internal; + +/** + * Libraries such as Guice and AutoValue will process any annotation named {@code Nullable}. This + * avoids a dependency on one of the many jsr305 jars, causes problems in OSGi and Java 9 projects + * (where a project is also using jax-ws). + */ +@java.lang.annotation.Documented +@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) +public @interface Nullable { +} diff --git a/zipkin/src/main/java/zipkin/internal/Util.java b/zipkin/src/main/java/zipkin/internal/Util.java index 0362f08e037..015d74a47de 100644 --- a/zipkin/src/main/java/zipkin/internal/Util.java +++ b/zipkin/src/main/java/zipkin/internal/Util.java @@ -23,7 +23,6 @@ import java.util.List; import java.util.TimeZone; import java.util.concurrent.TimeUnit; -import javax.annotation.Nullable; public final class Util { public static final Charset UTF_8 = Charset.forName("UTF-8"); diff --git a/zipkin/src/main/java/zipkin/internal/V2CallbackAdapter.java b/zipkin/src/main/java/zipkin/internal/V2CallbackAdapter.java index 07de5028dca..501bf3d466a 100644 --- a/zipkin/src/main/java/zipkin/internal/V2CallbackAdapter.java +++ b/zipkin/src/main/java/zipkin/internal/V2CallbackAdapter.java @@ -13,7 +13,6 @@ */ package zipkin.internal; -import javax.annotation.Nullable; import zipkin.storage.Callback; final class V2CallbackAdapter implements zipkin2.Callback { diff --git a/zipkin/src/main/java/zipkin/internal/V2Collector.java b/zipkin/src/main/java/zipkin/internal/V2Collector.java index dc523ae4796..028744d887b 100644 --- a/zipkin/src/main/java/zipkin/internal/V2Collector.java +++ b/zipkin/src/main/java/zipkin/internal/V2Collector.java @@ -17,7 +17,6 @@ import java.util.Collections; import java.util.List; import java.util.logging.Logger; -import javax.annotation.Nullable; import zipkin.collector.CollectorMetrics; import zipkin.collector.CollectorSampler; import zipkin.storage.Callback; diff --git a/zipkin/src/main/java/zipkin/internal/V2SpanConverter.java b/zipkin/src/main/java/zipkin/internal/V2SpanConverter.java index 659c5531cb8..128ceb9f130 100644 --- a/zipkin/src/main/java/zipkin/internal/V2SpanConverter.java +++ b/zipkin/src/main/java/zipkin/internal/V2SpanConverter.java @@ -18,7 +18,6 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import javax.annotation.Nullable; import zipkin.Annotation; import zipkin.BinaryAnnotation; import zipkin.Constants; diff --git a/zipkin/src/main/java/zipkin/internal/V2SpanStoreAdapter.java b/zipkin/src/main/java/zipkin/internal/V2SpanStoreAdapter.java index c42369bb180..9cfcf32115a 100644 --- a/zipkin/src/main/java/zipkin/internal/V2SpanStoreAdapter.java +++ b/zipkin/src/main/java/zipkin/internal/V2SpanStoreAdapter.java @@ -17,7 +17,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.storage.AsyncSpanStore; import zipkin.storage.Callback; diff --git a/zipkin/src/main/java/zipkin/internal/V2StorageComponent.java b/zipkin/src/main/java/zipkin/internal/V2StorageComponent.java index db803850de9..8ae56196bee 100644 --- a/zipkin/src/main/java/zipkin/internal/V2StorageComponent.java +++ b/zipkin/src/main/java/zipkin/internal/V2StorageComponent.java @@ -15,7 +15,6 @@ import java.io.IOException; import java.util.concurrent.ExecutionException; -import javax.annotation.Nullable; import zipkin.storage.AsyncSpanConsumer; import zipkin.storage.AsyncSpanStore; import zipkin.storage.StorageAdapters; diff --git a/zipkin/src/main/java/zipkin/package-info.java b/zipkin/src/main/java/zipkin/package-info.java deleted file mode 100644 index c860cbc3ec9..00000000000 --- a/zipkin/src/main/java/zipkin/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin; diff --git a/zipkin/src/main/java/zipkin/storage/AsyncSpanStore.java b/zipkin/src/main/java/zipkin/storage/AsyncSpanStore.java index 070774d75bd..b246b0ae8f3 100644 --- a/zipkin/src/main/java/zipkin/storage/AsyncSpanStore.java +++ b/zipkin/src/main/java/zipkin/storage/AsyncSpanStore.java @@ -14,9 +14,9 @@ package zipkin.storage; import java.util.List; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.Span; +import zipkin.internal.Nullable; /** * An interface that is equivalent to {@link SpanStore} but accepts callbacks to allow diff --git a/zipkin/src/main/java/zipkin/storage/Callback.java b/zipkin/src/main/java/zipkin/storage/Callback.java index 0b48c21523b..f7fa6f8dad1 100644 --- a/zipkin/src/main/java/zipkin/storage/Callback.java +++ b/zipkin/src/main/java/zipkin/storage/Callback.java @@ -13,7 +13,7 @@ */ package zipkin.storage; -import javax.annotation.Nullable; +import zipkin.internal.Nullable; /** * A callback of a single result or error. diff --git a/zipkin/src/main/java/zipkin/storage/InMemorySpanStore.java b/zipkin/src/main/java/zipkin/storage/InMemorySpanStore.java index 233222dae79..efbd5e3c0fd 100644 --- a/zipkin/src/main/java/zipkin/storage/InMemorySpanStore.java +++ b/zipkin/src/main/java/zipkin/storage/InMemorySpanStore.java @@ -24,13 +24,13 @@ import java.util.Map; import java.util.Set; import java.util.TreeMap; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.Span; import zipkin.internal.CorrectForClockSkew; import zipkin.internal.DependencyLinker; import zipkin.internal.GroupByTraceId; import zipkin.internal.MergeById; +import zipkin.internal.Nullable; import zipkin.internal.Pair; import static zipkin.internal.ApplyTimestampAndDuration.guessTimestamp; diff --git a/zipkin/src/main/java/zipkin/storage/InternalAsyncToBlockingSpanStoreAdapter.java b/zipkin/src/main/java/zipkin/storage/InternalAsyncToBlockingSpanStoreAdapter.java index 27645eddb33..5f6b159a3fc 100644 --- a/zipkin/src/main/java/zipkin/storage/InternalAsyncToBlockingSpanStoreAdapter.java +++ b/zipkin/src/main/java/zipkin/storage/InternalAsyncToBlockingSpanStoreAdapter.java @@ -14,10 +14,10 @@ package zipkin.storage; import java.util.List; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.Span; import zipkin.internal.CallbackCaptor; +import zipkin.internal.Nullable; final class InternalAsyncToBlockingSpanStoreAdapter implements SpanStore { final AsyncSpanStore delegate; diff --git a/zipkin/src/main/java/zipkin/storage/InternalBlockingToAsyncSpanStoreAdapter.java b/zipkin/src/main/java/zipkin/storage/InternalBlockingToAsyncSpanStoreAdapter.java index d91c654bd13..f4c3fe71d33 100644 --- a/zipkin/src/main/java/zipkin/storage/InternalBlockingToAsyncSpanStoreAdapter.java +++ b/zipkin/src/main/java/zipkin/storage/InternalBlockingToAsyncSpanStoreAdapter.java @@ -15,9 +15,9 @@ import java.util.List; import java.util.concurrent.Executor; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.Span; +import zipkin.internal.Nullable; import zipkin.internal.Util; import static zipkin.internal.Util.checkNotNull; diff --git a/zipkin/src/main/java/zipkin/storage/QueryRequest.java b/zipkin/src/main/java/zipkin/storage/QueryRequest.java index 6acba58a755..619b82050c5 100644 --- a/zipkin/src/main/java/zipkin/storage/QueryRequest.java +++ b/zipkin/src/main/java/zipkin/storage/QueryRequest.java @@ -20,12 +20,12 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.annotation.Nullable; import zipkin.Annotation; import zipkin.BinaryAnnotation; import zipkin.Endpoint; import zipkin.Span; import zipkin.internal.ApplyTimestampAndDuration; +import zipkin.internal.Nullable; import static zipkin.Constants.CORE_ANNOTATIONS; import static zipkin.internal.Util.UTF_8; diff --git a/zipkin/src/main/java/zipkin/storage/SpanStore.java b/zipkin/src/main/java/zipkin/storage/SpanStore.java index 005931c1d7d..6398daa13b7 100644 --- a/zipkin/src/main/java/zipkin/storage/SpanStore.java +++ b/zipkin/src/main/java/zipkin/storage/SpanStore.java @@ -14,10 +14,10 @@ package zipkin.storage; import java.util.List; -import javax.annotation.Nullable; import zipkin.DependencyLink; import zipkin.Endpoint; import zipkin.Span; +import zipkin.internal.Nullable; public interface SpanStore { diff --git a/zipkin/src/main/java/zipkin/storage/package-info.java b/zipkin/src/main/java/zipkin/storage/package-info.java deleted file mode 100644 index 8bd4523cbbb..00000000000 --- a/zipkin/src/main/java/zipkin/storage/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.storage; diff --git a/zipkin2/src/main/java/zipkin2/Annotation.java b/zipkin2/src/main/java/zipkin2/Annotation.java index 4134c9afbeb..ecca835bd4c 100644 --- a/zipkin2/src/main/java/zipkin2/Annotation.java +++ b/zipkin2/src/main/java/zipkin2/Annotation.java @@ -15,7 +15,6 @@ import com.google.auto.value.AutoValue; import java.io.Serializable; -import javax.annotation.concurrent.Immutable; /** * Associates an event that explains latency with a timestamp. @@ -23,7 +22,7 @@ *

Unlike log statements, annotations are often codes: Ex. {@link "cache.miss"}. */ @AutoValue -@Immutable +//@Immutable public abstract class Annotation implements Comparable, Serializable { // for Spark jobs private static final long serialVersionUID = 0L; diff --git a/zipkin2/src/main/java/zipkin2/Call.java b/zipkin2/src/main/java/zipkin2/Call.java index fcc873a51bb..8268c410953 100644 --- a/zipkin2/src/main/java/zipkin2/Call.java +++ b/zipkin2/src/main/java/zipkin2/Call.java @@ -17,7 +17,7 @@ import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicReference; -import javax.annotation.Nullable; +import zipkin2.internal.Nullable; /** * This captures a (usually remote) request and can be used once, either {@link #execute() diff --git a/zipkin2/src/main/java/zipkin2/Callback.java b/zipkin2/src/main/java/zipkin2/Callback.java index 509bc2b6ae1..a0f13d38a51 100644 --- a/zipkin2/src/main/java/zipkin2/Callback.java +++ b/zipkin2/src/main/java/zipkin2/Callback.java @@ -13,7 +13,7 @@ */ package zipkin2; -import javax.annotation.Nullable; +import zipkin2.internal.Nullable; /** * A callback of a single result or error. diff --git a/zipkin2/src/main/java/zipkin2/CheckResult.java b/zipkin2/src/main/java/zipkin2/CheckResult.java index 82bc86476d6..dc32d08be60 100644 --- a/zipkin2/src/main/java/zipkin2/CheckResult.java +++ b/zipkin2/src/main/java/zipkin2/CheckResult.java @@ -14,8 +14,7 @@ package zipkin2; import com.google.auto.value.AutoValue; -import javax.annotation.Nullable; -import jdk.nashorn.internal.ir.annotations.Immutable; +import zipkin2.internal.Nullable; /** * Answers the question: Are operations on this component likely to succeed? @@ -26,8 +25,8 @@ * * @see CheckResult#OK */ -@Immutable @AutoValue +//@Immutable public abstract class CheckResult { public static final CheckResult OK = new AutoValue_CheckResult(true, null); diff --git a/zipkin2/src/main/java/zipkin2/DependencyLink.java b/zipkin2/src/main/java/zipkin2/DependencyLink.java index 99d6f67c78c..467ac09c925 100644 --- a/zipkin2/src/main/java/zipkin2/DependencyLink.java +++ b/zipkin2/src/main/java/zipkin2/DependencyLink.java @@ -17,11 +17,10 @@ import java.io.Serializable; import java.nio.charset.Charset; import java.util.Locale; -import javax.annotation.concurrent.Immutable; import zipkin2.codec.DependencyLinkBytesEncoder; -@Immutable @AutoValue +//@Immutable public abstract class DependencyLink implements Serializable { // for Spark jobs static final Charset UTF_8 = Charset.forName("UTF-8"); diff --git a/zipkin2/src/main/java/zipkin2/Endpoint.java b/zipkin2/src/main/java/zipkin2/Endpoint.java index 7d9431db0af..a6b534899ce 100644 --- a/zipkin2/src/main/java/zipkin2/Endpoint.java +++ b/zipkin2/src/main/java/zipkin2/Endpoint.java @@ -20,12 +20,11 @@ import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.Locale; -import javax.annotation.Nullable; -import javax.annotation.concurrent.Immutable; +import zipkin2.internal.Nullable; /** The network context of a node in the service graph. */ @AutoValue -@Immutable +//@Immutable public abstract class Endpoint implements Serializable { // for Spark jobs private static final long serialVersionUID = 0L; diff --git a/zipkin2/src/main/java/zipkin2/Span.java b/zipkin2/src/main/java/zipkin2/Span.java index 46233b14ea2..f8ec5a88b7b 100644 --- a/zipkin2/src/main/java/zipkin2/Span.java +++ b/zipkin2/src/main/java/zipkin2/Span.java @@ -24,8 +24,7 @@ import java.util.Locale; import java.util.Map; import java.util.TreeMap; -import javax.annotation.Nullable; -import javax.annotation.concurrent.Immutable; +import zipkin2.internal.Nullable; import zipkin2.codec.SpanBytesEncoder; /** @@ -49,7 +48,7 @@ * and smaller data. */ @AutoValue -@Immutable +//@Immutable public abstract class Span implements Serializable { // for Spark jobs static final Charset UTF_8 = Charset.forName("UTF-8"); diff --git a/zipkin2/src/main/java/zipkin2/codec/BytesDecoder.java b/zipkin2/src/main/java/zipkin2/codec/BytesDecoder.java index 94d9af1703f..4e39dd10b1c 100644 --- a/zipkin2/src/main/java/zipkin2/codec/BytesDecoder.java +++ b/zipkin2/src/main/java/zipkin2/codec/BytesDecoder.java @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.List; -import javax.annotation.Nullable; +import zipkin2.internal.Nullable; /** * This type accepts a collection that receives decoded elements. diff --git a/zipkin2/src/main/java/zipkin2/codec/DependencyLinkBytesDecoder.java b/zipkin2/src/main/java/zipkin2/codec/DependencyLinkBytesDecoder.java index 4e16b3dcf61..e2477c2eab2 100644 --- a/zipkin2/src/main/java/zipkin2/codec/DependencyLinkBytesDecoder.java +++ b/zipkin2/src/main/java/zipkin2/codec/DependencyLinkBytesDecoder.java @@ -16,10 +16,10 @@ import java.io.IOException; import java.util.Collection; import java.util.List; -import javax.annotation.Nullable; import zipkin2.DependencyLink; import zipkin2.internal.JsonCodec; import zipkin2.internal.JsonCodec.JsonReader; +import zipkin2.internal.Nullable; public enum DependencyLinkBytesDecoder implements BytesDecoder { JSON_V1 { diff --git a/zipkin2/src/main/java/zipkin2/codec/SpanBytesDecoder.java b/zipkin2/src/main/java/zipkin2/codec/SpanBytesDecoder.java index 4419fd843d3..78736338eaf 100644 --- a/zipkin2/src/main/java/zipkin2/codec/SpanBytesDecoder.java +++ b/zipkin2/src/main/java/zipkin2/codec/SpanBytesDecoder.java @@ -15,9 +15,9 @@ import java.util.Collection; import java.util.List; -import javax.annotation.Nullable; import zipkin2.Span; import zipkin2.internal.JsonCodec; +import zipkin2.internal.Nullable; import zipkin2.internal.V2SpanReader; /** This is separate from {@link SpanBytesEncoder}, as it isn't needed for instrumentation */ diff --git a/zipkin2/src/main/java/zipkin2/codec/SpanBytesEncoder.java b/zipkin2/src/main/java/zipkin2/codec/SpanBytesEncoder.java index d9a5e075c8d..e230a442827 100644 --- a/zipkin2/src/main/java/zipkin2/codec/SpanBytesEncoder.java +++ b/zipkin2/src/main/java/zipkin2/codec/SpanBytesEncoder.java @@ -14,7 +14,6 @@ package zipkin2.codec; import java.util.List; -import javax.annotation.concurrent.Immutable; import zipkin2.Span; import zipkin2.internal.Buffer; import zipkin2.internal.JsonCodec; @@ -22,7 +21,7 @@ import zipkin2.internal.V2SpanWriter; /** Limited interface needed by those writing span reporters */ -@Immutable +//@Immutable public enum SpanBytesEncoder implements BytesEncoder { /** Corresponds to the Zipkin v1 json format (with tags as binary annotations) */ JSON_V1 { diff --git a/zipkin2/src/main/java/zipkin2/codec/package-info.java b/zipkin2/src/main/java/zipkin2/codec/package-info.java deleted file mode 100644 index 23fba410433..00000000000 --- a/zipkin2/src/main/java/zipkin2/codec/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin2.codec; diff --git a/zipkin2/src/main/java/zipkin2/internal/DependencyLinker.java b/zipkin2/src/main/java/zipkin2/internal/DependencyLinker.java index 21755f790aa..962aa294dad 100644 --- a/zipkin2/src/main/java/zipkin2/internal/DependencyLinker.java +++ b/zipkin2/src/main/java/zipkin2/internal/DependencyLinker.java @@ -20,7 +20,6 @@ import java.util.List; import java.util.Map; import java.util.logging.Logger; -import javax.annotation.Nullable; import zipkin2.DependencyLink; import zipkin2.Span; import zipkin2.Span.Kind; diff --git a/zipkin2/src/main/java/zipkin2/internal/JsonCodec.java b/zipkin2/src/main/java/zipkin2/internal/JsonCodec.java index 88dd4b80892..887e7c6ce96 100644 --- a/zipkin2/src/main/java/zipkin2/internal/JsonCodec.java +++ b/zipkin2/src/main/java/zipkin2/internal/JsonCodec.java @@ -22,7 +22,6 @@ import java.util.Collections; import java.util.LinkedList; import java.util.List; -import javax.annotation.Nullable; import static java.lang.String.format; diff --git a/zipkin2/src/main/java/zipkin2/internal/Node.java b/zipkin2/src/main/java/zipkin2/internal/Node.java index c523a8b3e76..13b5129d295 100644 --- a/zipkin2/src/main/java/zipkin2/internal/Node.java +++ b/zipkin2/src/main/java/zipkin2/internal/Node.java @@ -23,7 +23,6 @@ import java.util.Map; import java.util.Queue; import java.util.logging.Logger; -import javax.annotation.Nullable; import static java.lang.String.format; import static java.util.logging.Level.FINE; diff --git a/zipkin-autoconfigure/collector-kafka/src/main/java/zipkin/autoconfigure/collector/kafka/package-info.java b/zipkin2/src/main/java/zipkin2/internal/Nullable.java similarity index 59% rename from zipkin-autoconfigure/collector-kafka/src/main/java/zipkin/autoconfigure/collector/kafka/package-info.java rename to zipkin2/src/main/java/zipkin2/internal/Nullable.java index f55d618ba56..f582d1dec7c 100644 --- a/zipkin-autoconfigure/collector-kafka/src/main/java/zipkin/autoconfigure/collector/kafka/package-info.java +++ b/zipkin2/src/main/java/zipkin2/internal/Nullable.java @@ -11,5 +11,14 @@ * or implied. See the License for the specific language governing permissions and limitations under * the License. */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin.autoconfigure.collector.kafka; +package zipkin2.internal; + +/** + * Libraries such as Guice and AutoValue will process any annotation named {@code Nullable}. This + * avoids a dependency on one of the many jsr305 jars, causes problems in OSGi and Java 9 projects + * (where a project is also using jax-ws). + */ +@java.lang.annotation.Documented +@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) +public @interface Nullable { +} diff --git a/zipkin2/src/main/java/zipkin2/internal/V1SpanWriter.java b/zipkin2/src/main/java/zipkin2/internal/V1SpanWriter.java index 253efc7c24e..931259381c9 100644 --- a/zipkin2/src/main/java/zipkin2/internal/V1SpanWriter.java +++ b/zipkin2/src/main/java/zipkin2/internal/V1SpanWriter.java @@ -16,8 +16,6 @@ import java.nio.charset.Charset; import java.util.Iterator; import java.util.Map; -import javax.annotation.Nullable; -import javax.annotation.concurrent.Immutable; import zipkin2.Annotation; import zipkin2.Endpoint; import zipkin2.Span; @@ -26,7 +24,7 @@ import static zipkin2.internal.JsonEscaper.jsonEscape; import static zipkin2.internal.JsonEscaper.jsonEscapedSizeInBytes; -@Immutable +//@Immutable public final class V1SpanWriter implements Buffer.Writer { @Override public int sizeInBytes(Span value) { Parsed parsed = parse(value); diff --git a/zipkin2/src/main/java/zipkin2/internal/V2SpanWriter.java b/zipkin2/src/main/java/zipkin2/internal/V2SpanWriter.java index 38b2dab4a0f..e6a5e57057d 100644 --- a/zipkin2/src/main/java/zipkin2/internal/V2SpanWriter.java +++ b/zipkin2/src/main/java/zipkin2/internal/V2SpanWriter.java @@ -15,8 +15,6 @@ import java.util.Iterator; import java.util.Map; -import javax.annotation.Nullable; -import javax.annotation.concurrent.Immutable; import zipkin2.Annotation; import zipkin2.Endpoint; import zipkin2.Span; @@ -25,7 +23,7 @@ import static zipkin2.internal.JsonEscaper.jsonEscape; import static zipkin2.internal.JsonEscaper.jsonEscapedSizeInBytes; -@Immutable +//@Immutable public final class V2SpanWriter implements Buffer.Writer { @Override public int sizeInBytes(Span value) { int sizeInBytes = 13; // {"traceId":"" diff --git a/zipkin2/src/main/java/zipkin2/package-info.java b/zipkin2/src/main/java/zipkin2/package-info.java deleted file mode 100644 index 167c2447866..00000000000 --- a/zipkin2/src/main/java/zipkin2/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin2; diff --git a/zipkin2/src/main/java/zipkin2/storage/QueryRequest.java b/zipkin2/src/main/java/zipkin2/storage/QueryRequest.java index aacbe03bfb1..beb599eb91c 100644 --- a/zipkin2/src/main/java/zipkin2/storage/QueryRequest.java +++ b/zipkin2/src/main/java/zipkin2/storage/QueryRequest.java @@ -22,7 +22,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; -import javax.annotation.Nullable; +import zipkin2.internal.Nullable; import zipkin2.Annotation; import zipkin2.Span; diff --git a/zipkin2/src/main/java/zipkin2/storage/package-info.java b/zipkin2/src/main/java/zipkin2/storage/package-info.java deleted file mode 100644 index 7441cc7fce9..00000000000 --- a/zipkin2/src/main/java/zipkin2/storage/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Copyright 2015-2017 The OpenZipkin Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. - */ -@javax.annotation.ParametersAreNonnullByDefault -package zipkin2.storage; diff --git a/zipkin2/src/test/java/zipkin2/CallTest.java b/zipkin2/src/test/java/zipkin2/CallTest.java index d471a6ed069..0ad07d70b9b 100644 --- a/zipkin2/src/test/java/zipkin2/CallTest.java +++ b/zipkin2/src/test/java/zipkin2/CallTest.java @@ -22,12 +22,12 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import javax.annotation.Nullable; import org.junit.Rule; import org.junit.Test; import org.mockito.Mock; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; +import zipkin2.internal.Nullable; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/zipkin2/src/test/java/zipkin2/internal/DependencyLinkerTest.java b/zipkin2/src/test/java/zipkin2/internal/DependencyLinkerTest.java index 9f799f6d4b4..840e8cd2599 100644 --- a/zipkin2/src/test/java/zipkin2/internal/DependencyLinkerTest.java +++ b/zipkin2/src/test/java/zipkin2/internal/DependencyLinkerTest.java @@ -18,7 +18,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Collectors; -import javax.annotation.Nullable; import org.junit.Test; import zipkin2.DependencyLink; import zipkin2.Endpoint;