Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1633)

Issue 110330046: FSA Fix b/15667934: Removed files log The path ... is not a supported file type. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 10 months ago by Brett
Modified:
9 years, 10 months ago
Reviewers:
pjo, mifern
CC:
connector-cr_google.com
Visibility:
Public.

Description

Files that were moved or deleted would log a message claiming the file is not a supported file type. This is because FsAdaptor.isSupportedPath() returns false because the non-existent file is neither a directory, nor a regular file. Reading the BasicFileAttributes on a non-existent file throws an exception. So I catch the various not found exceptions, and moved the call to isSupportedPath() to after the attributes are fetched. Moving the call to isSupportedPath() down also fixed a broken FsAdaptor test, so I removed the comment that said the test was invalid.

Patch Set 1 #

Total comments: 6

Patch Set 2 : PJ and Miguel's feedback. Improved log messages and levels. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -25 lines) Patch
M src/com/google/enterprise/adaptor/fs/FsAdaptor.java View 1 5 chunks +31 lines, -13 lines 0 comments Download
M test/com/google/enterprise/adaptor/fs/FsAdaptorTest.java View 1 3 chunks +14 lines, -12 lines 0 comments Download
M test/com/google/enterprise/adaptor/fs/NioFileDelegateTest.java View 3 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 13
Brett
9 years, 10 months ago (2014-07-02 00:35:19 UTC) #1
pjo
Thank you. Miguel, please take a look. https://codereview.appspot.com/110330046/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/110330046/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode489 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:489: } maybe ...
9 years, 10 months ago (2014-07-02 00:44:11 UTC) #2
mifern
https://codereview.appspot.com/110330046/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/110330046/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode472 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:472: BasicFileAttributes attrs; I don't understand the reasoning for flipping ...
9 years, 10 months ago (2014-07-02 16:05:18 UTC) #3
pjo
Thank you https://codereview.appspot.com/110330046/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/110330046/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode472 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:472: BasicFileAttributes attrs; On 2014/07/02 16:05:18, mifern wrote: ...
9 years, 10 months ago (2014-07-02 16:37:32 UTC) #4
mifern
https://codereview.appspot.com/110330046/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/110330046/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode472 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:472: BasicFileAttributes attrs; I don't disagree with fixing a test ...
9 years, 10 months ago (2014-07-02 17:49:52 UTC) #5
pjo
Thank you https://codereview.appspot.com/110330046/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/110330046/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode472 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:472: BasicFileAttributes attrs; On 2014/07/02 17:49:51, mifern wrote: ...
9 years, 10 months ago (2014-07-02 18:06:28 UTC) #6
brett.michael.johnson_gmail.com
I didn’t change to production code to fix a test. I changed the production code ...
9 years, 10 months ago (2014-07-02 20:02:28 UTC) #7
brett.michael.johnson_gmail.com
I have also argued in the past that the order of the validity checks at ...
9 years, 10 months ago (2014-07-02 20:07:20 UTC) #8
mifern
The caching only happens in Windows not in Linux, but I'll let you and PJ ...
9 years, 10 months ago (2014-07-02 20:25:57 UTC) #9
pjo
Thank you for thoughtful conversation. Brett's sequencing and arguments make sense to me. Brett, please ...
9 years, 10 months ago (2014-07-02 21:05:56 UTC) #10
Brett
PJ and Miguel's feedback. Improved log messages and levels.
9 years, 10 months ago (2014-07-02 22:21:40 UTC) #11
pjo
LGTM. Thank you.
9 years, 10 months ago (2014-07-02 23:28:25 UTC) #12
Brett
9 years, 10 months ago (2014-07-02 23:33:50 UTC) #13
Committed 02 July 2014 to the Filesystem Adaptor:

To https://code.google.com/p/plexi.fs/
   137071c..d3b8276  master -> master
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b