Bug 222483 - Incorrectly merged property bundles
Incorrectly merged property bundles
Status: VERIFIED FIXED
Product: ide
Classification: Unclassified
Component: Features On Demand
7.3
PC Linux
: P1 (vote)
: 7.3
Assigned To: Jaroslav Tulach
issues@performance
: 73_HR_FIX
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-20 16:11 UTC by Jan Lahoda
Modified: 2013-01-19 00:03 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2012-11-20 16:11:55 UTC
When a bundle key's value is split across several lines, the ide.ergonomics will copy only the first line into its merged bundle, and because of this the next key will be missing (as it will be believed the next key is the second line of the previous' key's value).

This lead to a NPE (bug #221335), and was fixed by joining the bundle lines together:
http://hg.netbeans.org/main-golden/rev/6a10ecadc358

I am not very happy with that fix, for two reasons:
1. it makes the Bundles uglier, without a good reason (this is the smaller problem)
2. next time a hint will be introduced, description of which will span multiple lines, bug #221335 will re-appear without having a reasonable chance to catch this soon (I find this to be the bigger problem).

I would suggest to fix the bundle merger to properly understand values spanning multiple lines.
Comment 1 Jaroslav Tulach 2012-11-20 21:32:07 UTC
Can you justify P2 priority? E.g. will you block the 7.3 release unless this is fixed?

I certainly appreciate your time spent while debugging the foreign code in ide.ergonomics build scripts. That must have been frustrating.

On the other hand I believe we have a workaround. In such case I suggest to keep the issue P4. With ergonomics we just don't have a complete flexibility. The dynamic analysis of the layers is limited in some respects. We have the verification to tell us if something goes wrong.

We certainly don't want anyone else to spend time on debugging this kind of problem. We should detect it in the dynamic verification. So, if you are OK with improving the infrastructure to detect the multi-line problem, I agree this is P3 that should addressed for the benefit of NetBeans IDE developers.
Comment 2 Jan Lahoda 2012-11-20 22:14:01 UTC
(In reply to comment #1)
> Can you justify P2 priority? E.g. will you block the 7.3 release unless this is

The original bug was a P2 and we are at risk that this P2 will be reintroduced anytime. I must say that if I were asked to review the 6a10ecadc358 patch, I would be very reluctant to approve it.

> fixed?
> 
> I certainly appreciate your time spent while debugging the foreign code in
> ide.ergonomics build scripts. That must have been frustrating.
> 
> On the other hand I believe we have a workaround. In such case I suggest to
> keep the issue P4. With ergonomics we just don't have a complete flexibility.
> The dynamic analysis of the layers is limited in some respects. We have the
> verification to tell us if something goes wrong.
> 
> We certainly don't want anyone else to spend time on debugging this kind of
> problem. We should detect it in the dynamic verification. So, if you are OK
> with improving the infrastructure to detect the multi-line problem, I agree
> this is P3 that should addressed for the benefit of NetBeans IDE developers.

I fail to see the reason: my estimate is that the fix should be trivial (if the line ends with '\', include the next line?). What advantage is in creating a test that will basically do the same and will annoy developers, as opposed to simply fix the bug?
Comment 3 Jaroslav Tulach 2012-11-30 16:02:22 UTC
I don't have plans to fix this. The errors are detected and reported. It is easy to fix them when they occur.
Comment 4 Jaroslav Tulach 2012-12-18 10:16:16 UTC
(In reply to comment #1)
> problem. We should detect it in the dynamic verification. 

ergonomics#3a762173f8eb
Comment 5 Jaroslav Tulach 2012-12-18 10:59:24 UTC
ergonomics#40e1fcde80af
Comment 6 Quality Engineering 2012-12-20 02:47:24 UTC
Integrated into 'main-golden', will be available in build *201212200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3a762173f8eb
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #222483: Test to detect that all keywords are properly preserved
Comment 7 Masaki Katakai 2013-01-12 02:42:17 UTC
I noticed it's still happens in 7.3 RC build. Could you please check?

http://smetiste.cz.oracle.com/builds/netbeans/7.3/daily/2013-01-11_21-00-38/zip/

In build netbeans-7.3rc1-201301112100.zip, e.g.

./org/netbeans/modules/ide/ergonomics/webcommon/Bundle.properties :

ApacheConfResolver=Apache Conf Files


    Support for editing Apache Conf files.
Templates/Other/ApacheConfTemplate.conf=Apache Conf File

It looks strange.
Comment 8 Antonin Nebuzelsky 2013-01-15 12:34:35 UTC
Reopening as P1 for 7.3. The bug is blocking L10N.
Comment 9 Jaroslav Tulach 2013-01-16 08:07:22 UTC
What key is wrong? Can I see that in the UI?
Comment 10 Masaki Katakai 2013-01-16 09:19:24 UTC
Hi Jaroslav,

For example, in org/netbeans/modules/ide/ergonomics/webcommon/Bundle.properties
in build jar file in RC1 build,

    Support for editing Apache Conf files.

line is wrong. It looks it should be

OpenIDE-Module-Long-Description=\
    Support for editing Apache Conf files.

merged from org/netbeans/modules/languages/apacheconf/resources/Bundle.properties.

Invalid .properties files can not be accepted in translation process.
We need a quick fix and need to deliver files to translation vendor asap.
Please evaluate.
Comment 11 Jaroslav Tulach 2013-01-17 08:15:40 UTC
I see, the generated Bundle contains some debris. As far as I can tell, those extra lines are harmless during runtime as they get ignored.

We don't translators to waste time on debris, but it is not a blocker. I'll see what I can do with it.
Comment 12 Jaroslav Tulach 2013-01-17 13:12:45 UTC
ergonomics#501711eb0d34
Comment 13 Quality Engineering 2013-01-18 02:51:32 UTC
Integrated into 'main-golden', will be available in build *201301180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/501711eb0d34
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #222483: Exclude non-meaningful lines
Comment 14 Masaki Katakai 2013-01-18 09:26:14 UTC
Verified the fix in trunk build 201301180001.

Thank you!
Comment 15 Jaroslav Tulach 2013-01-18 11:30:42 UTC
changeset:   6aecb04d1533
branch:      release73
Comment 16 Quality Engineering 2013-01-19 00:03:46 UTC
Integrated into 'releases', will be available in build *201301182100* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/501711eb0d34
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #222483: Exclude non-meaningful lines


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo