Skip to content

Commit

Permalink
fix Unnecessary @SuppressWarnings("deprecation")
Browse files Browse the repository at this point in the history
  • Loading branch information
jukzi committed Jan 15, 2025
1 parent b8f34f6 commit 44528ee
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
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,
Platform.ARCH_X86_64 };

public PropertyDialog(Shell shell, IConfigurationProperty property,
Expand Down

0 comments on commit 44528ee

Please sign in to comment.