-
Notifications
You must be signed in to change notification settings - Fork 353
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
Added a /properties endpoint, with the ability to configure which pro… #1471
Added a /properties endpoint, with the ability to configure which pro… #1471
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1471 +/- ##
=============================================
- Coverage 66.68% 66.66% -0.02%
Complexity 1744 1744
=============================================
Files 723 724 +1
Lines 23669 23685 +16
Branches 2993 2997 +4
=============================================
+ Hits 15783 15790 +7
- Misses 6676 6681 +5
- Partials 1210 1214 +4
Continue to review full report at Codecov.
|
…xt when hitting the {propertyName} endpoint
…ttps://github.com/gchq/Gaffer into gh-1420-Add-a-/properties-endpoint-to-the-REST-API
@@ -32,6 +32,7 @@ | |||
|
|||
public static final String CLASS_NOT_FOUND = "Class not found"; | |||
public static final String FUNCTION_NOT_FOUND = "Function not found"; | |||
public static final String PROPERTY_NOT_FOUND = "Property not found"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a duplicated line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They look like different lines to me - one is used when a Function isn't found and one is used when a Property is not found.
* An implementation of {@link IPropertiesServiceV2} that gets the configured system properties | ||
*/ | ||
public class PropertiesServiceV2 implements IPropertiesServiceV2 { | ||
private static final Map<String, String> PROPERTIES = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be better to not cache the properties in case any of the properties change over time. In the future, if we find it is really slow then we could consider adding a daily cache or something similar.
…a call to the /properties endpoint is made.
…perties-endpoint-to-the-REST-API
…perties are visible