Skip to content

Commit e6db46b

Browse files
authored
Merge pull request #8 from sbabcoc/pr/change-artifact-name
Change uber-JAR classifier; fix slot matcher
2 parents e10c83a + 91272ee commit e6db46b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/assembly/assembly.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"
22
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd">
4-
<id>jar-with-deps</id>
4+
<id>grid-extension</id>
55
<formats>
66
<format>jar</format>
77
</formats>

src/main/java/org/openqa/selenium/htmlunit/remote/HtmlUnitSlotMatcher.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package org.openqa.selenium.htmlunit.remote;
22

3-
import java.io.Serializable;
43
import org.openqa.selenium.Capabilities;
5-
import org.openqa.selenium.grid.data.SlotMatcher;
4+
import org.openqa.selenium.grid.data.DefaultSlotMatcher;
65
import org.openqa.selenium.remote.Browser;
76

8-
public class HtmlUnitSlotMatcher implements SlotMatcher, Serializable {
7+
public class HtmlUnitSlotMatcher extends DefaultSlotMatcher {
98

109
private static final long serialVersionUID = 1L;
1110

@@ -20,7 +19,11 @@ public boolean matches(Capabilities stereotype, Capabilities capabilities) {
2019
return false;
2120
}
2221

23-
return Browser.HTMLUNIT.is(capabilities);
22+
if (Browser.HTMLUNIT.is(stereotype) && Browser.HTMLUNIT.is(capabilities)) {
23+
return true;
24+
}
25+
26+
return super.matches(stereotype, capabilities);
2427
}
2528

2629
private Boolean managedDownloadsEnabled(Capabilities stereotype, Capabilities capabilities) {

0 commit comments

Comments
 (0)