Skip to content

Commit

Permalink
Fix Weld processing a beans.xml, e.g. enabling interceptors
Browse files Browse the repository at this point in the history
Signed-off-by: Arjan Tijms <arjan.tijms@gmail.com>
  • Loading branch information
arjantijms committed May 22, 2022
1 parent 0ae9225 commit d7822ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022, 2022 Contributors to Eclipse Foundation.
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -92,7 +93,7 @@ public Collection<Class<?>> getModuleBeanClassObjects() {

@Override
public BeansXml getBeansXml() {
return null;
return getModuleBda().getBeansXml();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2021, 2022 Contributors to the Eclipse Foundation
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand All @@ -17,7 +17,12 @@

package org.glassfish.weld;

import com.sun.enterprise.deployment.EjbDescriptor;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.expect;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.net.URI;
import java.net.URL;
Expand All @@ -34,13 +39,7 @@
import org.jboss.weld.bootstrap.spi.BeansXml;
import org.junit.jupiter.api.Test;

import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.expect;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertSame;
import static org.junit.jupiter.api.Assertions.assertTrue;
import com.sun.enterprise.deployment.EjbDescriptor;

/**
* @author <a href="mailto:j.j.snyder@oracle.com">JJ Snyder</a>
Expand Down Expand Up @@ -116,7 +115,6 @@ public void testConstructor() throws Exception {
assertEquals(WeldUtils.BDAType.UNKNOWN, rootBeanDeploymentArchive.getBDAType());
assertEquals(0, rootBeanDeploymentArchive.getBeanClasses().size());
assertEquals(0, rootBeanDeploymentArchive.getBeanClassObjects().size());
assertNull(rootBeanDeploymentArchive.getBeansXml());

BeanDeploymentArchiveImpl moduleBda = (BeanDeploymentArchiveImpl) rootBeanDeploymentArchive.getModuleBda();
assertNotNull(moduleBda);
Expand Down

0 comments on commit d7822ec

Please sign in to comment.