| Summary: | Useless null check in org.eclipse.jetty.util.resource.Resource.defangURI() | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Richard Hash <richard.hash> |
| Component: | server | Assignee: | Greg Wilkins <gregw> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | trivial | ||
| Priority: | P3 | CC: | jetty-inbox, mgorovoy |
| Version: | 7.1.3 | ||
| Target Milestone: | 7.2.0.RC0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
defang URI! who even wrote that method!!!! (will probably turn out to be me!) DOH! it was me. Fixed and given a better method name: hrefEncodeURI r2003 Marking as resolved. |
Build Identifier: Build id: M20090917-0800 In org.eclipse.jetty.util.resource.Resource(), the following code might want to be a little less certain about buf being null: private static String defangURI(String raw) { StringBuffer buf = null; if (buf==null) { Reproducible: Always Steps to Reproduce: 1. Open org.eclipse.jetty.util.resource.Resource.defangURI() 2. Look at code. 3. Slap head and say doh!