Opened 13 years ago
Closed 13 years ago
#384 closed defect (fixed)
ScenarioShakeMapLocal fails on launch
Reported by: | Kevin Milner | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | OpenSHA 1.3 |
Component: | sha | Version: | 1.2.3 |
Keywords: | ScenarioShakeMapLocal | Cc: |
Description
Steps to reproduce: Launch ScenarioShakeMapApp?
Other info: (PLEASE FILL IN)
Application: ScenarioShakeMapLocal?
Version: 1.2.3
Bulid Type: Development
Java Version: 1.6.0_29 (Sun Microsystems Inc.)
Operating System: Linux (arch: amd64, version: 3.0.0-16-generic)
Exception:
java.lang.UnsupportedOperationException at com.google.common.collect.ImmutableCollection.add(ImmutableCollection.java:91) at org.opensha.sha.gui.beans.AttenuationRelationshipGuiBean.init_imtParamListAndEditor(AttenuationRelationshipGuiBean.java:737) at org.opensha.sha.gui.beans.AttenuationRelationshipGuiBean.<init>(AttenuationRelationshipGuiBean.java:229) at org.opensha.sha.gui.ScenarioShakeMapApp.initIMRGuiBean(ScenarioShakeMapApp.java:472) at org.opensha.sha.gui.ScenarioShakeMapApp.init(ScenarioShakeMapApp.java:273) at org.opensha.sha.gui.ScenarioShakeMapApp.main(ScenarioShakeMapApp.java:418)
Metadata:
Exception occured initializing the IMR with default parameters value
Note: See
TracTickets for help on using
tickets.
Fixed in [8619].
This arose from some changes I had made to List referencing (swapping ArrayList?<> with List<>). When requesting the constraints on a DoubleParam? the ArrayList? implementations returned a clone(), a method not included in the List interface, and I changed it to return an ImmutableList?, mistakingly thinking that constraints would not be changed once set. Personally I think params should be immutable with the exception of their value and that new params should be instantiated if different behavior is required.