mirror of
https://github.com/jwtk/jjwt.git
synced 2025-02-10 05:34:57 +00:00
relocated Service.java to impl module (along with tests). (#529)
This commit is contained in:
parent
c21c30a025
commit
dacdb2ce25
@ -1 +0,0 @@
|
||||
io.jsonwebtoken.DefaultStubService
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
@ -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.
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
}
|
@ -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
|
||||
|
||||
|
@ -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)
|
@ -0,0 +1 @@
|
||||
io.jsonwebtoken.impl.DefaultStubService
|
Loading…
x
Reference in New Issue
Block a user