Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.1.0.RELEASE
    • Fix Version/s: 3.2.0.RC1
    • Component/s: GRADLE
    • Labels:
      None

      Activity

      Hide
      Kris De Volder (c) added a comment - - edited

      Looking at the code around the NPE, it seems that somehow the eclipse 'IProject' instance ends up being 'null'. The project is being determined based on its location on disk, looking for a project in the workspace with that location.

      Without being able to reproduce it I have limited information about why the project is not found.

      One possibility that comes to mind is that for some reason the project's 'getLocation' method may be returning 'null'. This is unusual, but according to the eclipse api docs it is possible

      http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fcore%2Fresources%2FIResource.html

      If this resource is a project that exists in the workspace, this method returns the path to the project's local content area. This is true regardless of whether the project is open or closed. This value will be null in the case where the location is relative to an undefined workspace path variable.

      Show
      Kris De Volder (c) added a comment - - edited Looking at the code around the NPE, it seems that somehow the eclipse 'IProject' instance ends up being 'null'. The project is being determined based on its location on disk, looking for a project in the workspace with that location. Without being able to reproduce it I have limited information about why the project is not found. One possibility that comes to mind is that for some reason the project's 'getLocation' method may be returning 'null'. This is unusual, but according to the eclipse api docs it is possible http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fcore%2Fresources%2FIResource.html If this resource is a project that exists in the workspace, this method returns the path to the project's local content area. This is true regardless of whether the project is open or closed. This value will be null in the case where the location is relative to an undefined workspace path variable.
      Hide
      Kris De Volder (c) added a comment -

      I believe this eventually turned out to be a problem caused by having a case-insensitive file system and having renamed someting on the workspace path changing only the upper/lower case.
      This caused a mismatch between location 'paths' uses in the workspace and on disk and the search for a project by its location then fails because its location is not 'equals' to the name of the path returned by the OS.

      Closing as "won't fix" as its quite hard to find a good fix for this and it seems like such an rare edge case it doesn't seem worth the trouble.

      Willing to reconsider this decision if it happens again.

      Show
      Kris De Volder (c) added a comment - I believe this eventually turned out to be a problem caused by having a case-insensitive file system and having renamed someting on the workspace path changing only the upper/lower case. This caused a mismatch between location 'paths' uses in the workspace and on disk and the search for a project by its location then fails because its location is not 'equals' to the name of the path returned by the OS. Closing as "won't fix" as its quite hard to find a good fix for this and it seems like such an rare edge case it doesn't seem worth the trouble. Willing to reconsider this decision if it happens again.

        People

        • Assignee:
          Kris De Volder (c)
          Reporter:
          Kris De Volder (c)
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: