Lines 48-54
Link Here
|
48 |
// Static initializer to specify tests subset using TESTS_* static variables |
48 |
// Static initializer to specify tests subset using TESTS_* static variables |
49 |
// All specified tests which do not belong to the class are skipped... |
49 |
// All specified tests which do not belong to the class are skipped... |
50 |
static { |
50 |
static { |
51 |
// TESTS_NAMES = new String[] { "testBug384663" }; |
51 |
TESTS_NAMES = new String[] { "testBug386356" }; |
52 |
// TESTS_NUMBERS = new int[] { 297 }; |
52 |
// TESTS_NUMBERS = new int[] { 297 }; |
53 |
// TESTS_RANGE = new int[] { 294, -1 }; |
53 |
// TESTS_RANGE = new int[] { 294, -1 }; |
54 |
} |
54 |
} |
Lines 10637-10640
Link Here
|
10637 |
}; |
10637 |
}; |
10638 |
runConformTest(testFiles); |
10638 |
runConformTest(testFiles); |
10639 |
} |
10639 |
} |
|
|
10640 |
|
10641 |
// Bug 386356 - Type mismatch error with annotations and generics |
10642 |
// test case from comment 9 |
10643 |
public void testBug386356_1() { |
10644 |
runConformTest( |
10645 |
new String[] { |
10646 |
"p/X.java", |
10647 |
"package p;\n" + |
10648 |
"import javax.xml.bind.annotation.adapters.XmlAdapter;\n" + |
10649 |
"public abstract class X extends XmlAdapter<String,X> {\n" + |
10650 |
"}", |
10651 |
|
10652 |
"p/package-info.java", |
10653 |
"@XmlJavaTypeAdapters({ @XmlJavaTypeAdapter(value = X.class, type = X.class) })\n" + |
10654 |
"package p;\n" + |
10655 |
"import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; \n" + |
10656 |
"import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;" |
10657 |
|
10658 |
}); |
10659 |
} |
10660 |
|
10661 |
//Bug 386356 - Type mismatch error with annotations and generics |
10662 |
//test case from comment 6 |
10663 |
public void testBug386356_2() { |
10664 |
runConformTest( |
10665 |
new String[] { |
10666 |
"com/ermahgerd/Ermahgerd.java", |
10667 |
"package com.ermahgerd;\n" + |
10668 |
"\n" + |
10669 |
"public class Ermahgerd {\n" + |
10670 |
"}", |
10671 |
|
10672 |
"com/ermahgerd/package-info.java", |
10673 |
"@XmlJavaTypeAdapters({ @XmlJavaTypeAdapter(value = ErmahgerdXmlAdapter.class, type = Ermahgerd.class) })\n" + |
10674 |
"package com.ermahgerd;\n" + |
10675 |
"import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\n" + |
10676 |
"import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters;", |
10677 |
|
10678 |
"com/ermahgerd/ErmahgerdXmlAdapter.java", |
10679 |
"package com.ermahgerd;\n" + |
10680 |
"\n" + |
10681 |
"import javax.xml.bind.annotation.adapters.XmlAdapter;\n" + |
10682 |
"\n" + |
10683 |
"public class ErmahgerdXmlAdapter extends XmlAdapter<String,Ermahgerd> {\n" + |
10684 |
"\n" + |
10685 |
" @Override\n" + |
10686 |
" public String marshal(Ermahgerd arg0) throws Exception {\n" + |
10687 |
" // TODO Auto-generated method stub\n" + |
10688 |
" return null;\n" + |
10689 |
" }\n" + |
10690 |
"\n" + |
10691 |
" @Override\n" + |
10692 |
" public Ermahgerd unmarshal(String arg0) throws Exception {\n" + |
10693 |
" // TODO Auto-generated method stub\n" + |
10694 |
" return null;\n" + |
10695 |
" }\n" + |
10696 |
"}" |
10697 |
|
10698 |
}); |
10699 |
} |
10640 |
} |
10700 |
} |