finally block does not complete normally - Eclipse
- From: "dannyDog" <bill.blackmon@xxxxxxxxxxxxxxx>
- Date: 31 May 2005 12:42:52 -0700
I've started working on a new project using Eclipse. When I do a build
I get multiple warnings stating "finally block does not complete
normally".
A sample method follows:
/**
* Property getter for destination type
* @return type
*/
public String getDestinationType()
{
String destType = "SCHOOL_DISTRICT";
try
{
destType = this.getReceiving().getDestinationType();
if (destType.length() == 0)
{
destType = "SCHOOL_DISTRICT";
}
}
catch (Exception e)
{
destType = "SCHOOL_DISTRICT";
}
finally
{
return destType;
}
}
This type of coding of returning the return value in the finally block
is in many, many, many methods over many, many, many classes.
What is the correct way to code try/catch/finally return value?
.
- Follow-Ups:
- Re: finally block does not complete normally - Eclipse
- From: JaMess
- Re: finally block does not complete normally - Eclipse
- From: shakah
- Re: finally block does not complete normally - Eclipse
- Prev by Date: Re: J2EE book
- Next by Date: Re: peer to peer messaging
- Previous by thread: Tomcat, creating threads
- Next by thread: Re: finally block does not complete normally - Eclipse
- Index(es):