Skip to content

Commit

Permalink
refactor!: Change the package name. Everyone knows it's java (or it d…
Browse files Browse the repository at this point in the history
…oesn't matter) (#111)

* Change the package name. Everyone knows it's java (or it doesn't matter)

Fixes #82

Signed-off-by: Justin Abrahms <justin@abrah.ms>

* Missed 2 strings

Signed-off-by: Justin Abrahms <justin@abrah.ms>

* remove broken flagd import until changes absorbed

Signed-off-by: Todd Baert <toddbaert@gmail.com>

Signed-off-by: Justin Abrahms <justin@abrah.ms>
Signed-off-by: Todd Baert <toddbaert@gmail.com>
Co-authored-by: Todd Baert <toddbaert@gmail.com>
  • Loading branch information
justinabrahms and toddbaert authored Oct 5, 2022
1 parent 715fd03 commit 6eeeddd
Show file tree
Hide file tree
Showing 59 changed files with 96 additions and 105 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OpenFeature SDK for Java

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.openfeature/javasdk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.openfeature/javasdk)
[![javadoc](https://javadoc.io/badge2/dev.openfeature/javasdk/javadoc.svg)](https://javadoc.io/doc/dev.openfeature/javasdk)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.openfeature/sdk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.openfeature/sdk)
[![javadoc](https://javadoc.io/badge2/dev.openfeature/sdk/javadoc.svg)](https://javadoc.io/doc/dev.openfeature/sdk)
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![Specification](https://img.shields.io/static/v1?label=Specification&message=v0.5.0&color=yellow)](https://github.com/open-feature/spec/tree/v0.5.0)
[![Known Vulnerabilities](https://snyk.io/test/github/open-feature/java-sdk/badge.svg)](https://snyk.io/test/github/open-feature/java-sdk)
Expand All @@ -20,7 +20,7 @@ This library is intended to be used in server-side contexts and has not been eva
While `Boolean` provides the simplest introduction, we offer a variety of flag types.

```java
import dev.openfeature.javasdk.Structure;
import dev.openfeature.sdk.Structure;

class MyClass {
public UI booleanExample() {
Expand Down Expand Up @@ -65,7 +65,7 @@ class MyClass {
```xml
<dependency>
<groupId>dev.openfeature</groupId>
<artifactId>javasdk</artifactId>
<artifactId>sdk</artifactId>
<version>0.2.2</version>
</dependency>
```
Expand All @@ -90,7 +90,7 @@ If you would like snapshot builds, this is the relevant repository information:
<!-- x-release-please-start-version -->
```groovy
dependencies {
implementation 'dev.openfeature:javasdk:0.2.2'
implementation 'dev.openfeature:sdk:0.2.2'
}
```
<!-- x-release-please-end-version -->
Expand Down
13 changes: 2 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>dev.openfeature</groupId>
<artifactId>javasdk</artifactId>
<artifactId>sdk</artifactId>
<version>0.2.2</version> <!--x-release-please-version -->

<properties>
Expand Down Expand Up @@ -137,15 +137,6 @@
<version>31.1-jre</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>dev.openfeature.contrib.providers</groupId>
<artifactId>flagd</artifactId>
<!-- TODO: update this version -->
<version>0.3.2</version>
<scope>test</scope>
</dependency>

</dependencies>

<dependencyManagement>
Expand Down Expand Up @@ -271,7 +262,7 @@
<configuration>
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<excludes>
<exclude>dev/openfeature/javasdk/exceptions/**</exclude>
<exclude>dev/openfeature/sdk/exceptions/**</exclude>
</excludes>

<rules>
Expand Down
4 changes: 2 additions & 2 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"bootstrap-sha": "c701a6c4ebbe1170a25ca7636a31508b9628831c",
"packages": {
".": {
"package-name": "dev.openfeature.javasdk",
"package-name": "dev.openfeature.sdk",
"release-type": "simple",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
Expand All @@ -13,4 +13,4 @@
]
}
}
}
}
6 changes: 3 additions & 3 deletions spotbugs-exclusions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@

<!-- I'm reasonably confident that the singleton pattern isn't exposing internal representation -->
<And>
<Class name="dev.openfeature.javasdk.OpenFeatureAPI"/>
<Class name="dev.openfeature.sdk.OpenFeatureAPI"/>
<Bug pattern="MS_EXPOSE_REP"/>
</And>
<!-- similarly, client using the singleton doesn't seem bad -->
<And>
<Class name="dev.openfeature.javasdk.OpenFeatureClient"/>
<Class name="dev.openfeature.sdk.OpenFeatureClient"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</And>

<!-- Test class that should be excluded -->
<Match>
<Class name="dev.openfeature.javasdk.DoSomethingProvider"/>
<Class name="dev.openfeature.sdk.DoSomethingProvider"/>
</Match>
<!-- All bugs in test classes, except for JUnit-specific bugs -->
<Match>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

/**
* This is a common interface between the evaluation results that providers return and what is given to the end users.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

public interface BooleanHook extends Hook<Boolean> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

public interface DoubleHook extends Hook<Double> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

public enum ErrorCode {
PROVIDER_NOT_READY, FLAG_NOT_FOUND, PARSE_ERROR, TYPE_MISMATCH, TARGETING_KEY_MISSING, INVALID_CONTEXT, GENERAL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import java.time.Instant;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

/**
* An API for the type-specific fetch methods offered to users.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import java.util.HashMap;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

public enum FlagValueType {
STRING, INTEGER, DOUBLE, OBJECT, BOOLEAN;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import java.util.Map;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import lombok.Builder;
import lombok.NonNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import java.util.*;
import java.util.function.Consumer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

public interface IntegerHook extends Hook<Integer> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

/**
* Holds identifying information about a given entity.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import lombok.Getter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;

import dev.openfeature.javasdk.exceptions.GeneralError;
import dev.openfeature.javasdk.exceptions.OpenFeatureError;
import dev.openfeature.javasdk.internal.ObjectUtils;
import dev.openfeature.sdk.exceptions.GeneralError;
import dev.openfeature.sdk.exceptions.OpenFeatureError;
import dev.openfeature.sdk.internal.ObjectUtils;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import lombok.Builder;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

public enum Reason {
DISABLED, SPLIT, TARGETING_MATCH, DEFAULT, UNKNOWN, ERROR
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

public interface StringHook extends Hook<String> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import java.time.Instant;
import java.util.*;
import java.util.stream.Collectors;

import dev.openfeature.javasdk.exceptions.ValueNotConvertableError;
import dev.openfeature.sdk.exceptions.ValueNotConvertableError;
import lombok.EqualsAndHashCode;
import lombok.ToString;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import java.time.Instant;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.openfeature.javasdk.exceptions;
package dev.openfeature.sdk.exceptions;

import dev.openfeature.javasdk.ErrorCode;
import dev.openfeature.sdk.ErrorCode;
import lombok.Getter;
import lombok.experimental.StandardException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.openfeature.javasdk.exceptions;
package dev.openfeature.sdk.exceptions;

import dev.openfeature.javasdk.ErrorCode;
import dev.openfeature.sdk.ErrorCode;
import lombok.Getter;
import lombok.experimental.StandardException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.openfeature.javasdk.exceptions;
package dev.openfeature.sdk.exceptions;

import dev.openfeature.javasdk.ErrorCode;
import dev.openfeature.sdk.ErrorCode;
import lombok.Getter;
import lombok.experimental.StandardException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.openfeature.javasdk.exceptions;
package dev.openfeature.sdk.exceptions;

import dev.openfeature.javasdk.ErrorCode;
import dev.openfeature.sdk.ErrorCode;
import lombok.experimental.StandardException;

@StandardException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.openfeature.javasdk.exceptions;
package dev.openfeature.sdk.exceptions;

import dev.openfeature.javasdk.ErrorCode;
import dev.openfeature.sdk.ErrorCode;
import lombok.Getter;
import lombok.experimental.StandardException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.openfeature.javasdk.exceptions;
package dev.openfeature.sdk.exceptions;

import dev.openfeature.javasdk.ErrorCode;
import dev.openfeature.sdk.ErrorCode;
import lombok.Getter;
import lombok.experimental.StandardException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.openfeature.javasdk.exceptions;
package dev.openfeature.sdk.exceptions;

import dev.openfeature.javasdk.ErrorCode;
import dev.openfeature.sdk.ErrorCode;
import lombok.Getter;
import lombok.experimental.StandardException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.openfeature.javasdk.exceptions;
package dev.openfeature.sdk.exceptions;

import dev.openfeature.javasdk.ErrorCode;
import dev.openfeature.sdk.ErrorCode;
import lombok.Getter;
import lombok.experimental.StandardException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk.internal;
package dev.openfeature.sdk.internal;

import java.util.*;
import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import dev.openfeature.javasdk.exceptions.FlagNotFoundError;
import dev.openfeature.sdk.exceptions.FlagNotFoundError;

public class AlwaysBrokenProvider implements FeatureProvider {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand All @@ -8,7 +8,7 @@

import org.junit.jupiter.api.Test;

import dev.openfeature.javasdk.fixtures.HookFixtures;
import dev.openfeature.sdk.fixtures.HookFixtures;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

public class DoSomethingProvider implements FeatureProvider {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.openfeature.javasdk;
package dev.openfeature.sdk;

import static org.junit.jupiter.api.Assertions.assertEquals;

Expand Down
Loading

0 comments on commit 6eeeddd

Please sign in to comment.