Change DefaultChannelId visibility to default. Related to [#5053]

Motivation:

There is no need to make DefaultChannelId package private as it may be useful for the user. For example EmbeddedChannel allows to inject a ChannelId when it is constructed. For this case the user can just use DefaultChannelId.

Modifications:

Change visibility of DefaultChannelId to public.

Result:

It's possible to create a new instance of DefaultChannelId by the user.
This commit is contained in:
Norman Maurer 2016-03-29 11:34:13 +02:00
parent cee38ed2b6
commit 2facb7affd

View File

@ -33,7 +33,7 @@ import java.util.regex.Pattern;
/**
* The default {@link ChannelId} implementation.
*/
final class DefaultChannelId implements ChannelId {
public final class DefaultChannelId implements ChannelId {
private static final long serialVersionUID = 3884076183504074063L;
@ -53,7 +53,10 @@ final class DefaultChannelId implements ChannelId {
private static final AtomicInteger nextSequence = new AtomicInteger();
static ChannelId newInstance() {
/**
* Returns a new {@link DefaultChannelId} instance.
*/
public static DefaultChannelId newInstance() {
DefaultChannelId id = new DefaultChannelId();
id.init();
return id;
@ -184,6 +187,8 @@ final class DefaultChannelId implements ChannelId {
private transient String shortValue;
private transient String longValue;
private DefaultChannelId() { }
private void init() {
int i = 0;