Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HADOOP-16556. Fix some alerts raised by LGTM #1428

Closed
wants to merge 1 commit into from

Conversation

malcolmtaylor
Copy link
Contributor

Fix the following alerts:

  • Array index out of bounds in KerberosName.java

  • Contradictory type checks in GenericExceptionHandler

  • Missing format argument in RegistrySecurity and HttpFSExceptionProvider

These alerts are shown in https://lgtm.com/projects/g/apache/hadoop/?mode=tree

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
0 reexec 40 Docker mode activated.
_ Prechecks _
+1 dupname 0 No case conflicting files found.
+1 @author 0 The patch does not contain any @author tags.
-1 test4tests 0 The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
0 mvndep 37 Maven dependency ordering for branch
+1 mvninstall 1232 trunk passed
+1 compile 1120 trunk passed
+1 checkstyle 164 trunk passed
-1 mvnsite 41 hadoop-yarn-common in trunk failed.
+1 shadedclient 1148 branch has no errors when building and testing our client artifacts.
+1 javadoc 142 trunk passed
0 spotbugs 48 Used deprecated FindBugs config; considering switching to SpotBugs.
-1 findbugs 40 hadoop-yarn-common in trunk failed.
_ Patch Compile Tests _
0 mvndep 25 Maven dependency ordering for patch
-1 mvninstall 28 hadoop-yarn-common in the patch failed.
+1 compile 1087 the patch passed
+1 javac 1087 the patch passed
-0 checkstyle 150 root: The patch generated 1 new + 123 unchanged - 1 fixed = 124 total (was 124)
-1 mvnsite 39 hadoop-yarn-common in the patch failed.
+1 whitespace 0 The patch has no whitespace issues.
+1 shadedclient 772 patch has no errors when building and testing our client artifacts.
+1 javadoc 145 the patch passed
-1 findbugs 40 hadoop-yarn-common in the patch failed.
_ Other Tests _
+1 unit 197 hadoop-auth in the patch passed.
+1 unit 64 hadoop-registry in the patch passed.
-1 unit 137 hadoop-hdfs-httpfs in the patch failed.
-1 unit 42 hadoop-yarn-common in the patch failed.
+1 asflicense 47 The patch does not generate ASF License warnings.
7342
Reason Tests
Failed junit tests hadoop.fs.http.client.TestHttpFSWithHttpFSFileSystem
hadoop.fs.http.client.TestHttpFSFWithSWebhdfsFileSystem
hadoop.fs.http.client.TestHttpFSFWithWebhdfsFileSystem
hadoop.fs.http.server.TestHttpFSServerNoXAttrs
hadoop.fs.http.server.TestHttpFSServer
hadoop.fs.http.client.TestHttpFSFileSystemLocalFileSystem
hadoop.lib.service.hadoop.TestFileSystemAccessService
hadoop.test.TestHFSTestCase
hadoop.fs.http.server.TestHttpFSServerNoACLs
Subsystem Report/Notes
Docker Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/artifact/out/Dockerfile
GITHUB PR #1428
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 2aea207d8df1 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality personality/hadoop.sh
git revision trunk / 44850f6
Default Java 1.8.0_222
mvnsite https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/artifact/out/branch-mvnsite-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/artifact/out/branch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt
mvninstall https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/artifact/out/patch-mvninstall-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt
checkstyle https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/artifact/out/diff-checkstyle-root.txt
mvnsite https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/artifact/out/patch-mvnsite-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt
findbugs https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/artifact/out/patch-findbugs-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/artifact/out/patch-unit-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt
unit https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/artifact/out/patch-unit-hadoop-yarn-project_hadoop-yarn_hadoop-yarn-common.txt
Test Results https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/testReport/
Max. process+thread count 306 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-auth hadoop-common-project/hadoop-registry hadoop-hdfs-project/hadoop-hdfs-httpfs hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common U: .
Console output https://builds.apache.org/job/hadoop-multibranch/job/PR-1428/1/console
versions git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1
Powered by Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

@@ -281,7 +281,7 @@ static String replaceParameters(String format,
if (paramNum != null) {
try {
int num = Integer.parseInt(paramNum);
if (num < 0 || num > params.length) {
if (num < 0 || num >= params.length) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

@steveloughran
Copy link
Contributor

+1, merged into trunk. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants