Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 130145 - Method entry breakpoint fails on method with Enum parameter
Summary: Method entry breakpoint fails on method with Enum parameter
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 128734 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-02 11:34 EST by Darin Wright CLA
Modified: 2006-03-02 14:53 EST (History)
2 users (show)

See Also:


Attachments
patch (5.34 KB, patch)
2006-03-02 11:50 EST, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2006-03-02 11:34:08 EST
Test case - place method entry breakpoint on Y.foo(MyEnum)

/*******************************************************************************
 * Copyright (c) 2006 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
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package a.b.c;

/**
 * @since 3.2
 *
 */
public class X {
	
	enum MyEnum {
		APPLE, ORANGE;
	}
	
	class Y {
		public void foo(MyEnum z) {
			System.err.println(z);
		}
	}

	public static void main(String[] args) {
		X x = new X();
		x.foo();
	}
	
	public void foo() {
		Y y = new Y();
		y.foo(MyEnum.APPLE);
	}
}
Comment 1 Michael Rennie CLA 2006-03-02 11:50:33 EST
Created attachment 35620 [details]
patch

this patch fixes the inner method issue, as well as enums as params in general in methods, which also addresses bug 128734
Comment 2 Michael Rennie CLA 2006-03-02 11:52:13 EST
please verify Darin W
Comment 3 Darin Wright CLA 2006-03-02 14:51:16 EST
Modified patch. Fix is to translate '.' for member types to '$' and then back to '.' when creating a type siganture, otherwise the '.' is translated to a '/' which denotes package rather than member type.
Comment 4 Darin Wright CLA 2006-03-02 14:51:34 EST
Verified.
Comment 5 Darin Wright CLA 2006-03-02 14:53:21 EST
*** Bug 128734 has been marked as a duplicate of this bug. ***