Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

  • Analyze the issue - NullPointerException in HtmlRender.div_changedSchema when schema is null
  • Create test case to reproduce the issue
  • Implement fix in HtmlRender.java to handle null schema
  • Run tests to verify the fix
  • Run code review
  • Rename test methods and YAML files to include issue ID BUG: An unhandled exception after printing the result #865
Original prompt

This section details on the original issue you should resolve

<issue_title>BUG: An unhandled exception after printing the result</issue_title>
<issue_description>
After printing results I receive this error:

`--------------------------------------------------------------------------
-- Result --

               API changes are backward compatible                    

Unexpected exception. Reason: Cannot invoke "org.openapitools.openapidiff.core.model.ChangedSchema.isIncompatible()" because "schema" is null
java.lang.NullPointerException: Cannot invoke "org.openapitools.openapidiff.core.model.ChangedSchema.isIncompatible()" because "schema" is null
at org.openapitools.openapidiff.core.output.HtmlRender.div_changedSchema(HtmlRender.java:358)
at org.openapitools.openapidiff.core.output.HtmlRender.li_changedRequest(HtmlRender.java:346)
at org.openapitools.openapidiff.core.output.HtmlRender.ul_request(HtmlRender.java:330)
at org.openapitools.openapidiff.core.output.HtmlRender.ol_changed(HtmlRender.java:212)
at org.openapitools.openapidiff.core.output.HtmlRender.render(HtmlRender.java:106)
at org.openapitools.openapidiff.cli.Main.main(Main.java:245)
⚠️ API changes broke backward compatibility`</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: DrSatyr <8143518+DrSatyr@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unhandled exception when printing results Fix NullPointerException in HtmlRender when schema is null Nov 27, 2025
Copilot finished work on behalf of DrSatyr November 27, 2025 11:01
Copilot AI requested a review from DrSatyr November 27, 2025 11:01
@DrSatyr
Copy link
Collaborator

DrSatyr commented Nov 27, 2025

@copilot let's mention issue ID in test names. Also, in related yaml schemas names.

Co-authored-by: DrSatyr <8143518+DrSatyr@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 27, 2025

@copilot let's mention issue ID in test names. Also, in related yaml schemas names.

Done in a11280c. Renamed test methods to issue865_renderDoesNotFailWhenSchemaIsNullButExampleChanged and issue865_renderWithShowAllChangesDoesNotFailWhenSchemaIsNullButExampleChanged, and YAML files to issue-865-null-schema-1.yaml and issue-865-null-schema-2.yaml.

Copilot finished work on behalf of DrSatyr November 27, 2025 11:27
@DrSatyr DrSatyr marked this pull request as ready for review November 27, 2025 11:48
@DrSatyr DrSatyr merged commit f928125 into master Nov 27, 2025
6 checks passed
@DrSatyr DrSatyr deleted the copilot/fix-null-pointer-exception branch November 27, 2025 11:48
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.

BUG: An unhandled exception after printing the result

2 participants