Project: SWT
Bug 75739 Variant has no toString()
Reported: 2004-10-06 17:02:29 | Status: resolved fixed

The Variant class has no toString() and one cannot call getString() in all cases since it throws an Exception if the type is VT_EMPTY. So I suggest: /** * Always returns a String. * @param variant * @return a String */ public static String toString() { if (this.getType() == COM.VT_EMPTY) { return ""; } return this.getString(); } Version 3.1.M2.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT OLE Win32/win32/org/eclipse/swt/ole/win32/Variant.java