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

Replaced usages of javax.inject with jakarta.inject #709

Merged
merged 1 commit into from
Dec 14, 2023
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
4 changes: 2 additions & 2 deletions cnf/ext/runtime.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bundles.console: \

bundles.deps: \
javax.annotation,\
javax.inject,\
jakarta.inject.jakarta.inject-api,\
javax.xml.jre,\
org.apache.commons.jxpath,\
com.google.guava,\
Expand Down Expand Up @@ -86,7 +86,7 @@ bundles.required: \
org.apache.commons.text,\
org.eclipse.equinox.preferences,\
controlsfx,\
javax.inject,\
jakarta.inject.jakarta.inject-api,\
com.osgifx.console.util,\
com.osgifx.console.wrapper.mug,\
eu.hansolo.tilesfx,\
Expand Down
4 changes: 4 additions & 0 deletions cnf/maven/runtime.maven
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ org.eclipse.platform:org.eclipse.core.variables:3.6.200
org.slf4j:slf4j-api:1.7.36
org.apache.sling:org.apache.sling.commons.log:5.4.2
org.apache.sling:org.apache.sling.commons.logservice:1.1.0

# Jakarta

jakarta.inject:jakarta.inject-api:2.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public List<BundleStartDuration> getBundleStartDurations() {
return bundleToStartTime.values().stream().map(StartTime::toBundleStartDuration).collect(toList());
}
}

public Optional<BundleStartDuration> getBundleStartDuration(long bundleId) {
return Optional.ofNullable(bundleToStartTime.get(bundleId)).map(StartTime::toBundleStartDuration);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

import static com.osgifx.console.supervisor.Supervisor.AGENT_CONNECTED_EVENT_TOPIC;

import javax.inject.Inject;

import org.controlsfx.dialog.ProgressDialog;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.di.UIEventTopic;
Expand All @@ -32,6 +30,7 @@
import com.osgifx.console.executor.Executor;
import com.osgifx.console.util.fx.FxDialog;

import jakarta.inject.Inject;
import javafx.concurrent.Task;

public final class AgentConnectedAddon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.inject.Inject;

import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.di.extensions.EventTopic;
Expand All @@ -38,6 +37,8 @@
import com.osgifx.console.executor.Executor;
import com.osgifx.console.supervisor.Supervisor;

import jakarta.inject.Inject;

public final class AgentPingAddon {

private static final Duration INITIAL_DELAY = Duration.ofSeconds(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
import java.util.Set;

import javax.annotation.PostConstruct;
import javax.inject.Inject;

import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.fx.core.log.FluentLogger;
import org.eclipse.fx.core.log.Log;

import com.google.common.collect.Maps;

import jakarta.inject.Inject;

public final class ModifiablePropertyAddon {

private final Map<String, Object> modifiableProperties = Maps.newHashMap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
******************************************************************************/
package com.osgifx.console.application.addon;

import javax.inject.Inject;

import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.di.extensions.EventTopic;
import org.eclipse.e4.ui.model.application.MApplication;
Expand All @@ -26,6 +24,7 @@
import org.eclipse.fx.ui.workbench.renderers.base.widget.WWindow;
import org.osgi.service.event.Event;

import jakarta.inject.Inject;
import javafx.stage.Stage;

public final class WindowResizeDisablerAddon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@

import static com.osgifx.console.constants.FxConstants.STANDARD_CSS;

import javax.inject.Inject;

import org.eclipse.e4.core.di.extensions.OSGiBundle;
import org.eclipse.fx.core.di.LocalInstance;
import org.osgi.framework.BundleContext;

import com.osgifx.console.util.fx.Fx;

import jakarta.inject.Inject;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Dialog;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

import java.util.Map;

import javax.inject.Inject;

import org.eclipse.e4.core.di.extensions.OSGiBundle;
import org.eclipse.fx.core.di.LocalInstance;
import org.osgi.framework.BundleContext;
Expand All @@ -35,6 +33,7 @@
import com.osgifx.console.application.fxml.controller.MqttConnectionSettingsDialogController;
import com.osgifx.console.util.fx.Fx;

import jakarta.inject.Inject;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.ButtonBar;
import javafx.scene.control.ButtonType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

import java.util.Map;

import javax.inject.Inject;

import org.eclipse.e4.core.di.extensions.OSGiBundle;
import org.eclipse.fx.core.di.LocalInstance;
import org.osgi.framework.BundleContext;
Expand All @@ -35,6 +33,7 @@
import com.osgifx.console.application.fxml.controller.SocketConnectionSettingsDialogController;
import com.osgifx.console.util.fx.Fx;

import jakarta.inject.Inject;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.ButtonBar;
import javafx.scene.control.ButtonType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

import java.util.Optional;

import javax.inject.Inject;

import org.controlsfx.control.textfield.CustomPasswordField;
import org.controlsfx.control.textfield.CustomTextField;
import org.controlsfx.control.textfield.TextFields;
Expand All @@ -37,6 +35,7 @@
import com.google.common.primitives.Ints;
import com.osgifx.console.util.fx.FxDialog;

import jakarta.inject.Inject;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonBar.ButtonData;
import javafx.scene.control.ButtonType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

import java.util.Optional;

import javax.inject.Inject;

import org.controlsfx.control.textfield.CustomPasswordField;
import org.controlsfx.control.textfield.CustomTextField;
import org.controlsfx.control.textfield.TextFields;
Expand All @@ -37,6 +35,7 @@
import com.google.common.primitives.Ints;
import com.osgifx.console.util.fx.FxDialog;

import jakarta.inject.Inject;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonBar.ButtonData;
import javafx.scene.control.ButtonType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

import java.util.Map;

import javax.inject.Inject;

import org.apache.commons.text.StringSubstitutor;
import org.controlsfx.control.HyperlinkLabel;
import org.eclipse.e4.core.di.extensions.OSGiBundle;
Expand All @@ -29,6 +27,7 @@
import org.eclipse.fx.core.log.Log;
import org.osgi.framework.BundleContext;

import jakarta.inject.Inject;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
******************************************************************************/
package com.osgifx.console.application.fxml.controller;

import javax.inject.Inject;

import org.controlsfx.control.table.TableFilter;
import org.eclipse.fx.core.di.ContextBoundValue;
import org.eclipse.fx.core.di.ContextValue;
Expand All @@ -28,6 +26,7 @@
import com.osgifx.console.application.preference.ConnectionsProvider;
import com.osgifx.console.util.fx.DTOCellValueFactory;

import jakarta.inject.Inject;
import javafx.beans.property.ReadOnlyObjectProperty;
import javafx.fxml.FXML;
import javafx.scene.control.TableColumn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
******************************************************************************/
package com.osgifx.console.application.fxml.controller;

import javax.inject.Inject;

import org.controlsfx.control.table.TableFilter;
import org.eclipse.fx.core.di.ContextBoundValue;
import org.eclipse.fx.core.di.ContextValue;
Expand All @@ -27,6 +25,7 @@
import com.osgifx.console.application.preference.ConnectionsProvider;
import com.osgifx.console.util.fx.DTOCellValueFactory;

import jakarta.inject.Inject;
import javafx.beans.property.ReadOnlyObjectProperty;
import javafx.fxml.FXML;
import javafx.scene.control.TableColumn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
******************************************************************************/
package com.osgifx.console.application.handler;

import javax.inject.Inject;

import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.core.di.annotations.Execute;
Expand All @@ -25,6 +23,8 @@

import com.osgifx.console.application.dialog.AboutApplicationDialog;

import jakarta.inject.Inject;

public final class AboutApplicationHandler {

@Log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
import static com.osgifx.console.supervisor.factory.SupervisorFactory.SupervisorType.REMOTE_RPC;
import static com.osgifx.console.supervisor.factory.SupervisorFactory.SupervisorType.SNAPSHOT;

import javax.inject.Inject;
import javax.inject.Named;

import org.controlsfx.dialog.ProgressDialog;
import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
Expand All @@ -41,6 +38,8 @@
import com.osgifx.console.supervisor.factory.SupervisorFactory;
import com.osgifx.console.util.fx.FxDialog;

import jakarta.inject.Inject;
import jakarta.inject.Named;
import javafx.concurrent.Task;

public final class ConnectToLocalAgentHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

import java.util.Map;

import javax.inject.Inject;

import org.controlsfx.dialog.ProgressDialog;
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
Expand Down Expand Up @@ -51,6 +49,7 @@
import com.osgifx.console.util.fx.Fx;
import com.osgifx.console.util.fx.FxDialog;

import jakarta.inject.Inject;
import javafx.concurrent.Task;

public final class ConnectToMqttAgentHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

import java.util.Map;

import javax.inject.Inject;

import org.controlsfx.dialog.ProgressDialog;
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
Expand Down Expand Up @@ -51,6 +49,7 @@
import com.osgifx.console.util.fx.Fx;
import com.osgifx.console.util.fx.FxDialog;

import jakarta.inject.Inject;
import javafx.concurrent.Task;

public final class ConnectToSocketAgentHandler {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

import java.util.stream.Stream;

import javax.inject.Inject;

import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
Expand All @@ -35,6 +33,8 @@
import com.osgifx.console.supervisor.factory.SupervisorFactory;
import com.osgifx.console.supervisor.factory.SupervisorFactory.SupervisorType;

import jakarta.inject.Inject;

public final class DisconnectFromAgentHandler {

@Log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

import java.util.List;

import javax.inject.Inject;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.extensions.OSGiBundle;
import org.eclipse.e4.ui.di.AboutToShow;
Expand All @@ -34,6 +32,8 @@
import org.eclipse.fx.core.log.Log;
import org.osgi.framework.BundleContext;

import jakarta.inject.Inject;

public final class ExtensionListMenuContributionHandler {

@Log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import java.util.stream.IntStream;

import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.annotations.Optional;
Expand All @@ -36,6 +34,9 @@
import com.osgifx.console.application.dialog.MqttConnectionSettingDTO;
import com.osgifx.console.application.preference.ConnectionsProvider;

import jakarta.inject.Inject;
import jakarta.inject.Named;

public final class MqttConnectionPreferenceHandler {

@Log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import java.io.File;
import java.io.IOException;

import javax.inject.Inject;

import org.eclipse.e4.core.di.annotations.Execute;
import org.eclipse.e4.core.di.extensions.OSGiBundle;
import org.eclipse.fx.core.log.FluentLogger;
Expand All @@ -29,6 +27,8 @@

import com.osgifx.console.util.fx.FxDialog;

import jakarta.inject.Inject;

public final class OpenDiagnosticsHandler {

private static final String LOG_FILE_LOCATION_PROPERTY = "org.apache.sling.commons.log.file";
Expand Down
Loading
Loading