<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=ndeloof" rel="nofollow">nicolas de loof</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6335?redirect=false" rel="nofollow">SPR-6335</a></strong> and commented</p>
<p dir="auto">log4j users used to wrapp debug code with isDebugEnabled to avoid building logging Strings and calling toString() when not necessary. slf4j Uses MessageFormat as a workaround :</p>
<p dir="auto">logger.debug( "some log about {}", object );</p>
<p dir="auto">Spring Assert also is supposed to only fire an exception when some unexpected error occurs. Using same strategy it could avoid building the error message anytime an assertion is checked :</p>
<p dir="auto">// Many String concatenation + implicit toString() calls<br>
Assert.notNull( "the entity " + entity + " with ID " + id + " is not of type " + type );</p>
<p dir="auto">// Less useless CPU consumed in happy path<br>
Assert.notNull( "the entity {} with ID {} is not of type {}", entity, id, type );</p>
<p dir="auto">using varags can also make the parameter list as long as necessary for assertion message to contain all contextual elements the developper may provide.</p>
<hr>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398090907" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9822" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9822/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9822">#9822</a> Use MessageFormat to pass messages to spring Assert (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jonaskilian" rel="nofollow">Jonas Kilian</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-478?redirect=false" rel="nofollow">SPR-478</a></strong> and commented</p>
<p dir="auto">When binding my beans to the JmxMBeanAdapter, I found that they're exported (and therefore instantiated) BEFORE PropertyPlaceholderConfigurer has done its work.</p>
<p dir="auto">E.g. for my datasource, this leads to errors like:</p>
<p dir="auto">Cannot instantiate driver, caused by ClassNotFoundException: ${db.driver}</p>
<p dir="auto">and the like..</p>
<hr>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398053162" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/5240" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/5240/hovercard" href="https://github.com/spring-projects/spring-framework/issues/5240">#5240</a> Type mismatch when using custom property editors with Spring JMX (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>