Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 290388

Summary: defaultVMConnector\="" does not look fine in a exported preferences
Product: [Eclipse Project] JDT Reporter: Krzysztof Daniel <krzysztof.daniel>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: krzysztof.daniel, Olivier_Thomann
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Krzysztof Daniel CLA 2009-09-24 07:09:51 EDT
This attribute appears in PREF_VM_XML.

I am concerned, because two registered connectors in JDT have their ids, and the code writing the XML is 

if (getDefaultVMInstallConnectorTypeID() != null) {
			config.setAttribute("defaultVMConnector", getDefaultVMInstallConnectorTypeID()); //$NON-NLS-1$
		}

This suggest that methods like
	JavaRuntime.getDefaultVMConnector() {
                //..snip 
		if (id != null) {
			connector = getVMConnector(id);
		}
		if (connector == null) {
			connector = new SocketAttachConnector();
		}
		return connector;
	}

works rather by accident (getVMConnector returns null if connector with id="" is nto found).

The severity is minor as everything works fine, but such solution is confusing.

I believe that defaultVMConnector should not be stored as an empty string, because almost all methods in JDT check for null id.
Comment 1 Olivier Thomann CLA 2009-09-24 07:30:48 EDT
Move to JDT/Debug
Comment 2 Eclipse Genie CLA 2020-04-19 16:29:45 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.