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

Unified Diff: compiler/java/com/google/dart/compiler/util/Paths.java

Issue 8966029: Report errors and warnings for hiding elements, issue 572. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for comments Created 9 years 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: compiler/java/com/google/dart/compiler/util/Paths.java
diff --git a/compiler/java/com/google/dart/compiler/util/Paths.java b/compiler/java/com/google/dart/compiler/util/Paths.java
index d2a6b0de5c35d1a56431766a99136632d4748b72..ee42826f074be9bf236145d989d2f7bd2024c58e 100644
--- a/compiler/java/com/google/dart/compiler/util/Paths.java
+++ b/compiler/java/com/google/dart/compiler/util/Paths.java
@@ -30,6 +30,11 @@ public class Paths {
int baseFilePathLen = baseFilePath.length();
int relFilePathLen = relFilePath.length();
+ // Check for empty cases
+ if (baseFilePathLen == 0 && relFilePathLen == 0) {
+ return relFilePath;
+ }
+
// Find the common path elements
int index = 0;
while (index < baseFilePathLen - 1 && index < relFilePathLen - 1) {

Powered by Google App Engine
This is Rietveld 408576698