소스 검색

Remove deprecation from setTag and throw on subsequent calls

tags/8.1.0.beta1
Teemu Suo-Anttila 7 년 전
부모
커밋
b829146be0
2개의 변경된 파일10개의 추가작업 그리고 5개의 파일을 삭제
  1. 5
    4
      client/src/main/java/com/vaadin/client/ServerConnector.java
  2. 5
    1
      client/src/main/java/com/vaadin/client/ui/AbstractConnector.java

+ 5
- 4
client/src/main/java/com/vaadin/client/ServerConnector.java 파일 보기

@@ -221,19 +221,20 @@ public interface ServerConnector extends Connector {
* Sets the connector type tag for this connector. This should only be
* called from
* {@link WidgetSet#createConnector(int, ApplicationConfiguration)}
* <p>
* <strong>Note:</strong> This method is intended for internal use only.
*
* @see #getTag()
*
* @param tag
* the connector type tag
*
* @deprecated This is an internal method and should not be called by an
* application developer.
* @throws IllegalStateException
* if {@code tag} has already been set
*
* @since 8.1
*/
@Deprecated
public void setTag(int tag);
public void setTag(int tag) throws IllegalStateException;

/**
* Gets the connector type tag for this connector. This type tag is an

+ 5
- 1
client/src/main/java/com/vaadin/client/ui/AbstractConnector.java 파일 보기

@@ -61,7 +61,7 @@ public abstract class AbstractConnector

private ApplicationConnection connection;
private String id;
private int tag;
private int tag = -1;

private HandlerManager handlerManager;
private FastStringMap<HandlerManager> statePropertyHandlerManagers;
@@ -532,6 +532,10 @@ public abstract class AbstractConnector

@Override
public void setTag(int tag) {
if (this.tag >= 0) {
throw new IllegalStateException(
"Tag already set for this " + getClass().getSimpleName());
}
this.tag = tag;
}
}

Loading…
취소
저장