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

fix Unnecessary @SuppressWarnings("deprecation") #1564

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public interface IArgumentsInfo extends IProductObject {

public static final int L_ARGS_ARCH_ALL = 0;
public static final int L_ARGS_ARCH_X86 = 1;
public static final String ARCH_X86 = "x86";//$NON-NLS-1$
public static final int L_ARGS_ARCH_X86_64 = 2;

void setProgramArguments(String args, int platform);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,11 @@ public String getCompleteProgramArguments(String os) {
return getCompleteProgramArguments(os, ""); //$NON-NLS-1$
}

@SuppressWarnings("deprecation")
@Override
public String getCompleteProgramArguments(String os, String arch) {
int archIndex = L_ARGS_ARCH_ALL;
if (arch != null && arch.length() > 0) {
if (Platform.ARCH_X86.equals(arch)) {
if (ARCH_X86.equals(arch)) {
archIndex = L_ARGS_ARCH_X86;
} else if (Platform.ARCH_X86_64.equals(arch)) {
archIndex = L_ARGS_ARCH_X86_64;
Expand Down Expand Up @@ -218,12 +217,11 @@ public String getCompleteVMArguments(String os) {
return getCompleteVMArguments(os, ""); //$NON-NLS-1$
}

@SuppressWarnings("deprecation")
@Override
public String getCompleteVMArguments(String os, String arch) {
int archIndex = L_ARGS_ARCH_ALL;
if (arch != null && arch.length() > 0) {
if (Platform.ARCH_X86.equals(arch)) {
if (ARCH_X86.equals(arch)) {
archIndex = L_ARGS_ARCH_X86;
} else if (Platform.ARCH_X86_64.equals(arch)) {
archIndex = L_ARGS_ARCH_X86_64;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;

@SuppressWarnings("deprecation")
public class ArgumentsSection extends PDESection {

private static final String[] TAB_LABELS = new String[4];
Expand All @@ -64,7 +63,7 @@ public class ArgumentsSection extends PDESection {
private static final String[] TAB_ARCHLABELS = new String[8];
static {
TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ALL] = PDEUIMessages.ArgumentsSection_allArch;
TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ARCH_X86] = Platform.ARCH_X86;
TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ARCH_X86] = IArgumentsInfo.ARCH_X86;
TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ARCH_X86_64] = Platform.ARCH_X86_64;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.eclipse.jface.window.Window;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.core.IModelChangedEvent;
import org.eclipse.pde.internal.core.iproduct.IArgumentsInfo;
import org.eclipse.pde.internal.core.iproduct.IConfigurationProperty;
import org.eclipse.pde.internal.core.iproduct.IProduct;
import org.eclipse.pde.internal.core.iproduct.IProductModel;
Expand Down Expand Up @@ -130,8 +131,8 @@ private class PropertyDialog extends StatusDialog {

private final String[] COMBO_OSLABELS = new String[] { PDEUIMessages.PropertiesSection_All, Platform.OS_LINUX,
Platform.OS_MACOSX, Platform.OS_WIN32 };
@SuppressWarnings("deprecation")
private final String[] COMBO_ARCHLABELS = new String[] { PDEUIMessages.PropertiesSection_All, Platform.ARCH_X86,
private final String[] COMBO_ARCHLABELS = new String[] { PDEUIMessages.PropertiesSection_All,
IArgumentsInfo.ARCH_X86,
Copy link
Contributor

Choose a reason for hiding this comment

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

What makes me wonder if we should add the other supported archs now here? so what about arm, longaarch and alike?

Platform.ARCH_X86_64 };

public PropertyDialog(Shell shell, IConfigurationProperty property,
Expand Down
Loading