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

GUI unable to refresh Requirements #153

joblo2213 opened this issue Nov 14, 2019 · 1 comment

GUI unable to refresh Requirements #153

joblo2213 opened this issue Nov 14, 2019 · 1 comment


Copy link

@joblo2213 joblo2213 commented Nov 14, 2019

Just want to document this so I don't forget about it.
I'll try to do some more investigations on what happens tomorrow.


When setting the new IntegerRequirement from PR #148 to a noninteger it fails and displays the message Unable to set the requirement., just as intended.

But if you then try to refresh the Requirements using Show Requirements the get request fails without an error message.

To fix it use Delete for the IntegerRequirement that you previously set to an illegal value.
Then Show Requirements works again.

@joblo2213 joblo2213 added the bug label Nov 14, 2019
@joblo2213 joblo2213 added this to the pre-alpha 3 milestone Nov 14, 2019
@joblo2213 joblo2213 self-assigned this Nov 14, 2019
@joblo2213 joblo2213 added the urgent label Nov 14, 2019

This comment has been minimized.

Copy link
Member Author

@joblo2213 joblo2213 commented Nov 15, 2019

So here my results rom debugging:

When setting a Parameter to an invalid value deserializing it will throw an exception, jusat as intended.
The problem is that the requirement content is set before deserialzing the value:

try {
val reqContent = loadedRequirementType.get.newInstance().asInstanceOf[io.Serializable]
requirements.getAccess.setRequirementContent(requirementId, reqContent)
logger info s"Created requirement content for '$requirementId' and deserialized its content."
} catch {
case e: Exception =>
logger error s"Unable to instantiate requirement content. Exception: ${e.getMessage}"

So if deserializing the value throws an exception the requirement content will be set to a parameter witch cannot be deserialized cause the value is null.

Fixing this should be as simple es moving the call of deserialize() before setRequirementContent().

joblo2213 added a commit that referenced this issue Nov 15, 2019
@joblo2213 joblo2213 closed this Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.