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

Cleanup fmxlview and javax imports #3661

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -19,7 +19,6 @@


import bisq.desktop.common.view.ActivatableViewAndModel;
import bisq.desktop.common.view.FxmlView;
import bisq.desktop.components.AutoTooltipButton;
import bisq.desktop.components.AutoTooltipLabel;
import bisq.desktop.components.TitledGroupBg;
Expand All @@ -38,8 +37,6 @@
import bisq.common.util.Tuple2;
import bisq.common.util.Tuple3;

import javax.inject.Named;

import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
Expand Down Expand Up @@ -88,7 +85,7 @@ public abstract class AgentRegistrationView<R extends DisputeAgent, T extends Ag
// Constructor, lifecycle
///////////////////////////////////////////////////////////////////////////////////////////

public AgentRegistrationView(T model, @Named(AppOptionKeys.USE_DEV_PRIVILEGE_KEYS) boolean useDevPrivilegeKeys) {
public AgentRegistrationView(T model, boolean useDevPrivilegeKeys) {
super(model);
this.useDevPrivilegeKeys = useDevPrivilegeKeys;
}
Expand Down
Expand Up @@ -17,7 +17,6 @@

package bisq.desktop.main.support.dispute.agent;

import bisq.desktop.common.view.FxmlView;
import bisq.desktop.components.AutoTooltipButton;
import bisq.desktop.main.overlays.windows.ContractWindow;
import bisq.desktop.main.overlays.windows.DisputeSummaryWindow;
Expand All @@ -38,8 +37,6 @@

import bisq.common.crypto.KeyRing;

import javax.inject.Named;

import javafx.scene.control.Button;

public abstract class DisputeAgentView extends DisputeView {
Expand All @@ -53,7 +50,7 @@ public DisputeAgentView(DisputeManager<? extends DisputeList<? extends DisputeLi
ContractWindow contractWindow,
TradeDetailsWindow tradeDetailsWindow,
AccountAgeWitnessService accountAgeWitnessService,
@Named(AppOptionKeys.USE_DEV_PRIVILEGE_KEYS) boolean useDevPrivilegeKeys) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not obvious to me why injection of this value would still work without the explicit annotation. The value of AppOptionKeys.USE_DEV_PRIVILEGE_KEYS is in fact "useDevPrivilegeKeys", spelled exactly the same as the useDevPrivilegeKeys parameter, so in theory Guice could introspect and do the injection based on that, but this information is not inspectable at runtime unless the -parameters option has been passed to javac to keep the parameter symbol table available (and our build does not do this). What am I missing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The class is abstract and never instantiated directly. The annotation is legacy from a time before the type hierarchy was in place.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sub-classes should have the annotation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roger that, and I see that the subclasses are in fact annotated. Thanks.

utACK

boolean useDevPrivilegeKeys) {
super(disputeManager,
keyRing,
tradeManager,
Expand Down