Skip to content

Commit

Permalink
relocated Service.java to impl module (along with tests). (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogeared committed Oct 27, 2019
1 parent c21c30a commit dacdb2c
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 13 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import io.jsonwebtoken.io.Decoders;
import io.jsonwebtoken.io.Deserializer;
import io.jsonwebtoken.lang.Assert;
import io.jsonwebtoken.lang.Services;
import io.jsonwebtoken.impl.lang.Services;

import java.security.Key;
import java.util.Date;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import io.jsonwebtoken.CompressionException;
import io.jsonwebtoken.Header;
import io.jsonwebtoken.lang.Assert;
import io.jsonwebtoken.lang.Services;
import io.jsonwebtoken.impl.lang.Services;
import io.jsonwebtoken.lang.Strings;

import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package io.jsonwebtoken.impl.lang;

import io.jsonwebtoken.lang.Classes;
import io.jsonwebtoken.lang.Services;
import io.jsonwebtoken.lang.UnavailableImplementationException;
import io.jsonwebtoken.lang.UnknownClassException;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.jsonwebtoken.lang;
package io.jsonwebtoken.impl.lang;

import io.jsonwebtoken.lang.Assert;

import java.util.ArrayList;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.jsonwebtoken.lang;
package io.jsonwebtoken.impl.lang;

/**
* Exception indicating that no implementation of an jjwt-api SPI was found on the classpath.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import io.jsonwebtoken.impl.compression.DefaultCompressionCodecResolver
import io.jsonwebtoken.impl.compression.GzipCompressionCodec
import io.jsonwebtoken.io.Encoders
import io.jsonwebtoken.io.Serializer
import io.jsonwebtoken.lang.Services
import io.jsonwebtoken.impl.lang.Services
import io.jsonwebtoken.lang.Strings
import io.jsonwebtoken.security.Keys
import io.jsonwebtoken.security.WeakKeyException
Expand Down
2 changes: 1 addition & 1 deletion impl/src/test/groovy/io/jsonwebtoken/JwtsTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import io.jsonwebtoken.impl.compression.DefaultCompressionCodecResolver
import io.jsonwebtoken.impl.compression.GzipCompressionCodec
import io.jsonwebtoken.io.Encoders
import io.jsonwebtoken.io.Serializer
import io.jsonwebtoken.lang.Services
import io.jsonwebtoken.impl.lang.Services
import io.jsonwebtoken.lang.Strings
import io.jsonwebtoken.security.Keys
import io.jsonwebtoken.security.WeakKeyException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.jsonwebtoken
package io.jsonwebtoken.impl

import io.jsonwebtoken.StubService

class DefaultStubService implements StubService {
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import io.jsonwebtoken.CompressionCodec
import io.jsonwebtoken.CompressionException
import io.jsonwebtoken.impl.DefaultHeader
import io.jsonwebtoken.impl.io.FakeServiceDescriptorClassLoader
import io.jsonwebtoken.lang.Services
import io.jsonwebtoken.impl.lang.Services
import org.junit.Assert
import org.junit.Test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.jsonwebtoken.lang
package io.jsonwebtoken.impl.lang

import io.jsonwebtoken.DefaultStubService
import io.jsonwebtoken.impl.DefaultStubService
import io.jsonwebtoken.StubService
import org.junit.Test
import org.junit.runner.RunWith
Expand Down Expand Up @@ -50,6 +50,11 @@ class ServicesTest {
}
}

@Test
void testPrivateConstructor() {
new Services(); // not allowed in Java, including here for test coverage
}

static class NoServicesClassLoader extends ClassLoader {
private NoServicesClassLoader(ClassLoader parent) {
super(parent)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.jsonwebtoken.impl.DefaultStubService

0 comments on commit dacdb2c

Please sign in to comment.