Skip to content

Commit ed38ede

Browse files
committed
[2/5][java/other] Remove deprecated Integer constructor usage.
1 parent 1741245 commit ed38ede

File tree

20 files changed

+76
-66
lines changed

20 files changed

+76
-66
lines changed

java/ant.debugger/src/org/netbeans/modules/ant/debugger/AdvancedActionPanel.form

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,18 @@
2121
2222
-->
2323

24-
<Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
24+
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
25+
<AuxValues>
26+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
27+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
28+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
29+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
30+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
31+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
32+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
33+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
34+
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
35+
</AuxValues>
2536

2637
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
2738
<SubComponents>
@@ -111,8 +122,7 @@
111122
<SubComponents>
112123
<Component class="javax.swing.JEditorPane" name="propertiesPane">
113124
<Properties>
114-
<Property name="text" type="java.lang.String" value="# This is sample text for GUI design.&#xa;someprop1=someval1&#xa;someprop2=someval2&#xa;someprop3=someval3&#xa;"/>
115-
<Property name="contentType" type="java.lang.String" value="text/x-properties"/>
125+
<Property name="contentType" type="java.lang.String" value="text/x-properties" noResource="true"/>
116126
</Properties>
117127
</Component>
118128
</SubComponents>

java/ant.debugger/src/org/netbeans/modules/ant/debugger/AdvancedActionPanel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ private void initializeFields() {
132132
propertiesPane.setText(initialProperties);
133133
Integer verbosity = (Integer) script.getAttribute(ATTR_VERBOSITY);
134134
if (verbosity == null) {
135-
verbosity = new Integer(AntSettings.getVerbosity());
135+
verbosity = AntSettings.getVerbosity();
136136
}
137137
verbosityComboBox.setModel(new DefaultComboBoxModel(VERBOSITIES));
138138
for (int i = 0; i < VERBOSITY_LEVELS.length; i++) {
@@ -335,7 +335,7 @@ public void run() throws IOException {
335335
if (verbosity == AntSettings.getVerbosity()) {
336336
script.setAttribute(ATTR_VERBOSITY, null);
337337
} else {
338-
script.setAttribute(ATTR_VERBOSITY, new Integer(verbosity));
338+
script.setAttribute(ATTR_VERBOSITY, verbosity);
339339
}
340340
// Actually run the target(s).
341341
DebuggerAntLogger.getDefault ().debugFile (project.getFile ());

java/ant.debugger/src/org/netbeans/modules/ant/debugger/AntDebugger.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import org.openide.loaders.DataObject;
5353
import org.openide.loaders.DataObjectNotFoundException;
5454
import org.openide.text.Annotatable;
55-
import org.openide.util.Exceptions;
5655
import org.openide.util.NbBundle;
5756
import org.openide.util.RequestProcessor;
5857
import org.openide.util.TaskListener;
@@ -599,7 +598,7 @@ private boolean onBreakpoint () {
599598
for (j = 0; j < jj; j++) {
600599
Object value = getVariableValue (ws [j].getExpression ());
601600
if (value == null) {
602-
value = new Integer (0);
601+
value = 0;
603602
}
604603
if ( watches.containsKey (ws [j].getExpression ()) &&
605604
!watches.get (ws [j].getExpression ()).equals (value)

java/classfile/src/org/netbeans/modules/classfile/CPIntegerInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public final class CPIntegerInfo extends CPEntry {
3232

3333
CPIntegerInfo(ConstantPool pool, int v) {
3434
super(pool);
35-
value = new Integer(v);
35+
value = v;
3636
}
3737

3838
public final int getTag() {

java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/SessionsTableModelFilter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ private void fireTreeChanged () {
153153
((ModelListener) v.get (i)).modelChanged (null);
154154
}
155155

156-
private static final Integer SD = new Integer
157-
(JPDADebugger.STATE_DISCONNECTED);
156+
private static final Integer SD = JPDADebugger.STATE_DISCONNECTED;
158157

159158
public void propertyChange (PropertyChangeEvent e) {
160159
fireTreeChanged ();

java/java.examples/src/org/netbeans/modules/java/examples/J2SESampleProjectIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void updateStepsList() {
143143
NbBundle.getMessage(PanelConfigureProject.class, "LBL_NWP1_ProjectTitleName"), // NOI18N
144144
};
145145
component.putClientProperty (WizardDescriptor.PROP_CONTENT_DATA, list); // NOI18N
146-
component.putClientProperty (WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer (currentIndex)); // NOI18N
146+
component.putClientProperty (WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, currentIndex); // NOI18N
147147
}
148148

149149
}

java/java.examples/src/org/netbeans/modules/java/examples/PanelProjectLocationVisual.form

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,31 @@
2121
2222
-->
2323

24-
<Form version="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
24+
<Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
25+
<AuxValues>
26+
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
27+
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
28+
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
29+
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
30+
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
31+
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
32+
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
33+
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
34+
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
35+
</AuxValues>
2536

2637
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
2738
<SubComponents>
2839
<Component class="javax.swing.JLabel" name="projectNameLabel">
2940
<Properties>
3041
<Property name="displayedMnemonic" type="int" editor="org.netbeans.modules.i18n.form.FormI18nMnemonicEditor">
31-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="LBL_NWP1_ProjectName_LabelMnemonic" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
42+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="LBL_NWP1_ProjectName_LabelMnemonic" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
3243
</Property>
3344
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
3445
<ComponentRef name="projectNameTextField"/>
3546
</Property>
3647
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
37-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="LBL_NWP1_ProjectName_Label" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
48+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="LBL_NWP1_ProjectName_Label" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
3849
</Property>
3950
</Properties>
4051
<Constraints>
@@ -46,7 +57,7 @@
4657
<Component class="javax.swing.JTextField" name="projectNameTextField">
4758
<AccessibilityProperties>
4859
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
49-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="ACS_LBL_NWP1_ProjectName_A11YDesc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
60+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="ACS_LBL_NWP1_ProjectName_A11YDesc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
5061
</Property>
5162
</AccessibilityProperties>
5263
<AuxValues>
@@ -61,13 +72,13 @@
6172
<Component class="javax.swing.JLabel" name="projectLocationLabel">
6273
<Properties>
6374
<Property name="displayedMnemonic" type="int" editor="org.netbeans.modules.i18n.form.FormI18nMnemonicEditor">
64-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="LBL_NWP1_ProjectLocation_LabelMnemonic" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
75+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="LBL_NWP1_ProjectLocation_LabelMnemonic" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
6576
</Property>
6677
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
6778
<ComponentRef name="projectLocationTextField"/>
6879
</Property>
6980
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
70-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="LBL_NWP1_ProjectLocation_Label" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
81+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="LBL_NWP1_ProjectLocation_Label" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
7182
</Property>
7283
</Properties>
7384
<Constraints>
@@ -79,7 +90,7 @@
7990
<Component class="javax.swing.JTextField" name="projectLocationTextField">
8091
<AccessibilityProperties>
8192
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
82-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="ACS_LBL_NPW1_ProjectLocation_A11YDesc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
93+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="ACS_LBL_NPW1_ProjectLocation_A11YDesc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
8394
</Property>
8495
</AccessibilityProperties>
8596
<Constraints>
@@ -91,13 +102,13 @@
91102
<Component class="javax.swing.JButton" name="Button">
92103
<Properties>
93104
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
94-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="LBL_NWP1_BrowseLocation_Button" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
105+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="LBL_NWP1_BrowseLocation_Button" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
95106
</Property>
96107
<Property name="actionCommand" type="java.lang.String" value="BROWSE"/>
97108
</Properties>
98109
<AccessibilityProperties>
99110
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
100-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="ACS_LBL_NWP1_BrowseLocation_A11YDesc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
111+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="ACS_LBL_NWP1_BrowseLocation_A11YDesc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
101112
</Property>
102113
</AccessibilityProperties>
103114
<Events>
@@ -112,13 +123,13 @@
112123
<Component class="javax.swing.JLabel" name="createdFolderLabel">
113124
<Properties>
114125
<Property name="displayedMnemonic" type="int" editor="org.netbeans.modules.i18n.form.FormI18nMnemonicEditor">
115-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="LBL_NWP1_CreatedProjectFolder_LablelMnemonic" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
126+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="LBL_NWP1_CreatedProjectFolder_LablelMnemonic" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
116127
</Property>
117128
<Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
118129
<ComponentRef name="createdFolderTextField"/>
119130
</Property>
120131
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
121-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="LBL_NWP1_CreatedProjectFolder_Lablel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
132+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="LBL_NWP1_CreatedProjectFolder_Lablel" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
122133
</Property>
123134
</Properties>
124135
<Constraints>
@@ -133,7 +144,7 @@
133144
</Properties>
134145
<AccessibilityProperties>
135146
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
136-
<ResourceString bundle="org/netbeans/modules/web/project/ui/wizards/Bundle.properties" key="ACS_LBL_NWP1_CreatedProjectFolder_A11YDesc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
147+
<ResourceString bundle="org/netbeans/modules/java/examples/Bundle.properties" key="ACS_LBL_NWP1_CreatedProjectFolder_A11YDesc" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
137148
</Property>
138149
</AccessibilityProperties>
139150
<Constraints>

0 commit comments

Comments
 (0)