Skip to content

Commit

Permalink
Fix Checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
jzheaux committed Feb 2, 2024
1 parent 95da09c commit 2f3d934
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions core/src/main/java/org/springframework/ldap/core/LdapTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ public Object executeWithContext(DirContext ctx) throws javax.naming.NamingExcep
*/
@Override
public <T> T lookup(final Name dn, final AttributesMapper<T> mapper) {
return executeReadOnly(ctx -> {
return executeReadOnly((ctx) -> {
Attributes attributes = ctx.getAttributes(dn);
return mapper.mapFromAttributes(attributes);
});
Expand All @@ -852,7 +852,7 @@ public <T> T lookup(final Name dn, final AttributesMapper<T> mapper) {
@Override
public <T> T lookup(final String dn, final AttributesMapper<T> mapper) {

return executeReadOnly(ctx -> {
return executeReadOnly((ctx) -> {
Attributes attributes = ctx.getAttributes(dn);
return mapper.mapFromAttributes(attributes);
});
Expand All @@ -863,7 +863,7 @@ public <T> T lookup(final String dn, final AttributesMapper<T> mapper) {
*/
@Override
public <T> T lookup(final Name dn, final ContextMapper<T> mapper) {
return executeReadOnly(ctx -> {
return executeReadOnly((ctx) -> {
Object object = ctx.lookup(dn);
return mapper.mapFromContext(object);
});
Expand All @@ -874,7 +874,7 @@ public <T> T lookup(final Name dn, final ContextMapper<T> mapper) {
*/
@Override
public <T> T lookup(final String dn, final ContextMapper<T> mapper) {
return executeReadOnly(ctx -> {
return executeReadOnly((ctx) -> {
Object object = ctx.lookup(dn);
return mapper.mapFromContext(object);
});
Expand All @@ -885,7 +885,7 @@ public <T> T lookup(final String dn, final ContextMapper<T> mapper) {
*/
@Override
public <T> T lookup(final Name dn, final String[] attributes, final AttributesMapper<T> mapper) {
return executeReadOnly(ctx -> {
return executeReadOnly((ctx) -> {
Attributes filteredAttributes = ctx.getAttributes(dn, attributes);
return mapper.mapFromAttributes(filteredAttributes);
});
Expand All @@ -896,7 +896,7 @@ public <T> T lookup(final Name dn, final String[] attributes, final AttributesMa
*/
@Override
public <T> T lookup(final String dn, final String[] attributes, final AttributesMapper<T> mapper) {
return executeReadOnly(ctx -> {
return executeReadOnly((ctx) -> {
Attributes filteredAttributes = ctx.getAttributes(dn, attributes);
return mapper.mapFromAttributes(filteredAttributes);
});
Expand All @@ -907,7 +907,7 @@ public <T> T lookup(final String dn, final String[] attributes, final Attributes
*/
@Override
public <T> T lookup(final Name dn, final String[] attributes, final ContextMapper<T> mapper) {
return executeReadOnly(ctx -> {
return executeReadOnly((ctx) -> {
Attributes filteredAttributes = ctx.getAttributes(dn, attributes);
DirContextAdapter contextAdapter = new DirContextAdapter(filteredAttributes, dn);
return mapper.mapFromContext(contextAdapter);
Expand All @@ -919,7 +919,7 @@ public <T> T lookup(final Name dn, final String[] attributes, final ContextMappe
*/
@Override
public <T> T lookup(final String dn, final String[] attributes, final ContextMapper<T> mapper) {
return executeReadOnly(ctx -> {
return executeReadOnly((ctx) -> {
Attributes filteredAttributes = ctx.getAttributes(dn, attributes);
LdapName name = LdapUtils.newLdapName(dn);
DirContextAdapter contextAdapter = new DirContextAdapter(filteredAttributes, name);
Expand Down Expand Up @@ -958,7 +958,7 @@ public Object executeWithContext(DirContext ctx) throws javax.naming.NamingExcep
*/
@Override
public void bind(final Name dn, final Object obj, final Attributes attributes) {
executeReadWrite(ctx -> {
executeReadWrite((ctx) -> {
ctx.bind(dn, obj, attributes);
return null;
});
Expand All @@ -969,7 +969,7 @@ public void bind(final Name dn, final Object obj, final Attributes attributes) {
*/
@Override
public void bind(final String dn, final Object obj, final Attributes attributes) {
executeReadWrite(ctx -> {
executeReadWrite((ctx) -> {
ctx.bind(dn, obj, attributes);
return null;
});
Expand Down Expand Up @@ -1018,28 +1018,28 @@ public void unbind(final String dn, boolean recursive) {
}

private void doUnbind(final Name dn) {
executeReadWrite(ctx -> {
executeReadWrite((ctx) -> {
ctx.unbind(dn);
return null;
});
}

private void doUnbind(final String dn) {
executeReadWrite(ctx -> {
executeReadWrite((ctx) -> {
ctx.unbind(dn);
return null;
});
}

private void doUnbindRecursively(final Name dn) {
executeReadWrite(ctx -> {
executeReadWrite((ctx) -> {
deleteRecursively(ctx, LdapUtils.newLdapName(dn));
return null;
});
}

private void doUnbindRecursively(final String dn) {
executeReadWrite(ctx -> {
executeReadWrite((ctx) -> {
deleteRecursively(ctx, LdapUtils.newLdapName(dn));
return null;
});
Expand Down

0 comments on commit 2f3d934

Please sign in to comment.