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

OP-1363 | Fix NullPointerException on PatientBillEdit #2089

Merged
merged 5 commits into from
Nov 21, 2024

Conversation

ArnaudFofou
Copy link
Contributor

@ArnaudFofou ArnaudFofou commented Nov 19, 2024

See OP-1363.

To fix that issue:

  • I disable button when patient is not selected
  • I enable button when patient is selected

@mwithi
Copy link
Member

mwithi commented Nov 20, 2024

Editing a new bill still throws a NPE:

image

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "javax.swing.JButton.setEnabled(boolean)" because "this.jButtonTrashPatient" is null
	at org.isf.accounting.gui.PatientBillEdit.setJButtonPickPatient(PatientBillEdit.java:900)
	at org.isf.accounting.gui.PatientBillEdit.getJButtonPickPatient(PatientBillEdit.java:891)
	at org.isf.accounting.gui.PatientBillEdit.getJPanelDate(PatientBillEdit.java:822)
	at org.isf.accounting.gui.PatientBillEdit.getJPanelTop(PatientBillEdit.java:914)
	at org.isf.accounting.gui.PatientBillEdit.initComponents(PatientBillEdit.java:494)
	at org.isf.accounting.gui.PatientBillEdit.<init>(PatientBillEdit.java:383)
	at org.isf.accounting.gui.BillBrowser.lambda$5(BillBrowser.java:529)

@mwithi mwithi changed the title OP-1363 | Fix NullPointerexception OP-1363 | Fix NullPointErexception on PatientBillEdit Nov 20, 2024
@mwithi mwithi changed the title OP-1363 | Fix NullPointErexception on PatientBillEdit OP-1363 | Fix NullPointerException on PatientBillEdit Nov 20, 2024
Copy link
Member

@mwithi mwithi left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks a lot!

@mwithi mwithi merged commit f5eda62 into informatici:develop Nov 21, 2024
1 check passed
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