Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362572 - Warnings in generated Java of program testing arrays (lists)
Summary: Warnings in generated Java of program testing arrays (lists)
Status: CLOSED DUPLICATE of bug 360845
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Tim Wilson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-01 11:17 EDT by broy2 CLA
Modified: 2017-02-23 14:20 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description broy2 CLA 2011-11-01 11:17:39 EDT
Generating the following programs gives warnings in generated java.

program assign type BasicProgram {}
	myIntArray smallInt[][] { [ 1,2], [3,4,5], [6,7,8,9] }  ;
	myStringArray string[][] = [ ["Duke", "Carolina"], ["Duke", "State", "Carolina"], ["Duke", "Carolina", "Mikey", "Misty"] ]  ;
	myString string; 
	function main()
		myString  = myStringArray[3][3];
		if (myString == "Mikey")
			sysLib.writeStdout(myString);			
		end
	end
end 


Type safety: The expression of type List needs unchecked conversion to conform to List<List<Short>>
	
Type safety : A generic array of List<String> is created for a varargs parameter
	
List is a raw type. References to generic type List<E> should be parameterized

ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized
Comment 1 Jeff Douglas CLA 2011-11-01 11:53:51 EDT
This is normal and cannot be fixed.
Comment 2 broy2 CLA 2011-11-01 12:38:20 EDT
Brian, is this OK with you?  You didn't want warnings in the generated Java.
Comment 3 Brian Svihovec CLA 2011-11-01 14:07:53 EDT
I discussed this with Tim, and he agrees that we should spend some time in the future to try and generate code that contains no warnings.

Changing component to GenFramework since this covers all generators, and assigning to Future.
Comment 4 Jeff Douglas CLA 2011-11-01 14:54:55 EDT
It's impossible to do this. The java compiler will even gives warnings on suppress warning statements that were not needed.

My opinion is that this is a total waste of time.
Comment 5 Matt Heitz CLA 2012-12-21 09:38:24 EST

*** This bug has been marked as a duplicate of bug 360845 ***