From d7707a66ff5dc3ce960e03095e3cc541beee1414 Mon Sep 17 00:00:00 2001 From: svc-excavator-bot Date: Wed, 4 Dec 2019 22:36:07 +0000 Subject: [PATCH] Excavator: Upgrades Baseline to the latest version --- build.gradle | 2 +- .../tritium/proxy/ByteBuddyInstrumentationAdvice.java | 4 ++-- .../java/com/palantir/tritium/proxy/InvocationEventProxy.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index c9bc6a0c..c5ad1125 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,7 @@ buildscript { classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' classpath 'com.netflix.nebula:gradle-info-plugin:5.2.0' classpath 'com.netflix.nebula:nebula-publishing-plugin:14.1.1' - classpath 'com.palantir.baseline:gradle-baseline-java:2.37.0' + classpath 'com.palantir.baseline:gradle-baseline-java:2.40.0' classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.12.4' classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2' classpath 'com.palantir.metricschema:gradle-metric-schema:0.4.5' diff --git a/tritium-lib/src/main/java/com/palantir/tritium/proxy/ByteBuddyInstrumentationAdvice.java b/tritium-lib/src/main/java/com/palantir/tritium/proxy/ByteBuddyInstrumentationAdvice.java index 475325c8..991c5e09 100644 --- a/tritium-lib/src/main/java/com/palantir/tritium/proxy/ByteBuddyInstrumentationAdvice.java +++ b/tritium-lib/src/main/java/com/palantir/tritium/proxy/ByteBuddyInstrumentationAdvice.java @@ -61,7 +61,7 @@ static InvocationContext enter( return eventHandler.preInvocation(proxy, method, arguments); } return disabledHandlerSentinel; - } catch (Throwable t) { + } catch (RuntimeException | Error t) { if (logger.isWarnEnabled()) { logger.warn( "Failure occurred handling 'preInvocation' invocation on: {}", @@ -87,7 +87,7 @@ static void exit( } else { eventHandler.onFailure(context, thrown); } - } catch (Throwable t) { + } catch (RuntimeException | Error t) { if (logger.isWarnEnabled()) { Object value = thrown == null ? result : thrown; logger.warn( diff --git a/tritium-lib/src/main/java/com/palantir/tritium/proxy/InvocationEventProxy.java b/tritium-lib/src/main/java/com/palantir/tritium/proxy/InvocationEventProxy.java index d0fd5227..a968caf9 100644 --- a/tritium-lib/src/main/java/com/palantir/tritium/proxy/InvocationEventProxy.java +++ b/tritium-lib/src/main/java/com/palantir/tritium/proxy/InvocationEventProxy.java @@ -82,7 +82,7 @@ private boolean isEnabled(Object instance, Method method, Object[] args) { try { return eventHandler.isEnabled() && filter.shouldInstrument(instance, method, args); - } catch (Throwable t) { + } catch (RuntimeException | Error t) { logInvocationWarning("isEnabled", instance, method, t); return false; } @@ -103,7 +103,7 @@ public final Object invoke(Object proxy, Method method, @Nullable Object[] nulla return handleOnSuccess(context, result); } catch (InvocationTargetException ite) { throw handleOnFailure(context, ite.getCause()); - } catch (Throwable t) { + } catch (IllegalAccessException | RuntimeException | Error t) { throw handleOnFailure(context, t); } } else {