UnsupportedOperationException in FULL_ASSERT mode

22 views
Skip to first unread message

raicu...@gmail.com

unread,
Jan 17, 2020, 5:17:02 AM1/17/20
to OptaPlanner development
Hi,

I have been trying out 7.31.0 final and ran into an exception in FULL_ASSERT mode.

From ConstraintMatch.java:

    public ConstraintMatch(String constraintPackage, String constraintName, List<Object> justificationList,
            Score score) {
        this.constraintPackage = constraintPackage;
        this.constraintName = constraintName;
        this.justificationList = Collections.unmodifiableList(justificationList);
        this.score = score;
    }

From AbstractScoreDirector in buildScoreCorruptionAnalysis method
        for (ConstraintMatchTotal constraintMatchTotal : corruptedConstraintMatchTotals) {
            for (ConstraintMatch constraintMatch : constraintMatchTotal.getConstraintMatchSet()) {
                constraintMatch.getJustificationList().sort(comparator);
            }
        }
        for (ConstraintMatchTotal constraintMatchTotal : uncorruptedConstraintMatchTotals) {
            for (ConstraintMatch constraintMatch : constraintMatchTotal.getConstraintMatchSet()) {
                constraintMatch.getJustificationList().sort(comparator);
            }
        }
It generates an UnsupportedOperationException. I am using java 1.8.

Hope this helps.

Lukas Petrovicky

unread,
Jan 20, 2020, 2:47:30 AM1/20/20
to optapla...@googlegroups.com
Hi there,

On Fri, Jan 17, 2020 at 11:17 AM <raicu...@gmail.com> wrote:
I have been trying out 7.31.0 final and ran into an exception in FULL_ASSERT mode.

that could be a bug, we'll look into it.
In the meantime, disabling constraint matches should hopefully work around the exception.

Thanks for reporting and have a nice day!
 
--

Lukáš Petrovický

He/Him/His

Principal Software Engineer, Business Automation

Red Hat Czech, s. r. o.

Purkyňova 111, Brno

lukas.pe...@redhat.com    IM: triceo/lpetrovi

petrovic...@gmail.com

unread,
Jan 20, 2020, 3:01:45 AM1/20/20
to OptaPlanner development


On Monday, January 20, 2020 at 8:47:30 AM UTC+1, Lukas Petrovicky wrote:
In the meantime, disabling constraint matches should hopefully work around the exception.

On second thought, no it shouldn't. There appears to be no workaround, other than to not use FULL_ASSERT.

-- Lukas 

Geoffrey De Smet

unread,
Jan 22, 2020, 4:53:53 AM1/22/20
to optapla...@googlegroups.com

Is there a jira for this bug?

FULL_ASSERT is used a lot, I don't understand why this hasn't popped up before.
Are we sure it's not a regression?

With kind regards,
Geoffrey De Smet

--
You received this message because you are subscribed to the Google Groups "OptaPlanner development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to optaplanner-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/optaplanner-dev/519fb584-4228-41ec-b1f6-ac8cb46e8222%40googlegroups.com.

Lukas Petrovicky

unread,
Jan 22, 2020, 5:52:55 AM1/22/20
to optapla...@googlegroups.com
On Wed, Jan 22, 2020 at 10:54 AM Geoffrey De Smet <gds.geoffr...@gmail.com> wrote:

Is there a jira for this bug?

FULL_ASSERT is used a lot, I don't understand why this hasn't popped up before.
Are we sure it's not a regression?

Pretty sure it's a regression, most likely caused by me.
I have a fix ready for review: https://github.com/kiegroup/optaplanner/pull/659
 
Reply all
Reply to author
Forward
0 new messages