[jbosstools-issues] [JBoss JIRA] (JBIDE-20452) Application wizard: Template parameters not updated after going back and selecting a new template

Andre Dietisheim (JIRA) issues at jboss.org
Mon Aug 17 07:39:26 EDT 2015


    [ https://issues.jboss.org/browse/JBIDE-20452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098846#comment-13098846 ] 

Andre Dietisheim commented on JBIDE-20452:
------------------------------------------

adding the following to the osjc resolves the issue:

{code:title=com.openshift.internal.restclient.model.template.Parameter}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + 
				((getFrom() == null) ? 0 : getFrom().hashCode())
				+ ((getGeneratorName() == null) ? 0 : getGeneratorName().hashCode())
				+ ((getName() == null) ? 0 : getName().hashCode())
				+ ((getValue() == null) ? 0 : getValue().hashCode())
				+ Boolean.valueOf(isRequired()).hashCode();
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Parameter other = (Parameter) obj;
		if (getFrom() == null) {
			if (other.getFrom() != null) {
				return false;
			}
		} else if (!getFrom().equals(other.getFrom())) {
			return false;
		}
		if (getGeneratorName() == null) {
			if (other.getGeneratorName() != null) {
				return false;
			}
		} else if (!getGeneratorName().equals(other.getGeneratorName())) {
			return false;
		}
		if (getName() == null) {
			if (other.getName() != null) {
				return false;
			}
		} else if (!getName().equals(other.getName())) {
			return false;
		}
		if (getValue() == null) {
			if (other.getValue() != null) {
				return false;
			}
		} else if (!getValue().equals(other.getValue())) {
			return false;
		}
		if (isRequired() != other.isRequired()) {
			return false;
		}
		return true;
	}
{code}

I'll PR right afterwards against the openshift-restclient-java.

> Application wizard: Template parameters not updated after going back and selecting a new template
> -------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-20452
>                 URL: https://issues.jboss.org/browse/JBIDE-20452
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.3.0.Beta2
>            Reporter: Fred Bricon
>            Assignee: Andre Dietisheim
>            Priority: Critical
>              Labels: application_wizard, openshift_v3
>             Fix For: 4.3.0.CR1
>
>
> # EXEC: Open v3 application wizard
> # EXEC: Select a template
> # EXEC: click next
> # ASSERT: in app wizard: template parameters are displayed
> # EXEC: go back, select another template
> # EXEC: click next
> Result:
>  template parameters are mixed with the ones from the old template
> !http://content.screencast.com/users/fbricon/folders/Jing/media/c237e748-96d7-4668-afda-d99ac76cfeeb/00000142.png|width=600!



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jbosstools-issues mailing list