| commit | 61618141f0204ce6653354f6424e11276d939aed | [log] |
|---|---|---|
| author | Caolán McNamara <caolanm@redhat.com> | Sun Jul 11 19:52:52 2021 +0100 |
| committer | Caolán McNamara <caolanm@redhat.com> | Mon Jul 12 10:46:57 2021 +0200 |
| tree | 7deb56488bce8a899dfbf391ee845773ae1094f2 | |
| parent | de311257e851f1fdbc87a4df836a526220c668d0 [diff] |
cid#1487032 NP: Null pointer dereference and cid#1487033 UwF: Unwritten field since... commit 822f128e734f37ee4de9bf5b62640cbec140701e Date: Wed Jul 7 16:01:19 2021 +0300 Polymorphism is a better approach when there are chains of inheritance. where deGTBehavior and psGTBehavior are no longer stored when set from DEPSSolverImpl.java:146 and DEPSSolverImpl.java:147 Change-Id: If3d228bf6e5f2b1ddd119d75b55bd778bcce8b05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118759 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java index 88aa56e..adc6a75 100644 --- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java +++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java
@@ -101,6 +101,17 @@ public class DEPSAgent implements ILibEngine { public void setGTBehavior(AbsGTBehavior gtBehavior) { gtBehavior.setMemPoints(pbest_t, pcurrent_t, pold_t); // see getGTBehavior and setLibrary for uses of // deGTBehavior and psGTBehavior if (gtBehavior instanceof DEGTBehavior) { deGTBehavior = ((DEGTBehavior) gtBehavior); return; } if (gtBehavior instanceof PSGTBehavior) { psGTBehavior = ((PSGTBehavior) gtBehavior); return; } } public void generatePoint() {