From f73b1d32435ea5577f017adc266a4c08fd0a7a29 Mon Sep 17 00:00:00 2001
From: dgelessus <dgelessus@users.noreply.github.com>
Date: Tue, 12 Nov 2024 13:45:56 +0100
Subject: [PATCH] Remove deprecated checkTLC4BIsApplicable overload

Now no longer used by the ProB Java API or ProB 2 UI.
---
 src/main/java/de/tlc4b/TLC4B.java | 33 -------------------------------
 1 file changed, 33 deletions(-)

diff --git a/src/main/java/de/tlc4b/TLC4B.java b/src/main/java/de/tlc4b/TLC4B.java
index e98d0e2..45d56b8 100644
--- a/src/main/java/de/tlc4b/TLC4B.java
+++ b/src/main/java/de/tlc4b/TLC4B.java
@@ -15,11 +15,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
 
 import de.be4.classicalb.core.parser.exceptions.BCompoundException;
 import de.tlc4b.exceptions.TLC4BException;
@@ -117,34 +112,6 @@ public class TLC4B {
 		// tlc4B.createFiles() is intentionally not called here!
 	}
 
-	/**
-	 * Quickly check whether TLC4B is applicable to the provided machine.
-	 *
-	 * @param path path to B machine file
-	 * @param timeOut time out in seconds
-	 * @return Exception if TLC4B is not applicable, else null (also if unknown)
-	 * @deprecated This method creates an executor that is never shut down.
-	 *     Use {@link #checkTLC4BIsApplicable(String)} instead and implement the timeout logic yourself as appropriate for your application.
-	 */
-	@Deprecated
-	public static Exception checkTLC4BIsApplicable(final String path, int timeOut) {
-		Future<Exception> future = Executors.newSingleThreadExecutor().submit(() -> {
-			try {
-				checkTLC4BIsApplicable(path);
-				return null;
-			} catch (BCompoundException | TLC4BException e) {
-				return e;
-			}
-		});
-
-		try {
-			return future.get(timeOut, TimeUnit.SECONDS);
-		} catch (TimeoutException | InterruptedException | ExecutionException e) {
-			future.cancel(true);
-			return null; // unknown if TLC4B is applicable, exceptions can be ignored
-		}
-	}
-
 	private void printResults(TLCResults results) throws IOException {
 		printOperationsCount(results);
 		// options
-- 
GitLab