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.

Bug 244381 - When opening existing projects from NetBeans 7.4 with 8.0 all projects are changed and part of the project settings are replaced with a {workaroundforbugxxxx} style code
Summary: When opening existing projects from NetBeans 7.4 with 8.0 all projects are ch...
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-08 13:17 UTC by netbeansuzr
Modified: 2016-07-07 07:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description netbeansuzr 2014-05-08 13:17:43 UTC
When opening existing projects from NetBeans 7.4 with 8.0 all projects are changed and part of the project settings are replaced with a "{workaroundforbugxxxx}" style code.

This is really concerning for us because it shakes our confidence in upgrading to NetBeans 8.0.  Having a bug in the project file is really serious.  We don't know when it will be fixed or if there will be a clean upgrade path from 8.0 to future version of NetBeans.  We are concerned with having to re-create projects that have been automatically modified by version 8.0 of NetBeans.

We have waited this long since the release of NetBeans 8.0 regularly checking for IDE updates and then re-testing to see if NetBeans 8.0 with the latest updates (given a clean set of 7.4 projects) will upgrade the projects without generating the "{workaroundforbugxxxx}" tag in the project files, but this issue still has not been resolved.

We request this issue be prioritized as P1 as it is preventing us from upgrading to NetBeans 8.0.
Comment 1 Vladimir Riha 2014-05-09 12:52:02 UTC
What type of a project is it? Could you attach sample project created in 7.4, which causes this issue in 8.0? Could you please also attach IDE log (see [1]) from NetBeans 8.0 when this issue happens? Thank you


[1] http://wiki.netbeans.org/FaqLogMessagesFile
Comment 2 netbeansuzr 2014-05-09 16:05:48 UTC
I can't find the project type in the project properties, but tt's a standard java project with existing sources.

the line is changed from the below (works in 7.4):
            <fileset dir="${src.src.dir}" excludes="*.java,${excludes}" includes="${includes}">

to the following in 8.0:
            <fileset dir="${src.src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">

The concerning part is the "bug5101868workaround" part and the disappearance of "*.java"


Are you able to track the issue via the "bug5101868workaround" string?
Comment 3 Vladimir Riha 2014-05-12 06:22:11 UTC
(In reply to netbeansuzr from comment #2)
> I can't find the project type in the project properties, but tt's a standard
> java project with existing sources.
> 

Thanks, reassigning to Java/project for evaluation.
Comment 4 Tomas Zezula 2014-05-13 09:24:48 UTC
The bug5101868workaround property is a workaround of JDK Javadoc 1.5 and 1.6 crash when -use option is enabled.
See https://bugs.openjdk.java.net/browse/JDK-5101868 for details.

>Having a bug in the project file is really serious.
No bug in the NB project file.
>We don't know when it will be fixed or if there will be a clean upgrade path from 8.0 to future version of NetBeans.
No fix needed. Also as the Javadoc crash affects just the JDK 1.5 and 1.6 the 5101868 issue workaround is enabled just for these affected versions of JDK.
Comment 5 netbeansuzr 2014-05-13 11:57:36 UTC
Thank you for the feedback.

So NetBeans 8.0 will automatically update the project and remove the workaround tag when the project's JDK is changed to 1.7 or newer?
Comment 6 netbeansuzr 2014-05-13 18:42:13 UTC
I have just tested this with java 1.7 projects where the JDK platform was already set to a 1.7 JDK and the source/binary format is JDK7 and yet when opening the project is NetBeans 8.0 the project still gets modified to use the workaround.

Can this please be fixed ASAP.
Comment 7 netbeansuzr 2014-05-13 18:43:26 UTC
Another note: Netbeans is running with 1.8.0 u05 JDK
Comment 8 Jan Lahoda 2014-05-13 21:22:15 UTC
From what I can tell, the 'bug5101868workaround' property is set to "*.java" if the workaround is needed, and set to "" (or kept empty) if the workaround is not needed. This is done at the time the build script runs - seems reasonable to me, as that point is the best time to determine whether the workaround is needed. In fact, from what I can tell, the "*.java" in the original script is the real workaround for the JDK bug - the newly added property allows to disable the workaround if possible. So the new state seems better to me than the original.
Comment 9 Tomas Zezula 2014-05-14 09:32:50 UTC
Again there is nothing to fix.
It's a workaround of Javadoc issue https://bugs.openjdk.java.net/browse/JDK-5101868.

The property bug5101868workaround is set to '*.java' on JDK 1.5 and JDK 1.6.
On the JDK 1.7+ it's set to ''.
It's quite simple to  find out in build-impl.xml:
<condition else="" property="bug5101868workaround" value="*.java">
    <matches pattern="1\.[56](\..*)?" string="${java.version}"/>
</condition>
Comment 10 netbeansuzr 2014-05-14 11:42:44 UTC
Ok.  Thanks for the the info.  In your original reply it sounded like the workaround should not be there for JDK 1.7+.  Btw, I have the same issue with JDK 8 (tried it yesterday) But given your current feedback it makes sense as to why.

Do you think it makes more sense to not even have the workaround present in the project file for JDK 1.7+ because you can determine the JDK version from the project settings.
Comment 11 Tomas Zezula 2014-05-14 14:01:00 UTC
>Do you think it makes more sense to not even have the workaround present in the >project file for JDK 1.7+ because you can determine the JDK version from the >project settings.
The removal of the workaround on JDK 1.7 will be problematic.
We try not to change the build-impl.xml very often because of version control problems (possible conflicts, diffs unclear to the user). And also due to performance impact, the build-imp.xml is generated by XSLT transformation.
In fact we change the build-impl.xml only in two cases when the IDE update brings a new version of the XSL stylesheet or when the project.xml is changed (adding of source roots, test roots and changing the platform from default to non default). 
We try to remove the change of the platform from default to non default from this list but it's not so easy. The change of (source|test) roots needs to regenerate the build-impl.xsl as the structural change to some ant tasks is needed.
The change of project properties like source level, active platform, etc does not cause build-impl.xml to be regenerated.
Comment 12 netbeansuzr 2014-05-14 14:40:41 UTC
Ok.  Sounds like you guys have this well in hand.

Thanks to everyone for all the explanations.
Comment 13 netbeansuzr 2014-05-29 12:21:30 UTC
In one of the posts above, someone mentioned the following:
"The bug5101868workaround property is a workaround of JDK Javadoc 1.5 and 1.6 crash when -use option is enabled."

I have tried NetBeans 8 with several projects and most exhibit the behaviour above, however one project which uses JDK 1.6 (32 bit) doesn't get the "bug5101868workaround" placed in it's build-impl.xml.

If the issue affects JDK 1.5 and 1.6 as you mention why isn't this JDK project being affected, yet others are?  Please note that both a project that is affected and one that isn't have been created through NetBeans IDE and none of them are doing anything special, no custom build files and no javadoc settings were changed from the defaults set by NetBeans as far as I'm aware.
Comment 14 Martin Balin 2016-07-07 07:19:16 UTC
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