mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 18:11:47 +01:00
Merge branch 'master' into issue-993
This commit is contained in:
@@ -471,6 +471,8 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
boolean stillLooking = true;
|
boolean stillLooking = true;
|
||||||
int chr;
|
int chr;
|
||||||
int nxtChr;
|
int nxtChr;
|
||||||
|
//CSOFF: InnerAssignment
|
||||||
|
//CSOFF: NestedIfDepth
|
||||||
while (stillLooking && (chr = in.read()) != -1) {
|
while (stillLooking && (chr = in.read()) != -1) {
|
||||||
if (chr == '\n' || chr == '\r') {
|
if (chr == '\n' || chr == '\r') {
|
||||||
in.mark(4);
|
in.mark(4);
|
||||||
@@ -488,6 +490,8 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//CSON: InnerAssignment
|
||||||
|
//CSON: NestedIfDepth
|
||||||
} else {
|
} else {
|
||||||
in.reset();
|
in.reset();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ public class DependencyMergingAnalyzer extends AbstractDependencyComparingAnalyz
|
|||||||
@Override
|
@Override
|
||||||
protected boolean evaluateDependencies(final Dependency dependency, final Dependency nextDependency, final Set<Dependency> dependenciesToRemove) {
|
protected boolean evaluateDependencies(final Dependency dependency, final Dependency nextDependency, final Set<Dependency> dependenciesToRemove) {
|
||||||
Dependency main;
|
Dependency main;
|
||||||
|
//CSOFF: InnerAssignment
|
||||||
if ((main = getMainGemspecDependency(dependency, nextDependency)) != null) {
|
if ((main = getMainGemspecDependency(dependency, nextDependency)) != null) {
|
||||||
if (main == dependency) {
|
if (main == dependency) {
|
||||||
mergeDependencies(dependency, nextDependency, dependenciesToRemove);
|
mergeDependencies(dependency, nextDependency, dependenciesToRemove);
|
||||||
@@ -105,6 +106,7 @@ public class DependencyMergingAnalyzer extends AbstractDependencyComparingAnalyz
|
|||||||
return true; //since we merged into the next dependency - skip forward to the next in mainIterator
|
return true; //since we merged into the next dependency - skip forward to the next in mainIterator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//CSON: InnerAssignment
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -396,6 +396,7 @@ public final class ConnectionFactory {
|
|||||||
final int c0 = Integer.parseInt(currentDbVersion.getVersionParts().get(0));
|
final int c0 = Integer.parseInt(currentDbVersion.getVersionParts().get(0));
|
||||||
final int e1 = Integer.parseInt(appExpectedVersion.getVersionParts().get(1));
|
final int e1 = Integer.parseInt(appExpectedVersion.getVersionParts().get(1));
|
||||||
final int c1 = Integer.parseInt(currentDbVersion.getVersionParts().get(1));
|
final int c1 = Integer.parseInt(currentDbVersion.getVersionParts().get(1));
|
||||||
|
//CSOFF: EmptyBlock
|
||||||
if (e0 == c0 && e1 < c1) {
|
if (e0 == c0 && e1 < c1) {
|
||||||
LOGGER.warn("A new version of dependency-check is available; consider upgrading");
|
LOGGER.warn("A new version of dependency-check is available; consider upgrading");
|
||||||
settings.setBoolean(Settings.KEYS.AUTO_UPDATE, false);
|
settings.setBoolean(Settings.KEYS.AUTO_UPDATE, false);
|
||||||
@@ -406,6 +407,7 @@ public final class ConnectionFactory {
|
|||||||
UPGRADE_HELP_URL);
|
UPGRADE_HELP_URL);
|
||||||
throw new DatabaseException("Database schema is out of date");
|
throw new DatabaseException("Database schema is out of date");
|
||||||
}
|
}
|
||||||
|
//CSON: EmptyBlock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,6 @@ public class CentralAnalyzerTest {
|
|||||||
{
|
{
|
||||||
centralSearch.searchSha1(SHA1_SUM);
|
centralSearch.searchSha1(SHA1_SUM);
|
||||||
result = new IOException("Could not connect to MavenCentral (500): Internal Server Error");
|
result = new IOException("Could not connect to MavenCentral (500): Internal Server Error");
|
||||||
result = new IOException("Could not connect to MavenCentral (500): Internal Server Error");
|
|
||||||
result = expectedMavenArtifacts;
|
result = expectedMavenArtifacts;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
</module>
|
</module>
|
||||||
|
|
||||||
<module name="MethodCount">
|
<module name="MethodCount">
|
||||||
<property name="maxTotal" value="40"/>
|
<property name="maxTotal" value="80"/>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
<module name="LocalFinalVariableName"/>
|
<module name="LocalFinalVariableName"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user