Replace deprecated Class.newInstance with getDeclaredConstructor().newInstance #543
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.42) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 171 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.308
Real PR Conversation Timeline
1 comments
"Review active on #543"
general
weight: 0.35
gibson9583
What
Replaces the deprecated
Class.newInstance()withgetDeclaredConstructor().newInstance()at all 44 call sites in our own sources (32 files). Vendored third-party code is untouched.Why
Class.newInstance()has been deprecated since Java 9 because it rethrows checked constructor exceptions unchecked.Reviewer notes
catch (Exception)/catch (Throwable)or athrows Exceptionmethod, so error handling is unchanged.generator/.../hl7v2/Component.java,getCachedComponentdeclaresthrows InstantiationExceptionon about 24 methods. It catches the new exceptions locally and rethrows them asInstantiationExceptionwith the cause.InvocationTargetException. For a third-party connector or JMS connection factory whose constructor throws, the deploy error or JMS response message now readsnullinstead of the constructor's message. The cause chain and the logs keep the detail. None of the bundled classes throw from their constructors../gradlew compileJava compileTestJavaand 54 tests across the touched server classes.🤖 Generated with Claude Code