Skip to content

Commit 621317a

Browse files
committed
fix for GRAILS-5595 "Bug in sun.net.www.protocol.file.FileURLConnection#getLasModified() causes obscure build failure"
1 parent c4cb2af commit 621317a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/java/org/codehaus/groovy/grails/plugins/DefaultGrailsPlugin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ private void initializeModifiedTimes() throws IOException {
511511
URLConnection c = r.getURL().openConnection();
512512
c.setDoInput(false);
513513
c.setDoOutput(false);
514+
c.connect();
514515
modifiedTimes[i] = c.getLastModified();
515516
}
516517
}

src/java/org/codehaus/groovy/grails/web/pages/GroovyPagesTemplateEngine.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ private long establishLastModified(Resource resource) {
492492

493493
urlc.setDoInput(false);
494494
urlc.setDoOutput(false);
495+
urlc.connect();
495496

496497
lastModified = urlc.getLastModified();
497498
} catch (FileNotFoundException fnfe) {

0 commit comments

Comments
 (0)