Making CharRange non-public. LANG-689

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1090427 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2011-04-08 20:17:10 +00:00
parent 4458775718
commit 235040fa98
3 changed files with 8 additions and 3 deletions

View File

@ -29,7 +29,9 @@ import java.util.NoSuchElementException;
* @since 1.0
* @version $Id$
*/
public final class CharRange implements Iterable<Character>, Serializable {
// TODO: This is no longer public and will be removed later as CharSet is moved
// to depend on Range.
final class CharRange implements Iterable<Character>, Serializable {
/**
* Required for serialization support. Lang version 2.0.

View File

@ -206,7 +206,9 @@ public class CharSet implements Serializable {
* @return an array of immutable CharRange objects
* @since 2.0
*/
public CharRange[] getCharRanges() {
// NOTE: This is no longer public as CharRange is no longer a public class.
// It may be replaced when CharSet moves to Range.
/*public*/ CharRange[] getCharRanges() {
return set.toArray(new CharRange[set.size()]);
}

View File

@ -37,7 +37,8 @@ public class CharRangeTest extends TestCase {
//-----------------------------------------------------------------------
public void testClass() {
assertEquals(true, Modifier.isPublic(CharRange.class.getModifiers()));
// class changed to non-public in 3.0
assertEquals(false, Modifier.isPublic(CharRange.class.getModifiers()));
assertEquals(true, Modifier.isFinal(CharRange.class.getModifiers()));
}