Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8031695

CHA ignores default methods during analysis leading to incorrect code generation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: hs25, 8, 8u20
    • Fix Version/s: hs25
    • Component/s: hotspot
    • Environment:

      Java(TM) SE Runtime Environment (build 1.8.0-ea-b120)

      Related JavaFX bug report that the issue occured in b112.

    • Subcomponent:
    • Resolved In Build:
      b68
    • Verification:
      Verified

      Backports

        Description

        See JavaFX bug: https://javafx-jira.kenai.com/browse/RT-34355

        Download and run the sample. Switch between 0 and 1 fixed columns a few times. After a while, the table changes, because ColumnDefinitionIF#editableIf() has been called on CVPriceColumnDefinition.

        There's no change in stack trace before and after.

        Before it's:

        at vsa.vfx.experiment.demo.table.vfxtable.main.CVPriceColumnDefinition.editableIf(CVPriceColumnDefinition.java:40)
        at vsa.vfx.experiment.demo.table.vfxtable.main.TextFieldColumnDefinition.collaborator(TextFieldColumnDefinition.java:44)
        at vsa.vfx.experiment.demo.table.vfxtable.main.CVPriceColumnDefinition.collaborator(CVPriceColumnDefinition.java:18)
        at vsa.vfx.control.table.vfxtables.VfxTableColumns.lambda$1(VfxTableColumns.java:32)
        at vsa.vfx.control.table.vfxtables.VfxTableColumns$$Lambda$14/2025470705.call(Unknown Source)
        at com.sun.javafx.scene.control.skin.TableRowSkin.getCell(TableRowSkin.java:80)
        at com.sun.javafx.scene.control.skin.TableRowSkin.getCell(TableRowSkin.java:46)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.createCell(TableRowSkinBase.java:652)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.recreateCells(TableRowSkinBase.java:646)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.checkState(TableRowSkinBase.java:591)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.layoutChildren(TableRowSkinBase.java:246)
        at javafx.scene.control.Control.layoutChildren(Control.java:574)
        at javafx.scene.Parent.layout(Parent.java:1076)
        ...

        After it changes to:
        at vsa.vfx.experiment.demo.table.vfxtable.main.ColumnDefinitionIF.editableIf(ColumnDefinitionIF.java:43)
        at vsa.vfx.experiment.demo.table.vfxtable.main.TextFieldColumnDefinition.collaborator(TextFieldColumnDefinition.java:44)
        at vsa.vfx.experiment.demo.table.vfxtable.main.CVPriceColumnDefinition.collaborator(CVPriceColumnDefinition.java:18)
        at vsa.vfx.control.table.vfxtables.VfxTableColumns.lambda$1(VfxTableColumns.java:32)
        at vsa.vfx.control.table.vfxtables.VfxTableColumns$$Lambda$14/2025470705.call(Unknown Source)
        at com.sun.javafx.scene.control.skin.TableRowSkin.getCell(TableRowSkin.java:80)
        at com.sun.javafx.scene.control.skin.TableRowSkin.getCell(TableRowSkin.java:46)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.createCell(TableRowSkinBase.java:652)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.recreateCells(TableRowSkinBase.java:646)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.checkState(TableRowSkinBase.java:591)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.layoutChildren(TableRowSkinBase.java:246)
        at javafx.scene.control.Control.layoutChildren(Control.java:574)
        at javafx.scene.Parent.layout(Parent.java:1076)
        ...

        And sometimes I get:
        at vsa.vfx.experiment.demo.table.vfxtable.main.CVPriceColumnDefinition.editableIf(CVPriceColumnDefinition.java:40)
        at vsa.vfx.experiment.demo.table.vfxtable.main.TextFieldColumnDefinition.collaborator(TextFieldColumnDefinition.java:44)
        at vsa.vfx.experiment.demo.table.vfxtable.main.CVNameColumnDefinition.collaborator(CVNameColumnDefinition.java:12)
        at vsa.vfx.control.table.vfxtables.VfxTableColumns.lambda$1(VfxTableColumns.java:32)
        at vsa.vfx.control.table.vfxtables.VfxTableColumns$$Lambda$14/2025470705.call(Unknown Source)
        at com.sun.javafx.scene.control.skin.TableRowSkin.getCell(TableRowSkin.java:80)
        at com.sun.javafx.scene.control.skin.TableRowSkin.getCell(TableRowSkin.java:46)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.createCell(TableRowSkinBase.java:652)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.recreateCells(TableRowSkinBase.java:646)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.checkState(TableRowSkinBase.java:591)
        at com.sun.javafx.scene.control.skin.TableRowSkinBase.layoutChildren(TableRowSkinBase.java:246)
        at javafx.scene.control.Control.layoutChildren(Control.java:574)
        at javafx.scene.Parent.layout(Parent.java:1076)
                ...


        I've tried to create some simpler sample, but was unsuccessful.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  vlivanov Vladimir Ivanov
                  Reporter:
                  msladecek Martin Sládeček
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  13 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: