Skip to content

Use Weld SE 2.4.4.Final #1166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<webbit.version>0.4.15</webbit.version>
<webbit-rest.version>0.3.0</webbit-rest.version>
<jruby.version>9.1.5.0</jruby.version>
<weld-se.version>2.3.5.Final</weld-se.version>
<weld-se.version>2.4.4.Final</weld-se.version>
<cdi-api.version>1.2</cdi-api.version>
<openejb-core.version>4.7.4</openejb-core.version>
<needle.version>2.2</needle.version>
Expand Down
12 changes: 7 additions & 5 deletions weld/src/main/java/cucumber/runtime/java/weld/WeldFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import org.jboss.weld.environment.se.Weld;
import org.jboss.weld.environment.se.WeldContainer;

public class WeldFactory extends Weld implements ObjectFactory {
public class WeldFactory implements ObjectFactory {

private WeldContainer weld;
private WeldContainer containerInstance;

@Override
public void start() {
try {
weld = super.initialize();
containerInstance = new Weld().initialize();
} catch (IllegalArgumentException e) {
throw new CucumberException("" +
"\n" +
Expand All @@ -31,7 +31,9 @@ public void start() {
@Override
public void stop() {
try {
this.shutdown();
if (containerInstance.isRunning()) {
containerInstance.close();
}
} catch (NullPointerException npe) {
System.err.println("" +
"\nIf you have set enabled=false in org.jboss.weld.executor.properties and you are seeing\n" +
Expand All @@ -49,6 +51,6 @@ public boolean addClass(Class<?> clazz) {

@Override
public <T> T getInstance(Class<T> type) {
return weld.instance().select(type).get();
return containerInstance.select(type).get();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ Feature: Cukes

Scenario: Eat some cukes
Given I have 4 cukes in my belly
Then there are 4 cukes in my belly
Then there are 4 cukes in my belly

Scenario: Eat some more cukes
Given I have 6 cukes in my belly
Then there are 6 cukes in my belly