jdk/src/share/classes/com/sun/jndi/ldap/LdapSchemaParser.java
changeset 25808 e113d0a0fde0
parent 24969 afa6934dd8e8
equal deleted inserted replaced
25807:6c325960c9ee 25808:e113d0a0fde0
    82     private static final String     PRIVATE_ID = "X-";
    82     private static final String     PRIVATE_ID = "X-";
    83 
    83 
    84     // Object Class specific IDs
    84     // Object Class specific IDs
    85     private static final String    ABSTRACT_ID = "ABSTRACT";
    85     private static final String    ABSTRACT_ID = "ABSTRACT";
    86     private static final String  STRUCTURAL_ID = "STRUCTURAL";
    86     private static final String  STRUCTURAL_ID = "STRUCTURAL";
    87     private static final String    AUXILARY_ID = "AUXILIARY";
    87     private static final String   AUXILIARY_ID = "AUXILIARY";
    88     private static final String        MUST_ID = "MUST";
    88     private static final String        MUST_ID = "MUST";
    89     private static final String         MAY_ID = "MAY";
    89     private static final String         MAY_ID = "MAY";
    90 
    90 
    91     // Attribute Type specific IDs
    91     // Attribute Type specific IDs
    92     private static final String    EQUALITY_ID = "EQUALITY";
    92     private static final String    EQUALITY_ID = "EQUALITY";
   298         }
   298         }
   299 
   299 
   300         return new Object[] {currentName, attrs};
   300         return new Object[] {currentName, attrs};
   301     }
   301     }
   302 
   302 
   303     // returns the index of the first whitespace char of a linear whitspace
   303     // returns the index of the first whitespace char of a linear whitespace
   304     // sequince ending at the given position.
   304     // sequence ending at the given position.
   305     final private static int findTrailingWhitespace(String string, int pos) {
   305     final private static int findTrailingWhitespace(String string, int pos) {
   306         for(int i = pos; i > 0; i--) {
   306         for(int i = pos; i > 0; i--) {
   307             if(string.charAt(i) != WHSP) {
   307             if(string.charAt(i) != WHSP) {
   308                 return i + 1;
   308                 return i + 1;
   309             }
   309             }
   421         }
   421         }
   422 
   422 
   423         if (tag.equals(OBSOLETE_ID) ||
   423         if (tag.equals(OBSOLETE_ID) ||
   424             tag.equals(ABSTRACT_ID) ||
   424             tag.equals(ABSTRACT_ID) ||
   425             tag.equals(STRUCTURAL_ID) ||
   425             tag.equals(STRUCTURAL_ID) ||
   426             tag.equals(AUXILARY_ID) ||
   426             tag.equals(AUXILIARY_ID) ||
   427             tag.equals(SINGLE_VAL_ID) ||
   427             tag.equals(SINGLE_VAL_ID) ||
   428             tag.equals(COLLECTIVE_ID) ||
   428             tag.equals(COLLECTIVE_ID) ||
   429             tag.equals(NO_USER_MOD_ID)) {
   429             tag.equals(NO_USER_MOD_ID)) {
   430             return new String[] {SCHEMA_TRUE_VALUE};
   430             return new String[] {SCHEMA_TRUE_VALUE};
   431         }
   431         }
   817         if (attr != null) {
   817         if (attr != null) {
   818             objectDesc.append(writeBoolean(attr));
   818             objectDesc.append(writeBoolean(attr));
   819             count++;
   819             count++;
   820         }
   820         }
   821 
   821 
   822         attr = attrs.get(AUXILARY_ID);
   822         attr = attrs.get(AUXILIARY_ID);
   823         if (attr != null) {
   823         if (attr != null) {
   824             objectDesc.append(writeBoolean(attr));
   824             objectDesc.append(writeBoolean(attr));
   825             count++;
   825             count++;
   826         }
   826         }
   827 
   827 
   854                     attrId.equals(SUP_ID) ||
   854                     attrId.equals(SUP_ID) ||
   855                     attrId.equals(MAY_ID) ||
   855                     attrId.equals(MAY_ID) ||
   856                     attrId.equals(MUST_ID) ||
   856                     attrId.equals(MUST_ID) ||
   857                     attrId.equals(STRUCTURAL_ID) ||
   857                     attrId.equals(STRUCTURAL_ID) ||
   858                     attrId.equals(DESC_ID) ||
   858                     attrId.equals(DESC_ID) ||
   859                     attrId.equals(AUXILARY_ID) ||
   859                     attrId.equals(AUXILIARY_ID) ||
   860                     attrId.equals(ABSTRACT_ID) ||
   860                     attrId.equals(ABSTRACT_ID) ||
   861                     attrId.equals(OBSOLETE_ID)) {
   861                     attrId.equals(OBSOLETE_ID)) {
   862                     continue;
   862                     continue;
   863 
   863 
   864                 } else {
   864                 } else {