Skip to content

Commit ec2cb24

Browse files
committed
Merge pull request #4511 from gohai/fix-downloader
Fix Downloader
2 parents 26187af + 69bec8d commit ec2cb24

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

build/build.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,11 +835,11 @@
835835
-->
836836

837837
<!-- use the jre subfolder when having downloaded a JDK file -->
838-
<condition property="jre.dir" value="jdk${jdk.esoteric}/jre/">
838+
<condition property="jre.dir" value="jdk${jdk.esoteric}/jre">
839839
<!-- property might not be set, but it is for arm -->
840840
<equals arg1="${jre.download.jdk}" arg2="true" />
841841
</condition>
842-
<condition property="jre.dir" value="jre${jdk.esoteric}/">
842+
<condition property="jre.dir" value="jre${jdk.esoteric}">
843843
<not>
844844
<equals arg1="${jre.download.jdk}" arg2="true" />
845845
</not>

build/jre/src/Downloader.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ void download() throws IOException {
158158
}
159159
List<String> cookies = headers.get("Set-Cookie");
160160
conn = (HttpURLConnection) new URL(url).openConnection();
161-
for (String cookie : cookies) {
162-
conn.setRequestProperty("Cookie", cookie);
161+
if (cookies != null) {
162+
for (String cookie : cookies) {
163+
conn.setRequestProperty("Cookie", cookie);
164+
}
163165
}
164166
conn.setRequestProperty("Cookie", COOKIE);
165167
conn.connect();

0 commit comments

Comments
 (0)