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

show miniature when installing an application #372

Merged
merged 2 commits into from
Aug 26, 2017
Merged

show miniature when installing an application #372

merged 2 commits into from
Aug 26, 2017

Conversation

plata
Copy link
Collaborator

@plata plata commented Aug 26, 2017

var setupWizard = SetupWizard(this._name);
var appsManager = Bean("repositoryManager");
var application = appsManager.getApplication([this._type, this._category, this._name]);
var setupWizard = SetupWizardWithMiniature(this._name, application.getMainMiniature().get());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think calling get() is dangerous here. We can't be sure, that a script provides a main miniature. If this is not the case this line will throw an exception.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not true. I've just tried it. The only thing that happens is that the default miniature is used.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes no sense.
If no main miniature exists for an application Optional.empty() is returned.
If you call get() on Optional.empty, then new NoSuchElementException("No value present") will be thrown.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I have it. Don't know. Must have done something wrong.

@plata plata merged commit 36abce0 into PhoenicisOrg:master Aug 26, 2017
@plata plata deleted the installation-miniature branch August 26, 2017 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants