Skip to content

Commit becded2

Browse files
authored
Remove throws statements from the API until we decide how to document it (open-telemetry#2912)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
1 parent 9e1c76b commit becded2

2 files changed

Lines changed: 0 additions & 11 deletions

File tree

api/all/src/main/java/io/opentelemetry/api/trace/SpanBuilder.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ public interface SpanBuilder {
117117
*
118118
* @param context the {@code Context}.
119119
* @return this.
120-
* @throws NullPointerException if {@code context} is {@code null}.
121120
*/
122121
SpanBuilder setParent(Context context);
123122

@@ -140,7 +139,6 @@ public interface SpanBuilder {
140139
*
141140
* @param spanContext the context of the linked {@code Span}.
142141
* @return this.
143-
* @throws NullPointerException if {@code spanContext} is {@code null}.
144142
*/
145143
SpanBuilder addLink(SpanContext spanContext);
146144

@@ -154,8 +152,6 @@ public interface SpanBuilder {
154152
* @param spanContext the context of the linked {@code Span}.
155153
* @param attributes the attributes of the {@code Link}.
156154
* @return this.
157-
* @throws NullPointerException if {@code spanContext} is {@code null}.
158-
* @throws NullPointerException if {@code attributes} is {@code null}.
159155
*/
160156
SpanBuilder addLink(SpanContext spanContext, Attributes attributes);
161157

@@ -172,7 +168,6 @@ public interface SpanBuilder {
172168
* @param key the key for this attribute.
173169
* @param value the value for this attribute.
174170
* @return this.
175-
* @throws NullPointerException if {@code key} is {@code null}.
176171
*/
177172
SpanBuilder setAttribute(String key, String value);
178173

@@ -186,7 +181,6 @@ public interface SpanBuilder {
186181
* @param key the key for this attribute.
187182
* @param value the value for this attribute.
188183
* @return this.
189-
* @throws NullPointerException if {@code key} is {@code null}.
190184
*/
191185
SpanBuilder setAttribute(String key, long value);
192186

@@ -200,7 +194,6 @@ public interface SpanBuilder {
200194
* @param key the key for this attribute.
201195
* @param value the value for this attribute.
202196
* @return this.
203-
* @throws NullPointerException if {@code key} is {@code null}.
204197
*/
205198
SpanBuilder setAttribute(String key, double value);
206199

@@ -214,7 +207,6 @@ public interface SpanBuilder {
214207
* @param key the key for this attribute.
215208
* @param value the value for this attribute.
216209
* @return this.
217-
* @throws NullPointerException if {@code key} is {@code null}.
218210
*/
219211
SpanBuilder setAttribute(String key, boolean value);
220212

@@ -227,8 +219,6 @@ public interface SpanBuilder {
227219
* @param key the key for this attribute.
228220
* @param value the value for this attribute.
229221
* @return this.
230-
* @throws NullPointerException if {@code key} is {@code null}.
231-
* @throws NullPointerException if {@code value} is {@code null}.
232222
*/
233223
<T> SpanBuilder setAttribute(AttributeKey<T> key, T value);
234224

api/all/src/main/java/io/opentelemetry/api/trace/Tracer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ public interface Tracer {
6565
*
6666
* @param spanName The name of the returned Span.
6767
* @return a {@code Span.Builder} to create and start a new {@code Span}.
68-
* @throws NullPointerException if {@code spanName} is {@code null}.
6968
*/
7069
SpanBuilder spanBuilder(String spanName);
7170
}

0 commit comments

Comments
 (0)