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 206659 - False alarm when refactoring - undetected indirect dependency, shows "project X does not depend on target project Y".
Summary: False alarm when refactoring - undetected indirect dependency, shows "project...
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-23 09:26 UTC by pekarna
Modified: 2012-03-12 12:33 UTC (History)
0 users

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 pekarna 2011-12-23 09:26:08 UTC
Let's have a Maven modules structure:

Module A
  Module B
  Module C     depends on B
    Module D

Now when trying to move class from D to B, NetBeans shows:

  There are references in project "D" to moved files, but source project "D" does not depend on target project "B". Projects need not compile.

Which is not true, classes from B are visible in D through dependency inherited from it;s parent (C).
Comment 1 Jesse Glick 2011-12-27 17:44:34 UTC
(In reply to comment #0)
> Module A
>   Module B
>   Module C     depends on B
>     Module D

Not sure I follow what this diagram means. Is C a POM project, and if so how can it "depend" on B? A ZIP of an actual test case would be much more useful.

> Now when trying to move class from D to B, NetBeans shows:
> 
>   There are references in project "D" to moved files, but source project "D"
> does not depend on target project "B". Projects need not compile.

Seems like the IDE is right to signal an error, just gets the wording backwards - the problem is that B does not depend on D, so any references from other classes in D might become broken by the move.
Comment 2 Ralph Ruijs 2012-03-12 12:33:30 UTC
Tried to reproduce the problem, but works for me in 7.1.1.

Please attach a small test project with steps to reproduce.