You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by gg...@apache.org on 2016/05/09 00:22:41 UTC
svn commit: r1742856 -
/xalan/java/branches/xalan-j_2_7_1_maint/src/org/apache/xml/utils/XMLCharacterRecognizer.java
Author: ggregory
Date: Mon May 9 00:22:41 2016
New Revision: 1742856
URL: http://svn.apache.org/viewvc?rev=1742856&view=rev
Log:
Deprecations will be replaced by {@link #isWhiteSpace(CharSequence)} in the next major release.
Modified:
xalan/java/branches/xalan-j_2_7_1_maint/src/org/apache/xml/utils/XMLCharacterRecognizer.java
Modified: xalan/java/branches/xalan-j_2_7_1_maint/src/org/apache/xml/utils/XMLCharacterRecognizer.java
URL: http://svn.apache.org/viewvc/xalan/java/branches/xalan-j_2_7_1_maint/src/org/apache/xml/utils/XMLCharacterRecognizer.java?rev=1742856&r1=1742855&r2=1742856&view=diff
==============================================================================
--- xalan/java/branches/xalan-j_2_7_1_maint/src/org/apache/xml/utils/XMLCharacterRecognizer.java (original)
+++ xalan/java/branches/xalan-j_2_7_1_maint/src/org/apache/xml/utils/XMLCharacterRecognizer.java Mon May 9 00:22:41 2016
@@ -69,6 +69,28 @@ public class XMLCharacterRecognizer
* @param buf StringBuffer to check as XML whitespace.
* @return True if characters in buffer are XML whitespace, false otherwise
*/
+ public static boolean isWhiteSpace(CharSequence buf)
+ {
+
+ int n = buf.length();
+
+ for (int i = 0; i < n; i++)
+ {
+ if (!isWhiteSpace(buf.charAt(i)))
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Detects if the string is whitespace.
+ *
+ * @param buf StringBuffer to check as XML whitespace.
+ * @return True if characters in buffer are XML whitespace, false otherwise
+ * @deprecated Will be replaced by {@link #isWhiteSpace(CharSequence)} in the next major release.
+ */
+ @Deprecated
public static boolean isWhiteSpace(StringBuffer buf)
{
@@ -88,7 +110,9 @@ public class XMLCharacterRecognizer
*
* @param s String to check as XML whitespace.
* @return True if characters in buffer are XML whitespace, false otherwise
+ * @deprecated Will be replaced by {@link #isWhiteSpace(CharSequence)} in the next major release.
*/
+ @Deprecated
public static boolean isWhiteSpace(String s)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xalan.apache.org
For additional commands, e-mail: commits-help@xalan.apache.org