Skip to main content



      Home
Home » Newcomers » Newcomers » Unreachable code
Unreachable code [message #266271] Thu, 13 November 2008 10:31 Go to next message
Eclipse UserFriend
Somewhere in Preferences->Java->Compiler->Errors/Warnings, I have a
setting that denies me the possibility of inserting a premature return
statement while debugging.

Frequently, I don't want to execute the statements after that point and I
don't want always to have to comment out the rest of the method.

But, neither can I figure out what (Europa) severity level equates to the
compiler error so I can change it to a warning. If someone knows the name
of this option, or whether it is even an option, please inform me.

Thanks,
Russ Bateman
Re: Unreachable code [message #266273 is a reply to message #266271] Thu, 13 November 2008 10:40 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------000108060307070300030202
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Russ,

I'm not sure you can turn this off something that's required to be a
diagnosed error by the Java specification. Here's the trick I use instead.

if (true) return;

Russell Bateman wrote:
> Somewhere in Preferences->Java->Compiler->Errors/Warnings, I have a
> setting that denies me the possibility of inserting a premature return
> statement while debugging.
>
> Frequently, I don't want to execute the statements after that point
> and I don't want always to have to comment out the rest of the method.
>
> But, neither can I figure out what (Europa) severity level equates to
> the compiler error so I can change it to a warning. If someone knows
> the name of this option, or whether it is even an option, please
> inform me.
>
> Thanks,
> Russ Bateman
>

--------------000108060307070300030202
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Russ,<br>
<br>
I'm not sure you can turn this off something that's required to be a
diagnosed error by the Java specification.
Re: Unreachable code [message #266277 is a reply to message #266271] Thu, 13 November 2008 10:55 Go to previous messageGo to next message
Eclipse UserFriend
Russell Bateman wrote:
> Somewhere in Preferences->Java->Compiler->Errors/Warnings, I have a
> setting that denies me the possibility of inserting a premature return
> statement while debugging.
>
> Frequently, I don't want to execute the statements after that point
> and I don't want always to have to comment out the rest of the method.
>
> But, neither can I figure out what (Europa) severity level equates to
> the compiler error so I can change it to a warning. If someone knows
> the name of this option, or whether it is even an option, please
> inform me.
There's no such option.

Dani
>
> Thanks,
> Russ Bateman
>
Re: Unreachable code [message #266282 is a reply to message #266271] Thu, 13 November 2008 11:37 Go to previous message
Eclipse UserFriend
Thanks, the if( true ) thing will work.
Previous Topic:How to remove/replace the default binding scheme
Next Topic:inserting extracted methods in bottom-up order (before calling method)
Goto Forum:
  


Current Time: Sun Jul 20 03:34:57 EDT 2025

Powered by FUDForum. Page generated in 0.09930 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top