Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4062

Unable to import Records from other package

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 11.3
    • None
    • None

    Description

      NetBeans can't import records from other package. It instead suggests to create a class.

      It has to be imported manually. Even importing manually does not work smoothly coz after hitting dot, records do not show up but other classes do. There is no choice but to type it in explicitly.

      Steps to reproduce:

      1. Create a record in a package, e.g. `records.Person.java`.
      2. Create main class in another package, e.g. `app.PersonApp.java`.
      3. In `PersonApp`, type in `var person = new Person(....);`. Using content assist/auto-suggestion does not display Person.
      4. Manually type: `import records.` and using content assist does not display Person. Other classes, if any, do display, though. So, instead of relying on suggestion, just type it explicitly: `import records.Person;`.

      Attachments

        Activity

          People

            singh-akhilesh Akhilesh Singh
            julianjupiter Julian Jupiter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m