Skip to content

I20220622-0730

@jjohnstn jjohnstn tagged this 21 Jun 22:33
* Fix for loop to enhanced for loop conversion

    * Fix EntrySet issue 109 with for loops with multiple get() calls

      https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/109

	public void sample() {
		List<String> list1 = List.of(""); //$NON-NLS-1$
		for (int i = 0; i < list1.size(); i++) {
			String s1 = list1.get(i);
			String s2 = list1.get(i);
			System.out.println(s1 + "," + s2); //$NON-NLS-1$
		}
	}

	should not convert due to the multiple get() calls
Assets 2
Loading