@@ -816,6 +816,7 @@ static void aOrAn(StringBuilder e, RxMethod m, String wrongPre, String word, Str
816
816
}
817
817
}
818
818
819
+ jdx = 0 ;
819
820
for (;;) {
820
821
idx = m .javadoc .indexOf (wrongPre + " {@link " + word , jdx );
821
822
if (idx >= 0 ) {
@@ -832,6 +833,7 @@ static void aOrAn(StringBuilder e, RxMethod m, String wrongPre, String word, Str
832
833
}
833
834
}
834
835
836
+ jdx = 0 ;
835
837
for (;;) {
836
838
idx = m .javadoc .indexOf (wrongPre + " {@linkplain " + word , jdx );
837
839
if (idx >= 0 ) {
@@ -848,6 +850,7 @@ static void aOrAn(StringBuilder e, RxMethod m, String wrongPre, String word, Str
848
850
}
849
851
}
850
852
853
+ jdx = 0 ;
851
854
for (;;) {
852
855
idx = m .javadoc .indexOf (wrongPre + " {@code " + word , jdx );
853
856
if (idx >= 0 ) {
@@ -863,7 +866,43 @@ static void aOrAn(StringBuilder e, RxMethod m, String wrongPre, String word, Str
863
866
break ;
864
867
}
865
868
}
869
+
870
+ // remove linebreaks and multi-spaces
871
+ String javadoc2 = m .javadoc .replace ("\n " , " " ).replace ("\r " , " " )
872
+ .replace (" * " , " " )
873
+ .replaceAll ("\\ s+" , " " );
874
+
875
+ // strip {@xxx } tags
876
+ int kk = 0 ;
877
+ for (;;) {
878
+ int jj = javadoc2 .indexOf ("{@" , kk );
879
+ if (jj < 0 ) {
880
+ break ;
881
+ }
882
+ int nn = javadoc2 .indexOf (" " , jj + 2 );
883
+ int mm = javadoc2 .indexOf ("}" , jj + 2 );
884
+
885
+ javadoc2 = javadoc2 .substring (0 , jj ) + javadoc2 .substring (nn + 1 , mm ) + javadoc2 .substring (mm + 1 );
866
886
887
+ kk = mm + 1 ;
888
+ }
889
+
890
+ jdx = 0 ;
891
+ for (;;) {
892
+ idx = javadoc2 .indexOf (wrongPre + " " + word , jdx );
893
+ if (idx >= 0 ) {
894
+ e .append ("java.lang.RuntimeException: a/an typo " )
895
+ .append (word )
896
+ .append ("\r \n at io.reactivex." )
897
+ .append (baseTypeName )
898
+ .append (" (" )
899
+ .append (baseTypeName )
900
+ .append (".java:" ).append (m .javadocLine ).append (")\r \n \r \n " );
901
+ jdx = idx + wrongPre .length () + 1 + word .length ();
902
+ } else {
903
+ break ;
904
+ }
905
+ }
867
906
}
868
907
869
908
static void missingClosingDD (StringBuilder e , RxMethod m , String baseTypeName ) {
0 commit comments