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

Side by Side Diff: compiler/java/com/google/dart/compiler/SystemLibraryManager.java

Issue 8404004: Don't throw assertion when dart:lib cannot be found. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 package com.google.dart.compiler; 5 package com.google.dart.compiler;
6 6
7 import java.io.File; 7 import java.io.File;
8 import java.io.IOException; 8 import java.io.IOException;
9 import java.net.MalformedURLException; 9 import java.net.MalformedURLException;
10 import java.net.URI; 10 import java.net.URI;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (host == null) { 123 if (host == null) {
124 String spec = uri.getSchemeSpecificPart(); 124 String spec = uri.getSchemeSpecificPart();
125 String replacement = expansionMap.get(spec); 125 String replacement = expansionMap.get(spec);
126 if (replacement != null) { 126 if (replacement != null) {
127 try { 127 try {
128 uri = new URI(DART_SCHEME + ":" + replacement); 128 uri = new URI(DART_SCHEME + ":" + replacement);
129 } catch (URISyntaxException e) { 129 } catch (URISyntaxException e) {
130 throw new AssertionError(); 130 throw new AssertionError();
131 } 131 }
132 } else { 132 } else {
133 throw new RuntimeException("Don't know how to expand dart URI: " + uri ); 133 return null;
134 } 134 }
135 } 135 }
136 } 136 }
137 return uri; 137 return uri;
138 } 138 }
139 139
140 /** 140 /**
141 * Answer <code>true</code> if the specified URI has a "dart" scheme 141 * Answer <code>true</code> if the specified URI has a "dart" scheme
142 */ 142 */
143 public static boolean isDartUri(URI uri) { 143 public static boolean isDartUri(URI uri) {
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 if (library != null) { 305 if (library != null) {
306 defaultLibraries.add(library); 306 defaultLibraries.add(library);
307 baseFiles[path.ordinal()] = library.getFile(); 307 baseFiles[path.ordinal()] = library.getFile();
308 } 308 }
309 } 309 }
310 } 310 }
311 311
312 return defaultLibraries.toArray(new SystemLibrary[defaultLibraries.size()]); 312 return defaultLibraries.toArray(new SystemLibrary[defaultLibraries.size()]);
313 } 313 }
314 } 314 }
OLDNEW
« no previous file with comments | « compiler/java/com/google/dart/compiler/DefaultCompilerConfiguration.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698