Skip to content

Commit

Permalink
Use Comparator.comparing where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Jan 3, 2023
1 parent 78e7b3c commit 17b4ffe
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@
*/
public class ReferenceRenderer extends AbstractMavenReportRenderer {
private final Document taglibXml;
private static final Comparator<Element> SORT_BY_NAME = new Comparator<Element>() {
@Override
public int compare(Element o1, Element o2) {
return o1.attributeValue("name").compareTo(o2.attributeValue("name"));
}
};
private static final Comparator<Element> SORT_BY_NAME = Comparator.comparing(o -> o.attributeValue("name"));

public ReferenceRenderer(Sink sink, URL taglibXml) throws DocumentException {
super(sink);
Expand Down

0 comments on commit 17b4ffe

Please sign in to comment.