From 04f718781f94bd5c998007e82f338017be507417 Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Fri, 16 Feb 2024 20:20:56 +0100 Subject: [PATCH] refactor: remove dead code --- gradle.properties | 2 +- src/net/sourceforge/plantuml/tim/TFunction.java | 3 --- src/net/sourceforge/plantuml/tim/TFunctionImpl.java | 13 +------------ .../plantuml/tim/stdlib/InvokeProcedure.java | 6 +----- .../plantuml/tim/stdlib/SimpleReturnFunction.java | 6 +----- src/net/sourceforge/plantuml/version/Version.java | 2 +- 6 files changed, 5 insertions(+), 27 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5ab97f29b..6f86d3d81 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ # Warning, "version" should be the same in gradle.properties and Version.java # Any idea anyone how to magically synchronize those :-) ? -version = 1.2024.3 +version = 1.2024.4beta1 org.gradle.workers.max = 3 \ No newline at end of file diff --git a/src/net/sourceforge/plantuml/tim/TFunction.java b/src/net/sourceforge/plantuml/tim/TFunction.java index 028996913..b608b4006 100644 --- a/src/net/sourceforge/plantuml/tim/TFunction.java +++ b/src/net/sourceforge/plantuml/tim/TFunction.java @@ -49,9 +49,6 @@ public interface TFunction { public TFunctionType getFunctionType(); - public void executeProcedure(TContext context, TMemory memory, LineLocation location, String s) - throws EaterException, EaterExceptionLocated; - public TValue executeReturnFunction(TContext context, TMemory memory, LineLocation location, List args, Map named) throws EaterException, EaterExceptionLocated; diff --git a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java index dbdf7eb1a..111942152 100644 --- a/src/net/sourceforge/plantuml/tim/TFunctionImpl.java +++ b/src/net/sourceforge/plantuml/tim/TFunctionImpl.java @@ -130,18 +130,7 @@ public class TFunctionImpl implements TFunction { } } - public void executeProcedure(TContext context, TMemory memory, LineLocation location, String s) - throws EaterException, EaterExceptionLocated { - final EaterFunctionCall call = new EaterFunctionCall(new StringLocated(s, location), - context.isLegacyDefine(signature.getFunctionName()), unquoted); - call.analyze(context, memory); - final String endOfLine = call.getEndOfLine(); - final List args = call.getValues(); - final Map named = call.getNamedArguments(); - executeProcedureInternal(context, memory, args, named); - context.appendEndOfLine(endOfLine); - } - + @Override public void executeProcedureInternal(TContext context, TMemory memory, List args, Map named) throws EaterException, EaterExceptionLocated { if (functionType != TFunctionType.PROCEDURE && functionType != TFunctionType.LEGACY_DEFINELONG) diff --git a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java index c9079986a..3ea3695aa 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/InvokeProcedure.java @@ -62,11 +62,7 @@ public class InvokeProcedure implements TFunction { return TFunctionType.PROCEDURE; } - public void executeProcedure(TContext context, TMemory memory, LineLocation location, String s) - throws EaterException, EaterExceptionLocated { - throw new UnsupportedOperationException(); - } - + @Override public void executeProcedureInternal(TContext context, TMemory memory, List args, Map named) throws EaterException, EaterExceptionLocated { final String fname = args.get(0).toString(); diff --git a/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java b/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java index 146077597..f276bcbdd 100644 --- a/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java +++ b/src/net/sourceforge/plantuml/tim/stdlib/SimpleReturnFunction.java @@ -51,11 +51,7 @@ public abstract class SimpleReturnFunction implements TFunction { return TFunctionType.RETURN_FUNCTION; } - final public void executeProcedure(TContext context, TMemory memory, LineLocation location, String s) - throws EaterException { - throw new UnsupportedOperationException(); - } - + @Override final public void executeProcedureInternal(TContext context, TMemory memory, List args, Map named) throws EaterException { throw new UnsupportedOperationException(); diff --git a/src/net/sourceforge/plantuml/version/Version.java b/src/net/sourceforge/plantuml/version/Version.java index 165700d5f..50dd4b24e 100644 --- a/src/net/sourceforge/plantuml/version/Version.java +++ b/src/net/sourceforge/plantuml/version/Version.java @@ -46,7 +46,7 @@ public class Version { // Warning, "version" should be the same in gradle.properties and Version.java // Any idea anyone how to magically synchronize those :-) ? - private static final String version = "1.2024.3"; + private static final String version = "1.2024.4beta1"; public static String versionString() { return version;