GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [java] InsufficientStringBufferDeclaration false positive for initial calculated StringBuilder size · Issue #1438 · pmd/pmd Closed DescriptionAffects PMD Version:
Rule: InsufficientStringBufferDeclaration Description: When calculating the size of a Code Sample demonstrating the issue: public String foo(final String x, final String y, final double z, final Date d, final double v) { final StringBuilder sb = new StringBuilder(20 + 9*2 + 16 + 2 * x.length() + y.length()); final DecimalFormat df = (DecimalFormat) DecimalFormat.getInstance(Locale.GERMAN); df.applyPattern("#,##0.000"); final SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy hh:mm"); sb.append("foobar") .append(df.format(z)) .append(' ') .append(x) .append(y) .append("foobar") .append(sdf.format(d)) .append("foobar") .append(df.format(v)) .append(' ') .append(x); return sb.toString(); } Running PMD through: Gradle Activity
MetadataMetadataAssigneesLabelsa:false-positivePMD flags a piece of code that is not problematic TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |