Browse Source

I disagree with Sonar - moving the assignment make the code worse

master
Stefan Bodewig 8 years ago
parent
commit
ef80b111c4
3 changed files with 6 additions and 6 deletions
  1. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Expand.java
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
  3. +4
    -4
      src/main/org/apache/tools/bzip2/BlockSort.java

+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Expand.java View File

@@ -191,7 +191,7 @@ public class Expand extends Task {
log("extracting " + ze.getName(), Project.MSG_DEBUG);
try {
extractFile(fileUtils, srcF, dir,
is = zf.getInputStream(ze),
is = zf.getInputStream(ze), //NOSONAR
ze.getName(), new Date(ze.getTime()),
ze.isDirectory(), mapper);
} finally {


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java View File

@@ -868,7 +868,7 @@ public class NetRexxC extends MatchingTask {
PrintWriter w = null;
int rc =
COM.ibm.netrexx.process.NetRexxC.main(new Rexx(compileArgs),
w = new PrintWriter(out));
w = new PrintWriter(out)); //NOSONAR
String sdir = srcDir.getAbsolutePath();
String ddir = destDir.getAbsolutePath();
boolean doReplace = !(sdir.equals(ddir));


+ 4
- 4
src/main/org/apache/tools/bzip2/BlockSort.java View File

@@ -642,7 +642,7 @@ class BlockSort {
HAMMER: while (true) {
if (onceRunned) {
fmap[j] = a;
if ((j -= h) <= mj) {
if ((j -= h) <= mj) { //NOSONAR
break HAMMER;
}
} else {
@@ -660,7 +660,7 @@ class BlockSort {
if (block[i1 + 3] == block[i2 + 3]) {
if (block[i1 + 4] == block[i2 + 4]) {
if (block[i1 + 5] == block[i2 + 5]) {
if (block[(i1 += 6)] == block[(i2 += 6)]) {
if (block[(i1 += 6)] == block[(i2 += 6)]) { //NOSONAR
int x = lastShadow;
X: while (x > 0) {
x -= 4;
@@ -673,10 +673,10 @@ class BlockSort {
if (quadrant[i1 + 2] == quadrant[i2 + 2]) {
if (block[i1 + 4] == block[i2 + 4]) {
if (quadrant[i1 + 3] == quadrant[i2 + 3]) {
if ((i1 += 4) >= lastPlus1) {
if ((i1 += 4) >= lastPlus1) { //NOSONAR
i1 -= lastPlus1;
}
if ((i2 += 4) >= lastPlus1) {
if ((i2 += 4) >= lastPlus1) { //NOSONAR
i2 -= lastPlus1;
}
workDoneShadow++;


Loading…
Cancel
Save