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

Gh-2997: Prevented a NullPointerException being thrown. #2998

Merged
merged 4 commits into from
Jul 4, 2023

Conversation

Banji0x
Copy link
Contributor

@Banji0x Banji0x commented Jul 1, 2023

This commit refactors the code to address the scenario where the zookeepers property is null. The modified code now checks if the zookeepers property is null, and if so, it sets the ZooKeeperPort to the default value. This change ensures that a NullPointerException is avoided when accessing the zookeepers property and provides a more robust behavior in the case of a missing or null value.

@CLAassistant
Copy link

CLAassistant commented Jul 1, 2023

CLA assistant check
All committers have signed the CLA.

@Banji0x Banji0x changed the title Prevented a NullPointerException being thrown. Gh-2997: Addressed Null Pointer Exception by Implementing Defensive Null Checks Jul 1, 2023
@Banji0x Banji0x changed the title Gh-2997: Addressed Null Pointer Exception by Implementing Defensive Null Checks Gh-2997: Prevented a NullPointerException being thrown. Jul 1, 2023
… NullPointerException, set the zooKeeperPort to the zooKeeper default port.
@Banji0x Banji0x force-pushed the develop branch 2 times, most recently from c76df46 to 02d02b5 Compare July 3, 2023 15:11
@Banji0x
Copy link
Contributor Author

Banji0x commented Jul 3, 2023

@GCHQDeveloper314
It seems like some tests failed, how do i resolve that ?

@GCHQDeveloper314
Copy link
Member

I believe they were cancelled because of force pushing to the branch. Please avoid force pushing, as we squash all commits on merge there's no need to force push. It can cause issues with the CI sometimes.

There's a need to update the copyright header on the file that was changed to include the current year.

@Banji0x
Copy link
Contributor Author

Banji0x commented Jul 4, 2023

@GCHQDeveloper314
Understood.
Copyright has been updated.
Kindly review changes.

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #2998 (8971ce5) into develop (62d8331) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             develop    #2998      +/-   ##
=============================================
- Coverage      65.17%   65.16%   -0.02%     
+ Complexity      2633     2631       -2     
=============================================
  Files            901      901              
  Lines          28797    28797              
  Branches        3238     3238              
=============================================
- Hits           18769    18765       -4     
- Misses          8572     8574       +2     
- Partials        1456     1458       +2     

see 2 files with indirect coverage changes

Co-authored-by: GCHQDeveloper314 <94527357+GCHQDeveloper314@users.noreply.github.com>
@Banji0x
Copy link
Contributor Author

Banji0x commented Jul 4, 2023

@GCHQDeveloper314 copyright has been updated.

@GCHQDeveloper314 GCHQDeveloper314 merged commit 23eb989 into gchq:develop Jul 4, 2023
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.

NullPointerException occurs in MiniAccumuloStore if Zookeeper not set
3 participants