mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
substitute base class according to resolve place
EA-90836 - assert: InferenceSession.collectApplicabilityConstraints
This commit is contained in:
+8
@@ -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 {}
|
||||
}
|
||||
+23
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user