substitute base class according to resolve place

EA-90836 - assert: InferenceSession.collectApplicabilityConstraints
This commit is contained in:
Anna.Kozlova
2016-11-14 19:05:03 +01:00
parent 35e8c825f3
commit 3e9370f451
4 changed files with 50 additions and 6 deletions
@@ -0,0 +1,8 @@
package p;
import java.io.FileReader;
import java.io.IOException;
public class PersistentMap<K, V> extends FileReader {
public void close() throws IOException {}
}
@@ -0,0 +1,23 @@
package p;
import java.io.*;
class Subst {
PersistentMap<Integer, String> messages;
{
register(() -> catchAndWarn(messages::close));
}
static void register(Runnable r) {}
private static void catchAndWarn(ThrowableRunnable runnable) {
try {
runnable.run();
}
catch (IOException e) {}
}
interface ThrowableRunnable {
void run() throws IOException;
}
}