mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-25 18:41:44 +01:00
fixed shift operator per issue #335
This commit is contained in:
@@ -93,17 +93,12 @@ public final class LuceneUtils {
|
|||||||
* @return the escaped text.
|
* @return the escaped text.
|
||||||
*/
|
*/
|
||||||
public static String escapeLuceneQuery(final CharSequence text) {
|
public static String escapeLuceneQuery(final CharSequence text) {
|
||||||
|
|
||||||
if (text == null) {
|
if (text == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
final int size = text.length() << 1;
|
||||||
int size = text.length();
|
|
||||||
size = size >> 1;
|
|
||||||
final StringBuilder buf = new StringBuilder(size);
|
final StringBuilder buf = new StringBuilder(size);
|
||||||
|
|
||||||
appendEscapedLuceneQuery(buf, text);
|
appendEscapedLuceneQuery(buf, text);
|
||||||
|
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user