Replaced deprecated Double constuctors with Double.valueOf
This commit is contained in:
parent
7f6bf0895d
commit
5b4b5d784c
|
@ -95,7 +95,7 @@ public class Circle extends Shape
|
|||
for (int i = 0; i < coor.length; ++i)
|
||||
{
|
||||
p_file.write(" ");
|
||||
p_file.write(new Double(coor[i]).toString());
|
||||
p_file.write(Double.valueOf(coor[i]).toString());
|
||||
}
|
||||
p_file.write(")");
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ public class Component extends ScopeKeyword
|
|||
for (int i = 0; i < coor.length; ++i)
|
||||
{
|
||||
p_par.file.write(" ");
|
||||
p_par.file.write((new Double(coor[i])).toString());
|
||||
p_par.file.write((Double.valueOf(coor[i])).toString());
|
||||
}
|
||||
if (p_component.placed_on_front())
|
||||
{
|
||||
|
|
|
@ -188,7 +188,7 @@ public class Package
|
|||
for(int j = 0; j < rel_coor.length; ++j)
|
||||
{
|
||||
p_par.file.write(" ");
|
||||
p_par.file.write((new Double(rel_coor[j])).toString());
|
||||
p_par.file.write((Double.valueOf(rel_coor[j])).toString());
|
||||
}
|
||||
int rotation = (int) Math.round(curr_pin.rotation_in_degree);
|
||||
if (rotation != 0)
|
||||
|
|
|
@ -112,9 +112,9 @@ public class Polygon extends Shape
|
|||
for (int i = 0; i < corner_count; ++i)
|
||||
{
|
||||
p_file.new_line();
|
||||
p_file.write(new Double(coor[2 * i]).toString());
|
||||
p_file.write(Double.valueOf(coor[2 * i]).toString());
|
||||
p_file.write(" ");
|
||||
p_file.write(new Double(coor[2 * i + 1]).toString());
|
||||
p_file.write(Double.valueOf(coor[2 * i + 1]).toString());
|
||||
}
|
||||
p_file.end_scope();
|
||||
}
|
||||
|
|
|
@ -54,14 +54,14 @@ public class PolygonPath extends Path
|
|||
p_file.write("path ");
|
||||
p_identifier_type.write(this.layer.name, p_file);
|
||||
p_file.write(" ");
|
||||
p_file.write((new Double(this.width)).toString());
|
||||
p_file.write((Double.valueOf(this.width)).toString());
|
||||
int corner_count = coordinate_arr.length/ 2;
|
||||
for (int i = 0; i < corner_count; ++i)
|
||||
{
|
||||
p_file.new_line();
|
||||
p_file.write(new Double(coordinate_arr[2 * i]).toString());
|
||||
p_file.write(Double.valueOf(coordinate_arr[2 * i]).toString());
|
||||
p_file.write(" ");
|
||||
p_file.write(new Double(coordinate_arr[2 * i + 1]).toString());
|
||||
p_file.write(Double.valueOf(coordinate_arr[2 * i + 1]).toString());
|
||||
}
|
||||
p_file.end_scope();
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class PolygonPath extends Path
|
|||
p_file.write("path ");
|
||||
p_identifier_type.write(this.layer.name, p_file);
|
||||
p_file.write(" ");
|
||||
p_file.write((new Double(this.width)).toString());
|
||||
p_file.write((Double.valueOf(this.width)).toString());
|
||||
int corner_count = coordinate_arr.length/ 2;
|
||||
for (int i = 0; i < corner_count; ++i)
|
||||
{
|
||||
|
|
|
@ -50,14 +50,14 @@ public class PolylinePath extends Path
|
|||
p_file.write("polyline_path ");
|
||||
p_identifier.write(this.layer.name, p_file);
|
||||
p_file.write(" ");
|
||||
p_file.write((new Double(this.width)).toString());
|
||||
p_file.write((Double.valueOf(this.width)).toString());
|
||||
int line_count = coordinate_arr.length/ 4;
|
||||
for (int i = 0; i < line_count; ++i)
|
||||
{
|
||||
p_file.new_line();
|
||||
for (int j = 0; j < 4; ++j)
|
||||
{
|
||||
p_file.write(new Double(coordinate_arr[4 * i + j]).toString());
|
||||
p_file.write(Double.valueOf(coordinate_arr[4 * i + j]).toString());
|
||||
p_file.write(" ");
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class PolylinePath extends Path
|
|||
p_file.write("polyline_path ");
|
||||
p_identifier.write(this.layer.name, p_file);
|
||||
p_file.write(" ");
|
||||
p_file.write((new Double(this.width)).toString());
|
||||
p_file.write((Double.valueOf(this.width)).toString());
|
||||
int line_count = coordinate_arr.length/ 4;
|
||||
for (int i = 0; i < line_count; ++i)
|
||||
{
|
||||
|
|
|
@ -109,7 +109,7 @@ public class Rectangle extends Shape
|
|||
for (int i = 0; i < coor.length; ++i)
|
||||
{
|
||||
p_file.write(" ");
|
||||
p_file.write(new Double(coor[i]).toString());
|
||||
p_file.write(Double.valueOf(coor[i]).toString());
|
||||
}
|
||||
p_file.write(")");
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ public abstract class Rule
|
|||
double trace_width = 2 * p_par.coordinate_transform.board_to_dsn(default_trace_half_width);
|
||||
p_par.file.new_line();
|
||||
p_par.file.write("(width ");
|
||||
p_par.file.write((new Double(trace_width)).toString());
|
||||
p_par.file.write((Double.valueOf(trace_width)).toString());
|
||||
p_par.file.write(")");
|
||||
p_par.file.end_scope();
|
||||
for (int i = 1; i < p_par.board.layer_structure.arr.length; ++i)
|
||||
|
@ -211,7 +211,7 @@ public abstract class Rule
|
|||
double trace_width = 2 * p_par.coordinate_transform.board_to_dsn(curr_trace_half_width);
|
||||
p_par.file.new_line();
|
||||
p_par.file.write("(width ");
|
||||
p_par.file.write((new Double(trace_width)).toString());
|
||||
p_par.file.write((Double.valueOf(trace_width)).toString());
|
||||
p_par.file.write(") ");
|
||||
p_par.file.end_scope();
|
||||
p_par.file.end_scope();
|
||||
|
@ -228,7 +228,7 @@ public abstract class Rule
|
|||
double trace_width = 2 * p_par.coordinate_transform.board_to_dsn(p_par.board.rules.get_default_net_class().get_trace_half_width(0));
|
||||
p_par.file.new_line();
|
||||
p_par.file.write("(width ");
|
||||
p_par.file.write((new Double(trace_width)).toString());
|
||||
p_par.file.write((Double.valueOf(trace_width)).toString());
|
||||
p_par.file.write(")");
|
||||
// write the default clearance rule
|
||||
int default_cl_no = eu.mihosoft.freerouting.rules.BoardRules.default_clearance_class();
|
||||
|
@ -236,7 +236,7 @@ public abstract class Rule
|
|||
double default_clearance = p_par.coordinate_transform.board_to_dsn(default_board_clearance);
|
||||
p_par.file.new_line();
|
||||
p_par.file.write("(clear ");
|
||||
p_par.file.write((new Double(default_clearance)).toString());
|
||||
p_par.file.write((Double.valueOf(default_clearance)).toString());
|
||||
p_par.file.write(")");
|
||||
// write the Smd_to_turn_gap
|
||||
Double smd_to_turn_dist = p_par.coordinate_transform.board_to_dsn(p_par.board.rules.get_pin_edge_to_turn_dist());
|
||||
|
@ -269,7 +269,7 @@ public abstract class Rule
|
|||
double curr_clearance = p_par.coordinate_transform.board_to_dsn(curr_board_clearance);
|
||||
p_par.file.new_line();
|
||||
p_par.file.write("(clear ");
|
||||
p_par.file.write((new Double(curr_clearance)).toString());
|
||||
p_par.file.write((Double.valueOf(curr_clearance)).toString());
|
||||
p_par.file.write(" (type ");
|
||||
p_par.identifier_type.write(cl_matrix.get_name(p_cl_class), p_par.file);
|
||||
p_par.file.write("_");
|
||||
|
|
|
@ -1299,7 +1299,7 @@ class SpecctraFileScanner implements Scanner {
|
|||
}
|
||||
case 204: break;
|
||||
case 15:
|
||||
{ return new Double(yytext());
|
||||
{ return Double.valueOf(yytext());
|
||||
}
|
||||
case 205: break;
|
||||
case 42:
|
||||
|
|
|
@ -178,7 +178,7 @@ class Wiring extends ScopeKeyword
|
|||
for (int i = 0; i < via_coor.length; ++i)
|
||||
{
|
||||
p_par.file.write(" ");
|
||||
p_par.file.write((new Double(via_coor[i])).toString());
|
||||
p_par.file.write((Double.valueOf(via_coor[i])).toString());
|
||||
}
|
||||
if (via_net != null)
|
||||
{
|
||||
|
|
|
@ -1579,7 +1579,7 @@ class GUIDefaultsScanner {
|
|||
}
|
||||
case 146: break;
|
||||
case 7:
|
||||
{ return new Double(yytext());
|
||||
{ return Double.valueOf(yytext());
|
||||
}
|
||||
case 147: break;
|
||||
case 69:
|
||||
|
|
|
@ -243,9 +243,9 @@ public class Logfile
|
|||
}
|
||||
try
|
||||
{
|
||||
this.file_writer.write((new Double(p_corner.x)).toString());
|
||||
this.file_writer.write((Double.valueOf(p_corner.x)).toString());
|
||||
this.file_writer.write(" ");
|
||||
this.file_writer.write((new Double(p_corner.y)).toString());
|
||||
this.file_writer.write((Double.valueOf(p_corner.y)).toString());
|
||||
this.file_writer.write("\n");
|
||||
}
|
||||
catch (IOException e2)
|
||||
|
|
|
@ -518,7 +518,7 @@ class LogfileScanner {
|
|||
}
|
||||
case 8: break;
|
||||
case 5:
|
||||
{ return new Double(yytext());
|
||||
{ return Double.valueOf(yytext());
|
||||
}
|
||||
case 9: break;
|
||||
case 1:
|
||||
|
|
Loading…
Reference in New Issue