[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/propedit DSEntryPanel.java, 1.1.1.1, 1.2
Richard Allen Megginson
rmeggins at fedoraproject.org
Fri Dec 5 23:46:27 UTC 2008
Author: rmeggins
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/propedit
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25087/directoryconsole/src/com/netscape/admin/dirserv/propedit
Modified Files:
DSEntryPanel.java
Log Message:
Resolves: bug 234948
Bug Description: Console hangs when adding a custom entry and schema items are in certain order
Reviewed by: nkinder (Thanks!)
Fix Description: The problem is primarily due to https://bugzilla.redhat.com/show_bug.cgi?id=170791 "Schema file parsing overly picky?" - the console schema editor expects an objectclass to always have at least 1 superior. The bug causes SUP not to be present in the schema entry in the directory server. The fix is to use a schema helper function to make sure the list of superior objectclasses always contains at least "top". I also added a check for a null value to avoid the NullPointerException console error.
Platforms tested: RHEL5
Flag Day: no
Doc impact: no
Index: DSEntryPanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/propedit/DSEntryPanel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- DSEntryPanel.java 18 Jul 2005 00:56:14 -0000 1.1.1.1
+++ DSEntryPanel.java 5 Dec 2008 23:46:25 -0000 1.2
@@ -1647,14 +1647,16 @@
/* Enable/Disable the checkbox for showing attributes with values: if the entry is an extensible
object we don't allow to show all the values */
IAttributeEditor ed = (IAttributeEditor)_visible.get(OBJECTCLASS);
- Vector v = ed.getValues();
- if (v != null) {
- for (int i=0; i< v.size(); i++) {
- if (((String)v.elementAt(i)).equalsIgnoreCase(EXTENSIBLEOBJECT)) {
- _cbAllowedAttributes.setEnabled(false);
- break;
- }
- }
+ if (ed != null) {
+ Vector v = ed.getValues();
+ if (v != null) {
+ for (int i=0; i< v.size(); i++) {
+ if (((String)v.elementAt(i)).equalsIgnoreCase(EXTENSIBLEOBJECT)) {
+ _cbAllowedAttributes.setEnabled(false);
+ break;
+ }
+ }
+ }
}
_cbShowDN = UIFactory.makeJCheckBox(this, _section, "cbshowdn", _dnLabel.isVisible(), _resource);
More information about the Fedora-directory-commits
mailing list