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.
E.g. http://www.netbeans.org/updates/alpha/dev_alpha_daily.ent is full of modules that have no major version number yet have localizations. E.g.: <module codenamebase="org.apache.tools.ant.module.docs" license="russian_l10n-nbm-license.txt" downloadsize="3905" > <l10n langcode="ru" module_spec_version="2.9" OpenIDE-Module-Name="..." OpenIDE-Module-Long-Description="..." /> </module> This is permitted according to the DTD ("-//NetBeans//DTD Autoupdate Catalog 2.0//EN") and makes sense. However when parsing the file, AU throws an exception (attached). Fix should be simple. This code in L10NUpdate.java is wrong: majorversion = Integer.parseInt( getAttribute( n, "module_major_version" ) ); // NOI18N should be: String mmv = getAttribute(n, "module_major_version"); if (mmv != null) { majorversion = Integer.parseInt(mmv); } else { majorversion = -1; } Note that the same block of code also assumes that module_spec_version is defined (or an NPE will be thrown). The DTD permits it to be absent, however common sense requires that it be present - note that OpenIDE-Module-Specification-Version is required for <manifest>. I consider this a bug in the DTD and hopefully no actual <l10n> element is missing this attr.
Created attachment 10050 [details] Stack trace
Hmm in this case I would rather suggest to change the DTD. I don't think that if someone does major update to the module, such that it will change major version, all bundles will remain untouched. But I can try to implement your patch. Not sure however whether it will be allowed to go into 3.5. The obvious and easy workaround would of course be to add major version to all modules on the AU server.
OK the fix seems to be lightwight so let's do it for 3.5
Created attachment 10077 [details] Patch for the fix proposed by Jesse
Created attachment 10078 [details] Patch for the fix proposed bu Jesse
Fixed in main trunk.
Created attachment 10084 [details] Binary patch for relase35 - for testing
Crated an binary patch for release3.5 and adding Lukas Hasik to CC to test the patch in release35. Please replace the zipped class in AU module jar and create new AU server with url: http://www.netbeans.org/updates/alpha/dev_alpha_daily_ent.xml It should work without thorowing any exceptions.
Hrebejku, no verification, no review so far but I trust you :-) Approved for 3.5
patch verified
Surry, should be considered reviewed by Jesse as I'm only implementing his siggested fix.
Merged into release 53
"Hmm in this case I would rather suggest to change the DTD. I don't think that if someone does major update to the module, such that it will change major version, all bundles will remain untouched." - not sure what you're saying, or what DTD change you are suggesting. Some modules have major versions, some do not. All modules on AU must have spec versions. So, the DTD includes version info in the update, consisting of a mandatory spec version and an optional major version. What is wrong with that? "The obvious and easy workaround would of course be to add major version to all modules on the AU server." - this doesn't make any sense IMHO. Modules such as org.openide.execution have no major version, and they shouldn't have one because they are pure library modules and we do not plan to make incompatible major releases (we would use compat bridges instead).
For the record, I looked at the patch and it looks fine. Does it work? If so, someone (Lukas?) please mark VERIFIED.
yes, patch works fine - no exception after replace of L10NUpdate class. marking VERIFIED