Revision: 1004
http://stripes.svn.sourceforge.net/stripes/?rev=1004&view=rev
Author: bengunter
Date: 2008-11-07 20:13:33 +0000 (Fri, 07 Nov 2008)
Log Message:
-----------
Slightly more efficient toString()
Modified Paths:
--------------
trunk/stripes/src/net/sourceforge/stripes/controller/UrlBinding.java
Modified: trunk/stripes/src/net/sourceforge/stripes/controller/UrlBinding.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/controller/UrlBinding.java
2008-11-07 20:11:22 UTC (rev 1003)
+++ trunk/stripes/src/net/sourceforge/stripes/controller/UrlBinding.java
2008-11-07 20:13:33 UTC (rev 1004)
@@ -114,14 +114,14 @@
@Override
public String toString() {
- StringBuilder buf = new StringBuilder(getPath());
+ StringBuilder buf = new StringBuilder(64).append(getPath());
for (Object component : getComponents()) {
- if (component instanceof String) {
+ if (component instanceof UrlBindingParameter) {
+ buf.append('{').append(component).append('}');
+ }
+ else {
buf.append(component);
}
- else if (component instanceof UrlBindingParameter) {
- buf.append('{').append(component).append('}');
- }
}
return buf.toString();
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development