Link Here
|
6753 |
); |
6753 |
); |
6754 |
} |
6754 |
} |
6755 |
|
6755 |
|
|
|
6756 |
/** |
6757 |
* @bug 311864: [formatter] NPE with empty {@code } |
6758 |
* @test Ensure that no NPE occurs while formatting an empty code inline tag. |
6759 |
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=311864" |
6760 |
*/ |
6761 |
public void testBug0311864() throws JavaModelException { |
6762 |
this.formatterPrefs.use_tags = true; |
6763 |
String source = |
6764 |
"public class Test {\n" + |
6765 |
"\n" + |
6766 |
"/**\n" + |
6767 |
"* Compares two property values. For font or color the <i>description</i> of\n" + |
6768 |
"* the resource, {@link FontData} or {@link RGB}, is used for comparison.\n" + |
6769 |
"*\n" + |
6770 |
"* @param value1\n" + |
6771 |
"* first property value\n" + |
6772 |
"* @param value2\n" + |
6773 |
"* second property value\n" + |
6774 |
"* @return {@code true} if the values are equals; otherwise {@code}\n" + |
6775 |
"*/\n" + |
6776 |
"boolean foo(int value1, int value2) {\n" + |
6777 |
" return value1 > value2;\n" + |
6778 |
"}\n" + |
6779 |
"}\n"; |
6780 |
formatSource(source, |
6781 |
"public class Test {\n" + |
6782 |
"\n" + |
6783 |
" /**\n" + |
6784 |
" * Compares two property values. For font or color the <i>description</i> of\n" + |
6785 |
" * the resource, {@link FontData} or {@link RGB}, is used for comparison.\n" + |
6786 |
" * \n" + |
6787 |
" * @param value1\n" + |
6788 |
" * first property value\n" + |
6789 |
" * @param value2\n" + |
6790 |
" * second property value\n" + |
6791 |
" * @return {@code true} if the values are equals; otherwise {@code}\n" + |
6792 |
" */\n" + |
6793 |
" boolean foo(int value1, int value2) {\n" + |
6794 |
" return value1 > value2;\n" + |
6795 |
" }\n" + |
6796 |
"}\n" |
6797 |
); |
6798 |
} |
6799 |
|
6756 |
} |
6800 |
} |