Skip to content

Commit

Permalink
feat(#199): fix code offences
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Jan 9, 2025
1 parent 9968f2c commit 4bf47eb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/org/eolang/lints/LtByXsl.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,8 @@ private int lineno(final XML defect) {
* <a href="https://github.com/jcabi/jcabi-xml/issues/289">jcabi/jcabi-xml#289</a>.
*/
private static String findName(final XML program) {
return Optional.of(
program.inner().getFirstChild()
).map(Node::getAttributes)
.map(attrs -> attrs.getNamedItem("name"))
return Optional.of(program.inner().getFirstChild())
.map(Node::getAttributes).map(attrs -> attrs.getNamedItem("name"))
.map(Node::getTextContent).orElse("unknown");
}

Expand Down

0 comments on commit 4bf47eb

Please sign in to comment.