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

Add null check to response header method #8

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Add null check to response header method #8

merged 1 commit into from
Feb 22, 2024

Conversation

jordanpadams
Copy link
Member

@jordanpadams jordanpadams commented Feb 22, 2024

🗒️ Summary

Fix issues with nullpointerexception

⚙️ Test Data and/or Report

  • Load any documents into your registry.
  • Run curl command
$ curl --GET http://localhost:8080/search-ui-legacy/search?q=*:*


<div xmlns:html="http://www.w3.org/1999/xhtml" id="sidebar">
   <div class="sidebarSection">
      <h2>Refine Your Search</h2>
      <h3>
         <span class="pds_value">Type</span>
      </h3>
      <ul>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_type%3A%221%2Ccollection%22&amp;f.facet_type.facet.prefix=2%2Ccollection%2C">collection</a> (3661)</li>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_type%3A%221%2Cbundle%22&amp;f.facet_type.facet.prefix=2%2Cbundle%2C">bundle</a> (557)</li>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_type%3A%221%2Cdocument%22&amp;f.facet_type.facet.prefix=2%2Cdocument%2C">document</a> (45)</li>
      </ul>
      <h3>
         <span class="pds_value">Target</span>
      </h3>
      <ul>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_target%3A%221%2Cplanet%22&amp;f.facet_target.facet.prefix=2%2Cplanet%2C">planet</a> (1581)</li>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_target%3A%221%2Csatellite%22&amp;f.facet_target.facet.prefix=2%2Csatellite%2C">satellite</a> (460)</li>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_target%3A%221%2Cother%22&amp;f.facet_target.facet.prefix=2%2Cother%2C">other</a> (262)</li>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_target%3A%221%2Ccalibration%22&amp;f.facet_target.facet.prefix=2%2Ccalibration%2C">calibration</a> (65)</li>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_target%3A%221%2Cring%22&amp;f.facet_target.facet.prefix=2%2Cring%2C">ring</a> (57)</li>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_target%3A%221%2Casteroid%22&amp;f.facet_target.facet.prefix=2%2Casteroid%2C">asteroid</a> (48)</li>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_target%3A%221%2Ccomet%22&amp;f.facet_target.facet.prefix=2%2Ccomet%2C">comet</a> (3)</li>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_target%3A%221%2Cmeteorite%22&amp;f.facet_target.facet.prefix=2%2Cmeteorite%2C">meteorite</a> (3)</li>
         <li>
            <a class="pds_value"
               href="?q=%2A%3A%2A&amp;fq=facet_target%3A%221%2Ctrans-neptunian%20object%22&amp;f.facet_target.facet.prefix=2%2Ctrans-neptunian%20object%2C">trans-neptunian object</a> (3)</li>
      </ul>
      <h3>
         <span class="pds_value">Investigation</span>
...

♻️ Related Issues

Resolves #7

Note: I know Exception e is very very bad for exception handling, but leaving for now.

@jordanpadams jordanpadams requested a review from a team as a code owner February 22, 2024 21:03
Copy link
Member

@nutjob4life nutjob4life left a comment

Choose a reason for hiding this comment

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

Looks safe!

@jordanpadams jordanpadams merged commit 4e8911f into main Feb 22, 2024
3 checks passed
@jordanpadams jordanpadams deleted the i7 branch February 22, 2024 22:07
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 when wt is not provided
2 participants