File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2193,6 +2193,10 @@ public final Single<Long> count() {
2193
2193
* Returns a Maybe that emits the item emitted by the source Maybe or a specified default item
2194
2194
* if the source Maybe is empty.
2195
2195
* <p>
2196
+ * Note that the result Maybe is semantically equivalent to a {@code Single}, since it's guaranteed
2197
+ * to emit exactly one item or an error. See {@link #toSingle(Object)} for a method with equivalent
2198
+ * behavior which returns a {@code Single}.
2199
+ * <p>
2196
2200
* <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/defaultIfEmpty.png" alt="">
2197
2201
* <dl>
2198
2202
* <dt><b>Scheduler:</b></dt>
Original file line number Diff line number Diff line change @@ -148,9 +148,11 @@ public void maybeDocRefersToMaybeTypes() throws Exception {
148
148
for (;;) {
149
149
int idx = m .javadoc .indexOf ("Single" , jdx );
150
150
if (idx >= 0 ) {
151
- if (!m .signature .contains ("Single" )) {
151
+ int j = m .javadoc .indexOf ("#toSingle" , jdx );
152
+ int k = m .javadoc .indexOf ("{@code Single" , jdx );
153
+ if (!m .signature .contains ("Single" ) && (j + 3 != idx && k + 7 != idx )) {
152
154
e .append ("java.lang.RuntimeException: Maybe doc mentions Single but not in the signature\r \n at io.reactivex." )
153
- .append ("Maybe (Maybe.java:" ).append (m .javadocLine + lineNumber (m .javadoc , idx ) - 1 ).append (")\r \n \r \n " );
155
+ .append ("Maybe(Maybe.java:" ).append (m .javadocLine + lineNumber (m .javadoc , idx ) - 1 ).append (")\r \n \r \n " );
154
156
}
155
157
jdx = idx + 6 ;
156
158
} else {
You can’t perform that action at this time.
0 commit comments