View | Details | Raw Unified | Return to bug 83032 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java (-1 / +32 lines)
Lines 900-904 Link Here
900
				"}\n",
900
				"}\n",
901
			},
901
			},
902
			"");
902
			"");
903
	}			
903
	}
904
	
905
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=83032
906
	public void test022() {
907
		this.runConformTest(
908
			new String[] {
909
				"X.java",
910
				"public class X {\n" +
911
				"	String[] args;\n" +
912
				"	public X(String... args) {\n" +
913
				"		this.args = args;\n" +
914
				"	}\n" +
915
				"	public static X foo() {\n" +
916
				"		return new X(\"SU\", \"C\", \"CE\", \"SS\"){};\n" +
917
				"	}\n" +
918
				"	public String bar() {\n" +
919
				"		if (this.args != null) {\n" +
920
				"			StringBuffer buffer = new StringBuffer();\n" +
921
				"			for (String s : this.args) {\n" +
922
				"				buffer.append(s);\n" +
923
				"			}\n" +
924
				"			return String.valueOf(buffer);\n" +
925
				"		}\n" +
926
				"		return null;\n" +
927
				"	}\n" +
928
				"	public static void main(String[] args) {\n" +
929
				"		System.out.print(foo().bar());\n" +
930
				"	}\n" +
931
				"}\n",
932
			},
933
			"SUCCESS");
934
	}
904
}
935
}

Return to bug 83032