History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: EJB-37
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vance Karimi
Reporter: Torsten Lunze
Votes: (View)
Watchers: (View)
Operations

If you were logged in you would be able to see more operations.
EJB Cartridge

EJB3 ServiceDelegate.vsl: Compiler fails with "unreachable statement"

Created: 30/Jun/06 11:45 AM   Updated: 01/Jul/06 02:35 PM
Component/s: None
Affects Version/s: None
Fix Version/s: None

Environment: Andromda 3.2, EJB3 very latest from CVS


 Description   
If the service function has a return value the following is generated:

            switch (getViewType())
            {
                case LOCAL_VIEW_TYPE:
                    return getCosiTicketSubmissionLocal().submitTicketOrder(ticketOrder);
                    break;
                 case REMOTE_VIEW_TYPE:
                default:
                    return getCosiTicketSubmissionRemote().submitTicketOrder(ticketOrder);
                    breaK,
             }


The compiler is complaining about the break, because it can never be reached. Adding the following to ServiceDelegate.vsl works:

 #if (!$operation.returnTypePresent)break;#end

(Only add the break if it has not been a return statement)

Torsten

 All   Comments   Change History      Sort Order:
Comment by Vance Karimi [01/Jul/06 02:35 PM]
fix in CVS. Thanks Torsten