refactor: simplify code

This commit is contained in:
ReaJason
2025-05-14 00:34:32 +08:00
parent 1cdb231a95
commit d517abdea5
@@ -41,6 +41,7 @@ public class CommandGenerator {
DynamicType.Builder<?> builder = new ByteBuddy()
.redefine(commandConfig.getShellClass())
.name(commandConfig.getShellClassName())
.field(named("paramName")).value(commandConfig.getParamName())
.visit(new TargetJreVersionVisitorWrapper(shellConfig.getTargetJreVersion()));
if (shellConfig.isJakarta()) {
@@ -59,9 +60,6 @@ public class CommandGenerator {
put("paramName", commandConfig.getParamName());
}})
);
} else if (!ShellType.WEBSOCKET.equals(shellType)) {
builder = builder.field(named("paramName"))
.value(commandConfig.getParamName());
}
if (CommandConfig.Encryptor.DOUBLE_BASE64.equals(commandConfig.getEncryptor())) {