Skip to content

Issue #1353, fixed NullCall in GetProjectByUuidDatabaseAction.java #1368

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LordofthePickle
Copy link
Contributor

This commit is aimed towards fixing Issue #1353. In it, two files are changed, DatabaseSession.java and GetProjectByUuidDatabaseAction.java. The former introduces a new queryUuid() method which follows the previous query() method; however, it maps the IdEObject value to a uuid key (this is aimed to improve the O time complexity by allowing for the use of .contains within a hashmap in GetProjectByUuidDatabaseAction.execute()). Furthermore, if wanted, this function can also be used for other objects if one needs to query for a uuid mapping. In the latter, logic is added to call this new queryUuid() method, perform authentication checks, make a uuid comparison to find a potential match, and throw an exception if something goes wrong (i.e. authentication, project not found, or invalid input).

…ction.java

In this commit, a new query method was added to DatabaseSession.java
which returns a hashmap of an IdEObject value with a UUID key (this
allows for a faster run time via using HashMap.contains()
and allows for the use of this query with other IdEObjects).
In GetProjectByUuidDatabaseAction.java, logic was added to
execute the new queryUuid() method while also performing
authorization checks.

Reported-By: zaqifathis
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.

1 participant