Skip to content

Commit

Permalink
[UNDERTOW-2526] Deprecate DeploymentInfo methods dealing with async c…
Browse files Browse the repository at this point in the history
…ontext timeout containing typo and introduce new alternatives without typo.
  • Loading branch information
ropalka committed Nov 18, 2024
1 parent b44a1c3 commit 4e3d58b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
20 changes: 18 additions & 2 deletions servlet/src/main/java/io/undertow/servlet/api/DeploymentInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,18 +320,34 @@ public DeploymentInfo setDefaultSessionTimeout(final int defaultSessionTimeout)
return this;
}

public long getDefaultAsyncConextTimeout() {
public long getDefaultAsyncContextTimeout() {
return defaultAsyncContextTimeout;
}

/**
* @param defaultAsyncContextTimeout The default async context timeout, in milliseconds
*/
public DeploymentInfo setDefaultAsyncConextTimeout(final long defaultAsyncContextTimeout) {
public DeploymentInfo setDefaultAsyncContextTimeout(final long defaultAsyncContextTimeout) {
this.defaultAsyncContextTimeout = defaultAsyncContextTimeout;
return this;
}

/**
* @deprecated use {@link #getDefaultAsyncContextTimeout()} method instead
*/
@Deprecated
public long getDefaultAsyncConextTimeout() {
return getDefaultAsyncContextTimeout();
}

/**
* @deprecated use {@link #setDefaultAsyncContextTimeout(long)} method instead
*/
@Deprecated
public DeploymentInfo setDefaultAsyncConextTimeout(final long defaultAsyncContextTimeout) {
return setDefaultAsyncContextTimeout(defaultAsyncContextTimeout);
}

public String getDefaultEncoding() {
return defaultEncoding;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ public void run() {
}
});
//If its chain and non default value is set, use it
if(previousAsyncContext!=null && previousAsyncContext.getTimeout() != servletRequestContext.getDeployment().getDeploymentInfo().getDefaultAsyncConextTimeout()) {
if(previousAsyncContext!=null && previousAsyncContext.getTimeout() != servletRequestContext.getDeployment().getDeploymentInfo().getDefaultAsyncContextTimeout()) {
this.timeout = previousAsyncContext.getTimeout();
} else {
this.timeout = servletRequestContext.getDeployment().getDeploymentInfo().getDefaultAsyncConextTimeout();
this.timeout = servletRequestContext.getDeployment().getDeploymentInfo().getDefaultAsyncContextTimeout();
}
}

Expand Down

0 comments on commit 4e3d58b

Please sign in to comment.