Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-173

Default SolutionCloner shouldn't try to write constants (static final fields)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 6.0.0.Beta4
    • 6.0.0.Beta3
    • optaplanner-core
    • None

      <reinis> ge0ffrey: has a field (private static final long de.orbitx.retena.domain.Schedule.serialVersionUID) which can not be written with the value (7704993711369797496) to create a clone.
      <reinis> Why would cloner want to clone serialVersionUID?
      <reinis> Is this relevant or can I somehow order the cloner to ignore it?

      <reinis> I think FieldAccessingSolutionCloner is little bit too raw for real applications yet
      <reinis> I think fields = clazz.getDeclaredFields(); is too naive
      <reinis> I would expect atleast such a test: !Modifier.isFinal(objFields[i].getModifiers()

              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: