Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not a statement error

 
Charisse Lane
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to compile code that was previously compiled but isn't working for me for some reason.

Can anyone tell me if there's another way to do the following? I don't understand because this was previouly compiled - all I did was decompile and try to recompile after changing a completely separate method. I haven't touched this code.

x1;
is not a valid statement and I don't know why it's being declared here but when I remove it, I get an error that it hasn't been initialized and is then the other statement is unreachable.

static Class _mthclass$(String x0)
{
return Class.forName(x0);

ClassNotFoundException x1;
x1;

throw new NoClassDefFoundError(x1.getMessage());
}

 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The decompiler has produced completely invalid code; they do that sometimes if they can't quite figure out what the code is supposed to do -- or if they're decompiling bytecodes that weren't compiled from Java source in the first place, which may be the case here. Maybe it's just supposed to be something like

 
Charisse Lane
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so VERY much!!! That worked. I would have literally been here all day trying to figure this out.

Take care,

Charisse
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic