Skip to content

Commit

Permalink
WFLY-8695 WeldPortableExtensionProcessor should clean extension regis…
Browse files Browse the repository at this point in the history
…try on undeploy()
  • Loading branch information
rhusar committed May 6, 2017
1 parent 7398a11 commit 7fee6de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -26,7 +26,7 @@
*/
public class WeldPortableExtensions {

private static final AttachmentKey<WeldPortableExtensions> ATTACHMENT_KEY = AttachmentKey.create(WeldPortableExtensions.class);
public static final AttachmentKey<WeldPortableExtensions> ATTACHMENT_KEY = AttachmentKey.create(WeldPortableExtensions.class);

public static WeldPortableExtensions getPortableExtensions(final DeploymentUnit deploymentUnit) {
if (deploymentUnit.getParent() == null) {
Expand Down
Expand Up @@ -54,8 +54,6 @@
*/
public class WeldPortableExtensionProcessor implements DeploymentUnitProcessor {

private static final String[] EMPTY_STRING_ARRAY = {};

@Override
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
Expand Down Expand Up @@ -138,8 +136,10 @@ private Class<Extension> loadExtension(String serviceClassName, final ClassLoade
}

@Override
public void undeploy(DeploymentUnit context) {

public void undeploy(DeploymentUnit deploymentUnit) {
if (deploymentUnit.getParent() == null) {
deploymentUnit.removeAttachment(WeldPortableExtensions.ATTACHMENT_KEY);
}
}

}

0 comments on commit 7fee6de

Please sign in to comment.