Skip to content

Commit 98ee4df

Browse files
author
zhourenjian
committed
Fix bug that "new Shell((Display) null);" will throw exceptions.
1 parent c739bbd commit 98ee4df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net/sf/j2s/core/astvisitors/ASTScriptVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ protected void visitMethodParameterList(List arguments,
621621
}
622622
if (typeStr != null) {
623623
buffer.append("Clazz.castNullAs (\"");
624-
buffer.append(typeStr);
624+
buffer.append(typeStr.replaceFirst("^\\$wt.", "org.eclipse.swt."));
625625
buffer.append("\")");
626626
} else {
627627
boxingNode(element);

0 commit comments

Comments
 (0)