fixed some accepted checkstyle issues

This commit is contained in:
hneemann 2017-03-18 09:10:38 +01:00
parent 22663d131b
commit 65741df186
3 changed files with 9 additions and 0 deletions

View File

@ -94,6 +94,8 @@ public class GraphicSVG implements Graphic, Closeable {
@Override
public void drawPolygon(Polygon p, Style style) {
try {
//modification of loop variable i is intended!
//CHECKSTYLE.OFF: ModifiedControlVariable
w.write("<path d=\"M " + str(p.get(0)));
for (int i = 1; i < p.size(); i++)
if (p.isBezierStart(i)) {
@ -101,6 +103,7 @@ public class GraphicSVG implements Graphic, Closeable {
i += 2;
} else
w.write(" L " + str(p.get(i)));
//CHECKSTYLE.ON: ModifiedControlVariable
if (p.isClosed())
w.write(" Z");

View File

@ -51,6 +51,8 @@ public class GraphicSwing implements Graphic {
public void drawPolygon(Polygon p, Style style) {
applyStyle(style);
Path2D path = new GeneralPath();
//modification of loop variable i is intended!
//CHECKSTYLE.OFF: ModifiedControlVariable
for (int i = 0; i < p.size(); i++) {
if (i == 0) {
path.moveTo(p.get(i).x, p.get(i).y);
@ -62,6 +64,7 @@ public class GraphicSwing implements Graphic {
path.lineTo(p.get(i).x, p.get(i).y);
}
}
//CHECKSTYLE.ON: ModifiedControlVariable
if (p.isClosed())
path.closePath();

View File

@ -46,6 +46,8 @@ public class NetList implements Iterable<Net> {
mergeLabels();
}
//modification of loop variable j is intended!
//CHECKSTYLE.OFF: ModifiedControlVariable
private void mergeLabels() {
for (int i = 0; i < netList.size() - 1; i++)
for (int j = i + 1; j < netList.size(); j++)
@ -55,6 +57,7 @@ public class NetList implements Iterable<Net> {
j--;
}
}
//CHECKSTYLE.ON: ModifiedControlVariable
/**
* Creates a copy of the given net list