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

Replace javax.inject with jakarta.inject #389

Merged
merged 1 commit into from
Aug 7, 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
1 change: 0 additions & 1 deletion framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependencies {
implementation 'com.github.f4b6a3:ulid-creator:5.2.3'
api('commons-logging:commons-logging:1.3.2')
api('javax.mail:mail:1.4.7')
api('javax.inject:javax.inject:1')
api('jakarta.inject:jakarta.inject-api:2.0.1')
implementation('ch.qos.reload4j:reload4j:1.2.25')
implementation('org.ehcache:ehcache:3.10.8')
Expand Down
2 changes: 1 addition & 1 deletion framework/src/play/Play.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import play.templates.JavaExtensions;
import play.templates.TemplateLoader;

import jakarta.inject.Inject;
import javax.annotation.Nullable;
import javax.inject.Inject;
import java.io.File;
import java.lang.management.ManagementFactory;
import java.lang.reflect.Field;
Expand Down
6 changes: 3 additions & 3 deletions framework/src/play/db/jpa/JPARepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import play.db.jpa.GenericModel.JPAQuery;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Singleton;
import jakarta.inject.Singleton;
import jakarta.persistence.Entity;
import jakarta.persistence.PersistenceUnit;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.List;

@Singleton
Expand Down
2 changes: 1 addition & 1 deletion framework/src/play/libs/ws/WSAsync.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.slf4j.LoggerFactory;
import play.Play;

import javax.inject.Singleton;
import jakarta.inject.Singleton;
import javax.net.ssl.SSLContext;
import java.util.Optional;

Expand Down
2 changes: 1 addition & 1 deletion framework/src/play/mvc/ActionInvoker.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import play.utils.Java;
import play.utils.Utils;

import javax.inject.Inject;
import jakarta.inject.Inject;
import java.io.File;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
Expand Down
2 changes: 1 addition & 1 deletion framework/src/play/mvc/FlashStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import play.libs.Signer;
import play.mvc.results.Forbidden;

import jakarta.inject.Singleton;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Singleton;
import java.util.Map;

import static play.mvc.Scope.COOKIE_PREFIX;
Expand Down
2 changes: 1 addition & 1 deletion framework/src/play/mvc/Redirector.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import play.data.binding.Unbinder;

import javax.inject.Singleton;
import jakarta.inject.Singleton;
import java.lang.annotation.Annotation;
import java.util.HashMap;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import play.Invoker;
import play.mvc.ActionInvoker;

import javax.inject.Inject;
import jakarta.inject.Inject;

public class HttpServerPipelineFactory implements ChannelPipelineFactory {
private final Invoker invoker;
Expand Down
2 changes: 1 addition & 1 deletion netty4/src/play/server/netty4/HttpServerInitializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import play.Invoker;
import play.mvc.ActionInvoker;

import javax.inject.Inject;
import jakarta.inject.Inject;

import static play.server.ServerHelper.maxContentLength;

Expand Down
2 changes: 1 addition & 1 deletion pdf/src/play/modules/pdf/PdfGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import play.mvc.Http;

import javax.inject.Singleton;
import jakarta.inject.Singleton;
import java.io.ByteArrayOutputStream;

@Singleton
Expand Down
2 changes: 1 addition & 1 deletion replay-tests/criminals/app/controllers/Criminals.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import play.rebel.View;
import services.CriminalSafetyCalculator;

import javax.inject.Inject;
import jakarta.inject.Inject;

public class Criminals extends Controller {
@Inject
Expand Down
2 changes: 1 addition & 1 deletion replay-tests/criminals/app/controllers/Login.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import play.rebel.View;
import services.OtpCodeService;

import javax.inject.Inject;
import jakarta.inject.Inject;

public class Login extends Controller {
private static final Logger log = LoggerFactory.getLogger(Login.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.inject.Inject;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
import java.io.IOException;
import java.util.List;

Expand Down
2 changes: 1 addition & 1 deletion replay-tests/criminals/app/services/OtpCodeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.apache.commons.mail.SimpleEmail;
import play.libs.Mail;

import javax.inject.Singleton;
import jakarta.inject.Singleton;

@Singleton
public class OtpCodeService {
Expand Down
2 changes: 1 addition & 1 deletion replay-tests/criminals/app/services/RestClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import models.CriminalRecord;
import org.apache.http.client.fluent.Request;

import javax.inject.Singleton;
import jakarta.inject.Singleton;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.ArrayList;
Expand Down
2 changes: 1 addition & 1 deletion replay-tests/criminals/test/ui/MailServerEmulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.subethamail.smtp.server.SMTPServer;
import play.Play;

import javax.inject.Singleton;
import jakarta.inject.Singleton;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.internet.MimeMessage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import play.jobs.SimpleJob;
import services.Counter;

import javax.inject.Inject;
import jakarta.inject.Inject;

@Every("1s")
public class CounterUpdaterJob extends SimpleJob {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import play.jobs.SimpleJob;
import services.Counter;

import javax.inject.Inject;
import jakarta.inject.Inject;

@OnApplicationStart
public class CounterUpdaterJob2 extends SimpleJob {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import play.jobs.SimpleJob;
import services.Counter;

import javax.inject.Inject;
import jakarta.inject.Inject;

@On("cron.counterUpdater")
public class CounterUpdaterJob3 extends SimpleJob {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import play.mvc.Scope.Flash;
import services.Mathematics;

import javax.inject.Inject;
import jakarta.inject.Inject;
import java.lang.reflect.Method;
import java.math.BigDecimal;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package services;

import javax.inject.Singleton;
import jakarta.inject.Singleton;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package services;

import javax.inject.Singleton;
import jakarta.inject.Singleton;
import java.math.BigDecimal;

@Singleton
Expand Down
2 changes: 1 addition & 1 deletion replay-tests/liquibase-app/app/controllers/PetApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import play.mvc.results.RenderJson;
import play.mvc.results.Result;

import javax.inject.Inject;
import jakarta.inject.Inject;
import java.util.Map;

public class PetApi extends Controller {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import play.mvc.results.Result;
import play.rebel.View;

import javax.inject.Inject;
import jakarta.inject.Inject;
import java.util.Map;

public class PetRegistration extends Controller {
Expand Down
2 changes: 1 addition & 1 deletion replay-tests/liquibase-app/app/controllers/PetReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import play.mvc.Controller;
import play.mvc.results.Result;

import javax.inject.Inject;
import jakarta.inject.Inject;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
Expand Down
2 changes: 1 addition & 1 deletion replay-tests/liquibase-app/app/controllers/PetStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import play.mvc.Controller;
import play.rebel.View;

import javax.inject.Inject;
import jakarta.inject.Inject;
import java.util.List;

public class PetStore extends Controller {
Expand Down
2 changes: 1 addition & 1 deletion replay-tests/liquibase-app/app/model/PetRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import play.db.jpa.JPA;

import javax.inject.Singleton;
import jakarta.inject.Singleton;
import jakarta.persistence.Query;
import java.time.LocalDateTime;
import java.util.List;
Expand Down
Loading