Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2414)

Unified Diff: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java

Issue 14205011: Issue 9845. Compare runtime types using ==. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java
diff --git a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java
index 8dee9b4454ad09f9f9b99eeeda94ec8a5527aa95..71e7564e4547dbb5aead2292f22bcaef8db440cc 100644
--- a/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java
+++ b/editor/util/plugins/com.google.dart.java2dart/src/com/google/dart/java2dart/SyntaxTranslator.java
@@ -1754,9 +1754,10 @@ public class SyntaxTranslator extends org.eclipse.jdt.core.dom.ASTVisitor {
}
ITypeBinding typeBinding = context.getNodeTypeBinding(expression);
if (typeBinding != null) {
- String name = typeBinding.getName();
+ String name = JavaUtils.getFullyQualifiedName(typeBinding, false);
return name.equals("char") || name.equals("short") || name.equals("int")
- || name.equals("long") || name.equals("float") || name.equals("double");
+ || name.equals("long") || name.equals("float") || name.equals("double")
+ || name.equals("java.lang.Class");
}
return false;
}

Powered by Google App Engine
This is Rietveld 408576698