diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..25e428ac --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,17 @@ +name: CI +on: [push, pull_request] +jobs: + test: + strategy: + matrix: + java: [7, 8, 9, 10, 11, 12, 13, 14, 15] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Java + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Test + run: mvn clean install diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 266968ef..00000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -sudo: required - -language: java - -cache: - directories: - - $HOME/.m2/repository - -jdk: - - oraclejdk7 - - openjdk7 - - openjdk6 - - oraclejdk8 - - oraclejdk10 - -install: travis_wait mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V diff --git a/README.md b/README.md index b25c3cf7..2c0e6c30 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/fakemongo/fongo.svg?branch=master)](https://travis-ci.org/fakemongo/fongo) +[![Build Status](https://github.com/fakemongo/fongo/workflows/ci/badge.svg)](https://github.com/fakemongo/fongo/actions?query=workflow%3Aci) # fongo diff --git a/pom.xml b/pom.xml index d86ddf25..7eb11424 100644 --- a/pom.xml +++ b/pom.xml @@ -45,8 +45,9 @@ UTF-8 - 2.11.6 + 2.11.12 2.18.1 + 1.7 ${project.build.directory}/jacoco-unit.exec @@ -104,6 +105,11 @@ geojson-jackson 1.2 + + javax.xml.bind + jaxb-api + 2.3.1 + @@ -213,8 +219,8 @@ maven-compiler-plugin 3.2 - 1.6 - 1.6 + ${java.version} + ${java.version} UTF-8 com/github/fakemongo/PerfTest.java @@ -236,7 +242,7 @@ org.jacoco jacoco-maven-plugin - 0.7.5.201505241946 + 0.8.6 @@ -294,9 +300,9 @@ -source - 1.6 + ${java.version} -target - 1.6 + ${java.version} -Xms64m @@ -304,10 +310,11 @@ - -target:jvm-1.6 + -target:jvm-${java.version} -unchecked -deprecation -feature + -nobootcp @@ -339,6 +346,7 @@ 2.10.3 com.mongodb:com.github.fakemongo.impl + ${java.version} @@ -490,8 +498,8 @@ maven-compiler-plugin 3.2 - 1.6 - 1.6 + ${java.version} + ${java.version} UTF-8 com/github/fakemongo/PerfTest.java diff --git a/src/main/java/com/github/fakemongo/junit/FongoRule.java b/src/main/java/com/github/fakemongo/junit/FongoRule.java index 31fd4835..b5d6ea5a 100644 --- a/src/main/java/com/github/fakemongo/junit/FongoRule.java +++ b/src/main/java/com/github/fakemongo/junit/FongoRule.java @@ -63,6 +63,7 @@ public class FongoRule extends ExternalResource { * @param serverVersion version of the server to use for fongo. * @param realMongo set to true if you want to use a real mongoDB. * @param mongoClientIfReal real client to use if realMongo si true. + * @param codecRegistry the codec registry used by fongo. */ public FongoRule(final String dbName, final ServerVersion serverVersion, final boolean realMongo, final MongoClient mongoClientIfReal, final CodecRegistry codecRegistry) { this.dbName = dbName; diff --git a/src/main/java/com/mongodb/FongoDBCollection.java b/src/main/java/com/mongodb/FongoDBCollection.java index ae3909da..8356f018 100644 --- a/src/main/java/com/mongodb/FongoDBCollection.java +++ b/src/main/java/com/mongodb/FongoDBCollection.java @@ -44,7 +44,6 @@ import org.bson.types.ObjectId; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; import static com.mongodb.assertions.Assertions.isTrueArgument; @@ -1211,7 +1210,7 @@ BulkWriteResult executeBulkWriteOperation(final boolean ordered, final Boolean b } } } else { - throw new NotImplementedException(); + throw new UnsupportedOperationException(); } idx++; }