Skip to content

Commit f393648

Browse files
committed
lint: remove import
1 parent 5c25c9b commit f393648

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

+stdlib/canonical.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
expand_tilde (1,1) logical=true
2020
end
2121

22-
import java.io.File
23-
2422
if expand_tilde
2523
c = stdlib.expanduser(p);
2624
else
@@ -48,6 +46,6 @@
4846
% REQUIRES path to exist, while java method does not.
4947
% c = builtin('_canonicalizepath', c);
5048

51-
c = stdlib.posix(File(c).getCanonicalPath());
49+
c = stdlib.posix(java.io.File(c).getCanonicalPath());
5250

5351
end % function

+stdlib/filesystem_type.m

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
p (1,1) string
44
end
55

6-
import java.io.File
7-
import java.nio.file.Files
8-
9-
t = string(Files.getFileStore(File(p).toPath()).type());
6+
t = string(java.nio.file.Files.getFileStore(java.io.File(p).toPath()).type());
107

118
end

+stdlib/ini2struct.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
Val = strtok(Val, "#"); % remove inline comment
3737
Val = strtrim(Val); % remove spaces before comment
3838

39-
[val, status] = double(string(Val));
40-
if status, Val = val; end % convert string to number(s)
39+
Val = double(string(Val));
40+
% convert string to number(s)
4141
end
4242

4343
if ~exist('Section', 'var') % No section found before

+stdlib/samepath.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
path2 (1,1) string
1313
end
1414

15-
import java.io.File
16-
import java.nio.file.Files
17-
1815
issame = false;
1916
if ~stdlib.exists(path1) || ~stdlib.exists(path2)
2017
return
@@ -24,7 +21,9 @@
2421
path1 = stdlib.canonical(path1);
2522
path2 = stdlib.canonical(path2);
2623

27-
issame = Files.isSameFile(File(path1).toPath(), File(path2).toPath());
24+
issame = java.nio.file.Files.isSameFile(...
25+
java.io.File(path1).toPath(), ...
26+
java.io.File(path2).toPath());
2827

2928
% alternative, lower-level method is lexical only (not suitable for us):
3029
% https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/File.html#equals(java.lang.Object)

0 commit comments

Comments
 (0)