Skip to content

Commit 1897bc7

Browse files
Jörg Kubitzjukzi
authored andcommitted
fix Unnecessary @SuppressWarnings("deprecation")
1 parent 0e399fc commit 1897bc7

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/iproduct/IArgumentsInfo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public interface IArgumentsInfo extends IProductObject {
3636

3737
public static final int L_ARGS_ARCH_ALL = 0;
3838
public static final int L_ARGS_ARCH_X86 = 1;
39+
public static final String ARCH_X86 = "x86";//$NON-NLS-1$
3940
public static final int L_ARGS_ARCH_X86_64 = 2;
4041

4142
void setProgramArguments(String args, int platform);

ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/product/ArgumentsInfo.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,11 @@ public String getCompleteProgramArguments(String os) {
123123
return getCompleteProgramArguments(os, ""); //$NON-NLS-1$
124124
}
125125

126-
@SuppressWarnings("deprecation")
127126
@Override
128127
public String getCompleteProgramArguments(String os, String arch) {
129128
int archIndex = L_ARGS_ARCH_ALL;
130129
if (arch != null && arch.length() > 0) {
131-
if (Platform.ARCH_X86.equals(arch)) {
130+
if (ARCH_X86.equals(arch)) {
132131
archIndex = L_ARGS_ARCH_X86;
133132
} else if (Platform.ARCH_X86_64.equals(arch)) {
134133
archIndex = L_ARGS_ARCH_X86_64;
@@ -218,12 +217,11 @@ public String getCompleteVMArguments(String os) {
218217
return getCompleteVMArguments(os, ""); //$NON-NLS-1$
219218
}
220219

221-
@SuppressWarnings("deprecation")
222220
@Override
223221
public String getCompleteVMArguments(String os, String arch) {
224222
int archIndex = L_ARGS_ARCH_ALL;
225223
if (arch != null && arch.length() > 0) {
226-
if (Platform.ARCH_X86.equals(arch)) {
224+
if (ARCH_X86.equals(arch)) {
227225
archIndex = L_ARGS_ARCH_X86;
228226
} else if (Platform.ARCH_X86_64.equals(arch)) {
229227
archIndex = L_ARGS_ARCH_X86_64;

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/ArgumentsSection.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import org.eclipse.ui.forms.widgets.FormToolkit;
5151
import org.eclipse.ui.forms.widgets.Section;
5252

53-
@SuppressWarnings("deprecation")
5453
public class ArgumentsSection extends PDESection {
5554

5655
private static final String[] TAB_LABELS = new String[4];
@@ -64,7 +63,7 @@ public class ArgumentsSection extends PDESection {
6463
private static final String[] TAB_ARCHLABELS = new String[8];
6564
static {
6665
TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ALL] = PDEUIMessages.ArgumentsSection_allArch;
67-
TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ARCH_X86] = Platform.ARCH_X86;
66+
TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ARCH_X86] = IArgumentsInfo.ARCH_X86;
6867
TAB_ARCHLABELS[IArgumentsInfo.L_ARGS_ARCH_X86_64] = Platform.ARCH_X86_64;
6968
}
7069

ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/product/PropertiesSection.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.eclipse.jface.window.Window;
3535
import org.eclipse.osgi.util.NLS;
3636
import org.eclipse.pde.core.IModelChangedEvent;
37+
import org.eclipse.pde.internal.core.iproduct.IArgumentsInfo;
3738
import org.eclipse.pde.internal.core.iproduct.IConfigurationProperty;
3839
import org.eclipse.pde.internal.core.iproduct.IProduct;
3940
import org.eclipse.pde.internal.core.iproduct.IProductModel;
@@ -130,8 +131,8 @@ private class PropertyDialog extends StatusDialog {
130131

131132
private final String[] COMBO_OSLABELS = new String[] { PDEUIMessages.PropertiesSection_All, Platform.OS_LINUX,
132133
Platform.OS_MACOSX, Platform.OS_WIN32 };
133-
@SuppressWarnings("deprecation")
134-
private final String[] COMBO_ARCHLABELS = new String[] { PDEUIMessages.PropertiesSection_All, Platform.ARCH_X86,
134+
private final String[] COMBO_ARCHLABELS = new String[] { PDEUIMessages.PropertiesSection_All,
135+
IArgumentsInfo.ARCH_X86,
135136
Platform.ARCH_X86_64 };
136137

137138
public PropertyDialog(Shell shell, IConfigurationProperty property,

0 commit comments

Comments
 (0)