Details

    • Sub-task
    • Resolution: Done
    • Major
    • 8.14.0.Final
    • 8.7.0.Final
    • optaplanner-core
    • None

    Description

      Imagine the following constraint:

      constraintFactory.from(Cluster.class)
                      .ifExists(Pod.class, 
                         Joiners.equal(Function.identity(), pod -> pod.getNode().getCluster()))
      

      The constraint throws a NPE as pod.getNode() is null, because pod is the PlanningEntity and its reference to Node is the PlanningVariable.

      In this context, the ifExists() behaves like fromUnfiltered(), without any option to avoid the uninitialized planning entities.

      Attachments

        Issue Links

          Activity

            People

              lpetrovi@redhat.com Lukáš Petrovický (Inactive)
              rsynek@redhat.com Radovan Synek
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: