Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352134 - Integer literal function paramater isn't wrapped inside exception block
Summary: Integer literal function paramater isn't wrapped inside exception block
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 12:34 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:18 EST (History)
1 user (show)

See Also:


Attachments
Project to recreate issue (55.37 KB, application/x-zip-compressed)
2011-07-14 12:34 EDT, Kathy Carroll CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kathy Carroll CLA 2011-07-14 12:34:15 EDT
Build Identifier: 0.7.0

My function signature is 
   function errorInVariation(details Status, variationNo int)
and I invoke it using an integer literal
  testLib.errorInVariation(details, 111);

Proper Java code is generated with the invocation occurs inside an if-block.  Bad java code results when the invocation occurs inside an exception-block.

Here the generated java code

			if (myT == myF != false) {
				AnyBoxedObject<java.lang.Integer> eze$Temp2 = null;
				eze$Temp2 = AnyObject.ezeWrap((int)(1));
				eze_Lib_runtime_testLib().failedVariation(details, eze$Temp2);
				AnyBoxedObject<java.lang.Integer> eze$Temp3 = null;
				eze$Temp3 = AnyObject.ezeWrap((int)(111));
				eze_Lib_runtime_testLib().errorInVariation(details, eze$Temp3);
			}
		}
		catch (AnyException exp) {
			eze_Lib_runtime_testLib().errorInVariation(details, (int)(1));
		}

The java error is

The method errorInVariation(Status, AnyBoxedObject<Integer>) in the type testLib is not applicable for the arguments (Status, int)

Reproducible: Always

Steps to Reproduce:
1. Import project from attached archive file
2. Create the src folder
3. Clean the project
4. Get 12 java errors
Comment 1 Kathy Carroll CLA 2011-07-14 12:34:54 EDT
Created attachment 199683 [details]
Project to recreate issue
Comment 2 Jeff Douglas CLA 2011-07-14 13:24:36 EDT
The statement block reorganization logic was not being invoked for the onexception block. This prevented the reorg code from encapsulating the function calls with boxed object arguments.
Comment 3 Lisa Lasher CLA 2011-10-11 16:02:39 EDT
Closing this defect.