Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 201059 Details for
Bug 353238
[1.7] update unusedTypeArgs option description for the batch compiler
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
proposed fix v.1.1
patch353238.txt (text/plain), 13.99 KB, created by
Ayushman Jain
on 2011-08-08 05:04:52 EDT
(
hide
)
Description:
proposed fix v.1.1
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2011-08-08 05:04:52 EDT
Size:
13.99 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: batch/org/eclipse/jdt/internal/compiler/batch/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties,v >retrieving revision 1.989 >diff -u -r1.989 messages.properties >--- batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 28 Jul 2011 18:56:24 -0000 1.989 >+++ batch/org/eclipse/jdt/internal/compiler/batch/messages.properties 8 Aug 2011 09:03:30 -0000 >@@ -337,7 +337,7 @@ > \ unusedLocal + unread local variable\n\ > \ unusedPrivate + unused private member declaration\n\ > \ unusedThrown unused declared thrown exception\n\ >-\ unusedTypeArgs + unused type arguments for method\n\ >+\ unusedTypeArgs + unused type arguments for method and constructor\n\ > \ uselessTypeCheck unnecessary cast/instanceof operation\n\ > \ varargsCast + varargs argument need explicit cast\n\ > \ warningToken + unsupported or unnecessary @SuppressWarnings\n >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v >retrieving revision 1.226 >diff -u -r1.226 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 28 Jul 2011 17:06:24 -0000 1.226 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 8 Aug 2011 09:03:32 -0000 >@@ -1731,7 +1731,7 @@ > " unusedLocal + unread local variable\n" + > " unusedPrivate + unused private member declaration\n" + > " unusedThrown unused declared thrown exception\n" + >- " unusedTypeArgs + unused type arguments for method\n" + >+ " unusedTypeArgs + unused type arguments for method and constructor\n" + > " uselessTypeCheck unnecessary cast/instanceof operation\n" + > " varargsCast + varargs argument need explicit cast\n" + > " warningToken + unsupported or unnecessary @SuppressWarnings\n" + >@@ -9038,6 +9038,35 @@ > "1 problem (1 warning)", > true); > } >+//-warn option - regression tests >+public void test230_warn_options() { >+ // same source as 190, skip check defaults >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "import java.util.ArrayList;\n" + >+ "public class X<T>{\n" + >+ " public X() {\n" + >+ " }\n" + >+ " public X(T t){}\n" + >+ " void foo() {\n" + >+ " X<String> x = new X<String>();\n" + >+ " X<Number> x1 = new X<Number>(1);\n" + >+ " }\n" + >+ "}\n" >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "X.java\"" >+ + " -warn:unusedTypeArgs -proc:none -1.7 -d \"" + OUTPUT_DIR + "\"", >+ "", >+ "----------\n" + >+ "1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 7)\n" + >+ " X<String> x = new X<String>();\n" + >+ " ^\n" + >+ "Redundant specification of type arguments <String>\n" + >+ "----------\n" + >+ "1 problem (1 warning)", >+ true); >+} > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=216684 > // .java/.class files precedence depending on sourcepath and other conditions > // ecj always selects source files from the sourcepath over class files >#P org.eclipse.jdt.doc.isv >Index: guide/jdt_api_options.htm >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.doc.isv/guide/jdt_api_options.htm,v >retrieving revision 1.89 >diff -u -r1.89 jdt_api_options.htm >--- guide/jdt_api_options.htm 23 May 2011 20:32:52 -0000 1.89 >+++ guide/jdt_api_options.htm 8 Aug 2011 09:03:34 -0000 >@@ -1211,6 +1211,27 @@ > "../reference/api/org/eclipse/jdt/core/JavaCore.html#IGNORE"><i>IGNORE</i></a></b></td> > </tr> > <tr> >+<tr> >+<td colspan="2"><a name="REDUNDANT_TYPE_ARGUMENTS" id="REDUNDANT_TYPE_ARGUMENTS"></a><b>Reporting Redundant >+Specification of type arguments for generic class instance creation</b> (<b><a href= >+"../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_REDUNDANT_TYPE_ARGUMENTS">COMPILER_PB_REDUNDANT_TYPE_ARGUMENTS</a></b>)</td> >+</tr> >+<tr valign="top"> >+<td rowspan="3">When enabled, the compiler will issue an error or a warning whenever type arguments >+are specified in a generic instance creation expression, although the diamond operator '<>' could have >+been used instead.<br /> >+ >+(java 1.7 and greater)</td> >+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#ERROR">ERROR</a></b></td> >+</tr> >+<tr valign="top"> >+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#WARNING">WARNING</a></b></td> >+</tr> >+<tr valign="top"> >+<td><b><a href= >+"../reference/api/org/eclipse/jdt/core/JavaCore.html#IGNORE"><i>IGNORE</i></a></b></td> >+</tr> >+<tr> > <td colspan="2"><b>Reporting Attempt to Override Package Visible Method</b> (<b><a href= > "../reference/api/org/eclipse/jdt/core/JavaCore.html#COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD">COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD</a></b>)</td> > >@@ -2393,6 +2414,32 @@ > <td>createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)</td> > </tr> > <tr> >+<td colspan="2"><b>Option for alignment of arguments in try with resources statement</b> (<b><a href= >+"../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_ALIGNMENT_FOR_RESOURCES_IN_TRY">FORMATTER_ALIGNMENT_FOR_RESOURCES_IN_TRY</a></b>)</td> >+</tr> >+<tr valign="top"> >+<td>Possible value</td> >+<td>values returned by <code>createAlignmentValue(boolean, int, int)</code> call</td> >+ >+</tr> >+<tr valign="top"> >+<td>Default value</td> >+<td>createAlignmentValue(false, WRAP_NEXT_PER_LINE, INDENT_DEFAULT)</td> >+</tr> >+<tr> >+<td colspan="2"><b>Option for alignment of union type in multi-catch expression</b> (<b><a href= >+"../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_ALIGNMENT_FOR_UNION_TYPE_IN_MULTICATCH">FORMATTER_ALIGNMENT_FOR_UNION_TYPE_IN_MULTICATCH</a></b>)</td> >+</tr> >+<tr valign="top"> >+<td>Possible value</td> >+<td>values returned by <code>createAlignmentValue(boolean, int, int)</code> call</td> >+ >+</tr> >+<tr valign="top"> >+<td>Default value</td> >+<td>createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)</td> >+</tr> >+<tr> > <td colspan="2"><b>Option for alignment of assignment</b> (<b><a href= > "../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_ALIGNMENT_FOR_ASSIGNMENT">FORMATTER_ALIGNMENT_FOR_ASSIGNMENT</a></b>)</td> > >@@ -4574,6 +4621,19 @@ > "../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT"><i>DO_NOT_INSERT</i></a></b></td> > </tr> > <tr> >+<td colspan="2"><b>Option to insert a space after the opening parenthesis in a try with resources >+statement</b> (<b><a href= >+"../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_TRY">FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_TRY</a></b>)</td> >+</tr> >+<tr valign="top"> >+<td rowspan="2">Possible values</td> >+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#INSERT">INSERT</a></b></td> >+</tr> >+<tr valign="top"> >+<td><b><a href= >+"../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT"><i>DO_NOT_INSERT</i></a></b></td> >+</tr> >+<tr> > <td colspan="2"><b>Option to insert a space after the opening parenthesis in a while statement</b> > (<b><a href= > "../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_WHILE">FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_WHILE</a></b>)</td> >@@ -4655,6 +4715,19 @@ > "../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT">DO_NOT_INSERT</a></b></td> > </tr> > <tr> >+<td colspan="2"><b>Option to insert a space after each semicolon in a try with resources >+statement</b> (<b><a href= >+"../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_SPACE_AFTER_SEMICOLON_IN_TRY_RESOURCES">FORMATTER_INSERT_SPACE_AFTER_SEMICOLON_IN_TRY_RESOURCES</a></b>)</td> >+</tr> >+<tr valign="top"> >+<td rowspan="2">Possible values</td> >+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#INSERT"><i>INSERT</i></a></b></td> >+</tr> >+<tr valign="top"> >+<td><b><a href= >+"../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT">DO_NOT_INSERT</a></b></td> >+</tr> >+<tr> > <td colspan="2"><b>Option to insert a space after an unary operator</b> (<b><a href= > "../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_SPACE_AFTER_UNARY_OPERATOR">FORMATTER_INSERT_SPACE_AFTER_UNARY_OPERATOR</a></b>)</td> > >@@ -4976,6 +5049,19 @@ > "../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT"><i>DO_NOT_INSERT</i></a></b></td> > </tr> > <tr> >+<td colspan="2"><b>Option to insert a space before closing paranthesis in a try with resources >+statement</b> (<b><a href= >+"../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_TRY">FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_TRY</a></b>)</td> >+</tr> >+<tr valign="top"> >+<td rowspan="2">Possible values</td> >+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#INSERT">INSERT</a></b></td> >+</tr> >+<tr valign="top"> >+<td><b><a href= >+"../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT"></i>DO_NOT_INSERT</i></a></b></td> >+</tr> >+<tr> > <td colspan="2"><b>Option to insert a space before the closing parenthesis in a while statement</b> > (<b><a href= > "../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_WHILE">FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_WHILE</a></b>)</td> >@@ -5754,6 +5840,21 @@ > "../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT">DO_NOT_INSERT</a></b></td> > </tr> > <tr> >+<td colspan="2"><b>Option to insert a space before the opening parenthesis in a try with resources >+statement</b> (<b><a href= >+"../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_TRY">FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_TRY</a></b>)</td> >+ >+</tr> >+<tr valign="top"> >+<td rowspan="2">Possible values</td> >+<td><b><a href= >+"../reference/api/org/eclipse/jdt/core/JavaCore.html#INSERT">INSERT</a></b></td> >+</tr> >+<tr valign="top"> >+<td><b><a href= >+"../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT"><i>DO_NOT_INSERT</i></a></b></td> >+</tr> >+<tr> > <td colspan="2"><b>Option to insert a space before the opening parenthesis in a while statement</b> > (<b><a href= > "../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_WHILE">FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_WHILE</a></b>)</td> >@@ -5879,6 +5980,19 @@ > "../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT"><i>DO_NOT_INSERT</i></a></b></td> > </tr> > <tr> >+<td colspan="2"><b>Option to insert a space before each semicolon in try with resources statement</b> (<b><a href= >+"../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_SPACE_BEFORE_SEMICOLON_IN_TRY_RESOURCES">FORMATTER_INSERT_SPACE_BEFORE_SEMICOLON_IN_TRY_RESOURCES</a></b>)</td> >+ >+</tr> >+<tr valign="top"> >+<td rowspan="2">Possible values</td> >+<td><b><a href="../reference/api/org/eclipse/jdt/core/JavaCore.html#INSERT">INSERT</a></b></td> >+</tr> >+<tr valign="top"> >+<td><b><a href= >+"../reference/api/org/eclipse/jdt/core/JavaCore.html#DO_NOT_INSERT"><i>DO_NOT_INSERT</i></a></b></td> >+</tr> >+<tr> > <td colspan="2"><b>Option to insert a space before unary operator</b> (<b><a href= > "../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_INSERT_SPACE_BEFORE_UNARY_OPERATOR">FORMATTER_INSERT_SPACE_BEFORE_UNARY_OPERATOR</a></b>)</td> > >@@ -6202,6 +6316,20 @@ > "../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FALSE">FALSE</a></b></td> > </tr> > <tr> >+<td colspan="2"><b>Option to wrap before OR operator in a multi-catch expression</b> (<b><a href= >+"../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_WRAP_BEFORE_OR_OPERATOR_MULTICATCH">FORMATTER_WRAP_BEFORE_OR_OPERATOR_MULTICATCH</a></b>)</td> >+ >+</tr> >+<tr valign="top"> >+<td rowspan="2">Possible values</td> >+<td><b><a href= >+"../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#TRUE"><i>TRUE</i></a></b></td> >+</tr> >+<tr valign="top"> >+<td><b><a href= >+"../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FALSE">FALSE</a></b></td> >+</tr> >+<tr> > <td colspan="2"><b>Option to wrap outer expressions in nested expressions</b> (<b><a href= > "../reference/api/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.html#FORMATTER_WRAP_OUTER_EXPRESSIONS_WHEN_NESTED">FORMATTER_WRAP_OUTER_EXPRESSIONS_WHEN_NESTED</a></b>)</td> > >#P org.eclipse.jdt.doc.user >Index: tasks/task-using_batch_compiler.htm >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.doc.user/tasks/task-using_batch_compiler.htm,v >retrieving revision 1.4 >diff -u -r1.4 task-using_batch_compiler.htm >--- tasks/task-using_batch_compiler.htm 24 Jun 2011 10:03:52 -0000 1.4 >+++ tasks/task-using_batch_compiler.htm 8 Aug 2011 09:03:35 -0000 >@@ -592,7 +592,7 @@ > <tr> > <td align="center" valign="top">+</td> > <td align="left" valign="top">unusedTypeArgs</td> >-<td valign="top">unused type arguments for method</td> >+<td valign="top">unused type arguments for method and constructor</td> > </tr> > <tr> > <td align="center" valign="top">-</td>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 353238
:
200970
| 201059 |
202148