diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..0cd965aad --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Reusable action of building snapshot and publish + +on: + workflow_call: + inputs: + action: + required: true + type: string + travis_tag: + required: true + type: string + secrets: + MAVEN_SIGNING_KEY_BASE64: + required: true + MAVEN_SIGNING_PASSPHRASE: + required: true + MAVEN_CENTRAL_USERNAME: + required: true + MAVEN_CENTRAL_PASSWORD: + required: true +jobs: + run_build: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'temurin' + cache: gradle + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: ${{ inputs.action }} + env: + MAVEN_SIGNING_KEY_BASE64: ${{ secrets.MAVEN_SIGNING_KEY_BASE64 }} + MAVEN_SIGNING_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_PASSPHRASE }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + run: TRAVIS_TAG=${{ inputs.travis_tag }} ./gradlew ${{ inputs.action }} diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml new file mode 100644 index 000000000..9471458fc --- /dev/null +++ b/.github/workflows/integration_test.yml @@ -0,0 +1,56 @@ +name: Reusable action of running integration of production suite + +on: + workflow_call: + inputs: + FULLSTACK_TEST_REPO: + required: false + type: string + secrets: + CI_USER_TOKEN: + required: true + TRAVIS_COM_TOKEN: + required: true +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + # You should create a personal access token and store it in your repository + token: ${{ secrets.CI_USER_TOKEN }} + repository: 'optimizely/travisci-tools' + path: 'home/runner/travisci-tools' + ref: 'master' + - name: set SDK Branch if PR + if: ${{ github.event_name == 'pull_request' }} + run: | + echo "SDK_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV + echo "TRAVIS_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV + - name: set SDK Branch if not pull request + if: ${{ github.event_name != 'pull_request' }} + run: | + echo "SDK_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV + echo "TRAVIS_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV + - name: Trigger build + env: + SDK: java + FULLSTACK_TEST_REPO: ${{ inputs.FULLSTACK_TEST_REPO }} + BUILD_NUMBER: ${{ github.run_id }} + TESTAPP_BRANCH: master + GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }} + EVENT_TYPE: ${{ github.event_name }} + GITHUB_CONTEXT: ${{ toJson(github) }} + #REPO_SLUG: ${{ github.repository }} + PULL_REQUEST_SLUG: ${{ github.repository }} + UPSTREAM_REPO: ${{ github.repository }} + PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} + PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} + UPSTREAM_SHA: ${{ github.sha }} + TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} + TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} + EVENT_MESSAGE: ${{ github.event.message }} + HOME: 'home/runner' + run: | + echo "$GITHUB_CONTEXT" + home/runner/travisci-tools/trigger-script-with-status-update.sh diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml new file mode 100644 index 000000000..1c6c57a02 --- /dev/null +++ b/.github/workflows/java.yml @@ -0,0 +1,117 @@ +name: Java CI with Gradle + +on: + push: + branches: [ master ] + tags: + - '*' + pull_request: + branches: [ master ] + workflow_dispatch: + inputs: + SNAPSHOT: + type: boolean + description: Set SNAPSHOT true to publish + +jobs: + lint_markdown_files: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '2.6' + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Install gem + run: | + gem install awesome_bot + - name: Run tests + run: find . -type f -name '*.md' -exec awesome_bot {} \; + + integration_tests: + if: ${{ startsWith(github.ref, 'refs/tags/') != true && github.event.inputs.SNAPSHOT != 'true' }} + uses: optimizely/java-sdk/.github/workflows/integration_test.yml@mnoman/fsc-gitaction-test + secrets: + CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }} + TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} + + fullstack_production_suite: + if: ${{ startsWith(github.ref, 'refs/tags/') != true && github.event.inputs.SNAPSHOT != 'true' }} + uses: optimizely/java-sdk/.github/workflows/integration_test.yml@master + with: + FULLSTACK_TEST_REPO: ProdTesting + secrets: + CI_USER_TOKEN: ${{ secrets.CI_USER_TOKEN }} + TRAVIS_COM_TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} + + test: + if: ${{ startsWith(github.ref, 'refs/tags/') != true && github.event.inputs.SNAPSHOT != 'true' }} + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + jdk: [8, 9] + optimizely_default_parser: [GSON_CONFIG_PARSER, JACKSON_CONFIG_PARSER, JSON_CONFIG_PARSER, JSON_SIMPLE_CONFIG_PARSER] + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: set up JDK ${{ matrix.jdk }} + uses: AdoptOpenJDK/install-jdk@v1 + with: + version: ${{ matrix.jdk }} + architecture: x64 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Gradle cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} + + - name: run tests + id: unit_tests + env: + optimizely_default_parser: ${{ matrix.optimizely_default_parser }} + run: | + ./gradlew clean + ./gradlew exhaustiveTest + ./gradlew build + - name: Check on failures + if: always() && steps.unit_tests.outcome != 'success' + run: | + cat /home/runner/java-sdk/core-api/build/reports/findbugs/main.html + cat /home/runner/java-sdk/core-api/build/reports/findbugs/test.html + - name: Check on success + if: always() && steps.unit_tests.outcome == 'success' + run: | + ./gradlew coveralls uploadArchives --console plain + + publish: + if: startsWith(github.ref, 'refs/tags/') + uses: optimizely/java-sdk/.github/workflows/build.yml@master + with: + action: ship + travis_tag: ${GITHUB_REF#refs/*/} + secrets: + MAVEN_SIGNING_KEY_BASE64: ${{ secrets.MAVEN_SIGNING_KEY_BASE64 }} + MAVEN_SIGNING_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_PASSPHRASE }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + + snapshot: + if: ${{ github.event.inputs.SNAPSHOT == 'true' && github.event_name == 'workflow_dispatch' }} + uses: optimizely/java-sdk/.github/workflows/build.yml@master + with: + action: ship + travis_tag: BB-SNAPSHOT + secrets: + MAVEN_SIGNING_KEY_BASE64: ${{ secrets.MAVEN_SIGNING_KEY_BASE64 }} + MAVEN_SIGNING_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_PASSPHRASE }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} diff --git a/.github/workflows/source_clear_cron.yml b/.github/workflows/source_clear_cron.yml new file mode 100644 index 000000000..54eca5358 --- /dev/null +++ b/.github/workflows/source_clear_cron.yml @@ -0,0 +1,16 @@ +name: Source clear + +on: + schedule: + # Runs "weekly" + - cron: '0 0 * * 0' + +jobs: + source_clear: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Source clear scan + env: + SRCCLR_API_TOKEN: ${{ secrets.SRCCLR_API_TOKEN }} + run: curl -sSL https://download.sourceclear.com/ci.sh | bash -s – scan diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2735eacaf..000000000 --- a/.travis.yml +++ /dev/null @@ -1,92 +0,0 @@ -language: java -dist: trusty -jdk: - - openjdk8 - - oraclejdk8 - - oraclejdk9 -install: true -env: - - optimizely_default_parser=GSON_CONFIG_PARSER - - optimizely_default_parser=JACKSON_CONFIG_PARSER - - optimizely_default_parser=JSON_CONFIG_PARSER - - optimizely_default_parser=JSON_SIMPLE_CONFIG_PARSER -script: - - "./gradlew clean" - - "./gradlew exhaustiveTest" - - "./gradlew build" - -cache: - gradle: true - directories: - - "$HOME/.gradle/caches" - - "$HOME/.gradle/wrapper" -branches: - only: - - master - - /^\d+\.\d+\.(\d|[x])+(-SNAPSHOT|-alpha|-beta)?\d*$/ # trigger builds on tags which are semantically versioned to ship the SDK. -after_success: - - ./gradlew coveralls uploadArchives --console plain -after_failure: - - cat /home/travis/build/optimizely/java-sdk/core-api/build/reports/findbugs/main.html - - cat /home/travis/build/optimizely/java-sdk/core-api/build/reports/findbugs/test.html - -# Integration tests need to run first to reset the PR build status to pending -stages: - - 'Source Clear' - - 'Lint markdown files' - - 'Integration tests' - - 'Full stack production tests' - - 'Test' - - 'Publish' - - 'Snapshot' - -jobs: - include: - - stage: 'Lint markdown files' - os: linux - language: generic - install: gem install awesome_bot - script: - - find . -type f -name '*.md' -exec awesome_bot {} \; - notifications: - email: false - - - &integrationtest - stage: 'Integration tests' - merge_mode: replace - env: SDK=java SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH - cache: false - language: minimal - before_install: skip - install: skip - before_script: - - mkdir $HOME/travisci-tools && pushd $HOME/travisci-tools && git init && git pull https://$CI_USER_TOKEN@github.com/optimizely/travisci-tools.git && popd - script: - - $HOME/travisci-tools/trigger-script-with-status-update.sh - after_success: travis_terminate 0 - - - <<: *integrationtest - stage: 'Full stack production tests' - env: - SDK=java - SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH - FULLSTACK_TEST_REPO=ProdTesting - - - stage: 'Source Clear' - if: type = cron - install: skip - before_script: skip - script: skip - after_success: skip - - - stage: 'Publish' - if: tag IS present - script: - - ./gradlew ship - after_success: skip - - - stage: 'Snapshot' - if: env(SNAPSHOT) = true and type = api - script: - - TRAVIS_TAG=BB-SNAPSHOT ./gradlew ship - after_success: skip diff --git a/CHANGELOG.md b/CHANGELOG.md index 50b9c6cf0..ac028c780 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Optimizely Java X SDK Changelog +## [3.10.3] +March 13th, 2023 + +### Fixes +We updated our README.md and other non-functional code to reflect that this SDK supports both Optimizely Feature Experimentation and Optimizely Full Stack ([#506](https://github.com/optimizely/java-sdk/pull/506)). + ## [3.10.2] March 17th, 2022 diff --git a/README.md b/README.md index 62c75d880..33e55928d 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,40 @@ -Optimizely Java SDK -=================== +# Optimizely Java SDK + [![Build Status](https://travis-ci.org/optimizely/java-sdk.svg?branch=master)](https://travis-ci.org/optimizely/java-sdk) [![Apache 2.0](https://img.shields.io/badge/license-APACHE%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0) -This repository houses the Java SDK for use with Optimizely Full Stack and Optimizely Rollouts. +This repository houses the Java SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy). + +Optimizely Feature Experimentation is an A/B testing and feature management tool for product development teams that enables you to experiment at every step. Using Optimizely Feature Experimentation allows for every feature on your roadmap to be an opportunity to discover hidden insights. Learn more at [Optimizely.com](https://www.optimizely.com/products/experiment/feature-experimentation/), or see the [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome). + +Optimizely Rollouts is [free feature flags](https://www.optimizely.com/free-feature-flagging/) for development teams. You can easily roll out and roll back features in any application without code deploys, mitigating risk for every feature on your roadmap. + +## Get started -Optimizely Full Stack is A/B testing and feature flag management for product development teams. Experiment in any application. Make every feature on your roadmap an opportunity to learn. Learn more at https://www.optimizely.com/platform/full-stack/, or see the [documentation](https://docs.developers.optimizely.com/full-stack/docs). +Refer to the [Java SDK's developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/java-sdk) for detailed instructions on getting started with using the SDK. -Optimizely Rollouts is free feature flags for development teams. Easily roll out and roll back features in any application without code deploys. Mitigate risk for every feature on your roadmap. Learn more at https://www.optimizely.com/rollouts/, or see the [documentation](https://docs.developers.optimizely.com/rollouts/docs). +### Requirements +Java 8 or higher versions. -## Getting Started +### Install the SDK -### Installing the SDK +The Java SDK is distributed through Maven Central and is created with source and target compatibility of Java 1.8. The `core-api` and `httpclient` packages are [optimizely-sdk-core-api](https://mvnrepository.com/artifact/com.optimizely.ab/core-api) and [optimizely-sdk-httpclient](https://mvnrepository.com/artifact/com.optimizely.ab/core-httpclient-impl), respectively. -#### Gradle -The Java SDK is distributed through Maven Central and is created with source and target compatibility of Java 1.8. The `core-api` and `httpclient` packages are [optimizely-sdk-core-api](https://mvnrepository.com/artifact/com.optimizely.ab/core-api) and [optimizely-sdk-httpclient](https://mvnrepository.com/artifact/com.optimizely.ab/core-httpclient-impl), respectively. +`core-api` requires [org.slf4j:slf4j-api:1.7.16](https://mvnrepository.com/artifact/org.slf4j/slf4j-api/1.7.16) and a supported JSON parser. +We currently integrate with [Jackson](https://github.com/FasterXML/jackson), [GSON](https://github.com/google/gson), [json.org](http://www.json.org), and [json-simple](https://code.google.com/archive/p/json-simple); if any of those packages are available at runtime, they will be used by `core-api`. If none of those packages are already provided in your project's classpath, one will need to be added. + +`core-httpclient-impl` is an optional dependency that implements the event dispatcher and requires [org.apache.httpcomponents:httpclient:4.5.2](https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.2). --- + **NOTE** Optimizely previously distributed the Java SDK through Bintray/JCenter. But, as of April 27, 2021, [Bintray/JCenter will become a read-only repository indefinitely](https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/). The publish repository has been migrated to [MavenCentral](https://mvnrepository.com/artifact/com.optimizely.ab) for the SDK version 3.8.1 or later. --- - ``` repositories { mavenCentral() @@ -35,49 +44,29 @@ repositories { dependencies { compile 'com.optimizely.ab:core-api:{VERSION}' compile 'com.optimizely.ab:core-httpclient-impl:{VERSION}' - // The SDK integrates with multiple JSON parsers, here we use - // Jackson. + // The SDK integrates with multiple JSON parsers, here we use Jackson. compile 'com.fasterxml.jackson.core:jackson-core:2.7.1' compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.1' compile 'com.fasterxml.jackson.core:jackson-databind:2.7.1' } -``` - -#### Dependencies - -`core-api` requires [org.slf4j:slf4j-api:1.7.16](https://mvnrepository.com/artifact/org.slf4j/slf4j-api/1.7.16) and a supported JSON parser. -We currently integrate with [Jackson](https://github.com/FasterXML/jackson), [GSON](https://github.com/google/gson), [json.org](http://www.json.org), -and [json-simple](https://code.google.com/archive/p/json-simple); if any of those packages are available at runtime, they will be used by `core-api`. -If none of those packages are already provided in your project's classpath, one will need to be added. `core-httpclient-impl` is an optional -dependency that implements the event dispatcher and requires [org.apache.httpcomponents:httpclient:4.5.2](https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.2). -The supplied `pom` files on Bintray define module dependencies. - -### Feature Management Access -To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive. +``` -### Using the SDK -See the Optimizely Full Stack [developer documentation](http://developers.optimizely.com/server/reference/index.html) to learn how to set -up your first Java project and use the SDK. +## Use the Java SDK -## Development +See the Optimizely Feature Experimentation [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0-full-stack/docs/java-sdk) to learn how to set up your first Java project and use the SDK. -### Building the SDK -To build local jars which are outputted into the respective modules' `build/lib` directories: - -``` -./gradlew build -``` +## SDK Development ### Unit tests -#### Running all tests - You can run all unit tests with: ``` + ./gradlew test + ``` ### Checking for bugs @@ -85,7 +74,9 @@ You can run all unit tests with: We utilize [FindBugs](http://findbugs.sourceforge.net/) to identify possible bugs in the SDK. To run the check: ``` + ./gradlew check + ``` ### Benchmarking @@ -93,7 +84,9 @@ We utilize [FindBugs](http://findbugs.sourceforge.net/) to identify possible bug [JMH](http://openjdk.java.net/projects/code-tools/jmh/) benchmarks can be run through gradle: ``` + ./gradlew core-api:jmh + ``` Results are generated in `$buildDir/reports/jmh`. @@ -112,34 +105,74 @@ This software incorporates code from the following open source projects: #### core-api module -**SLF4J** [https://www.slf4j.org ](https://www.slf4j.org) -Copyright © 2004-2017 QOS.ch +**SLF4J** [https://www.slf4j.org ](https://www.slf4j.org) + +Copyright © 2004-2017 QOS.ch + License (MIT): [https://www.slf4j.org/license.html](https://www.slf4j.org/license.html) -**Jackson Annotations** [https://github.com/FasterXML/jackson-annotations](https://github.com/FasterXML/jackson-annotations) +**Jackson Annotations** [https://github.com/FasterXML/jackson-annotations](https://github.com/FasterXML/jackson-annotations) + License (Apache 2.0): [https://github.com/FasterXML/jackson-annotations/blob/master/src/main/resources/META-INF/LICENSE](https://github.com/FasterXML/jackson-annotations/blob/master/src/main/resources/META-INF/LICENSE) -**Gson** [https://github.com/google/gson ](https://github.com/google/gson) +**Gson** [https://github.com/google/gson ](https://github.com/google/gson) + Copyright © 2008 Google Inc. + License (Apache 2.0): [https://github.com/google/gson/blob/master/LICENSE](https://github.com/google/gson/blob/master/LICENSE) -**JSON-java** [https://github.com/stleary/JSON-java](https://github.com/stleary/JSON-java) -Copyright © 2002 JSON.org +**JSON-java** [https://github.com/stleary/JSON-java](https://github.com/stleary/JSON-java) + +Copyright © 2002 JSON.org + License (The JSON License): [https://github.com/stleary/JSON-java/blob/master/LICENSE](https://github.com/stleary/JSON-java/blob/master/LICENSE) -**JSON.simple** [https://code.google.com/archive/p/json-simple/](https://code.google.com/archive/p/json-simple/) -Copyright © January 2004 +**JSON.simple** [https://code.google.com/archive/p/json-simple/](https://code.google.com/archive/p/json-simple/) + +Copyright © January 2004 + License (Apache 2.0): [https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt](https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt) -**Jackson Databind** [https://github.com/FasterXML/jackson-databind](https://github.com/FasterXML/jackson-databind) +**Jackson Databind** [https://github.com/FasterXML/jackson-databind](https://github.com/FasterXML/jackson-databind) + License (Apache 2.0): [https://github.com/FasterXML/jackson-databind/blob/master/src/main/resources/META-INF/LICENSE](https://github.com/FasterXML/jackson-databind/blob/master/src/main/resources/META-INF/LICENSE) #### core-httpclient-impl module -**Gson** [https://github.com/google/gson ](https://github.com/google/gson) +**Gson** [https://github.com/google/gson ](https://github.com/google/gson) + Copyright © 2008 Google Inc. + License (Apache 2.0): [https://github.com/google/gson/blob/master/LICENSE](https://github.com/google/gson/blob/master/LICENSE) -**Apache HttpClient** [https://hc.apache.org/httpcomponents-client-ga/index.html ](https://hc.apache.org/httpcomponents-client-ga/index.html) +**Apache HttpClient** [https://hc.apache.org/httpcomponents-client-ga/index.html ](https://hc.apache.org/httpcomponents-client-ga/index.html) + Copyright © January 2004 + License (Apache 2.0): [https://github.com/apache/httpcomponents-client/blob/master/LICENSE.txt](https://github.com/apache/httpcomponents-client/blob/master/LICENSE.txt) + +### Other Optimzely SDKs + +- Agent - https://github.com/optimizely/agent + +- Android - https://github.com/optimizely/android-sdk + +- C# - https://github.com/optimizely/csharp-sdk + +- Flutter - https://github.com/optimizely/optimizely-flutter-sdk + +- Go - https://github.com/optimizely/go-sdk + +- Java - https://github.com/optimizely/java-sdk + +- JavaScript - https://github.com/optimizely/javascript-sdk + +- PHP - https://github.com/optimizely/php-sdk + +- Python - https://github.com/optimizely/python-sdk + +- React - https://github.com/optimizely/react-sdk + +- Ruby - https://github.com/optimizely/ruby-sdk + +- Swift - https://github.com/optimizely/swift-sdk diff --git a/build.gradle b/build.gradle index 4c167014f..b8405e39b 100644 --- a/build.gradle +++ b/build.gradle @@ -223,7 +223,7 @@ def customizePom(pom, title) { name title url 'https://github.com/optimizely/java-sdk' - description 'The Java SDK for Optimizely Full Stack (feature flag management for product development teams)' + description 'The Java SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts' licenses { license { name 'The Apache Software License, Version 2.0' diff --git a/core-api/README.md b/core-api/README.md index 13504566f..91d439ec7 100644 --- a/core-api/README.md +++ b/core-api/README.md @@ -1,7 +1,7 @@ # Java SDK Core API -This package contains the core APIs and interfaces for the Optimizely Full Stack API in Java. +This package contains the core APIs and interfaces for the Optimizely Feature Experimentation API in Java. -Full product documentation is in the [Optimizely developers documentation](https://docs.developers.optimizely.com/full-stack/docs/welcome). +Full product documentation is in the [Optimizely developers documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome). ## Installation @@ -22,7 +22,7 @@ compile 'com.optimizely.ab:core-api:{VERSION}' ## Optimizely [`Optimizely`](https://github.com/optimizely/java-sdk/blob/master/core-api/src/main/java/com/optimizely/ab/Optimizely.java) -provides top level API access to the Full Stack project. +provides top level API access to the Feature Experimentation project. ### Usage ```Java diff --git a/core-api/src/test/java/com/optimizely/ab/config/DatafileProjectConfigTestUtils.java b/core-api/src/test/java/com/optimizely/ab/config/DatafileProjectConfigTestUtils.java index b96815a39..49eaac733 100644 --- a/core-api/src/test/java/com/optimizely/ab/config/DatafileProjectConfigTestUtils.java +++ b/core-api/src/test/java/com/optimizely/ab/config/DatafileProjectConfigTestUtils.java @@ -491,7 +491,7 @@ private static void verifyExperiments(List actual, List assertThat(actualExperiment.getGroupId(), is(expectedExperiment.getGroupId())); assertThat(actualExperiment.getStatus(), is(expectedExperiment.getStatus())); assertThat(actualExperiment.getAudienceIds(), is(expectedExperiment.getAudienceIds())); - assertThat(actualExperiment.getAudienceConditions(), is(expectedExperiment.getAudienceConditions())); + assertEquals(actualExperiment.getAudienceConditions(), expectedExperiment.getAudienceConditions()); assertThat(actualExperiment.getUserIdToVariationKeyMap(), is(expectedExperiment.getUserIdToVariationKeyMap())); diff --git a/core-api/src/test/java/com/optimizely/ab/config/parser/JacksonConfigParserTest.java b/core-api/src/test/java/com/optimizely/ab/config/parser/JacksonConfigParserTest.java index e4e009e10..2e5dcb672 100644 --- a/core-api/src/test/java/com/optimizely/ab/config/parser/JacksonConfigParserTest.java +++ b/core-api/src/test/java/com/optimizely/ab/config/parser/JacksonConfigParserTest.java @@ -69,6 +69,7 @@ public void parseProjectConfigV3() throws Exception { verifyProjectConfig(actual, expected); } + @SuppressFBWarnings("NP_NULL_PARAM_DEREF") @Test public void parseProjectConfigV4() throws Exception { JacksonConfigParser parser = new JacksonConfigParser();