Skip to content

Commit a7cb886

Browse files
authored
Issue #1495: Avoid non-short-circuit logic in FileClientHelper (#1497)
1 parent 34143f6 commit a7cb886

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

changes.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ Changes log
33

44
- 2.7 Milestone 3 (??-??-2025)
55
- Bugs fixed
6-
- Reuse an instance of Random class in RandomUtils. Issue #1487.
7-
- Complete test classes. Issue #1490.
6+
- Reuse an instance of Random class in RandomUtils. Issue #1487.
7+
- Complete test classes. Issue #1490.
8+
- Avoid non-short-circuit logic in FileClientHelper. Issue #1495.
89

910
- 2.7 Milestone 2 (29-06-2025)
1011
- Misc

org.restlet/src/main/java/org/restlet/engine/local/FileClientHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ private static boolean isFileInDirectory(final Directory directory, final File f
205205
final String fileAbsolute = directory.getRootRef().getPath(true);
206206
final String filePath;
207207

208-
if (fileAbsolute.indexOf(':') == 2 | fileAbsolute.indexOf('|') == 2) {
208+
if (fileAbsolute.indexOf(':') == 2 || fileAbsolute.indexOf('|') == 2) {
209209
filePath = fileAbsolute.substring(1);
210210
} else {
211211
filePath = fileAbsolute;

0 commit comments

Comments
 (0)