Adding a note about LUCENE-4020 issue. Spelling corrections.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1330051 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dawid Weiss 2012-04-24 22:30:27 +00:00
parent c0a94ba5f8
commit 0f08c5a3f9
2 changed files with 12 additions and 6 deletions

View File

@ -1318,14 +1318,20 @@ public abstract class LuceneTestCase extends Assert {
return new Field(name, value, newType);
}
/** return a random Locale from the available locales on the system */
/**
* Return a random Locale from the available locales on the system.
* @see "https://issues.apache.org/jira/browse/LUCENE-4020"
*/
public static Locale randomLocale(Random random) {
Locale locales[] = Locale.getAvailableLocales();
return locales[random.nextInt(locales.length)];
}
/** return a random TimeZone from the available timezones on the system */
/**
* Return a random TimeZone from the available timezones on the system
* @see "https://issues.apache.org/jira/browse/LUCENE-4020"
*/
public static TimeZone randomTimeZone(Random random) {
String tzIds[] = TimeZone.getAvailableIDs();
return TimeZone.getTimeZone(tzIds[random.nextInt(tzIds.length)]);

View File

@ -48,17 +48,17 @@ public final class TimeZoneUtils {
/**
* This method is provided as a replacement for TimeZone.getTimeZone but
* with out the anoying behavior of returning "GMT" for gibberish input.
* without the annoying behavior of returning "GMT" for gibberish input.
* <p>
* This method will return null unless the input is either:
* </p>
* <ul>
* <li>Included in the set of known TimeZone IDs
* <li>Included in the set of known TimeZone IDs</li>
* <li>A "CustomID" specified as a numeric offset from "GMT"</li>
* </ul>
*
* @param ID Either a TimeZone ID found in KNOWN_TIMEZONE_IDS, or a "CustomID" specified as a GMT offset.
* @return A TImeZone object corrisponding to the input, or null if no such TimeZone is supported.
* @return A TimeZone object corresponding to the input, or null if no such TimeZone is supported.
* @see #KNOWN_TIMEZONE_IDS
* @see TimeZone
*/