зеркало из https://github.com/mozilla/pjs.git
fix for Schema retrieval crashes, bug 232298
This commit is contained in:
Родитель
d48f3eb7ef
Коммит
7a16b37b18
|
@ -18,6 +18,7 @@
|
||||||
* Rights Reserved.
|
* Rights Reserved.
|
||||||
*
|
*
|
||||||
* Contributor(s):
|
* Contributor(s):
|
||||||
|
* Ingo Schaefer (ingo.schaefer@fh-brandenburg.de)
|
||||||
*/
|
*/
|
||||||
package netscape.ldap;
|
package netscape.ldap;
|
||||||
|
|
||||||
|
@ -220,12 +221,19 @@ public class LDAPMatchingRuleSchema extends LDAPAttributeSchema {
|
||||||
if ( use != null ) {
|
if ( use != null ) {
|
||||||
parseValue( use );
|
parseValue( use );
|
||||||
}
|
}
|
||||||
Vector v = (Vector)properties.get( "APPLIES" );
|
Object p = properties.get( "APPLIES" );
|
||||||
if ( v != null ) {
|
if ( p instanceof Vector ) {
|
||||||
attributes = new String[v.size()];
|
Vector v = (Vector) p;
|
||||||
v.copyInto( attributes );
|
if ( v != null ) {
|
||||||
v.removeAllElements();
|
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" );
|
String val = (String)properties.get( "SYNTAX" );
|
||||||
if ( val != null ) {
|
if ( val != null ) {
|
||||||
syntaxElement.syntaxString = val;
|
syntaxElement.syntaxString = val;
|
||||||
|
|
|
@ -132,11 +132,18 @@ public class LDAPMatchingRuleUseSchema extends LDAPAttributeSchema {
|
||||||
public LDAPMatchingRuleUseSchema( String use ) {
|
public LDAPMatchingRuleUseSchema( String use ) {
|
||||||
attrName = "matchingruleuse";
|
attrName = "matchingruleuse";
|
||||||
parseValue( use );
|
parseValue( use );
|
||||||
Vector v = (Vector)properties.get( "APPLIES" );
|
Object p = properties.get( "APPLIES" );
|
||||||
if ( v != null ) {
|
if ( p instanceof Vector ) {
|
||||||
attributes = new String[v.size()];
|
Vector v = (Vector)p;
|
||||||
v.copyInto( attributes );
|
if ( v != null ) {
|
||||||
v.removeAllElements();
|
attributes = new String[v.size()];
|
||||||
|
v.copyInto( attributes );
|
||||||
|
v.removeAllElements();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( p instanceof String ) {
|
||||||
|
attributes = new String[1];
|
||||||
|
attributes[0] = (String)p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче