Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/utilities/general/StringUtilities.java

Issue 128443003: Analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/utilities/general/StringUtilities.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/utilities/general/StringUtilities.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/utilities/general/StringUtilities.java
index b7ece63e85e8ff5551795c128d1799c0350c16d9..ed693c4aeebfc863c140762f78b6d29747146cb8 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/utilities/general/StringUtilities.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/utilities/general/StringUtilities.java
@@ -104,11 +104,10 @@ public final class StringUtilities {
/**
* <p>
- * Checks if the CharSequence can be used as a tag name.
+ * Checks if the String can be used as a tag name.
* </p>
* <p>
- * {@code null} will return {@code false}. An empty CharSequence (length()=0) will return
- * {@code false}.
+ * {@code null} will return {@code false}. An empty String (length()=0) will return {@code false}.
* </p>
*
* <pre>
@@ -121,16 +120,16 @@ public final class StringUtilities {
* StringUtils.isAlpha("ab-c") = true
* </pre>
*
- * @param cs the CharSequence to check, may be null
+ * @param s the String to check, may be null
* @return {@code true} if can be used as a tag name, and is non-null
*/
- public static boolean isTagName(CharSequence cs) {
- if (cs == null || cs.length() == 0) {
+ public static boolean isTagName(String s) {
+ if (s == null || s.length() == 0) {
return false;
}
- int sz = cs.length();
+ int sz = s.length();
for (int i = 0; i < sz; i++) {
- char c = cs.charAt(i);
+ char c = s.charAt(i);
if (!Character.isLetter(c)) {
if (i == 0) {
return false;

Powered by Google App Engine
This is Rietveld 408576698