java 反编译 goto_java – 反编译代码中的Goto语句导致问题

我已经在客户的jar文件中给了一些古老的不受支持的第三方供应商代码,我正在尝试对其进行逆向工程,因此我重新实现了用于连接服务器的相同协议.

我已经反编译了它,其中一个类似乎有标签和goto语句.我的编译器在这方面投入了大量的东西,因为我理解它在Java中不支持goto.

由于IP问题,我无法发布所有代码,但这里是它的要点(我已将编译器错误放在注释中):

private void methodName(InputType input)

throws ConfigurationException

{

// initialization code here

_L2:

String x; // The compiler is complaining that "String cannot be resolved to a variable" here

String y; // This line is fine though...

// Some Code here

x = // Compiler complains about "x cannot be resolved to a variable"

y = // Compiler is fine with this.

// Some more code

if(true) goto _L2; else goto _L1 // Multiple issues here see following lines.

// Syntax error on token "goto", throw expected

// _L2 cannot be resolved to a variable

// Syntax error on token "goto", { expected

// Syntax error on token "goto", { expected

_L1: // Syntax error on token "goto", { expected

local; // local cannot be resolved to a variable

// Some more code

JVM INSTR ret 12; // Multiple issues here see following lines.

// JVM INSTR ret 12;

// Syntax error on token "ret", = expected

return;

}

我知道冒号后面的行是标签,但我不明白这里出了什么问题.

带goto的行正在测试为true所以我可以删除标签,因为它们在这里无关紧要,但我不明白这条线的含义:

local;

或这个:

JVM INSTR ret 12;

任何解释这一点的协助都将非常受欢迎.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值