From cd5fc54ff44b4811281b202496239ffc3c30bfa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Wr=C3=B3bel?= <183546751+pwrobeldev@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:43:25 +0100 Subject: [PATCH] JavaNameRules: remove dead code (#1643) The overload of 'getName()' function for 'LimeLambdaParameter' is not used anywhere. Initially, it was used by 'JavaModelBuilder', but this class was removed in the past and it no longer exists. Currently, the type 'LimeLambdaParameter' is not used in Java generator and its templates, because 'JavaLambda.mustache' utilizes 'LimeLambda.asFunction()', which converts the mentioned type via 'LimeLambdaParameter.asLimeParameter()'. The indices of lambda parameters are encoded in the path and stored via 'AntlrLimeModelBuilder.exitLambda()'. Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com> --- .../com/here/gluecodium/generator/java/JavaNameRules.kt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gluecodium/src/main/java/com/here/gluecodium/generator/java/JavaNameRules.kt b/gluecodium/src/main/java/com/here/gluecodium/generator/java/JavaNameRules.kt index 0fabc74d38..e52259494c 100644 --- a/gluecodium/src/main/java/com/here/gluecodium/generator/java/JavaNameRules.kt +++ b/gluecodium/src/main/java/com/here/gluecodium/generator/java/JavaNameRules.kt @@ -24,7 +24,6 @@ import com.here.gluecodium.generator.common.NameRules import com.here.gluecodium.model.lime.LimeAttributeType.JAVA import com.here.gluecodium.model.lime.LimeAttributeValueType.NAME import com.here.gluecodium.model.lime.LimeElement -import com.here.gluecodium.model.lime.LimeLambdaParameter import com.here.gluecodium.model.lime.LimeNamedElement import com.here.gluecodium.model.lime.LimeProperty import com.here.gluecodium.model.lime.LimeTypedElement @@ -40,11 +39,6 @@ internal class JavaNameRules(nameRuleSet: NameRuleSet) : NameRules(nameRuleSet) (limeElement as? LimeProperty)?.let { getPlatformName(it.setter) } ?: super.getSetterName(limeElement) - fun getName( - limeLambdaParameter: LimeLambdaParameter, - index: Int, - ) = limeLambdaParameter.attributes.get(JAVA, NAME) ?: "p$index" - private fun getPlatformName(limeElement: LimeNamedElement?) = limeElement?.attributes?.get(JAVA, NAME) companion object {