| | |
| | | }; |
| | | for (int j=0; j < attrNames.length; j++) |
| | | { |
| | | Object o = values[j] + r.nextInt(); |
| | | ByteString o = ByteString.valueOfUtf8(values[j] + r.nextInt()); |
| | | csr.set(attrNames[j], newArrayList(o)); |
| | | } |
| | | try |
| | |
| | | }; |
| | | for (int j=0; j < attrNames.length; j++) |
| | | { |
| | | Object o = values[j]; |
| | | ByteString o = ByteString.valueOfUtf8(values[j]); |
| | | csr.set(attrNames[j], newArrayList(o)); |
| | | } |
| | | try |
| | |
| | | // corresponding definition and add the value to the appropriate hash. |
| | | if (attrType.isObjectClass()) |
| | | { |
| | | for (Object value : csr.getAttributeValues(attrType.getNameOrOID())) |
| | | for (ByteString value : csr.getAttributeValues(attrType.getNameOrOID())) |
| | | { |
| | | String ocName = value.toString().trim(); |
| | | objectClasses.put(DirectoryServer.getSchema().getObjectClass(ocName), ocName); |
| | |
| | | else |
| | | { |
| | | AttributeBuilder builder = new AttributeBuilder(attrDesc); |
| | | for (Object value : csr.getAttributeValues(attrType.getNameOrOID())) |
| | | for (ByteString bs : csr.getAttributeValues(attrType.getNameOrOID())) |
| | | { |
| | | ByteString bs; |
| | | if (value instanceof byte[]) |
| | | { |
| | | bs = ByteString.wrap((byte[])value); |
| | | } |
| | | else |
| | | { |
| | | bs = ByteString.valueOfUtf8(value.toString()); |
| | | } |
| | | builder.add(bs); |
| | | } |
| | | |