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

Issue 318490043: FS Fix b/34961349: Using mime-type.properties file crashes with NPE (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 2 months ago by Brett
Modified:
7 years, 2 months ago
Reviewers:
JohnL, Srinivas
CC:
connector-cr_google.com, dgalkiewicz_google.com, Brett Johnson
Visibility:
Public.

Description

This change fixes a NullPointerException introduced in commit 06e4ade.

Patch Set 1 #

Patch Set 2 : Handle NIO NoSuchFileException #

Total comments: 2

Patch Set 3 : Add unit tests #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -19 lines) Patch
M src/com/google/enterprise/adaptor/fs/FsAdaptor.java View 1 2 3 chunks +22 lines, -18 lines 0 comments Download
M test/com/google/enterprise/adaptor/fs/FsAdaptorTest.java View 1 2 4 chunks +83 lines, -1 line 5 comments Download

Messages

Total messages: 7
Brett
7 years, 2 months ago (2017-02-06 20:42:24 UTC) #1
Brett
Handle NIO NoSuchFileException
7 years, 2 months ago (2017-02-06 21:12:42 UTC) #2
JohnL
Can we add a unit test with a mime-type.properties file? John L https://codereview.appspot.com/318490043/diff/20001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java ...
7 years, 2 months ago (2017-02-06 21:54:44 UTC) #3
Brett
Add unit tests
7 years, 2 months ago (2017-02-07 01:26:20 UTC) #4
Brett
https://codereview.appspot.com/318490043/diff/20001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/318490043/diff/20001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode1221 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:1221: return defaults; On 2017/02/06 21:54:44, JohnL wrote: > Awfully ...
7 years, 2 months ago (2017-02-07 01:26:35 UTC) #5
JohnL
LGTM, with some suggestions. John L https://codereview.appspot.com/318490043/diff/40001/test/com/google/enterprise/adaptor/fs/FsAdaptorTest.java File test/com/google/enterprise/adaptor/fs/FsAdaptorTest.java (right): https://codereview.appspot.com/318490043/diff/40001/test/com/google/enterprise/adaptor/fs/FsAdaptorTest.java#newcode130 test/com/google/enterprise/adaptor/fs/FsAdaptorTest.java:130: Files.write(file, content.getBytes("UTF-8")); The ...
7 years, 2 months ago (2017-02-08 02:00:54 UTC) #6
Brett
7 years, 2 months ago (2017-02-08 20:19:15 UTC) #7
Committed 08 February 2017:
https://github.com/googlegsa/filesystem/commit/462a4a20dc773166da2523cc5da041...

https://codereview.appspot.com/318490043/diff/40001/test/com/google/enterpris...
File test/com/google/enterprise/adaptor/fs/FsAdaptorTest.java (right):

https://codereview.appspot.com/318490043/diff/40001/test/com/google/enterpris...
test/com/google/enterprise/adaptor/fs/FsAdaptorTest.java:130: Files.write(file,
content.getBytes("UTF-8"));
On 2017/02/08 02:00:53, JohnL wrote:
> The Charset override is preferred, with a static import of UTF_8 from Guava or
> Java 7.

Done.

https://codereview.appspot.com/318490043/diff/40001/test/com/google/enterpris...
test/com/google/enterprise/adaptor/fs/FsAdaptorTest.java:156: public void
testLoadMimeTypesUniqueValue() throws Exception {
On 2017/02/08 02:00:54, JohnL wrote:
> s/Value/Key/ maybe, and the same in the MultipleValues test, but not the one
> after that?

Done.
Sign in to reply to this message.

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