Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added jakarta namespace #1309

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 43 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SOFTWARE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.66.0</version>
<version>0.68.0</version>
</parent>
<groupId>org.takes</groupId>
<artifactId>takes</artifactId>
Expand Down Expand Up @@ -130,27 +130,27 @@ SOFTWARE.
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.1.4</version>
<groupId>jakarta.json</groupId>
<artifactId>jakarta.json-api</artifactId>
<version>2.1.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-http</artifactId>
<version>1.20.1</version>
<version>2.0.0</version>
<optional>true</optional>
</dependency>
<dependency>
Expand Down Expand Up @@ -210,13 +210,19 @@ SOFTWARE.
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-servlet-server</artifactId>
<version>2.4.4</version>
<version>4.0.2</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-npn-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1.4</version>
<groupId>org.eclipse.parsson</groupId>
<artifactId>jakarta.json</artifactId>
<version>1.1.6</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -244,16 +250,24 @@ SOFTWARE.
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>1.19.4</version>
<version>3.1.5</version>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>3.1.5</version>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.sf.saxon</groupId>
Expand All @@ -278,6 +292,12 @@ SOFTWARE.
<artifactId>slf4j-reload4j</artifactId>
<version>2.0.13</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>ch.qos.reload4j</groupId>
<artifactId>reload4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
Expand Down Expand Up @@ -535,9 +555,9 @@ SOFTWARE.
</activation>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.4.0-b180830.0359</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
Expand Down
15 changes: 8 additions & 7 deletions src/it/file-manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SOFTWARE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.66.0</version>
<version>0.68.0</version>
</parent>
<groupId>org.takes.test</groupId>
<artifactId>file-manager</artifactId>
Expand Down Expand Up @@ -68,7 +68,7 @@ SOFTWARE.
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-http</artifactId>
<version>1.20.1</version>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -90,16 +90,17 @@ SOFTWARE.
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>1.19.4</version>
<scope>test</scope>
<version>3.1.5</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.sourceforge.saxon</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/takes/facets/auth/PsBasic.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.takes.facets.auth;

import jakarta.xml.bind.DatatypeConverter;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
Expand All @@ -33,7 +34,6 @@
import java.util.Map;
import java.util.logging.Level;
import java.util.regex.Pattern;
import javax.xml.bind.DatatypeConverter;
import lombok.EqualsAndHashCode;
import org.cactoos.text.IoCheckedText;
import org.cactoos.text.TextOf;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/takes/facets/auth/PsToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
*/
package org.takes.facets.auth;

import jakarta.json.Json;
import jakarta.json.JsonObject;
import jakarta.json.JsonReader;
import java.io.IOException;
import java.io.StringReader;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.Arrays;
import java.util.Base64;
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonReader;
import lombok.EqualsAndHashCode;
import org.cactoos.iterable.Mapped;
import org.cactoos.scalar.Constant;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/takes/facets/auth/Token.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
*/
package org.takes.facets.auth;

import jakarta.json.Json;
import jakarta.json.JsonObject;
import java.nio.charset.Charset;
import java.util.Base64;
import java.util.Calendar;
import java.util.TimeZone;
import javax.json.Json;
import javax.json.JsonObject;

/**
* JSON Token.
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/org/takes/facets/auth/codecs/CcSalted.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
package org.takes.facets.auth.codecs;

import com.jcabi.aspects.Tv;
import java.io.IOException;
import java.security.SecureRandom;
import java.util.Random;
Expand All @@ -45,6 +44,11 @@ public final class CcSalted implements Codec {
*/
private static final Random RND = new SecureRandom();

/**
* Maximum reandom size.
*/
private static final int RND_MAX_SIZE = 10;

/**
* Original codec.
*/
Expand Down Expand Up @@ -75,7 +79,7 @@ public Identity decode(final byte[] bytes) throws IOException {
*/
@SuppressWarnings("PMD.AvoidArrayLoops")
private static byte[] salt(final byte[] text) {
final byte size = (byte) CcSalted.RND.nextInt(Tv.TEN);
final byte size = (byte) CcSalted.RND.nextInt(CcSalted.RND_MAX_SIZE);
final byte[] output = new byte[text.length + (int) size + 2];
output[0] = size;
byte sum = (byte) 0;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/takes/facets/auth/social/PsGithub.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
import com.jcabi.http.response.JsonResponse;
import com.jcabi.http.response.RestResponse;
import com.jcabi.http.response.XmlResponse;
import jakarta.json.JsonObject;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import javax.json.JsonObject;
import lombok.EqualsAndHashCode;
import org.takes.HttpException;
import org.takes.Request;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/takes/facets/auth/social/PsGoogle.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
import com.jcabi.http.request.JdkRequest;
import com.jcabi.http.response.JsonResponse;
import com.jcabi.http.response.RestResponse;
import jakarta.json.JsonObject;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import javax.json.JsonObject;
import lombok.EqualsAndHashCode;
import org.takes.HttpException;
import org.takes.Request;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/takes/facets/auth/social/PsLinkedin.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
import com.jcabi.http.request.JdkRequest;
import com.jcabi.http.response.JsonResponse;
import com.jcabi.http.response.RestResponse;
import jakarta.json.JsonObject;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import javax.json.JsonObject;
import lombok.EqualsAndHashCode;
import org.takes.HttpException;
import org.takes.Request;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/takes/facets/auth/social/PsTwitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
import com.jcabi.http.request.JdkRequest;
import com.jcabi.http.response.JsonResponse;
import com.jcabi.http.response.RestResponse;
import jakarta.json.JsonObject;
import jakarta.xml.bind.DatatypeConverter;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import javax.json.JsonObject;
import javax.xml.bind.DatatypeConverter;
import lombok.EqualsAndHashCode;
import org.cactoos.bytes.BytesOf;
import org.cactoos.bytes.UncheckedBytes;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/takes/rs/RsJson.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
*/
package org.takes.rs;

import jakarta.json.Json;
import jakarta.json.JsonStructure;
import jakarta.json.JsonWriter;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.HttpURLConnection;
import javax.json.Json;
import javax.json.JsonStructure;
import javax.json.JsonWriter;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.takes.Response;
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/takes/rs/RsPrettyJson.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
*/
package org.takes.rs;

import jakarta.json.Json;
import jakarta.json.JsonException;
import jakarta.json.JsonObject;
import jakarta.json.JsonReader;
import jakarta.json.JsonWriter;
import jakarta.json.stream.JsonGenerator;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import javax.json.Json;
import javax.json.JsonException;
import javax.json.JsonObject;
import javax.json.JsonReader;
import javax.json.JsonWriter;
import javax.json.stream.JsonGenerator;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.takes.Response;
Expand Down
Loading
Loading