relocated Service.java to impl module (along with tests). (#529)

This commit is contained in:
Micah Silverman 2019-10-27 17:13:49 -04:00 committed by GitHub
parent c21c30a025
commit dacdb2ce25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 20 additions and 13 deletions

View File

@ -1 +0,0 @@
io.jsonwebtoken.DefaultStubService

View File

@ -26,7 +26,7 @@ import io.jsonwebtoken.io.Decoder;
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;

View File

@ -21,7 +21,7 @@ import io.jsonwebtoken.CompressionCodecs;
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;

View File

@ -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;
/**

View File

@ -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;

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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 {
}

View File

@ -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

View File

@ -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
@ -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)

View File

@ -0,0 +1 @@
io.jsonwebtoken.impl.DefaultStubService