Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 73123 - "Add NetBeans Platform" broken on Mac OS X
"Add NetBeans Platform" broken on Mac OS X
Product: apisupport
Classification: Unclassified
Component: Project
Macintosh Mac OS X
: P1 (vote)
: 5.x
Assigned To: Martin Krauskopf
Depends on:
  Show dependency treegraph
Reported: 2006-03-01 09:45 UTC by lordy
Modified: 2006-03-01 12:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

NullPointerException (7.54 KB, text/plain)
2006-03-01 09:46 UTC, lordy

Note You need to log in before you can comment on or make changes to this bug.
Description lordy 2006-03-01 09:45:37 UTC
I get a java.lang.NullPointerException when i want browse directories in current NetBeans builds. I found 
out the the problem is org.netbeans.modules.apisupport.project.ui.platform.PlatformChooserVisualPanel. 
In revision 1.15  you add  File plafDir = FileUtil.normalizeFile(platformChooser.getSelectedFile()); which 
throws the exception on Mac OS X.

Maybe this is because i use a germany env and it works in normal english env. I found in a own application  
also some problem like this because the unix path is /Application but in a german env you see Programme 
and getFile also give me Programme back..
Comment 1 lordy 2006-03-01 09:46:22 UTC
Created attachment 29061 [details]
Comment 2 pzajac 2006-03-01 10:33:25 UTC
Related to filesystems on MacOS.
Comment 3 lordy 2006-03-01 10:53:20 UTC
Did version 5.0u2 mean that this bug find his why into u1 and get fixed in u2? If so i think that is not good 
idea. Better go back to no FileUtil.normalizeFile or to a if(!isMac) solution.
Comment 4 pzajac 2006-03-01 10:57:23 UTC
I don't know if this bug is in 50u1. 50u1 is on the branch. The 50u2 is dev
build. If it is on 50u1 we will fix it I hope.   
Comment 5 pzajac 2006-03-01 11:11:59 UTC
50u1 is on the branch. The 50u2 is dev build. Yes it it is reproducible on
5.0u1. Thanks a lot.
Comment 6 Martin Krauskopf 2006-03-01 11:17:06 UTC
Thanks for the nice analysis. I think we already had a similar bug with the
FileChooser on MacOS. I'll take a look at it soon.
Comment 7 Martin Krauskopf 2006-03-01 11:46:22 UTC
Does this happen everytime?

File chooser on MacOS returns null from platformChooser.getSelectedFile() after
FileChooser.SELECTED_FILE_CHANGED_PROPERTY is fired. According to JFileChooser's
source in Sun's JDK it is presumably OK to retrun null from JFC.gSF(). But not
sure if there is some javadoc/spec if it is legal to return null after the
property is fired - seems ok to me. So I've just added check for null. Please
let me know (lordy or zajo) if it helps. I'll backport then.

Checking in;
new revision: 1.16; previous revision: 1.15
Comment 8 lordy 2006-03-01 12:08:47 UTC
verified revision 1.16
Comment 9 Martin Krauskopf 2006-03-01 12:18:58 UTC
Thanks. Backported.

ui/platform/; 1.15 ->;

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo