[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-awt-dev
Subject: Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v5]
From: Tejesh R <tr () openjdk ! org>
Date: 2022-10-10 13:58:30
Message-ID: k7YbI_DPpnwcd2vC4P2KDJV2-yMhyKsb8iei_QB1E5U=.705e00c0-d168-4b99-b641-ce56c5552e4c () github ! com
[Download RAW message or body]
> When a custom `FileView` is used and folder traversal is restricted to a particular directory NPE occurs when user tries to traverse/select other folders except traversable folder. This is caused because when user selects folder other than traversable, the traversal is rejected and hence no file is selected as `currentDirectory` of `JFileChooser`. When user tries to access the restricted folder second time, previous selected file check is failing because of NPE since `getFileChooser().getCurrentDirectory();` is null. To fix the issue, NPE check is added.
Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
Updated based on review comments
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/10485/files
- new: https://git.openjdk.org/jdk/pull/10485/files/62f6c307..11a697ea
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=10485&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=10485&range=03-04
Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/10485.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10485/head:pull/10485
PR: https://git.openjdk.org/jdk/pull/10485
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic