Minor cleanup tweaks.

This commit is contained in:
Mattias Hellborg Arthursson
2013-10-24 13:02:06 +02:00
parent 08ce0a6407
commit cdea204f55
23 changed files with 104 additions and 119 deletions

View File

@@ -136,16 +136,16 @@ public class LdapAttributes extends BasicAttributes {
while (values.hasMore()) {
Object value = values.next();
if (value instanceof String)
if (value instanceof String) {
sb.append(attribute.getID() + ": " + (String) value + "\n");
else if (value instanceof byte[])
} else if (value instanceof byte[]) {
sb.append(attribute.getID() + ":: " + new BASE64Encoder().encode((byte[]) value) + "\n");
else if (value instanceof URI)
} else if (value instanceof URI) {
sb.append(attribute.getID() + ":< " + (URI) value + "\n");
else {
} else {
sb.append(attribute.getID() + ": " + value + "\n");
}
}

View File

@@ -290,8 +290,9 @@ public class LdifParser implements Parser, InitializingBean {
log.trace("...done parsing record. (EndOfRecord)");
//Validate record and return.
if (record == null) return null;
else {
if (record == null) {
return null;
} else {
try {
//flush buffer.
addAttributeToRecord(builder.toString(), record);