File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 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() {
21932193 * Returns a Maybe that emits the item emitted by the source Maybe or a specified default item
21942194 * if the source Maybe is empty.
21952195 * <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>
21962200 * <img width="640" height="305" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/defaultIfEmpty.png" alt="">
21972201 * <dl>
21982202 * <dt><b>Scheduler:</b></dt>
Original file line number Diff line number Diff line change @@ -148,9 +148,11 @@ public void maybeDocRefersToMaybeTypes() throws Exception {
148148 for (;;) {
149149 int idx = m .javadoc .indexOf ("Single" , jdx );
150150 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 )) {
152154 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 " );
154156 }
155157 jdx = idx + 6 ;
156158 } else {
You can’t perform that action at this time.
0 commit comments