diff --git a/cpp/src/phonenumbers/phonenumberutil.h b/cpp/src/phonenumbers/phonenumberutil.h index 12e4ec7e6..54ae8bec2 100644 --- a/cpp/src/phonenumbers/phonenumberutil.h +++ b/cpp/src/phonenumbers/phonenumberutil.h @@ -422,7 +422,7 @@ class PhoneNumberUtil : public Singleton { // be successfully extracted. bool TruncateTooLongNumber(PhoneNumber* number) const; - // Gets the type of a phone number. + // Gets the type of a valid phone number, or UNKNOWN if it is invalid. PhoneNumberType GetNumberType(const PhoneNumber& number) const; // Tests whether a phone number matches a valid pattern. Note this doesn't diff --git a/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java b/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java index d36673333..9aa3152d9 100644 --- a/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java +++ b/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java @@ -2138,10 +2138,10 @@ public class PhoneNumberUtil { } /** - * Gets the type of a phone number. + * Gets the type of a valid phone number. * * @param number the phone number that we want to know the type - * @return the type of the phone number + * @return the type of the phone number, or UNKNOWN if it is invalid */ public PhoneNumberType getNumberType(PhoneNumber number) { String regionCode = getRegionCodeForNumber(number); diff --git a/javascript/i18n/phonenumbers/phonenumberutil.js b/javascript/i18n/phonenumbers/phonenumberutil.js index 87a9b007c..adef74b79 100644 --- a/javascript/i18n/phonenumbers/phonenumberutil.js +++ b/javascript/i18n/phonenumbers/phonenumberutil.js @@ -2807,11 +2807,12 @@ i18n.phonenumbers.PhoneNumberUtil.getNumberDescByType_ = /** - * Gets the type of a phone number. + * Gets the type of a valid phone number. * * @param {i18n.phonenumbers.PhoneNumber} number the phone number that we want * to know the type. - * @return {i18n.phonenumbers.PhoneNumberType} the type of the phone number. + * @return {i18n.phonenumbers.PhoneNumberType} the type of the phone number, or + * UNKNOWN if it is invalid. */ i18n.phonenumbers.PhoneNumberUtil.prototype.getNumberType = function(number) { diff --git a/pending_code_changes.txt b/pending_code_changes.txt index 8b1378917..4a2ec7d34 100644 --- a/pending_code_changes.txt +++ b/pending_code_changes.txt @@ -1 +1,2 @@ - +Code changes: + - Documentation fix for getNumberType