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: | String annotation values are generated as evaluated expressions | ||
---|---|---|---|
Product: | java | Reporter: | Jaroslav Tulach <jtulach> |
Component: | Source | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | jlahoda |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Jaroslav Tulach
2014-01-27 14:28:38 UTC
Here is a way to enforce new lines suggested by Jan: http://hg.netbeans.org/main/contrib/rev/363fb381d03f Isn't using an Identifier to represent a concatenation of literals a sort of hack ? The actual reason for the behaviour is the code generator VeryPretty.printAnnotationsFormatted, which parses the annotation text back in Reformatter.reformat; but the javac will evaluate compile-time constants, so the String expression is evaluated and pieces concatenated together. The result is then generated into the source. This applies not only to long Strings, but in general to all compile-time non-literal constants. This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss |