fix for Schema retrieval crashes, bug 232298
git-svn-id: svn://10.0.0.236/trunk@153245 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Ingo Schaefer (ingo.schaefer@fh-brandenburg.de)
|
||||
*/
|
||||
package netscape.ldap;
|
||||
|
||||
@@ -220,12 +221,19 @@ public class LDAPMatchingRuleSchema extends LDAPAttributeSchema {
|
||||
if ( use != null ) {
|
||||
parseValue( use );
|
||||
}
|
||||
Vector v = (Vector)properties.get( "APPLIES" );
|
||||
if ( v != null ) {
|
||||
attributes = new String[v.size()];
|
||||
v.copyInto( attributes );
|
||||
v.removeAllElements();
|
||||
Object p = properties.get( "APPLIES" );
|
||||
if ( p instanceof Vector ) {
|
||||
Vector v = (Vector) p;
|
||||
if ( v != null ) {
|
||||
attributes = new String[v.size()];
|
||||
v.copyInto( attributes );
|
||||
v.removeAllElements();
|
||||
}
|
||||
}
|
||||
else if ( p instanceof String ) {
|
||||
attributes = new String[1];
|
||||
attributes[0] = (String) p;
|
||||
}
|
||||
String val = (String)properties.get( "SYNTAX" );
|
||||
if ( val != null ) {
|
||||
syntaxElement.syntaxString = val;
|
||||
|
||||
@@ -132,11 +132,18 @@ public class LDAPMatchingRuleUseSchema extends LDAPAttributeSchema {
|
||||
public LDAPMatchingRuleUseSchema( String use ) {
|
||||
attrName = "matchingruleuse";
|
||||
parseValue( use );
|
||||
Vector v = (Vector)properties.get( "APPLIES" );
|
||||
if ( v != null ) {
|
||||
attributes = new String[v.size()];
|
||||
v.copyInto( attributes );
|
||||
v.removeAllElements();
|
||||
Object p = properties.get( "APPLIES" );
|
||||
if ( p instanceof Vector ) {
|
||||
Vector v = (Vector)p;
|
||||
if ( v != null ) {
|
||||
attributes = new String[v.size()];
|
||||
v.copyInto( attributes );
|
||||
v.removeAllElements();
|
||||
}
|
||||
}
|
||||
else if ( p instanceof String ) {
|
||||
attributes = new String[1];
|
||||
attributes[0] = (String)p;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user