Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362572

Summary: Warnings in generated Java of program testing arrays (lists)
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Tim Wilson <tww>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: jeffdouglas, mheitz, svihovec, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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 ***