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

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

我已经对它进行了反编译,其中一个类似乎在其中有标签和goto语句。我的编译器在这方面引发了一个棘手的问题,因为据我了解,goto在Java中不受支持。

由于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、付费专栏及课程。

余额充值