Skip to content

Commit

Permalink
Imps: 1. more java 17 features used
Browse files Browse the repository at this point in the history
  • Loading branch information
galaxyeye committed Oct 14, 2022
1 parent 655d0b6 commit 91ba0cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>ai.platon.template</groupId>
<artifactId>pulsar-java-template</artifactId>
<artifactId>pulsar-java-17-template</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>

Expand Down Expand Up @@ -36,8 +36,8 @@
<version>3.10.1</version>
<configuration>
<source>17</source>
<target>11</target>
<release>11</release>
<target>17</target>
<release>17</release>
</configuration>
</plugin>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/platon/template/BasicUsage.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static void main(String[] args) {
document.selectFirstOptional("title").ifPresent(System.out::println);

System.out.println("== pages");
System.out.println(pages.stream().map(WebPage::getUrl).collect(Collectors.toList()));
System.out.println(pages.stream().map(WebPage::getUrl).toList());

var gson = new Gson();
System.out.println("== fields");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/platon/template/ContinuousCrawler.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static void main(String[] args) {
var urls = LinkExtractors.fromResource("seeds10.txt")
.stream()
.map(seed -> new ParsableHyperlink(seed, ContinuousCrawler::onParse))
.collect(Collectors.toList());
.toList();
var context = PulsarContexts.create();
// feel free to submit millions of urls here
// ...
Expand Down

0 comments on commit 91ba0cd

Please sign in to comment.