Log nothing when class is found (#7897)

This commit is contained in:
Jaroslav Tulach 2023-09-26 17:55:58 +02:00 committed by GitHub
parent 2ad19a5366
commit 3094dc74c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -5,6 +5,7 @@ import java.io.File;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@ -463,7 +464,8 @@ public final class EnsoContext {
*/
@TruffleBoundary
public Object lookupJavaClass(String className) {
List<String> items = Arrays.asList(className.split("\\."));
var items = Arrays.asList(className.split("\\."));
var collectedExceptions = new ArrayList<Exception>();
for (int i = items.size() - 1; i >= 0; i--) {
String pkgName = String.join(".", items.subList(0, i));
String curClassName = items.get(i);
@ -478,9 +480,12 @@ public final class EnsoContext {
return lookupHostSymbol(pkgName, fullInnerClassName);
}
} catch (RuntimeException | InteropException ex) {
logger.log(Level.WARNING, null, ex);
collectedExceptions.add(ex);
}
}
for (var ex : collectedExceptions) {
logger.log(Level.WARNING, null, ex);
}
return null;
}

View File

@ -546,7 +546,7 @@ final class SerializationManager(compiler: Compiler) {
pool.shutdownNow()
Thread.sleep(100)
compiler.context.logSerializationManager(
Level.WARNING,
debugLogLevel,
"Serialization manager has been shut down."
)
}