Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import java.util.Date;

import org.cloudfoundry.Nullable;
import org.immutables.value.Value;

/**
Expand All @@ -35,6 +36,7 @@ abstract class _Current {
* The number of configured limiter mappings
*/
@JsonProperty("limiterMappings")
@Nullable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you mention in the Javadoc that this can be null now? Same for credentialIdExtractor and loggingLevel. UAA also leaves out limiterMappings when it's ACTIVE with 0 mappings, so someone doing int n = current.getLimiterMappings() will get an NPE.

abstract Integer getLimiterMappings();

/**
Expand All @@ -53,11 +55,13 @@ abstract class _Current {
* The credentialIdExtractor
*/
@JsonProperty("credentialIdExtractor")
@Nullable
abstract String getCredentialIdExtractor();

/**
* The loggingLevel. Valid values include: "OnlyLimited", "AllCalls" and "AllCallsWithDetails"
*/
@JsonProperty("loggingLevel")
@Nullable
abstract String getLoggingLevel();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not needed for this PR, but maybe worth a follow-up: UAA also sends an "error" field in current when loading the rate limit config failed. We don't map it right now, so callers can't see why rate limiting is off. Happy to open an issue for that if you don't want to add it here.

}
Loading