Compare commits

...

3 Commits

Author SHA1 Message Date
Andreas Dangel
fdf162382b [maven-release-plugin] prepare release pmd_releases/5.5.7 2017-04-29 21:46:53 +02:00
Andreas Dangel
ecf5bcb48b Prepare pmd release 5.5.7 2017-04-29 21:40:54 +02:00
Andreas Dangel
25e840cd68 Disable caching for URLConnections
Fixes #364, refs #337

(cherry picked from commit 9fae304b6f895d9d517842e720622fd1ca68188e)
2017-04-29 21:30:07 +02:00
28 changed files with 35 additions and 60 deletions

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -11,7 +11,6 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.JarURLConnection;
import java.net.URL;
import java.net.URLConnection;
@ -96,27 +95,12 @@ public final class ResourceLoader {
return null;
} else {
final URLConnection connection = resource.openConnection();
// This avoids reusing the underlaying file, if the resource is loaded from a Jar file.
// The file is closed with the input stream then thus not leaving a leaked resource behind.
// See https://github.com/pmd/pmd/issues/364 and https://github.com/pmd/pmd/issues/337
connection.setUseCaches(false);
final InputStream inputStream = connection.getInputStream();
if (connection instanceof JarURLConnection) {
// Wrap the InputStream to also close the underlying JarFile if from a JarURLConnection.
// See https://github.com/pmd/pmd/issues/337
return new InputStream() {
@Override
public int read() throws IOException {
return inputStream.read();
}
@Override
public void close() throws IOException {
inputStream.close();
if (connection instanceof JarURLConnection) {
((JarURLConnection) connection).getJarFile().close();
}
}
};
} else {
return inputStream;
}
return inputStream;
}
} catch (IOException e1) {
// Ignored

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -8,7 +8,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
</parent>
<properties>

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd</artifactId>
<version>5.5.7-SNAPSHOT</version>
<version>5.5.7</version>
<packaging>pom</packaging>
<name>PMD</name>
@ -234,7 +234,7 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
<connection>scm:git:git://github.com/pmd/pmd.git</connection>
<developerConnection>scm:git:ssh://git@github.com/pmd/pmd.git</developerConnection>
<url>https://github.com/pmd/pmd</url>
<tag>HEAD</tag>
<tag>pmd_releases/5.5.7</tag>
</scm>
<distributionManagement>
<snapshotRepository>

View File

@ -1,22 +1,13 @@
# PMD Release Notes
## ????? - 5.5.7-SNAPSHOT
## 29-April-2017 - 5.5.7
The PMD team is pleased to announce PMD 5.5.7.
This is a bug fixing release.
### Table Of Contents
* [New and noteworthy](#New_and_noteworthy)
* [Fixed Issues](#Fixed_Issues)
* [API Changes](#API_Changes)
* [External Contributions](#External_Contributions)
### New and noteworthy
### Fixed Issues
### API Changes
* General
* [#364](https://github.com/pmd/pmd/issues/364): \[core] Stream closed exception when running through maven
### External Contributions