Skip to content

Commit 9523cf2

Browse files
scheglovcommit-bot@chromium.org
authored and
commit-bot@chromium.org
committed
Deprecate JavaFile.
Only dartdoc still uses it. dart-lang/dartdoc#2856 Change-Id: I09ebb9e2714702dddc21f7e8c599fef472063c12 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220880 Reviewed-by: Samuel Rawlins <srawlins@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
1 parent d6d45d9 commit 9523cf2

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

pkg/analyzer/lib/src/generated/java_engine_io.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44

55
import "dart:io";
66

7-
import "package:analyzer/src/generated/java_io.dart";
8-
9-
class FileUtilities2 {
10-
static JavaFile createFile(String path) {
11-
return JavaFile(path).getAbsoluteFile();
12-
}
13-
}
14-
157
class OSUtilities {
168
static String LINE_SEPARATOR = isWindows() ? '\r\n' : '\n';
179
static bool isMac() => Platform.operatingSystem == 'macos';

pkg/analyzer/lib/src/generated/java_io.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import "dart:io";
66

77
import 'package:path/path.dart' as path;
88

9+
@Deprecated('Use ResourceProvider and path context instead.')
910
class JavaFile {
1011
@deprecated
1112
static path.Context pathContext = path.context;

pkg/analyzer/test/generated/java_io_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ main() {
1616
expect(path.context.isAbsolute(absolutePath), isTrue,
1717
reason: '"$absolutePath" is not absolute');
1818
// test that toURI() returns an absolute URI
19+
// ignore: deprecated_member_use_from_same_package
1920
Uri uri = JavaFile(absolutePath).toURI();
2021
expect(uri.isAbsolute, isTrue);
2122
expect(uri.scheme, 'file');
@@ -30,6 +31,7 @@ main() {
3031
// it may be not on Windows, if "temp" is on other disk.
3132
String relPath = path.context.relative(absolutePath);
3233
// test that toURI() returns an absolute URI
34+
// ignore: deprecated_member_use_from_same_package
3335
Uri uri = JavaFile(relPath).toURI();
3436
expect(uri.isAbsolute, isTrue);
3537
expect(uri.scheme, 'file');

0 commit comments

Comments
 (0)