Replaced deprecated Interger constuctors with Integer.valueOf
This commit is contained in:
parent
033f985ead
commit
7f6bf0895d
|
@ -118,7 +118,7 @@ public class BatchOptRoute
|
|||
{
|
||||
java.util.ResourceBundle resources =
|
||||
java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.interactive.InteractiveState", this.thread.hdlg.get_locale());
|
||||
String start_message = resources.getString("batch_optimizer") + " " + resources.getString("stop_message") + " " + resources.getString("pass") + " " + (new Integer(p_pass_no)).toString() + ": ";
|
||||
String start_message = resources.getString("batch_optimizer") + " " + resources.getString("stop_message") + " " + resources.getString("pass") + " " + (Integer.valueOf(p_pass_no)).toString() + ": ";
|
||||
this.thread.hdlg.screen_messages.set_status_message(start_message);
|
||||
this.thread.hdlg.remove_ratsnest();
|
||||
int incomplete_count_before = this.thread.hdlg.get_ratsnest().incomplete_count();
|
||||
|
|
|
@ -1310,7 +1310,7 @@ public class BasicBoard implements java.io.Serializable
|
|||
{
|
||||
for (int i = 0; i < curr_item.net_count(); ++i)
|
||||
{
|
||||
p_changed_nets.add(new Integer(curr_item.get_net_no(i)));
|
||||
p_changed_nets.add(Integer.valueOf(curr_item.get_net_no(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1327,7 +1327,7 @@ public class BasicBoard implements java.io.Serializable
|
|||
{
|
||||
for (int i = 0; i < curr_item.net_count(); ++i)
|
||||
{
|
||||
p_changed_nets.add(new Integer(curr_item.get_net_no(i)));
|
||||
p_changed_nets.add(Integer.valueOf(curr_item.get_net_no(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ public class Components implements java.io.Serializable
|
|||
*/
|
||||
public Component add(Point p_location, double p_rotation, boolean p_on_front, Package p_package)
|
||||
{
|
||||
String component_name = "Component#" + (new Integer(component_arr.size() + 1)).toString();
|
||||
String component_name = "Component#" + (Integer.valueOf(component_arr.size() + 1)).toString();
|
||||
return add(component_name, p_location, p_rotation, p_on_front, p_package, p_package, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public class Component extends ScopeKeyword
|
|||
p_par.file.write(" back ");
|
||||
}
|
||||
int rotation = (int) Math.round(p_component.get_rotation_in_degree());
|
||||
p_par.file.write((new Integer(rotation).toString()));
|
||||
p_par.file.write((Integer.valueOf(rotation).toString()));
|
||||
}
|
||||
if (p_component.position_fixed)
|
||||
{
|
||||
|
|
|
@ -194,7 +194,7 @@ public class Package
|
|||
if (rotation != 0)
|
||||
{
|
||||
p_par.file.write("(rotate ");
|
||||
p_par.file.write((new Integer(rotation)).toString());
|
||||
p_par.file.write((Integer.valueOf(rotation)).toString());
|
||||
p_par.file.write(")");
|
||||
}
|
||||
p_par.file.write(")");
|
||||
|
|
|
@ -107,7 +107,7 @@ public class Polygon extends Shape
|
|||
p_file.write("polygon ");
|
||||
p_identifier_type.write(this.layer.name, p_file);
|
||||
p_file.write(" ");
|
||||
p_file.write((new Integer(0)).toString());
|
||||
p_file.write((Integer.valueOf(0)).toString());
|
||||
int corner_count = coor.length/ 2;
|
||||
for (int i = 0; i < corner_count; ++i)
|
||||
{
|
||||
|
@ -125,7 +125,7 @@ public class Polygon extends Shape
|
|||
p_file.write("polygon ");
|
||||
p_identifier_type.write(this.layer.name, p_file);
|
||||
p_file.write(" ");
|
||||
p_file.write((new Integer(0)).toString());
|
||||
p_file.write((Integer.valueOf(0)).toString());
|
||||
int corner_count = coor.length/ 2;
|
||||
for (int i = 0; i < corner_count; ++i)
|
||||
{
|
||||
|
|
|
@ -84,7 +84,7 @@ public class Resolution extends ScopeKeyword
|
|||
p_file.write("(resolution ");
|
||||
p_file.write(p_board_communication.unit.toString());
|
||||
p_file.write(" ");
|
||||
p_file.write((new Integer(p_board_communication.resolution)).toString());
|
||||
p_file.write((Integer.valueOf(p_board_communication.resolution)).toString());
|
||||
p_file.write(")");
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ public class SessionFile
|
|||
p_file.write(" back ");
|
||||
}
|
||||
int rotation = (int) Math.round(p_component.get_rotation_in_degree());
|
||||
p_file.write((new Integer(rotation).toString()));
|
||||
p_file.write((Integer.valueOf(rotation).toString()));
|
||||
if (p_component.position_fixed)
|
||||
{
|
||||
p_file.new_line();
|
||||
|
@ -470,14 +470,14 @@ public class SessionFile
|
|||
p_file.write("path ");
|
||||
p_identifier_type.write(p_layer_name, p_file);
|
||||
p_file.write(" ");
|
||||
p_file.write((new Integer(p_width)).toString());
|
||||
p_file.write((Integer.valueOf(p_width)).toString());
|
||||
int corner_count = p_coors.length/ 2;
|
||||
for (int i = 0; i < corner_count; ++i)
|
||||
{
|
||||
p_file.new_line();
|
||||
p_file.write(new Integer(p_coors[2 * i]).toString());
|
||||
p_file.write(Integer.valueOf(p_coors[2 * i]).toString());
|
||||
p_file.write(" ");
|
||||
p_file.write(new Integer(p_coors[2 * i + 1]).toString());
|
||||
p_file.write(Integer.valueOf(p_coors[2 * i + 1]).toString());
|
||||
}
|
||||
p_file.end_scope();
|
||||
}
|
||||
|
|
|
@ -1424,7 +1424,7 @@ class SpecctraFileScanner implements Scanner {
|
|||
}
|
||||
case 235: break;
|
||||
case 5:
|
||||
{ return new Integer(yytext());
|
||||
{ return Integer.valueOf(yytext());
|
||||
}
|
||||
case 236: break;
|
||||
case 25:
|
||||
|
|
|
@ -1656,7 +1656,7 @@ class GUIDefaultsScanner {
|
|||
}
|
||||
case 165: break;
|
||||
case 4:
|
||||
{ return new Integer(yytext());
|
||||
{ return Integer.valueOf(yytext());
|
||||
}
|
||||
case 166: break;
|
||||
case 13:
|
||||
|
|
|
@ -154,7 +154,7 @@ public class WindowSnapshot extends BoardSavableSubWindow
|
|||
this.snapshot_count = saved_attributes.snapshot_count;
|
||||
this.list_model = saved_attributes.list_model;
|
||||
this.list.setModel(this.list_model);
|
||||
String next_default_name = "snapshot " + (new Integer(snapshot_count + 1)).toString();
|
||||
String next_default_name = "snapshot " + (Integer.valueOf(snapshot_count + 1)).toString();
|
||||
this.name_field.setText(next_default_name);
|
||||
this.setLocation(saved_attributes.location);
|
||||
this.setVisible(saved_attributes.is_visible);
|
||||
|
@ -251,7 +251,7 @@ public class WindowSnapshot extends BoardSavableSubWindow
|
|||
{
|
||||
++snapshot_count;
|
||||
list_model.addElement(new_snapshot);
|
||||
String next_default_name = resources.getString("snapshot") + " " + (new Integer(snapshot_count + 1)).toString();
|
||||
String next_default_name = resources.getString("snapshot") + " " + (Integer.valueOf(snapshot_count + 1)).toString();
|
||||
name_field.setText(next_default_name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -434,7 +434,7 @@ public class BoardHandling extends BoardHandlingImpl
|
|||
if (clearance_violations == null)
|
||||
{
|
||||
clearance_violations = new ClearanceViolations(this.board.get_items());
|
||||
Integer violation_count = new Integer((clearance_violations.list.size() + 1) / 2);
|
||||
Integer violation_count = Integer.valueOf((clearance_violations.list.size() + 1) / 2);
|
||||
String curr_message = violation_count.toString() + " " + resources.getString("clearance_violations_found");
|
||||
screen_messages.set_status_message(curr_message);
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ public class CopyItemState extends InteractiveState
|
|||
{
|
||||
//This item belongs to a component
|
||||
int new_cmp_no;
|
||||
Integer curr_key = new Integer(curr_cmp_no);
|
||||
Integer curr_key = Integer.valueOf(curr_cmp_no);
|
||||
if (cmp_no_pairs.containsKey(curr_key))
|
||||
{
|
||||
// the new component for this pin is already created
|
||||
|
@ -225,7 +225,7 @@ public class CopyItemState extends InteractiveState
|
|||
old_component.placed_on_front(), new_package);
|
||||
copied_components.add(new_component);
|
||||
new_cmp_no = new_component.no;
|
||||
cmp_no_pairs.put(new Integer(curr_cmp_no), new Integer(new_cmp_no));
|
||||
cmp_no_pairs.put(Integer.valueOf(curr_cmp_no), Integer.valueOf(new_cmp_no));
|
||||
}
|
||||
curr_item.assign_component_no(new_cmp_no);
|
||||
}
|
||||
|
|
|
@ -170,7 +170,7 @@ public class DragItemState extends DragState
|
|||
Item curr_moved_item = it.next();
|
||||
for (int i = 0; i < curr_moved_item.net_count(); ++i)
|
||||
{
|
||||
changed_nets.add(new Integer(curr_moved_item.get_net_no(i)));
|
||||
changed_nets.add(Integer.valueOf(curr_moved_item.get_net_no(i)));
|
||||
}
|
||||
}
|
||||
for (Integer curr_net_no : changed_nets)
|
||||
|
|
|
@ -203,7 +203,7 @@ public class Logfile
|
|||
{
|
||||
try
|
||||
{
|
||||
this.file_writer.write((new Integer(p_int)).toString());
|
||||
this.file_writer.write((Integer.valueOf(p_int)).toString());
|
||||
this.file_writer.write("\n");
|
||||
}
|
||||
catch (IOException e2)
|
||||
|
|
|
@ -510,7 +510,7 @@ class LogfileScanner {
|
|||
}
|
||||
case 6: break;
|
||||
case 4:
|
||||
{ return new Integer(yytext());
|
||||
{ return Integer.valueOf(yytext());
|
||||
}
|
||||
case 7: break;
|
||||
case 2:
|
||||
|
|
|
@ -98,7 +98,7 @@ public class ScreenMessages
|
|||
public void set_batch_fanout_info(int p_pass_no, int p_components_to_go)
|
||||
{
|
||||
Integer components_to_go = p_components_to_go;
|
||||
Integer pass_no = new Integer(p_pass_no);
|
||||
Integer pass_no = Integer.valueOf(p_pass_no);
|
||||
add_field.setText(resources.getString("fanout_pass") + " " + pass_no.toString() + ": ");
|
||||
layer_field.setText(resources.getString("still") + " "
|
||||
+ components_to_go.toString() + " " + resources.getString("components"));
|
||||
|
|
|
@ -304,7 +304,7 @@ public class SelectedItemState extends InteractiveState
|
|||
{
|
||||
Via curr_via = (Via) it.next();
|
||||
Vector rel_coor = curr_via.get_center().difference_by(gravity_point);
|
||||
String pin_name = (new Integer(i + 1)).toString();
|
||||
String pin_name = (Integer.valueOf(i + 1)).toString();
|
||||
pin_arr[i] = new Package.Pin(pin_name, curr_via.get_padstack().no, rel_coor, 0);
|
||||
}
|
||||
Package new_package = board.library.packages.add(pin_arr);
|
||||
|
@ -873,7 +873,7 @@ public class SelectedItemState extends InteractiveState
|
|||
if (clearance_violations == null)
|
||||
{
|
||||
clearance_violations = new ClearanceViolations(this.item_list);
|
||||
Integer violation_count = new Integer(clearance_violations.list.size());
|
||||
Integer violation_count = Integer.valueOf(clearance_violations.list.size());
|
||||
String curr_message = violation_count.toString() + " " + resources.getString("clearance_violations_found");
|
||||
hdlg.screen_messages.set_status_message(curr_message);
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ public class Packages implements java.io.Serializable
|
|||
*/
|
||||
public Package add(Package.Pin [] p_pin_arr)
|
||||
{
|
||||
String package_name = "Package#" + (new Integer(package_arr.size() + 1)).toString();
|
||||
String package_name = "Package#" + (Integer.valueOf(package_arr.size() + 1)).toString();
|
||||
|
||||
return add(package_name, p_pin_arr, null, new Package.Keepout [0], new Package.Keepout [0],
|
||||
new Package.Keepout [0], true);
|
||||
|
|
|
@ -108,7 +108,7 @@ public class Padstacks implements java.io.Serializable
|
|||
*/
|
||||
public Padstack add(ConvexShape [] p_shapes)
|
||||
{
|
||||
String new_name = "padstack#" + (new Integer(padstack_arr.size() + 1).toString());
|
||||
String new_name = "padstack#" + (Integer.valueOf(padstack_arr.size() + 1).toString());
|
||||
return add(new_name, p_shapes, false, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ public class Nets implements java.io.Serializable
|
|||
public Net new_net(java.util.Locale p_locale)
|
||||
{
|
||||
java.util.ResourceBundle resources = java.util.ResourceBundle.getBundle("eu.mihosoft.freerouting.rules.Default", p_locale);
|
||||
String net_name = resources.getString("net#") + (new Integer(net_arr.size() + 1)).toString();
|
||||
String net_name = resources.getString("net#") + (Integer.valueOf(net_arr.size() + 1)).toString();
|
||||
return add(net_name, 1, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue