[jira] [Updated] (EAGLE-1094) JSONObject.getString() may cause exception, optString() should be used.
[ https://issues.apache.org/jira/browse/EAGLE-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] bd2019us updated EAGLE-1094: Attachment: 1.patch > JSONObject.getString() may cause exception, optString() should be used. > --- > > Key: EAGLE-1094 > URL: https://issues.apache.org/jira/browse/EAGLE-1094 > Project: Eagle > Issue Type: Bug >Reporter: bd2019us >Priority: Major > Labels: pull-request-available > Attachments: 1.patch > > Time Spent: 10m > Remaining Estimate: 0h > > Locations: > (1) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:158 > (2) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:165 > (3) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:180 > (4) > eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java:117 > (5) > eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java:65 > > JSONObject.getString(elem) would throw an exception if the key of "elem" does > not exist, which may cause the program crash. Therefore, another one > "optString()" should be used to avoid such kind of errors since it will > return a default value ("") and won't risk the program in crashing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] [eagle] bd2019us opened a new pull request #1000: [EAGLE-1094] change JSONObject.getString() to optString() to avoid exception
bd2019us opened a new pull request #1000: [EAGLE-1094] change JSONObject.getString() to optString() to avoid exception URL: https://github.com/apache/eagle/pull/1000 Be sure to do all of the following to help us incorporate your contribution quickly and easily: - [x] Make sure the PR title is formatted like: `[EAGLE-] Description of pull request` - [x] Make sure tests pass via `mvn clean verify`. This command causes style. - [x] Replace `` in the title with the actual Jira issue number, if there is one. --- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[jira] [Updated] (EAGLE-1094) JSONObject.getString() may cause exception, optString() should be used.
[ https://issues.apache.org/jira/browse/EAGLE-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] bd2019us updated EAGLE-1094: Labels: pull-request-available (was: ) > JSONObject.getString() may cause exception, optString() should be used. > --- > > Key: EAGLE-1094 > URL: https://issues.apache.org/jira/browse/EAGLE-1094 > Project: Eagle > Issue Type: Bug >Reporter: bd2019us >Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > Locations: > (1) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:158 > (2) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:165 > (3) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:180 > (4) > eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java:117 > (5) > eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java:65 > > JSONObject.getString(elem) would throw an exception if the key of "elem" does > not exist, which may cause the program crash. Therefore, another one > "optString()" should be used to avoid such kind of errors since it will > return a default value ("") and won't risk the program in crashing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (EAGLE-1094) JSONObject.getString() may cause exception, optString() should be used.
[ https://issues.apache.org/jira/browse/EAGLE-1094?focusedWorklogId=221084&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-221084 ] ASF GitHub Bot logged work on EAGLE-1094: - Author: ASF GitHub Bot Created on: 01/Apr/19 05:00 Start Date: 01/Apr/19 05:00 Worklog Time Spent: 10m Work Description: bd2019us commented on pull request #1000: [EAGLE-1094] change JSONObject.getString() to optString() to avoid exception URL: https://github.com/apache/eagle/pull/1000 Be sure to do all of the following to help us incorporate your contribution quickly and easily: - [x] Make sure the PR title is formatted like: `[EAGLE-] Description of pull request` - [x] Make sure tests pass via `mvn clean verify`. This command causes style. - [x] Replace `` in the title with the actual Jira issue number, if there is one. --- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 221084) Time Spent: 10m Remaining Estimate: 0h > JSONObject.getString() may cause exception, optString() should be used. > --- > > Key: EAGLE-1094 > URL: https://issues.apache.org/jira/browse/EAGLE-1094 > Project: Eagle > Issue Type: Bug >Reporter: bd2019us >Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > Locations: > (1) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:158 > (2) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:165 > (3) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:180 > (4) > eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java:117 > (5) > eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java:65 > > JSONObject.getString(elem) would throw an exception if the key of "elem" does > not exist, which may cause the program crash. Therefore, another one > "optString()" should be used to avoid such kind of errors since it will > return a default value ("") and won't risk the program in crashing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (EAGLE-1094) JSONObject.getString() may cause exception, optString() should be used.
[ https://issues.apache.org/jira/browse/EAGLE-1094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] bd2019us updated EAGLE-1094: Description: Locations: (1) eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:158 (2) eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:165 (3) eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:180 (4) eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java:117 (5) eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java:65 JSONObject.getString(elem) would throw an exception if the key of "elem" does not exist, which may cause the program crash. Therefore, another one "optString()" should be used to avoid such kind of errors since it will return a default value ("") and won't risk the program in crashing. was: Locations: (1) eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:158 (2) eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:165 (3) eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:180 (4) eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java:117 (5) eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java:65 JSONObject.getString(elem) would throw an exception if the key of "elem" does not exist, which may cause the program crash. Therefore, another one "optString()" should be used to avoid such kind of errors since it will return a default value ("") and won't risk the program in crashing. > JSONObject.getString() may cause exception, optString() should be used. > --- > > Key: EAGLE-1094 > URL: https://issues.apache.org/jira/browse/EAGLE-1094 > Project: Eagle > Issue Type: Bug >Reporter: bd2019us >Priority: Major > > Locations: > (1) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:158 > (2) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:165 > (3) > eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:180 > (4) > eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java:117 > (5) > eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java:65 > > JSONObject.getString(elem) would throw an exception if the key of "elem" does > not exist, which may cause the program crash. Therefore, another one > "optString()" should be used to avoid such kind of errors since it will > return a default value ("") and won't risk the program in crashing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (EAGLE-1094) JSONObject.getString() may cause exception, optString() should be used.
bd2019us created EAGLE-1094: --- Summary: JSONObject.getString() may cause exception, optString() should be used. Key: EAGLE-1094 URL: https://issues.apache.org/jira/browse/EAGLE-1094 Project: Eagle Issue Type: Bug Reporter: bd2019us Locations: (1) eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:158 (2) eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:165 (3) eagle-topology-check/eagle-topology-app/src/main/java/org/apache/eagle/topology/extractor/hdfs/HdfsTopologyEntityParser.java:180 (4) eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSVolumeResolver.java:117 (5) eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/rest/MapRNameResolver.java:65 JSONObject.getString(elem) would throw an exception if the key of "elem" does not exist, which may cause the program crash. Therefore, another one "optString()" should be used to avoid such kind of errors since it will return a default value ("") and won't risk the program in crashing. -- This message was sent by Atlassian JIRA (v7.6.3#76005)