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

Fix tests expecting the wrong exception #108

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/main/java/com/flagsmith/config/FlagsmithCacheConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ public Builder recordStats() {
* @param envFlagsCacheKey key to use in the cache for environment level flags
* @return the Builder
*/
public Builder enableEnvLevelCaching(@NonNull String envFlagsCacheKey) {
if (StringUtils.isBlank(envFlagsCacheKey)) {
public Builder enableEnvLevelCaching(String envFlagsCacheKey) {
if (envFlagsCacheKey == null || StringUtils.isBlank(envFlagsCacheKey)) {
throw new IllegalArgumentException("Missing environment level cache key");
}
this.envFlagsCacheKey = envFlagsCacheKey;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/flagsmith/interfaces/FlagsmithSdk.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Flags identifyUserWithTraits(
);

FlagsmithConfig getConfig();

EnvironmentModel getEnvironment();

RequestProcessor getRequestor();
Expand All @@ -43,8 +43,8 @@ default FlagsmithCache getCache() {
* validate user has a valid identifier.
* @param identifier user identifier
*/
default void assertValidUser(@NonNull String identifier) {
if (StringUtils.isBlank(identifier)) {
default void assertValidUser(String identifier) {
if (identifier == null || StringUtils.isBlank(identifier)) {
throw new IllegalArgumentException("Missing user identifier");
}
}
Expand Down