Fixing nullability annotations on Util.escape.

This commit is contained in:
Jesse Glick committed 2018-02-05 23:43:54 +01:00
1 parent 01a65588f6
commit 7f839d8277
1 file changed
+2 -2
+2 -2
View File
@@ -1094,8 +1094,8 @@ public class Util {
/**
* Escapes HTML unsafe characters like <, & to the respective character entities.
*/
@Nonnull
public static String escape(@Nonnull String text) {
@Nullable
public static String escape(@CheckForNull String text) {
if (text==null) return null;
StringBuilder buf = new StringBuilder(text.length()+64);
for( int i=0; i<text.length(); i++ ) {