This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Alpha AU server XML files truncated | ||
---|---|---|---|
Product: | www | Reporter: | _ mihmax <mihmax> |
Component: | Builds & Repositories | Assignee: | rbalada <rbalada> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 33098 | ||
Attachments: |
Shortened ide.log
Patch for nbbuild/antsrc/org/netbeans/nbbuild/MakeUpdateDesc.java to flush streams |
Description
_ mihmax
2003-04-27 08:37:39 UTC
Created attachment 10171 [details]
Shortened ide.log
*** This issue has been marked as a duplicate of 33097 *** Not a duplicate. Recently the alpha AU server files have been truncated. dev_1.6_.xml is empty. 35_1.6_.xml ends suddenly halfway through. Guilty logs: [35_1.6_.xml] revision 1.10 date: 2003/04/26 03:06:12; author: rbalada; state: Exp; lines: +1041 -7393 Automatically updated during NetBeans release35 200304252350 build [dev_1.6_.xml] revision 1.8 date: 2003/04/26 04:10:47; author: rbalada; state: Exp; lines: +0 -8478 Automatically updated during NetBeans dev 200304260100 build Once again, I would suggest that issue #31961 be implemented - it should be rather easy - as that would cause the build to signal an immediate error in case bogus or ill-formed update server XML files are being created, rather than waiting for someone to discover the problem manually. Or for the short term (3.5), even without changes to the task, it should be simple to run <validatexml> on the generated files. This is my bug. I'm testing new infrastructure and it looks like conflict between the infrastructures. The very first investigation discovered, that 35_1.6_.xml file is 90112 bytes long, what is (64 + 24) * 1024. Maybe some buffer/filestream is not properly flushed before close. Related fix done in trunk. nbcvs ci -m "Issue 33264. Added OutputStream and PrintWriter flush () right before their close()" antsrc/org/netbeans/nbbuild/MakeUpdateDesc.java Checking in antsrc/org/netbeans/nbbuild/MakeUpdateDesc.java; /cvs/nbbuild/antsrc/org/netbeans/nbbuild/MakeUpdateDesc.java,v <-- MakeUpdateDesc.java new revision: 1.15; previous revision: 1.14 done Processing log script arguments... Mailing the commit message to cvs@nbbuild.netbeans.org (from rbalada@netbeans.org) Created attachment 10174 [details]
Patch for nbbuild/antsrc/org/netbeans/nbbuild/MakeUpdateDesc.java to flush streams
pw.flush() is probably useless. Writer's generally are documented that close() implies a flush() first, and in fact PW.close calls here OutputStreamWriter.close, which ultimately calls OS.close, after writing all remaining converted characters; and FileOutputStream.flush according to JDK 1.4 sources does nothing (no buffering). So calling os.flush is probably useless as well. The Javadoc for OutputStream.close does not explicitly state that there is an implied flush first (as Writer does), but I think that is the intent - e.g. FilteredOutputStream's close (used also by BufferedOutputStream, which *does* implement flush) does an automatic flush before closing. Probably the calls to os.close() are gratuitous as well - just calling pw.close() should suffice. Calling os.close() *afterwards* should be harmless however. So I am not sure the attached patch will do anything at all - the code may have been correct without it. Were you able to reproduce the creation of the truncated files and confirm that the patched <makeupdatedesc> works correctly? If not, there may be some other problem. Currently looks like the 3.5 version is OK but the dev version is still broken (empty). What is going on? Progress? I'm sorry, I was on vacations last five days. Looking into that right now. Fixed for trunk builds. The trunk builds are run on another build infrastructure which was changed a little bit from the one used for release35 build. Results: 1) L10N modules have been put into separate module groups (folders) by language (no more "garbage" in the root) 2) dev_1.6_.xml is actually 435737 bytes long I was able to successfully work with dev/release35 alpha update centres on J2SDK 1.4.1, from NetBeans dev build 200305050100 and release35 2003292350 (RC1). Please verify. Dev server seems OK. Did not try the r35 server. |