Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FHA: IndexOutOfBoundsException if likelihood unspecified #2093

jjhugues opened this issue Dec 2, 2019 · 1 comment · Fixed by #2094

FHA: IndexOutOfBoundsException if likelihood unspecified #2093

jjhugues opened this issue Dec 2, 2019 · 1 comment · Fixed by #2094


Copy link

@jjhugues jjhugues commented Dec 2, 2019

The following example triggers an exception

package foo
	system bar
		annex emv2 {**
			use behavior ErrorLibrary::FailStop; -- definition of error modes
				EMV2::severity => 1 applies to Failstop;
					--		EMV2::likelihood => C applies to Failstop;
				EMV2::hazards => ([crossreference => "";
						failure => "failure";
						phases => ("phases");
						description => "descr.";
						comment => "comment";
					]) applies to Failstop;
	end bar;

	system implementation bar.i
	end bar.i;
end foo;

java.lang.IndexOutOfBoundsException: Index: 0
at java.util.Collections$EmptyList.get(
at org.osate.aadl2.errormodel.analysis.fha.FHAReport.reportHazardProperty(
at org.osate.aadl2.errormodel.analysis.fha.FHAReport.processHazards(
at org.osate.aadl2.errormodel.analysis.fha.FHAReport.doFHAReport(
at org.osate.aadl2.errormodel.analysis.handlers.FHAHandler.doAaxlAction(
at org.osate.ui.handlers.AbstractAaxlHandler.processAaxlAction(
at org.osate.ui.handlers.AbstractAaxlHandler.actionBody(
at org.osate.ui.handlers.AaxlReadOnlyHandlerAsJob$ActionAsJob.runInWorkspace(

@jjhugues jjhugues self-assigned this Dec 2, 2019

This comment has been minimized.

Copy link
Contributor Author

@jjhugues jjhugues commented Dec 2, 2019

Trivial copy/paste error, patch is

index 534eecad2..d10fab341 100644
--- a/emv2/org.osate.aadl2.errormodel.analysis/src/org/osate/aadl2/errormodel/analysis/fha/
+++ b/emv2/org.osate.aadl2.errormodel.analysis/src/org/osate/aadl2/errormodel/analysis/fha/
@@ -301,7 +300,7 @@ public final class FHAReport {
} else {
// did not have a type set. Let's use fmr (state of type set as failure mode.
EMV2PropertyAssociation Sev = SevList.isEmpty() ? null : SevList.get(0);

  •                                           EMV2PropertyAssociation Like = SevList.isEmpty() ? null : LikeList.get(0);
  •                                           EMV2PropertyAssociation Like = LikeList.isEmpty() ? null : LikeList.get(0);
jjhugues added a commit that referenced this issue Dec 2, 2019
@lwrage lwrage added this to the 2.6.1 milestone Dec 2, 2019
@lwrage lwrage modified the milestones: 2.6.1, 2.7.0 Dec 9, 2019
@lwrage lwrage changed the title FHA java.lang.IndexOutOfBoundsException if Likelihood unspecified FHA: IndexOutOfBoundsException if likelihood unspecified Dec 10, 2019
@lwrage lwrage closed this in #2094 Dec 10, 2019
lwrage added a commit that referenced this issue Dec 10, 2019
Bugfix for Issue #2093
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.