Skip to content

Commit

Permalink
Merge pull request #18243 from brenthdaniel/removeBetaGuard16079
Browse files Browse the repository at this point in the history
Remove beta guarding
  • Loading branch information
brenthdaniel authored Aug 23, 2021
2 parents 48cf31d + a371731 commit 427439c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.ibm.ws.kernel.launch.service.PauseableComponent;
import com.ibm.ws.kernel.launch.service.PauseableComponentController;
import com.ibm.ws.kernel.launch.service.PauseableComponentControllerRequestFailedException;
import com.ibm.ws.kernel.productinfo.ProductInfo;

/**
* This service provides a means of delivering actions to Listeners.
Expand Down Expand Up @@ -431,7 +430,6 @@ public boolean isPaused(String targets) throws PauseableComponentControllerReque

@Override
public boolean isActive(String endpoints) {
betaFenceCheck();

Set<String> targetList = createTargetList(endpoints);

Expand All @@ -454,22 +452,6 @@ public boolean isActive(String endpoints) {
return false;
}

// Flag tells us if the message for a call to a beta method has been issued
private static boolean issuedBetaMessage = false;

private void betaFenceCheck() throws UnsupportedOperationException {
// Not running beta edition, throw exception
if (!ProductInfo.getBetaEdition()) {
throw new UnsupportedOperationException("This method is beta and is not available.");
} else {
// Running beta exception, issue message if we haven't already issued one for this class
if (!issuedBetaMessage) {
Tr.info(tc, "BETA: The beta method isActive has been invoked for the class " + this.getClass().getName() + " for the first time.");
issuedBetaMessage = !issuedBetaMessage;
}
}
}

/*
* (non-Javadoc)
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public interface PauseableComponentController {
/**
* Check if specific endpoints exist, have started, and are not paused.
*/
@Deprecated
boolean isActive(String targets);

}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public interface ServerEndpointControlMBean {
* @return If a single target is specified, returns true if the target exists, has started, and is not paused. If multiple targets are
* specified, returns true only if all specified targets exist, are started, and are not paused.
*/
@Deprecated
public boolean isActive(String targets);

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@
import org.osgi.service.component.annotations.ReferencePolicyOption;

import com.ibm.websphere.kernel.server.ServerEndpointControlMBean;
import com.ibm.websphere.ras.Tr;
import com.ibm.websphere.ras.TraceComponent;
import com.ibm.ws.kernel.launch.service.PauseableComponent;
import com.ibm.ws.kernel.launch.service.PauseableComponentController;
import com.ibm.ws.kernel.launch.service.PauseableComponentControllerRequestFailedException;
import com.ibm.ws.kernel.productinfo.ProductInfo;

/*
* Register this mbean as an osgi service
Expand Down Expand Up @@ -200,26 +197,8 @@ protected final String getDescription(MBeanOperationInfo info) {

@Override
public boolean isActive(String targets) {
betaFenceCheck();
return pauseableComponentController.isActive(targets);

}

// Flag tells us if the message for a call to a beta method has been issued
private static boolean issuedBetaMessage = false;
private static final TraceComponent tc = Tr.register(ServerEndpointControlMBeanImpl.class);

private void betaFenceCheck() throws UnsupportedOperationException {
// Not running beta edition, throw exception
if (!ProductInfo.getBetaEdition()) {
throw new UnsupportedOperationException("This method is beta and is not available.");
} else {
// Running beta exception, issue message if we haven't already issued one for this class
if (!issuedBetaMessage) {
Tr.info(tc, "BETA: The beta method isActive has been invoked for the class " + this.getClass().getName() + " for the first time.");
issuedBetaMessage = !issuedBetaMessage;
}
}
}

}

0 comments on commit 427439c

Please sign in to comment.