Fix Issue 4240 : NPE in Simplified LDIF view with specific entries
* In the case of a Regex Syntax, there is no name.
| | |
| | | AttributeType attr = schema.getAttributeType(attrName.toLowerCase()); |
| | | if (attr != null) |
| | | { |
| | | mustAddBrowseButton = |
| | | attr.getSyntax().getSyntaxName().equalsIgnoreCase( |
| | | // There is no name for a regex syntax. |
| | | String syntaxName = attr.getSyntax().getSyntaxName(); |
| | | if (syntaxName!=null) { |
| | | mustAddBrowseButton=syntaxName.equalsIgnoreCase( |
| | | SchemaConstants.SYNTAX_DN_NAME); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return mustAddBrowseButton; |
| | | } |
| | | |