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

Workspace should update project by path instead by name #1741

Closed
ashumilova opened this issue Jul 15, 2016 · 1 comment
Closed

Workspace should update project by path instead by name #1741

ashumilova opened this issue Jul 15, 2016 · 1 comment
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template.

Comments

@ashumilova
Copy link
Contributor

As project name is not a mandatory attribute for the project, we need to change behaviour of updating project on the workspace {{org.eclipse.che.api.workspace.server.WorkspaceService#updateProject}} to search project by its path, not by name, otherwise we can get a NPE.
if (!workspace.getConfig().getProjects().removeIf(project -> project.getName().equals(update.getName()))) { throw new NotFoundException("Workspace " + id + " doesn't contain project " + update.getName()); }

@ashumilova ashumilova added the kind/bug Outline of a bug - must adhere to the bug report template. label Jul 15, 2016
@voievodin
Copy link
Contributor

Already fixed by #954

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

No branches or pull requests

3 participants