You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Ted Kirby (JIRA)" <ji...@apache.org> on 2008/05/08 16:28:55 UTC
[jira] Commented: (GERONIMODEVTOOLS-342) Setting the JRE on the
Edit Server Runtime panel usually fails
[ https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-342?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12595264#action_12595264 ]
Ted Kirby commented on GERONIMODEVTOOLS-342:
--------------------------------------------
Thanks, BJ. That works for me!
I am wondering about this code:
{code}
public void widgetSelected(SelectionEvent e) {
int sel = combo.getSelectionIndex();
IVMInstall vmInstall = null;
if (sel > 0)
vmInstall = (IVMInstall) installedJREs.get(sel - 1);
getRuntimeDelegate().setVMInstall(vmInstall);
validate();
}
{code}
I know you did not originally write the code, but don't our coding conventions say to use {} for if statements?
My real question is, do we want to set the vm to null if there is no selection?
I thus propose:
{code}
public void widgetSelected(SelectionEvent e) {
int sel = combo.getSelectionIndex();
IVMInstall vmInstall = null;
if (sel > 0) {
vmInstall = (IVMInstall) installedJREs.get(sel - 1);
getRuntimeDelegate().setVMInstall(vmInstall);
validate();
}
}
{code}
Possibly the validate could happen unconditionally.
Thoughts?
> Setting the JRE on the Edit Server Runtime panel usually fails
> --------------------------------------------------------------
>
> Key: GERONIMODEVTOOLS-342
> URL: https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-342
> Project: Geronimo-Devtools
> Issue Type: Bug
> Components: eclipse-plugin
> Affects Versions: 2.1.0
> Reporter: Ted Kirby
> Assignee: B.J. Reed
> Priority: Minor
> Fix For: 2.1.1
>
> Attachments: GERONIMODEVTOOLS-342.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.