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 193972 Details for
Bug 343713
[compiler] bogus line number in constructor of inner class in 1.5 compliance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Alternative fix
Bug_343713_v2.patch (text/plain), 3.46 KB, created by
Stephan Herrmann
on 2011-04-24 16:07:34 EDT
(
hide
)
Description:
Alternative fix
Filename:
MIME Type:
Creator:
Stephan Herrmann
Created:
2011-04-24 16:07:34 EDT
Size:
3.46 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java,v >retrieving revision 1.114 >diff -u -r1.114 ConstructorDeclaration.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 5 Mar 2011 17:18:43 -0000 1.114 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java 24 Apr 2011 20:02:07 -0000 >@@ -335,6 +335,7 @@ > > if (needFieldInitializations && preInitSyntheticFields){ > generateSyntheticFieldInitializationsIfNecessary(this.scope, codeStream, declaringClass); >+ codeStream.recordPositionsFrom(0, this.bodyStart); > } > // generate constructor call > if (this.constructorCall != null) { >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest_1_5.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest_1_5.java,v >retrieving revision 1.1 >diff -u -r1.1 InnerEmulationTest_1_5.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest_1_5.java 12 May 2009 20:49:53 -0000 1.1 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest_1_5.java 24 Apr 2011 20:02:08 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2009 IBM Corporation and others. >+ * Copyright (c) 2009, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -286,6 +286,39 @@ > " inner name: #24 D, accessflags: 8 static]\n"; > checkDisassembledClassFile(OUTPUT_DIR + File.separator + "p" + File.separator + "X.class", "X", expectedOutput); > } >+public void test14() throws Exception { >+ runConformTest(new String[] { >+ "LineNumberBug.java", >+ "public class LineNumberBug {\n" + >+ " class Inner {\n" + >+ " public Inner() {\n" + >+ " System.out.println(\"Inner()\");\n" + >+ " }\n" + >+ " }\n" + >+ " public static void main(String[] args) {\n" + >+ " new LineNumberBug().new Inner();\n" + >+ " }\n" + >+ "}\n" >+ }); >+ String expectedOutput = >+ " // Method descriptor #8 (LLineNumberBug;)V\n" + >+ " // Stack: 2, Locals: 2\n" + >+ " public LineNumberBug$Inner(LineNumberBug arg0);\n" + >+ " 0 aload_0 [this]\n" + >+ " 1 aload_1 [arg0]\n" + >+ " 2 putfield LineNumberBug$Inner.this$0 : LineNumberBug [10]\n" + >+ " 5 aload_0 [this]\n" + >+ " 6 invokespecial java.lang.Object() [12]\n" + >+ " 9 getstatic java.lang.System.out : java.io.PrintStream [15]\n" + >+ " 12 ldc <String \"Inner()\"> [21]\n" + >+ " 14 invokevirtual java.io.PrintStream.println(java.lang.String) : void [23]\n" + >+ " 17 return\n" + >+ " Line numbers:\n" + >+ " [pc: 0, line: 3]\n" + >+ " [pc: 9, line: 4]\n" + >+ " [pc: 17, line: 5]\n"; >+ checkDisassembledClassFile(OUTPUT_DIR + File.separator + "LineNumberBug$Inner.class", "LineNumberBug$Inner", expectedOutput); >+} > public static Class testClass() { > return InnerEmulationTest_1_5.class; > }
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 343713
:
193971
|
193972
|
194026