From 44d6dfea9e46c17c5b751388f6b1c098e37b8e03 Mon Sep 17 00:00:00 2001 From: Brian Rosenberg Date: Wed, 18 Mar 2026 11:57:31 -0400 Subject: [PATCH] Make Java component inherit from AutoCloseable --- .../org/mitre/mpf/component/api/MPFComponentInterface.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/MPFComponentInterface.java b/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/MPFComponentInterface.java index 7020899..f3f32bd 100644 --- a/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/MPFComponentInterface.java +++ b/detection/java-component-api/src/main/java/org/mitre/mpf/component/api/MPFComponentInterface.java @@ -32,8 +32,11 @@ * that all types of components must follow. Currently, the only supported type of component is "DETECTION", so all * components must implement the * {@link org.mitre.mpf.component.api.detection.MPFDetectionComponentInterface MPFDetectionComponentInterface}. + *

+ * Extends {@link AutoCloseable} so that Spring will automatically call {@link #close} on the + * component. */ -public interface MPFComponentInterface { +public interface MPFComponentInterface extends AutoCloseable { /** * Returns the type of component this is.