Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-14 Thread Tejesh R
On Fri, 14 Oct 2022 04:39:02 GMT, Tejesh R wrote: >>> Probably it will be good to automate it >> >> I've submitted [JDK-8295298](https://bugs.openjdk.org/browse/JDK-8295298): >> Automate javax/swing/JFileChooser/FileViewNPETest.java >> >>> … and cover the macOS? I do not see a reason why we ca

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-14 Thread Tejesh R
On Mon, 10 Oct 2022 16:17:04 GMT, Alexey Ivanov wrote: >> Yeah, was not able to reproduce in macOS. > > You can set Metal L&F explicitly on macOS. Yeah, I checked it now and the issue is reproducible in macOS also, have to update the test to include macOS. Had thought that default L&F in macOS

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-13 Thread Tejesh R
On Thu, 13 Oct 2022 20:01:37 GMT, Alexey Ivanov wrote: >> I wasn't able to reproduce the issue in macOS, so didn't include it in >> test.. And the fix is for metal L&F and should we explicitly set the >> L&F? Anyhow default L&F is metal right? > >> Probably it will be good to automate i

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-13 Thread Alexey Ivanov
On Thu, 13 Oct 2022 04:52:02 GMT, Tejesh R wrote: >> Probably it will be good to automate it, and cover the macOS? I do not see a >> reason why we cannot set Metal L&F and verify the fix. > > I wasn't able to reproduce the issue in macOS, so didn't include it in > test.. And the fix is for

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-12 Thread Tejesh R
On Wed, 12 Oct 2022 21:30:42 GMT, Sergey Bylokhov wrote: >> Yet you control which folders are non-traversable. Anyway… A test is better >> than no test; an automatic test is better than a manual one. > > Probably it will be good to automate it, and cover the macOS? I do not see a > reason why w

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-12 Thread Sergey Bylokhov
On Mon, 10 Oct 2022 11:27:27 GMT, Alexey Ivanov wrote: >> Ok, since the test has to select non traversable folders in both windows and >> linux I had thought that making it as manual would be better. > > Yet you control which folders are non-traversable. Anyway… A test is better > than no test;

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Alexey Ivanov
On Tue, 11 Oct 2022 07:52:42 GMT, Abhishek Kumar wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 39: > >> 37: * @test >

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v9]

2022-10-11 Thread Alexey Ivanov
On Tue, 11 Oct 2022 10:35:35 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Tejesh R
On Tue, 11 Oct 2022 10:27:23 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 39: > >> 37: * @test >>

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v9]

2022-10-11 Thread Tejesh R
> 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

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Alexey Ivanov
On Tue, 11 Oct 2022 04:54:14 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v8]

2022-10-11 Thread Alexey Ivanov
On Tue, 11 Oct 2022 10:15:10 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Tejesh R
On Tue, 11 Oct 2022 07:46:06 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 77: > >> 75:

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Tejesh R
On Tue, 11 Oct 2022 08:54:45 GMT, Abhishek Kumar wrote: >>> Few lines are going beyond 80 columns, can you please update them? >> >> I agree, line 80 could be wrapped, it's 92 columns long. At the same, I >> wouldn't have insisted because it contains the parameters to >> `PassFailJFrame` which

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Tejesh R
On Tue, 11 Oct 2022 08:50:48 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 39: >> >>> 37: * @test >>> 38: * @bug 6616245 >>> 39: * @key headful >> >> Is it required to have a `key` tag for manual test case? > >> Is it required to have a `key` tag fo

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v8]

2022-10-11 Thread Tejesh R
> 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

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Abhishek Kumar
On Tue, 11 Oct 2022 04:54:14 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Abhishek Kumar
On Tue, 11 Oct 2022 08:48:20 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 80: >> >>> 78: """; >>> 79: frame = new JFrame("JFileChooser File View NPE test"); >>> 80: passFailJFrame = new PassFailJFrame("Test Instructions"

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Alexey Ivanov
On Tue, 11 Oct 2022 07:52:42 GMT, Abhishek Kumar wrote: > Is it required to have a `key` tag for manual test case? A manual test is declared by its `@run` tag: * @run main/manual FileViewNPETest If `-a` (automatic tests) is passed to jtreg, this test isn't selected for running. ---

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Alexey Ivanov
On Tue, 11 Oct 2022 07:57:26 GMT, Abhishek Kumar wrote: > Few lines are going beyond 80 columns, can you please update them? I agree, line 80 could be wrapped, it's 92 columns long. At the same, I wouldn't have insisted because it contains the parameters to `PassFailJFrame` which aren't so imp

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Abhishek Kumar
On Tue, 11 Oct 2022 04:54:14 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Abhishek Kumar
On Tue, 11 Oct 2022 04:54:14 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-11 Thread Alexey Ivanov
On Tue, 11 Oct 2022 04:54:14 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v6]

2022-10-10 Thread Tejesh R
On Mon, 10 Oct 2022 17:23:16 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 82: > >> 80: pas

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

2022-10-10 Thread Tejesh R
> 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

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v6]

2022-10-10 Thread Alexey Ivanov
On Mon, 10 Oct 2022 16:52:48 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v5]

2022-10-10 Thread Tejesh R
On Mon, 10 Oct 2022 16:14:56 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 35: > >> 33: >> 34: imp

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v6]

2022-10-10 Thread Tejesh R
> 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

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v5]

2022-10-10 Thread Tejesh R
On Mon, 10 Oct 2022 16:17:49 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 42: > >> 40: * @require

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-10 Thread Alexey Ivanov
On Mon, 3 Oct 2022 16:33:59 GMT, Tejesh R wrote: >> test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 40: >> >>> 38: * @bug 6616245 >>> 39: * @key headful >>> 40: * @requires (os.family == "windows" | os.family == "linux") >> >> Is there a specific reason to exclude macOS? Is it on

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v5]

2022-10-10 Thread Alexey Ivanov
On Mon, 10 Oct 2022 13:58:30 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-10 Thread Tejesh R
On Mon, 10 Oct 2022 11:24:43 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Test case update > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 81: > >> 79: passFailJFrame = ne

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v5]

2022-10-10 Thread Tejesh R
> 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

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-10 Thread Alexey Ivanov
On Mon, 10 Oct 2022 10:23:58 GMT, Tejesh R wrote: >> @mrserb is suggesting making the test automatic. `JFileChooser` is embedded >> in a frame in the test. It should be possible… I'm fine with manual test >> though… for now. > > Ok, since the test has to select non traversable folders in both w

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-10 Thread Alexey Ivanov
On Tue, 4 Oct 2022 08:06:24 GMT, Tejesh R wrote: >> 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 othe

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-10 Thread Tejesh R
On Mon, 10 Oct 2022 10:19:11 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 67: >> >>> 65: //Initialize the components >>> 66: final String INSTRUCTIONS = """ >>> 67: Instructions to Test: >> >> JFileChooser extends JComp

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-10 Thread Alexey Ivanov
On Mon, 10 Oct 2022 06:32:44 GMT, Sergey Bylokhov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Test case update > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 67: > >> 65: //Initialize the

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-10 Thread Tejesh R
On Mon, 10 Oct 2022 06:41:24 GMT, Tejesh R wrote: >> test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 67: >> >>> 65: //Initialize the components >>> 66: final String INSTRUCTIONS = """ >>> 67: Instructions to Test: >> >> JFileChooser extends JComponent

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-09 Thread Tejesh R
On Mon, 10 Oct 2022 06:32:44 GMT, Sergey Bylokhov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Test case update > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 67: > >> 65: //Initialize the

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-09 Thread Sergey Bylokhov
On Tue, 4 Oct 2022 08:06:24 GMT, Tejesh R wrote: >> 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 othe

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-09 Thread Abhishek Kumar
On Tue, 4 Oct 2022 05:45:50 GMT, Tejesh R wrote: >> You say that the current directory in `JFileChooser` gets set to `null` >> because of forbidden navigation to a folder which is not traversable. You >> avoid the NPE by a null-check. >> >> However, you should prevent the current directory to

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v4]

2022-10-04 Thread Tejesh R
> 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

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Mon, 3 Oct 2022 11:29:14 GMT, Tejesh R wrote: >> test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 114: >> >>> 112: } else { >>> 113: return false; >>> 114: } >> >> It can be simplified to: >> Suggestion: >> >> return ((filePath != null) && (fil

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Mon, 3 Oct 2022 12:01:55 GMT, Alexey Ivanov wrote: >> Then I can just make user.home directory as the only traversable...? > > Makes sense to me. Updated. - PR: https://git.openjdk.org/jdk/pull/10485

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Mon, 3 Oct 2022 11:10:27 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated based on review comments > > You say that the current directory in `JFileChooser` gets set to `null` > because of

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v3]

2022-10-03 Thread Tejesh R
> 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

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Mon, 3 Oct 2022 15:24:43 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 40: > >> 38: * @bug 6616

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Alexey Ivanov
On Fri, 30 Sep 2022 10:57:37 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Alexey Ivanov
On Mon, 3 Oct 2022 14:48:04 GMT, Tejesh R wrote: > … NPE doesn't occur since that previous directory check is not done. Then I suggest going this way and just drop the checks from Metal L&F. The test should set Metal L&F explicitly. Or better yet, it should be run in all L&Fs to ensure NPE isn

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Mon, 3 Oct 2022 12:13:23 GMT, Alexey Ivanov wrote: >>> Well, the logic there tries to prevent the current directory from becoming >>> `null`. Yet it traverses up the tree: >>> >>> https://github.com/openjdk/jdk/blob/ccc1d3169691d066c08e294f5d989b007bfab114/src/java.desktop/share/classes/java

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Alexey Ivanov
On Mon, 3 Oct 2022 12:09:26 GMT, Alexey Ivanov wrote: >> In other L&F the same problem exist, but NPE is does not occurs because >> previous state check is not done, directly the clicked file is been set. >> https://github.com/openjdk/jdk/blob/ccc1d3169691d066c08e294f5d989b007bfab114/src/java.d

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Alexey Ivanov
On Mon, 3 Oct 2022 12:07:10 GMT, Tejesh R wrote: >> Well, the logic there tries to prevent the current directory from becoming >> `null`. Yet it traverses up the tree: >> https://github.com/openjdk/jdk/blob/ccc1d3169691d066c08e294f5d989b007bfab114/src/java.desktop/share/classes/javax/swing/JFile

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Mon, 3 Oct 2022 12:00:52 GMT, Alexey Ivanov wrote: >> https://github.com/openjdk/jdk/blob/ccc1d3169691d066c08e294f5d989b007bfab114/src/java.desktop/share/classes/javax/swing/JFileChooser.java#L608 >> Here the above logic checks if the current selected directory is traversable >> and if not it

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Alexey Ivanov
On Mon, 3 Oct 2022 11:56:25 GMT, Tejesh R wrote: >> User's home could be a better option. It's guaranteed to exist, `user.home` >> system property points to it. And it's a more real-life scenario. > > Then I can just make user.home directory as the only traversable...? Makes sense to me. -

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Alexey Ivanov
On Mon, 3 Oct 2022 11:42:36 GMT, Tejesh R wrote: >> Why is it bad to modify `JFileChooser` class itself? >> >> I think setting the current directory to `null` while it displays a >> directory kind of breaks the invariant. >> >> `JFileChooser` navigated to a directory and the current directory

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Mon, 3 Oct 2022 11:49:41 GMT, Alexey Ivanov wrote: >> Why not request the path to the system temporary directory? >> >> Temporary directory on Windows is not located in `C:\temp`. Likely this >> folder does not exist. You should use `TMP` or `TEMP` environment variable. >> Alternatively, yo

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Alexey Ivanov
On Mon, 3 Oct 2022 11:47:20 GMT, Alexey Ivanov wrote: >> Since temp will be better option without creating any new directory for the >> test, I didn't change it (it was reused from JBS report). Any other >> alternative..? > > Why not request the path to the system temporary directory? > >

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Alexey Ivanov
On Mon, 3 Oct 2022 11:32:17 GMT, Tejesh R wrote: >> test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 84: >> >>> 82: String path = ""; >>> 83: if (Platform.isWindows()) { >>> 84: path = "C:" + File.separator + "temp"; >> >> It's rare but possible that Windo

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Mon, 3 Oct 2022 11:37:07 GMT, Alexey Ivanov wrote: >>> >> >> Prevention of not setting to null means I have to modify `JFileChooser` >> class itself, so just handling here. And yeah` f `can't be null, can do that. > > Why is it bad to modify `JFileChooser` class itself? > > I think setting

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Alexey Ivanov
On Mon, 3 Oct 2022 11:28:09 GMT, Tejesh R wrote: >> src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java >> line 1271: >> >>> 1269: File curDir = getFileChooser().getCurrentDirectory(); >>> 1270: >>> 1271: if (curDir != null && !curDir.equals(f)

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Mon, 3 Oct 2022 11:06:14 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 84: > >> 82: Stri

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Mon, 3 Oct 2022 11:02:32 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated based on review comments > > src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java > line

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Alexey Ivanov
On Fri, 30 Sep 2022 10:57:37 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-10-03 Thread Tejesh R
On Fri, 30 Sep 2022 10:57:37 GMT, Tejesh R wrote: >> 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 oth

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView

2022-10-03 Thread Tejesh R
On Fri, 30 Sep 2022 07:44:31 GMT, Abhishek Kumar wrote: >> 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 >> fold

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView

2022-09-30 Thread Tejesh R
On Fri, 30 Sep 2022 07:44:31 GMT, Abhishek Kumar wrote: > The instruction are not quite clear. Can you please modify it as we discussed > over call? Updated. - PR: https://git.openjdk.org/jdk/pull/10485

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

2022-09-30 Thread Tejesh R
> 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

Re: RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView

2022-09-30 Thread Abhishek Kumar
On Thu, 29 Sep 2022 11:12:41 GMT, Tejesh R wrote: > 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 t