This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 103104 - Cannot open properties file
Summary: Cannot open properties file
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords:
: 103108 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-05-02 10:34 UTC by Jiri Skrivanek
Modified: 2007-11-05 13:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace. (3.88 KB, text/plain)
2007-05-02 10:34 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2007-05-02 10:34:21 UTC
Since build 20070430-0227 it happens that NullPointerException is thrown when
you call open action on properties file. It might be caused by this commit:

 cleaning up obsolete editor settings initializers; fontcolor and
	keybinding settings should be supplied and accessed using the
	Editor Settings and Editor Settings Storage APIs

To reproduce:

- create a java project
- open new file wizard
- select 'Other|Properties File' and finish the wizard
- right-click newproperties.properties file and choose Open. It throws the
following:

java.lang.NullPointerException
	at
org.netbeans.modules.properties.syntax.EditorSettingsCopy.updateColors(EditorSettingsCopy.java:270)
	at
org.netbeans.modules.properties.syntax.EditorSettingsCopy.updateSettings(EditorSettingsCopy.java:254)
	at
org.netbeans.modules.properties.syntax.EditorSettingsCopy.prepareSettings(EditorSettingsCopy.java:239)
	at
org.netbeans.modules.properties.syntax.EditorSettingsCopy.getKeyStrokesFindNext(EditorSettingsCopy.java:174)
	at
org.netbeans.modules.properties.TableViewSettings$DelegatingSettings.getKeyStrokesFindNext(TableViewSettings.java:175)
Comment 1 Jiri Skrivanek 2007-05-02 10:34:44 UTC
Created attachment 42032 [details]
Stack trace.
Comment 2 Vitezslav Stejskal 2007-05-02 13:10:42 UTC
I see, sorry about that. In fact you can reproduce it with any properties file
if you try to 'Open' it instead of 'Edit' it, which is the default action. I
think the TableViewSettings will have to be initialized from MimeLookup instead
of the old Settings.
Comment 3 Vitezslav Stejskal 2007-05-03 23:55:52 UTC
*** Issue 103108 has been marked as a duplicate of this issue. ***
Comment 4 Vitezslav Stejskal 2007-05-05 07:32:04 UTC
Should be fixed now.

Checking in editor/lib/nbproject/project.xml;
/cvs/editor/lib/nbproject/project.xml,v  <--  project.xml
new revision: 1.10; previous revision: 1.9
done
Checking in editor/libsrc/org/netbeans/editor/BaseKit.java;
/cvs/editor/libsrc/org/netbeans/editor/BaseKit.java,v  <--  BaseKit.java
new revision: 1.167; previous revision: 1.166
done
Checking in editor/libsrc/org/netbeans/editor/EditorUI.java;
/cvs/editor/libsrc/org/netbeans/editor/EditorUI.java,v  <--  EditorUI.java
new revision: 1.92; previous revision: 1.91
done
Checking in editor/libsrc/org/netbeans/editor/Settings.java;
/cvs/editor/libsrc/org/netbeans/editor/Settings.java,v  <--  Settings.java
new revision: 1.67; previous revision: 1.66
done
Checking in editor/libsrc/org/netbeans/editor/SettingsUtil.java;
/cvs/editor/libsrc/org/netbeans/editor/SettingsUtil.java,v  <--  SettingsUtil.java
new revision: 1.31; previous revision: 1.30
done
Checking in editor/libsrc/org/netbeans/editor/Utilities.java;
/cvs/editor/libsrc/org/netbeans/editor/Utilities.java,v  <--  Utilities.java
new revision: 1.86; previous revision: 1.85
done
RCS file: /cvs/editor/libsrc/org/netbeans/modules/editor/lib/ColoringMap.java,v
done
Checking in editor/libsrc/org/netbeans/modules/editor/lib/ColoringMap.java;
/cvs/editor/libsrc/org/netbeans/modules/editor/lib/ColoringMap.java,v  <-- 
ColoringMap.java
initial revision: 1.1
done
Checking in
editor/settings/storage/src/org/netbeans/modules/editor/settings/storage/CompositeFCS.java;
/cvs/editor/settings/storage/src/org/netbeans/modules/editor/settings/storage/CompositeFCS.java,v
 <--  CompositeFCS.java
new revision: 1.4; previous revision: 1.3
done
Checking in editor/src/org/netbeans/modules/editor/NbEditorUI.java;
/cvs/editor/src/org/netbeans/modules/editor/NbEditorUI.java,v  <--  NbEditorUI.java
new revision: 1.65; previous revision: 1.64
done
Checking in editor/src/org/netbeans/modules/editor/options/BaseOptions.java;
/cvs/editor/src/org/netbeans/modules/editor/options/BaseOptions.java,v  <-- 
BaseOptions.java
new revision: 1.147; previous revision: 1.146
done
Checking in ide/golden/deps.txt;
/cvs/ide/golden/deps.txt,v  <--  deps.txt
new revision: 1.557; previous revision: 1.556
done
Comment 5 Jiri Skrivanek 2007-05-09 09:32:18 UTC
Verified.