@@ -86,19 +86,12 @@ private Joiner(Joiner prototype) {
86
86
this .separator = prototype .separator ;
87
87
}
88
88
89
- /*
90
- * In this file, we use <? extends @Nullable Object> instead of <?> to work around a Kotlin bug
91
- * (see b/189937072 until we file a bug against Kotlin itself). (The two should be equivalent, so
92
- * we normally prefer the shorter one.)
93
- */
94
-
95
89
/**
96
90
* Appends the string representation of each of {@code parts}, using the previously configured
97
91
* separator between each, to {@code appendable}.
98
92
*/
99
93
@ CanIgnoreReturnValue
100
- public <A extends Appendable > A appendTo (A appendable , Iterable <? extends @ Nullable Object > parts )
101
- throws IOException {
94
+ public <A extends Appendable > A appendTo (A appendable , Iterable <?> parts ) throws IOException {
102
95
return appendTo (appendable , parts .iterator ());
103
96
}
104
97
@@ -109,8 +102,7 @@ public <A extends Appendable> A appendTo(A appendable, Iterable<? extends @Nulla
109
102
* @since 11.0
110
103
*/
111
104
@ CanIgnoreReturnValue
112
- public <A extends Appendable > A appendTo (A appendable , Iterator <? extends @ Nullable Object > parts )
113
- throws IOException {
105
+ public <A extends Appendable > A appendTo (A appendable , Iterator <?> parts ) throws IOException {
114
106
checkNotNull (appendable );
115
107
if (parts .hasNext ()) {
116
108
appendable .append (toString (parts .next ()));
@@ -151,8 +143,7 @@ public final <A extends Appendable> A appendTo(
151
143
* Iterable)}, except that it does not throw {@link IOException}.
152
144
*/
153
145
@ CanIgnoreReturnValue
154
- public final StringBuilder appendTo (
155
- StringBuilder builder , Iterable <? extends @ Nullable Object > parts ) {
146
+ public final StringBuilder appendTo (StringBuilder builder , Iterable <?> parts ) {
156
147
return appendTo (builder , parts .iterator ());
157
148
}
158
149
@@ -164,8 +155,7 @@ public final StringBuilder appendTo(
164
155
* @since 11.0
165
156
*/
166
157
@ CanIgnoreReturnValue
167
- public final StringBuilder appendTo (
168
- StringBuilder builder , Iterator <? extends @ Nullable Object > parts ) {
158
+ public final StringBuilder appendTo (StringBuilder builder , Iterator <?> parts ) {
169
159
try {
170
160
appendTo ((Appendable ) builder , parts );
171
161
} catch (IOException impossible ) {
@@ -204,7 +194,7 @@ public final StringBuilder appendTo(
204
194
* Returns a string containing the string representation of each of {@code parts}, using the
205
195
* previously configured separator between each.
206
196
*/
207
- public String join (Iterable <? extends @ Nullable Object > parts ) {
197
+ public String join (Iterable <?> parts ) {
208
198
/*
209
199
* If we can quickly determine how many elements there are likely to be, then we can use the
210
200
* fastest possible implementation, which delegates to the array overload of String.join.
@@ -264,7 +254,7 @@ public String join(Iterable<? extends @Nullable Object> parts) {
264
254
*
265
255
* @since 11.0
266
256
*/
267
- public final String join (Iterator <? extends @ Nullable Object > parts ) {
257
+ public final String join (Iterator <?> parts ) {
268
258
return appendTo (new StringBuilder (), parts ).toString ();
269
259
}
270
260
@@ -324,8 +314,7 @@ public String join(Iterable<? extends @Nullable Object> parts) {
324
314
}
325
315
326
316
@ Override
327
- public <A extends Appendable > A appendTo (
328
- A appendable , Iterator <? extends @ Nullable Object > parts ) throws IOException {
317
+ public <A extends Appendable > A appendTo (A appendable , Iterator <?> parts ) throws IOException {
329
318
checkNotNull (appendable , "appendable" );
330
319
checkNotNull (parts , "parts" );
331
320
while (parts .hasNext ()) {
0 commit comments