Skip to content

Commit 14ea26b

Browse files
authored
2.x: compatibility fixes (JDK 9 & IntelliJ 2017.1 EAP) (#5069)
1 parent ad11100 commit 14ea26b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/test/java/io/reactivex/MaybeNo2Dot0Since.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,16 @@ public static File findSource(String baseClassName) throws Exception {
4040

4141
// System.out.println(path);
4242

43-
int i = path.indexOf("/RxJava/");
43+
int i = path.indexOf("/RxJava");
4444
if (i < 0) {
4545
System.out.println("Can't find the base RxJava directory");
4646
return null;
4747
}
4848

49-
String p = path.substring(0, i + 8) + "src/main/java/io/reactivex/" + baseClassName + ".java";
49+
// find end of any potential postfix to /RxJava
50+
int j = path.indexOf("/", i + 6);
51+
52+
String p = path.substring(0, j + 1) + "src/main/java/io/reactivex/" + baseClassName + ".java";
5053

5154
File f = new File(p);
5255

src/test/java/io/reactivex/exceptions/ExceptionsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public void onNext(Integer n) {
141141
}
142142
});
143143
a.onNext(1);
144-
assertTrue(depth.get() > MAX_STACK_DEPTH);
144+
assertTrue(depth.get() >= MAX_STACK_DEPTH);
145145
}
146146

147147
@Test(expected = StackOverflowError.class)

0 commit comments

Comments
 (0)