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 105505 Details for
Bug 236230
[formatter] SIOOBE while formatting a compilation unit.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Updated patch
v05.txt (text/plain), 22.79 KB, created by
Frederic Fusier
on 2008-06-20 11:53:06 EDT
(
hide
)
Description:
Updated patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2008-06-20 11:53:06 EDT
Size:
22.79 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: formatter/org/eclipse/jdt/internal/formatter/Scribe.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java,v >retrieving revision 1.143 >diff -u -r1.143 Scribe.java >--- formatter/org/eclipse/jdt/internal/formatter/Scribe.java 29 May 2008 09:28:43 -0000 1.143 >+++ formatter/org/eclipse/jdt/internal/formatter/Scribe.java 20 Jun 2008 15:51:09 -0000 >@@ -1715,8 +1715,9 @@ > } > > // 3 - process snippet (@see JavaDocRegion#formatCodeSnippet) >+ // include comments in case of line comments are present in the snippet > String formattedSnippet = convertedSnippet; >- TextEdit edit= CommentFormatterUtil.format2(CodeFormatter.K_UNKNOWN, convertedSnippet, 0, this.lineSeparator, this.formatter.preferences.getMap()); >+ TextEdit edit= CommentFormatterUtil.format2(CodeFormatter.K_UNKNOWN | CodeFormatter.F_INCLUDE_COMMENTS, convertedSnippet, 0, this.lineSeparator, this.formatter.preferences.getMap()); > if (edit != null) { > formattedSnippet= CommentFormatterUtil.evaluateFormatterEdit(convertedSnippet, edit, null); > } >Index: formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java,v >retrieving revision 1.13 >diff -u -r1.13 FormatterCommentParser.java >--- formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java 22 May 2008 15:34:15 -0000 1.13 >+++ formatter/org/eclipse/jdt/internal/formatter/FormatterCommentParser.java 20 Jun 2008 15:51:08 -0000 >@@ -475,22 +475,7 @@ > } > > // Add the text >- int textEnd = end; >- if (this.javadocTextEnd > 0 && end >= this.javadocTextEnd) { >- // Special case on javadoc text end, need to retrieve the space >- // position by rescanning the text >- int restart = this.spacePosition == -1 ? start : this.spacePosition; >- this.scanner.resetTo(restart, end-1/* before last star*/); >- try { >- if (this.scanner.getNextToken() == TerminalTokens.TokenNameEOF) { >- textEnd = this.spacePosition; >- } >- } >- catch (InvalidInputException iie) { >- // do nothing >- } >- } >- FormatJavadocText text = new FormatJavadocText(start, textEnd-1, lineStart, htmlIndex, htmlDepth); >+ FormatJavadocText text = new FormatJavadocText(start, end-1, lineStart, htmlIndex, htmlDepth); > previousBlock.addText(text); > previousBlock.sourceStart = previousStart; > if (lineStart == previousBlock.lineStart) { >Index: formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java,v >retrieving revision 1.72 >diff -u -r1.72 DefaultCodeFormatter.java >--- formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java 21 May 2008 10:58:04 -0000 1.72 >+++ formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java 20 Jun 2008 15:51:07 -0000 >@@ -25,6 +25,7 @@ > import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; > import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; > import org.eclipse.jdt.internal.compiler.parser.Scanner; >+import org.eclipse.jdt.internal.compiler.parser.TerminalTokens; > import org.eclipse.jdt.internal.compiler.util.Util; > import org.eclipse.jdt.internal.core.util.CodeSnippetParsingUtil; > import org.eclipse.jdt.internal.formatter.comment.CommentRegion; >@@ -487,8 +488,9 @@ > > private TextEdit probeFormatting(String source, int indentationLevel, String lineSeparator, IRegion[] regions, boolean includeComments) { > if (PROBING_SCANNER == null) { >- // scanner use to check if the kind could be K_JAVA_DOC, K_MULTI_LINE_COMMENT or K_SINGLE_LINE_COMMENT >- PROBING_SCANNER = new Scanner(true, true, false/*nls*/, ClassFileConstants.JDK1_3, ClassFileConstants.JDK1_3, null/*taskTags*/, null/*taskPriorities*/, true/*taskCaseSensitive*/); >+ // scanner use to check if the kind could be K_JAVA_DOC, K_MULTI_LINE_COMMENT or K_SINGLE_LINE_COMMENT >+ // do not tokenize white spaces to get single comments even with spaces before... >+ PROBING_SCANNER = new Scanner(true, false/*do not tokenize whitespaces*/, false/*nls*/, ClassFileConstants.JDK1_6, ClassFileConstants.JDK1_6, null/*taskTags*/, null/*taskPriorities*/, true/*taskCaseSensitive*/); > } > PROBING_SCANNER.setSource(source.toCharArray()); > >@@ -496,22 +498,22 @@ > int offset = coveredRegion.getOffset(); > int length = coveredRegion.getLength(); > >- PROBING_SCANNER.resetTo(offset, offset + length); >+ PROBING_SCANNER.resetTo(offset, offset + length - 1); > try { > int kind = -1; > switch(PROBING_SCANNER.getNextToken()) { > case ITerminalSymbols.TokenNameCOMMENT_BLOCK : >- if (PROBING_SCANNER.getCurrentTokenEndPosition() == offset + length - 1) { >+ if (PROBING_SCANNER.getNextToken() == TerminalTokens.TokenNameEOF) { > kind = K_MULTI_LINE_COMMENT; > } > break; > case ITerminalSymbols.TokenNameCOMMENT_LINE : >- if (PROBING_SCANNER.getCurrentTokenEndPosition() == offset + length - 1) { >+ if (PROBING_SCANNER.getNextToken() == TerminalTokens.TokenNameEOF) { > kind = K_SINGLE_LINE_COMMENT; > } > break; > case ITerminalSymbols.TokenNameCOMMENT_JAVADOC : >- if (PROBING_SCANNER.getCurrentTokenEndPosition() == offset + length - 1) { >+ if (PROBING_SCANNER.getNextToken() == TerminalTokens.TokenNameEOF) { > kind = K_JAVA_DOC; > } > break; >Index: compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java,v >retrieving revision 1.75 >diff -u -r1.75 AbstractCommentParser.java >--- compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 15 May 2008 17:45:49 -0000 1.75 >+++ compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java 20 Jun 2008 15:51:07 -0000 >@@ -62,7 +62,7 @@ > protected int javadocTextStart, javadocTextEnd = -1; > protected int firstTagPosition; > protected int index, lineEnd; >- protected int tokenPreviousPosition, lastIdentifierEndPosition, starPosition, spacePosition; >+ protected int tokenPreviousPosition, lastIdentifierEndPosition, starPosition; > protected int textStart, memberStart; > protected int tagSourceStart, tagSourceEnd; > protected int inlineTagStart; >@@ -133,7 +133,6 @@ > this.deprecated = false; > this.lastLinePtr = getLineNumber(javadocEnd); > this.textStart = -1; >- this.spacePosition = -1; > char previousChar = 0; > int invalidTagLineEnd = -1; > int invalidInlineTagLineEnd = -1; >@@ -163,9 +162,13 @@ > this.javadocTextStart = this.index; > } > this.lineEnd = (this.linePtr == this.lastLinePtr) ? this.javadocEnd: this.scanner.getLineEnd(this.linePtr) - 1; >+ this.javadocTextEnd = this.javadocEnd - 2; // supposed text end, it will be refined later... > > // Loop on each comment character >+ int textEndPosition = -1; > while (!abort && this.index < this.javadocEnd) { >+ >+ // Store previous position and char > previousPosition = this.index; > previousChar = nextCharacter; > >@@ -206,10 +209,6 @@ > this.sourceParser.problemReporter().javadocUnterminatedInlineTag(this.inlineTagStart, end); > } > validComment = false; >- int textEndPosition = previousPosition; >- if (isFormatterParser && ScannerHelper.isWhitespace(previousChar)) { >- textEndPosition = this.spacePosition; >- } > if (this.textStart != -1 && this.textStart < textEndPosition) { > if (pushText) pushText(this.textStart, textEndPosition); > } >@@ -219,10 +218,6 @@ > } > if (previousChar == '{') { > if (this.textStart != -1) { >- int textEndPosition = this.inlineTagStart; >- if (isFormatterParser && this.spacePosition == (this.inlineTagStart-1)) { >- textEndPosition = this.spacePosition; >- } > if (this.textStart < textEndPosition) { > if (pushText) pushText(this.textStart, textEndPosition); > } >@@ -230,11 +225,7 @@ > this.inlineTagStarted = true; > invalidInlineTagLineEnd = this.lineEnd; > } else if (this.textStart != -1 && this.textStart < invalidTagLineEnd) { >- int textEndPosition = invalidTagLineEnd; >- if (isFormatterParser && ScannerHelper.isWhitespace(previousChar)) { >- textEndPosition = this.spacePosition; >- } >- if (pushText) pushText(this.textStart, textEndPosition); >+ if (pushText) pushText(this.textStart, invalidTagLineEnd); > } > this.scanner.resetTo(this.index, this.javadocEnd); > this.currentTokenType = -1; // flush token cache at line begin >@@ -250,27 +241,26 @@ > } > this.textStart = this.tagSourceEnd+1; > invalidTagLineEnd = this.lineEnd; >+ textEndPosition = this.index; > } > } catch (InvalidInputException e) { > consumeToken(); > } >- } else if (verifText && this.tagValue == TAG_RETURN_VALUE && this.returnStatement != null) { >- refreshReturnStatement(); >- } else if (isFormatterParser) { >- if (this.textStart == -1) this.textStart = previousPosition; >+ } else { >+ textEndPosition = this.index; >+ if (verifText && this.tagValue == TAG_RETURN_VALUE && this.returnStatement != null) { >+ refreshReturnStatement(); >+ } else if (isFormatterParser) { >+ if (this.textStart == -1) this.textStart = previousPosition; >+ } > } > this.lineStarted = true; > break; > case '\r': > case '\n': > if (this.lineStarted) { >- int textEndPosition = previousPosition; >- if (isFormatterParser) { >- if (ScannerHelper.isWhitespace(previousChar)) { >- textEndPosition = this.spacePosition; >- } else { >- this.spacePosition = previousPosition; >- } >+ if (isFormatterParser && !ScannerHelper.isWhitespace(previousChar)) { >+ textEndPosition = previousPosition; > } > if (this.textStart != -1 && this.textStart < textEndPosition) { > if (pushText) pushText(this.textStart, textEndPosition); >@@ -287,10 +277,6 @@ > } > if (this.inlineTagStarted) { > if (pushText) { >- int textEndPosition = previousPosition; >- if (isFormatterParser && ScannerHelper.isWhitespace(previousChar)) { >- textEndPosition = this.spacePosition; >- } > if (this.lineStarted && this.textStart != -1 && this.textStart < textEndPosition) { > pushText(this.textStart, textEndPosition); > } >@@ -304,6 +290,7 @@ > } > } > this.lineStarted = true; >+ textEndPosition = this.index; > break; > case '{' : > if (verifText && this.tagValue == TAG_RETURN_VALUE && this.returnStatement != null) { >@@ -318,15 +305,14 @@ > this.sourceParser.problemReporter().javadocUnterminatedInlineTag(this.inlineTagStart, end); > } > if (pushText) { >- int textEndPosition = previousPosition; >- if (isFormatterParser && ScannerHelper.isWhitespace(previousChar)) { >- textEndPosition = this.spacePosition; >- } > if (this.lineStarted && this.textStart != -1 && this.textStart < textEndPosition) { > pushText(this.textStart, textEndPosition); > } > refreshInlineTagPosition(textEndPosition); > } >+ textEndPosition = this.index; >+ } else if (peekChar() != '@') { >+ textEndPosition = this.index; > } > if (!this.lineStarted) { > this.textStart = previousPosition; >@@ -352,9 +338,13 @@ > case '\u000c' : /* FORM FEED */ > case ' ' : /* SPACE */ > case '\t' : /* HORIZONTAL TABULATION */ >- // Store first space position while formatting >- if (isFormatterParser && !ScannerHelper.isWhitespace(previousChar)) { >- this.spacePosition = previousPosition; >+ // Do not include trailing spaces in text while formatting >+ if (isFormatterParser) { >+ if (!ScannerHelper.isWhitespace(previousChar)) { >+ textEndPosition = previousPosition; >+ } >+ } else if (this.lineStarted) { >+ textEndPosition = this.index; > } > break; > case '/': >@@ -368,8 +358,10 @@ > // html tags are meaningful for formatter parser > int initialIndex = this.index; > this.scanner.resetTo(this.index, this.javadocEnd); >- int endTextPosition = ScannerHelper.isWhitespace(previousChar) ? this.spacePosition : previousPosition; >- if (parseHtmlTag(previousPosition, endTextPosition)) { >+ if (!ScannerHelper.isWhitespace(previousChar)) { >+ textEndPosition = previousPosition; >+ } >+ if (parseHtmlTag(previousPosition, textEndPosition)) { > break; > } > if (this.abort) return false; >@@ -384,6 +376,7 @@ > this.textStart = previousPosition; > } > this.lineStarted = true; >+ textEndPosition = this.index; > break; > } > } >@@ -398,18 +391,14 @@ > this.sourceParser.problemReporter().javadocUnterminatedInlineTag(this.inlineTagStart, end); > } > if (pushText) { >- int textEndPosition = this.javadocTextEnd; >- if (isFormatterParser && ScannerHelper.isWhitespace(previousChar)) { >- textEndPosition = this.spacePosition; >- } > if (this.lineStarted && this.textStart != -1 && this.textStart < textEndPosition) { > pushText(this.textStart, textEndPosition); > } > refreshInlineTagPosition(textEndPosition); > } > this.inlineTagStarted = false; >- } else if (pushText && this.lineStarted && this.textStart != -1 && this.textStart <= this.javadocTextEnd) { >- pushText(this.textStart, this.starPosition); >+ } else if (pushText && this.lineStarted && this.textStart != -1 && this.textStart <= textEndPosition) { >+ pushText(this.textStart, textEndPosition); > } > updateDocComment(); > } catch (Exception ex) { >@@ -1539,13 +1528,12 @@ > * Note that end of comment may be preceding by several contiguous '*' chars. > */ > protected boolean verifyEndLine(int textPosition) { >- boolean isDomParser = (this.kind & DOM_PARSER) != 0; >- boolean isFormatterParser = (this.kind & FORMATTER_COMMENT_PARSER) != 0; >+ boolean domParser = (this.kind & DOM_PARSER) != 0; > // Special case for inline tag > if (this.inlineTagStarted) { > // expecting closing brace > if (peekChar() == '}') { >- if (isDomParser || isFormatterParser) { >+ if (domParser) { > createTag(); > pushText(textPosition, this.starPosition); > } >@@ -1556,30 +1544,21 @@ > > int startPosition = this.index; > int previousPosition = this.index; >- int spacePos = this.index; > this.starPosition = -1; > char ch = readChar(); >- char previousChar = ch; > nextChar: while (true) { > switch (ch) { > case '\r': > case '\n': >- if (isDomParser || isFormatterParser) { >+ if (domParser) { > createTag(); >- int textEndPosition = previousPosition; >- if (isFormatterParser && ScannerHelper.isWhitespace(previousChar)) { >- textEndPosition = spacePos; >- } >- pushText(textPosition, textEndPosition); >+ pushText(textPosition, previousPosition); > } > this.index = previousPosition; > return true; > case '\u000c' : /* FORM FEED */ > case ' ' : /* SPACE */ > case '\t' : /* HORIZONTAL TABULATION */ >- if (isFormatterParser && previousChar != ch && !ScannerHelper.isWhitespace(previousChar)) { >- this.spacePosition = previousPosition; >- } > if (this.starPosition >= 0) break nextChar; > break; > case '*': >@@ -1587,13 +1566,9 @@ > break; > case '/': > if (this.starPosition >= textPosition) { >- if (isDomParser || isFormatterParser) { >+ if (domParser) { > createTag(); >- int textEndPosition = this.starPosition; >- if (isFormatterParser && ScannerHelper.isWhitespace(previousChar)) { >- textEndPosition = this.spacePosition; >- } >- pushText(textPosition, textEndPosition); >+ pushText(textPosition, this.starPosition); > } > return true; > } >@@ -1603,7 +1578,6 @@ > > } > previousPosition = this.index; >- previousChar = ch; > ch = readChar(); > } > this.index = startPosition; >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java,v >retrieving revision 1.11 >diff -u -r1.11 FormatterCommentsBugsTest.java >--- src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java 29 May 2008 09:28:37 -0000 1.11 >+++ src/org/eclipse/jdt/core/tests/formatter/FormatterCommentsBugsTest.java 20 Jun 2008 15:51:11 -0000 >@@ -977,4 +977,206 @@ > 1 /* indentation level */ > ); > } >+ >+/** >+ * @bug 236230: [formatter] SIOOBE while formatting a compilation unit. >+ * @test Ensure that no exception occurs while formatting >+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=236230" >+ */ >+public void testBug236230() throws JavaModelException { >+ String source = >+ "/**\n" + >+ " * Need a javadoc comment before to get the exception.\n" + >+ " */\n" + >+ "public class Test {\n" + >+ "\n" + >+ " /**\n" + >+ " * <p>If there is an authority, it is:\n" + >+ " * <pre>\n" + >+ " * //authority/device/pathSegment1/pathSegment2...</pre>\n" + >+ " */\n" + >+ " public String devicePath() {\n" + >+ " return null;\n" + >+ " }\n" + >+ "}\n"; >+ formatSource(source, >+ "/**\n" + >+ " * Need a javadoc comment before to get the exception.\n" + >+ " */\n" + >+ "public class Test {\n" + >+ "\n" + >+ " /**\n" + >+ " * <p>\n" + >+ " * If there is an authority, it is:\n" + >+ " * \n" + >+ " * <pre>\n" + >+ " * // authority/device/pathSegment1/pathSegment2...\n" + >+ " * </pre>\n" + >+ " */\n" + >+ " public String devicePath() {\n" + >+ " return null;\n" + >+ " }\n" + >+ "}\n" >+ ); >+} >+public void testBug236230b() throws JavaModelException { >+ String source = >+ "/**\n" + >+ " * Need a javadoc comment before to get the exception.\n" + >+ " */\n" + >+ "public class Test {\n" + >+ "\n" + >+ " /**\n" + >+ " * <p>If there is an authority, it is:\n" + >+ " * <pre>//authority/device/pathSegment1/pathSegment2...</pre>\n" + >+ " */\n" + >+ " public String devicePath() {\n" + >+ " return null;\n" + >+ " }\n" + >+ "}\n"; >+ formatSource(source, >+ "/**\n" + >+ " * Need a javadoc comment before to get the exception.\n" + >+ " */\n" + >+ "public class Test {\n" + >+ "\n" + >+ " /**\n" + >+ " * <p>\n" + >+ " * If there is an authority, it is:\n" + >+ " * \n" + >+ " * <pre>\n" + >+ " * // authority/device/pathSegment1/pathSegment2...\n" + >+ " * </pre>\n" + >+ " */\n" + >+ " public String devicePath() {\n" + >+ " return null;\n" + >+ " }\n" + >+ "}\n" >+ ); >+} >+public void testBug236230c() throws JavaModelException { >+ this.preferences.comment_format_header = true; >+ String source = >+ "/**\n" + >+ " * Need a javadoc comment before to get the exception.\n" + >+ " */\n" + >+ "public class Test {\n" + >+ "\n" + >+ " /**\n" + >+ " * <p>If there is an authority, it is:\n" + >+ " * <pre>\n" + >+ " import java.util.List;\n" + >+ " // CU snippet\n" + >+ " public class X implements List {}\n" + >+ " </pre>\n" + >+ " */\n" + >+ " public String devicePath() {\n" + >+ " return null;\n" + >+ " }\n" + >+ "}\n"; >+ formatSource(source, >+ "/**\n" + >+ " * Need a javadoc comment before to get the exception.\n" + >+ " */\n" + >+ "public class Test {\n" + >+ "\n" + >+ " /**\n" + >+ " * <p>\n" + >+ " * If there is an authority, it is:\n" + >+ " * \n" + >+ " * <pre>\n" + >+ " * import java.util.List;\n" + >+ " * \n" + >+ " * // CU snippet\n" + >+ " * public class X implements List {\n" + >+ " * }\n" + >+ " * </pre>\n" + >+ " */\n" + >+ " public String devicePath() {\n" + >+ " return null;\n" + >+ " }\n" + >+ "}\n" >+ ); >+} >+public void testBug236230d() throws JavaModelException { >+ String source = >+ "/**\n" + >+ " * Need a javadoc comment before to get the exception.\n" + >+ " */\n" + >+ "public class Test {\n" + >+ "\n" + >+ " /**\n" + >+ " * <p>If there is an authority, it is:\n" + >+ " * <pre>\n" + >+ " //class body snippet\n" + >+ " public class X {}\n" + >+ " </pre>\n" + >+ " */\n" + >+ " public String devicePath() {\n" + >+ " return null;\n" + >+ " }\n" + >+ "}\n"; >+ // TODO (frederic) line comment should be formatted when F_INCLUDE_COMMENTS >+ // flag will work for all snippet kinds >+ formatSource(source, >+ "/**\n" + >+ " * Need a javadoc comment before to get the exception.\n" + >+ " */\n" + >+ "public class Test {\n" + >+ "\n" + >+ " /**\n" + >+ " * <p>\n" + >+ " * If there is an authority, it is:\n" + >+ " * \n" + >+ " * <pre>\n" + >+ " * //class body snippet\n" + >+ " * public class X {\n" + >+ " * }\n" + >+ " * </pre>\n" + >+ " */\n" + >+ " public String devicePath() {\n" + >+ " return null;\n" + >+ " }\n" + >+ "}\n" >+ ); >+} >+// Following tests showed possible regressions while implementing the fix... >+public void testBug236230e() throws JavaModelException { >+ String source = >+ "public class X02 {\n" + >+ "\n" + >+ "\n" + >+ " /**\n" + >+ " /**\n" + >+ " * Removes the Java nature from the project.\n" + >+ " */\n" + >+ " void foo() {\n" + >+ " }\n" + >+ "}\n"; >+ formatSource(source, >+ "public class X02 {\n" + >+ "\n" + >+ " /**\n" + >+ " * /** Removes the Java nature from the project.\n" + >+ " */\n" + >+ " void foo() {\n" + >+ " }\n" + >+ "}\n" >+ ); >+} >+public void testBug236230f() throws JavaModelException { >+ String source = >+ "public class X03 {\n" + >+ " /** The value of <tt>System.getProperty(\"java.version\")<tt>. **/\n" + >+ " static final String JAVA_VERSION = System.getProperty(\"java.version\");\n" + >+ "\n" + >+ "}\n"; >+ formatSource(source, >+ "public class X03 {\n" + >+ " /** The value of <tt>System.getProperty(\"java.version\")<tt>. **/\n" + >+ " static final String JAVA_VERSION = System.getProperty(\"java.version\");\n" + >+ "\n" + >+ "}\n" >+ ); >+} > }
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 236230
:
104144
|
104887
| 105505