Skip to content

Commit

Permalink
Adding junit5 runners - fix stream
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulienVa committed Nov 24, 2020
1 parent 2fe0ca4 commit e875fd3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 37 deletions.
79 changes: 45 additions & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<assertj.version>3.9.0</assertj.version>
<mockito.version>3.6.0</mockito.version>
<pitest.version>1.5.2</pitest.version>
<junit-jupiter.version>5.6.3</junit-jupiter.version>
</properties>

<scm>
Expand Down Expand Up @@ -119,6 +120,19 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>


<dependency>
<groupId>org.pitest</groupId>
Expand All @@ -137,8 +151,6 @@
</dependencies>

<build>


<plugins>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
Expand Down Expand Up @@ -166,38 +178,41 @@
</goals>
</execution>
</executions>
<configuration>
<jvmTarget>1.8</jvmTarget>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Implementation-Vendor>${project.groupId}</Implementation-Vendor>
<Implementation-Title>${project.artifactId}</Implementation-Title>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.11.2</version>
</dependency>
</dependencies>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>


<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-jar-plugin</artifactId>-->
<!-- <version>3.2.0</version>-->
<!-- <configuration>-->
<!-- <archive>-->
<!-- <manifest>-->
<!-- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>-->
<!-- </manifest>-->
<!-- <manifestEntries>-->
<!-- <Implementation-Vendor>${project.groupId}</Implementation-Vendor>-->
<!-- <Implementation-Title>${project.artifactId}</Implementation-Title>-->
<!-- </manifestEntries>-->
<!-- </archive>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <artifactId>maven-release-plugin</artifactId>-->
<!-- <version>2.5.3</version>-->
<!-- <dependencies>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.maven.scm</groupId>-->
<!-- <artifactId>maven-scm-provider-gitexe</artifactId>-->
<!-- <version>1.11.2</version>-->
<!-- </dependency>-->
<!-- </dependencies>-->
<!-- </plugin>-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -212,10 +227,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<executions>
<execution>
<id>compile</id>
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/pitest/kotlin/KotlinInterceptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ public InterceptorType type() {
public void begin(ClassTree clazz) {
currentClass = clazz;
isKotlinClass = clazz.annotations().stream()
.filter(annotationNode -> annotationNode.desc.equals("Lkotlin/Metadata;"))
.findFirst()
.isPresent();
.anyMatch(annotationNode -> annotationNode.desc.equals("Lkotlin/Metadata;"));
}

@Override
Expand Down

0 comments on commit e875fd3

Please sign in to comment.