Skip to content
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

Bump edu.hm.hafner:codingstyle-pom from 4.5.0 to 4.12.0 #1765

Merged
merged 2 commits into from
Jun 7, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import java.nio.charset.Charset;
import java.util.Optional;

import edu.hm.hafner.util.Ensure;

import org.jenkinsci.plugins.workflow.graph.FlowNode;
import org.jenkinsci.plugins.workflow.steps.StepContext;
import org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution;
Expand Down Expand Up @@ -136,6 +138,14 @@ protected Charset getCharset(final String charset) {
}

protected PipelineResultHandler createResultHandler() throws IOException, InterruptedException {
return new PipelineResultHandler(getRun(), getContext().get(FlowNode.class));
return new PipelineResultHandler(getRun(), getFlowNode());
}

private FlowNode getFlowNode() throws IOException, InterruptedException {
var flowNode = getContext().get(FlowNode.class);

Ensure.that(flowNode).isNotNull("FlowNode is not defined in the context of " + this);

return flowNode;
}
}
2 changes: 1 addition & 1 deletion ui-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>edu.hm.hafner</groupId>
<artifactId>codingstyle-pom</artifactId>
<version>4.5.0</version>
<version>4.12.0</version>
<relativePath/>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ By getXpath() {
* @throws NoSuchElementException
* if the tab could not be found
*/
@SuppressWarnings("PMD.UnnecessaryFullyQualifiedName") // false positives
static Tab valueWithHref(final String href) {
for (Tab tab : Tab.values()) {
if (tab.contentId.equals(href.substring(1))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class AnalysisSummary extends PageObject {
* @param id
* the type of the result page (e.g. simian, checkstyle, cpd, etc.)
*/
@SuppressWarnings("PMD.ConstructorCallsOverridableMethod")
public AnalysisSummary(final Build parent, final String id) {
super(parent, parent.url(id));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class DashboardTable extends PageObject {
* the type of the result page (e.g. simian, checkstyle, cpd, etc.)
*/
@SuppressFBWarnings("MC")
@SuppressWarnings("PMD.ConstructorCallsOverridableMethod")
public DashboardTable(final Build parent, final URL url) {
super(parent, url);

Expand Down Expand Up @@ -63,7 +64,7 @@ public DashboardTable(final Build parent, final URL url) {

List<List<List<String>>> lines = rows.stream().skip(1)
.map(dom -> dom.findElements(by.tagName("td")).stream().map(td -> {
if (td.findElements(by.tagName("a")).size() == 0) {
if (td.findElements(by.tagName("a")).isEmpty()) {
return Arrays.asList(td.getText(), null);
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ private WebElement findCell(final WebElement table, final String name) {
for (WebElement row : rows) {
if (row.getAttribute("id").startsWith("job_")) {
return row.findElement(By.xpath("td[" + columnIndex + "]"));

}
}
throw new NoSuchElementException("Cannot find a valid project row");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,4 @@ public String getUrl(final String prefix) {
}
return prefix + "/" + url;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void shouldShowConfiguredToolOnlyWithLink() {

private void addCheckStyle(final FreeStyleJob job) {
job.addPublisher(IssuesRecorder.class, recorder -> {
recorder.setTool(UiTest.CHECKSTYLE_TOOL);
recorder.setTool(CHECKSTYLE_TOOL);
recorder.setEnabledForFailure(true);
});
}
Expand Down
Loading