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

IDE freezes when using Maven + "Xlint:strictfp"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 12.4, 12.5
    • ?
    • None
    • None

    Description

      Hello:

      I'm developing a Java project using Maven. If I write this configuration in the pom.xml file:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <release>17</release>
          <compilerArgs>
            <arg>-Xlint:all</arg>
          </compilerArgs>
         <showWarnings>true</showWarnings>
       </configuration>
      </plugin>

      And then, I edit any Java source file, the IDE freezes completely. I've to kill the process.

      However, if I replace the "-Xlint:all" argument with this equivalent value:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <release>17</release>
          <compilerArgs>
            <arg>-Xlint:cast,classfile,deprecation,
              dep-ann,divzero,empty,fallthrough,finally,options,
              overrides,path,processing,rawtypes,static,
              try,unchecked,varargs</arg>
          </compilerArgs>
         <showWarnings>true</showWarnings>
       </configuration>
      </plugin>

      It works well.

      It also works well if I remove the compiler arguments all together.

      There is a visual defect that indicates me whether the IDE is going to freeze or not before saving the file: The code that is after the text block partially loses its highlighting and becomes white. Please, check the attached screenshots.

      UPDATE #1.

      I've continued making tests, and I've realized that the value all in -Xlint:all is equivalent to more values than I thought:

      auxiliaryclass
      cast
      classfile
      deprecation
      dep-ann
      divzero
      empty
      exports
      fallthrough
      finally
      missing-explicit-ctor
      module
      opens
      options
      overloads
      overrides
      path
      processing
      rawtypes
      removal
      requires-automatic
      requires-transitive-automatic
      serial
      static
      strictfp
      synchronization
      text-blocks
      try
      unchecked
      varargs
      preview
      

      By removing one by one, I've found which one causes the freeze: strictfp .

      UPDATE #2.

      I confirm that the value text-blocks also causes the same problem if there is at least one text block in the source file that is currently open. The highlighting fails and I can't save the file.

      Attachments

        Activity

          People

            Unassigned Unassigned
            negora negora
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: