mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 05:02:26 -05:00
Merge pull request #70 from andrewgaul/combine-one-element
Optimize Utility.combine for length 1 arguments
This commit is contained in:
commit
186b65e523
@ -56,6 +56,8 @@ public class Utility {
|
|||||||
return null;
|
return null;
|
||||||
} else if (parts.length == 0) {
|
} else if (parts.length == 0) {
|
||||||
return "";
|
return "";
|
||||||
|
} else if (parts.length == 1) {
|
||||||
|
return parts[0].toString();
|
||||||
}
|
}
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(parts[0]);
|
sb.append(parts[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user