Skip to content

Commit 48ecc93

Browse files
committed
SwingJS-site.zip for 3.2.6
1 parent cbb0230 commit 48ecc93

File tree

6 files changed

+13
-2
lines changed

6 files changed

+13
-2
lines changed
10.4 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20191221184600
1+
20191221191910
10.4 KB
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20191221184600
1+
20191221191910
10.4 KB
Binary file not shown.

sources/net.sf.j2s.java.core/src/test/Test_Generic_Java8.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package test;
22

3+
import java.util.List;
4+
import java.util.ArrayList;
5+
36
import javax.swing.DefaultListModel;
47
import javax.swing.JComboBox;
58
import javax.swing.JComponent;
@@ -9,6 +12,12 @@
912

1013
public class Test_Generic_Java8 extends Test_ implements ListCellRenderer {
1114

15+
16+
public static <T> List<T> asList(T... a) {
17+
return (List<T>) new ArrayList<String>();
18+
}
19+
20+
1221
/**
1322
* Demonstrates the issue with Java8 classes being generic while Java6
1423
* version is not. As long as the transpiler is working in a Java8
@@ -21,6 +30,8 @@ public class Test_Generic_Java8 extends Test_ implements ListCellRenderer {
2130
*/
2231
public static void main(String[] args) {
2332

33+
System.out.println(Test_Generic_Java8.<String>asList("testing"));
34+
2435
Test_Generic_Java8 test = new Test_Generic_Java8();
2536
// calls getListCellRendererComponent$javax_swing_JList$O$I$Z$Z
2637
test.getListCellRendererComponent(null, null, 0, false, false);

0 commit comments

Comments
 (0)