Bug 559030 - IllegalArgumentException in CommitMessageComponent.setAmendingButtonSelection(CommitMessageComponent.java:388)
Summary: IllegalArgumentException in CommitMessageComponent.setAmendingButtonSelection...
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 5.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-10 10:20 EST by Andrey Loskutov CLA
Modified: 2020-01-10 10:25 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2020-01-10 10:20:52 EST
After rebase & merge & amend commits in the jgit bug 356832 patch series I've noticed that my error log contained few errors like below.

I'm using latest nightly egit build on latest SDK 4.15 nightly build.

eclipse.buildId=4.15.0.I20200108-2240
java.version=1.8.0_181
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

org.eclipse.ui
Error
Fri Jan 10 15:00:14 CET 2020
Unhandled event loop exception

java.lang.IllegalArgumentException: Argument cannot be null
	at org.eclipse.swt.SWT.error(SWT.java:4701)
	at org.eclipse.swt.SWT.error(SWT.java:4635)
	at org.eclipse.swt.SWT.error(SWT.java:4606)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:550)
	at org.eclipse.swt.widgets.Text.setText(Text.java:2575)
	at org.eclipse.egit.ui.internal.dialogs.CommitMessageComponent.setAmendingButtonSelection(CommitMessageComponent.java:388)
	at org.eclipse.egit.ui.internal.staging.StagingView$13.run(StagingView.java:955)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
	at org.eclipse.jface.action.ActionContributionItem.lambda$5(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5741)
Comment 1 Andrey Loskutov CLA 2020-01-10 10:25:31 EST
Forgot to mention, I only used Staging view.

Looks like code in CommitMessageComponent allows to re-set "author" field to null but in other places (like in the one with the error) supplies the "author" value to API that does not accept null arguments. May be it would be better to reset the field to EMPTY_STRING instead of null.