mirror of https://github.com/jwtk/jjwt.git
Switched from jacoco to open-clover. Updated GzipCompressionCodec to improve coverage report.
This commit is contained in:
parent
8797f1d04f
commit
9aec59c4d9
|
@ -15,5 +15,5 @@ install: echo "No need to run mvn install -DskipTests then mvn install. Running
|
|||
script: mvn install
|
||||
|
||||
after_success:
|
||||
- test -z "$BUILD_COVERAGE" || mvn clean test jacoco:report coveralls:report
|
||||
- test -z "$BUILD_COVERAGE" || mvn clean test -Pclover.report coveralls:report
|
||||
|
||||
|
|
59
pom.xml
59
pom.xml
|
@ -73,6 +73,7 @@
|
|||
<junit.version>4.12</junit.version>
|
||||
<powermock.version>1.6.6</powermock.version>
|
||||
<failsafe.plugin.version>2.19.1</failsafe.plugin.version>
|
||||
<clover.version>4.2.0</clover.version>
|
||||
|
||||
</properties>
|
||||
|
||||
|
@ -269,24 +270,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.7.9</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/io/jsonwebtoken/lang/*</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>prepare-agent</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
|
@ -403,5 +386,45 @@
|
|||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>clover.report</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.openclover</groupId>
|
||||
<artifactId>clover-maven-plugin</artifactId>
|
||||
<version>${clover.version}</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/*Test*</exclude>
|
||||
<exclude>**/*IT*</exclude>
|
||||
<!-- leaving out lang as it mostly comes from other sources -->
|
||||
<exclude>io/jsonwebtoken/lang/*</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>clover</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>instrument</goal>
|
||||
<goal>check</goal>
|
||||
<goal>clover</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.openclover</groupId>
|
||||
<artifactId>clover-maven-plugin</artifactId>
|
||||
<version>${clover.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
|
|
@ -50,9 +50,10 @@ public class GzipCompressionCodec extends AbstractCompressionCodec implements Co
|
|||
inputStream = new ByteArrayInputStream(compressed);
|
||||
gzipInputStream = new GZIPInputStream(inputStream);
|
||||
outputStream = new ByteArrayOutputStream();
|
||||
int read;
|
||||
while ((read = gzipInputStream.read(buffer)) != -1) {
|
||||
int read = gzipInputStream.read(buffer);
|
||||
while (read != -1) {
|
||||
outputStream.write(buffer, 0, read);
|
||||
read = gzipInputStream.read(buffer);
|
||||
}
|
||||
return outputStream.toByteArray();
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue