Skip to content

Commit 713a56a

Browse files
mfijasjzheaux
authored andcommitted
Fixed debug log format strings
There were a few '%s$1' instead of '%1$s', which caused "$1" to be written to logs.
1 parent 75fa912 commit 713a56a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/main/java/org/springframework/ldap/core/LdapTemplate.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,7 +1686,7 @@ public <T> T searchForObject(LdapQuery query, ContextMapper<T> mapper) {
16861686
@Override
16871687
public <T> T findByDn(Name dn, final Class<T> clazz) {
16881688
if (LOG.isDebugEnabled()) {
1689-
LOG.debug(String.format("Reading Entry at - %s$1", dn));
1689+
LOG.debug(String.format("Reading Entry at - %1$s", dn));
16901690
}
16911691

16921692
// Make sure the class is OK before doing the lookup
@@ -1703,7 +1703,7 @@ public T mapFromContext(Object ctx) throws javax.naming.NamingException {
17031703
throw new OdmException(String.format("Entry %1$s does not have the required objectclasses ", dn));
17041704
}
17051705
if (LOG.isDebugEnabled()) {
1706-
LOG.debug(String.format("Found entry - %s$1", result));
1706+
LOG.debug(String.format("Found entry - %1$s", result));
17071707
}
17081708

17091709
return result;
@@ -1717,7 +1717,7 @@ public void create(Object entry) {
17171717
Assert.notNull(entry, "Entry must not be null");
17181718

17191719
if (LOG.isDebugEnabled()) {
1720-
LOG.debug(String.format("Creating entry - %s$1", entry));
1720+
LOG.debug(String.format("Creating entry - %1$s", entry));
17211721
}
17221722

17231723
Name id = odm.getId(entry);
@@ -1741,7 +1741,7 @@ public void create(Object entry) {
17411741
public void update(Object entry) {
17421742
Assert.notNull(entry, "Entry must not be null");
17431743
if (LOG.isDebugEnabled()) {
1744-
LOG.debug(String.format("Updating entry - %s$1", entry));
1744+
LOG.debug(String.format("Updating entry - %1$s", entry));
17451745
}
17461746

17471747
Name originalId = odm.getId(entry);
@@ -1786,7 +1786,7 @@ public void update(Object entry) {
17861786
public void delete(Object entry) {
17871787
Assert.notNull(entry, "Entry must not be null");
17881788
if (LOG.isDebugEnabled()) {
1789-
LOG.debug(String.format("Deleting %s$1", entry));
1789+
LOG.debug(String.format("Deleting %1$s", entry));
17901790
}
17911791

17921792
Name id = odm.getId(entry);

0 commit comments

Comments
 (0)