Chromium Code Reviews| OLD | NEW |
|---|---|
| 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.Reader; | 7 import java.io.Reader; |
| 8 import java.io.StringReader; | 8 import java.io.StringReader; |
| 9 import java.io.StringWriter; | 9 import java.io.StringWriter; |
| 10 import java.io.Writer; | 10 import java.io.Writer; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 return null; | 69 return null; |
| 70 } | 70 } |
| 71 | 71 |
| 72 return artifact.writer.toString(); | 72 return artifact.writer.toString(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 /** | 75 /** |
| 76 * Removes the given artifact, by name. | 76 * Removes the given artifact, by name. |
| 77 */ | 77 */ |
| 78 public void removeArtifact(String name, String part, String ext) { | 78 public void removeArtifact(String name, String part, String ext) { |
| 79 artifacts.remove(keyFor(name, part, ext)); | 79 Artifact found = artifacts.remove(keyFor(name, part, ext)); |
|
scheglov
2012/02/25 21:47:18
unused assignment
| |
| 80 } | 80 } |
| 81 | 81 |
| 82 private String keyFor(Source source, String part, String ext) { | 82 private String keyFor(Source source, String part, String ext) { |
| 83 return keyFor(source.getName(), part, ext); | 83 return keyFor(source.getName(), part, ext); |
| 84 } | 84 } |
| 85 | 85 |
| 86 private String keyFor(String sourceName, String part, String ext) { | 86 private String keyFor(String sourceName, String part, String ext) { |
| 87 if (!part.isEmpty()) { | 87 if (!part.isEmpty()) { |
| 88 part = "$" + part; | 88 part = "$" + part; |
| 89 } | 89 } |
| 90 return sourceName + part + "/" + ext; | 90 return sourceName + part + "/" + ext; |
| 91 } | 91 } |
| 92 } | 92 } |
| OLD | NEW |