Permalink
Browse files

Removed old code from Escape::allocateStringBuilder

  • Loading branch information...
1 parent 7f741ce commit 734934bc489f1bb4698978b27d67474662f86ea2 @neuroo neuroo committed Oct 27, 2012
Showing with 9 additions and 10 deletions.
  1. +9 −10 coverity-escapers/src/main/java/com/coverity/security/Escape.java
@@ -94,7 +94,7 @@ public static String html(String input) {
return null;
int length = input.length();
- StringBuilder output = allocateStringBuilder(input, length);
+ StringBuilder output = allocateStringBuilder(length);
for (int i = 0; i < length; i++) {
char c = input.charAt(i);
@@ -183,7 +183,7 @@ public static String htmlText(String input) {
return null;
int length = input.length();
- StringBuilder output = allocateStringBuilder(input, length);
+ StringBuilder output = allocateStringBuilder(length);
for (int i = 0; i < length; i++) {
char c = input.charAt(i);
@@ -260,7 +260,7 @@ public static String uriParam(String input) {
return null;
int length = input.length();
- StringBuilder output = allocateStringBuilder(input, length);
+ StringBuilder output = allocateStringBuilder(length);
for (int i = 0; i < length; i++) {
char c = input.charAt(i);
@@ -415,7 +415,7 @@ public static String jsString(String input) {
return null;
int length = input.length();
- StringBuilder output = allocateStringBuilder(input, length);
+ StringBuilder output = allocateStringBuilder(length);
for (int i = 0; i < length; i++) {
char c = input.charAt(i);
@@ -529,7 +529,7 @@ public static String jsRegex(String input) {
return null;
int length = input.length();
- StringBuilder output = allocateStringBuilder(input, length);
+ StringBuilder output = allocateStringBuilder(length);
for (int i = 0; i < length; i++) {
char c = input.charAt(i);
@@ -654,7 +654,7 @@ public static String cssString(String input) {
return null;
int length = input.length();
- StringBuilder output = allocateStringBuilder(input, length);
+ StringBuilder output = allocateStringBuilder(length);
for (int i = 0; i < length; i++) {
char c = input.charAt(i);
@@ -768,7 +768,7 @@ public static String sqlLikeClause(String input, char escape) {
return null;
int length = input.length();
- StringBuilder output = allocateStringBuilder(input, length);
+ StringBuilder output = allocateStringBuilder(length);
for (int i = 0; i < length; i++) {
char c = input.charAt(i);
@@ -782,10 +782,9 @@ public static String sqlLikeClause(String input, char escape) {
/**
- * Compute the allocation size of the StringBuilder based on the input and its
- * length.
+ * Compute the allocation size of the StringBuilder based on the length.
*/
- private static StringBuilder allocateStringBuilder(String input, int length) {
+ private static StringBuilder allocateStringBuilder(int length) {
// Allocate enough temporary buffer space to avoid reallocation in most
// cases. If you believe you will output large amount of data at once
// you might need to change the factor.

0 comments on commit 734934b

Please sign in to comment.