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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/java_io.dart

Issue 18129004: Simplify constructors translation, improve code style. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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: pkg/analyzer_experimental/lib/src/generated/java_io.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/java_io.dart b/pkg/analyzer_experimental/lib/src/generated/java_io.dart
index c561daa8a043a7095e9c8de686e0f50ac4ec93b9..d186c47764e3ea535c04ebed30802f42a307b41b 100644
--- a/pkg/analyzer_experimental/lib/src/generated/java_io.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/java_io.dart
@@ -105,7 +105,11 @@ class JavaFile {
}
Uri toURI() => new Uri(path: _path.toString());
String readAsStringSync() => _newFile().readAsStringSync();
- int lastModified() => _newFile().lastModifiedSync().millisecondsSinceEpoch;
+ int lastModified() {
+ if (!_newFile().existsSync()) return 0;
+ return _newFile().lastModifiedSync().millisecondsSinceEpoch;
+
+ }
List<JavaFile> listFiles() {
List<JavaFile> files = [];
List<FileSystemEntity> entities = _newDirectory().listSync();

Powered by Google App Engine
This is Rietveld 408576698