[jboss-jira] [JBoss JIRA] (JBJCA-1295) MergerTestCase.shouldMergeXaDsAndConnector fails with JDK8 due to different order of elements in collection

Martin Simka (JIRA) issues at jboss.org
Thu Oct 8 10:07:00 EDT 2015


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

Martin Simka commented on JBJCA-1295:
-------------------------------------

PR to 1.3: https://github.com/ironjacamar/ironjacamar/pull/397

> MergerTestCase.shouldMergeXaDsAndConnector fails with JDK8 due to different order of elements in collection
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: JBJCA-1295
>                 URL: https://issues.jboss.org/browse/JBJCA-1295
>             Project: IronJacamar
>          Issue Type: Bug
>          Components: Test suite
>    Affects Versions: WildFly/IronJacamar 1.3.0.Final
>         Environment: JDK8
>            Reporter: Martin Simka
>            Assignee: Martin Simka
>            Priority: Minor
>
> Test issue only - IronJacamar 1.3.0
> org.jboss.jca.common.metadata.merge.MergerTestCase#shouldMergeXaDsAndConnector
> There is hardcoded expected value of <config-property-value> in [MergerTestCase.java#L224|https://github.com/ironjacamar/ironjacamar/blob/1.3/common/src/test/java/org/jboss/jca/common/metadata/merge/MergerTestCase.java#L224]
> {code:java}
> Merger.ConfigPropertyFactory.createConfigProperty(
>                Merger.ConfigPropertyFactory.Prototype.XADATASOURCEPROPERTIES,
>                "DatabaseName=database_name;User=user;ServerName=server_name;PortNumber=5432;" + "Password=password;"))
> {code}
> but String generated by [Merger.java#L399|https://github.com/ironjacamar/ironjacamar/blob/1.3/common/src/main/java/org/jboss/jca/common/metadata/merge/Merger.java#L399]
> {code:java}
> StringBuffer valueBuf = new StringBuffer();
> for (Entry<String, String> xaConfigProperty : xads.getXaDataSourceProperty().entrySet())
> {
>    valueBuf.append(xaConfigProperty.getKey());
>    valueBuf.append("=");
>    valueBuf.append(xaConfigProperty.getValue());
>    valueBuf.append(";");
> }
> {code}
> differs on JDK7 and JDK8
> JDK7:
> {noformat}
> DatabaseName=database_name;User=user;ServerName=server_name;PortNumber=5432;Password=password;
> {noformat}
> JDK8:
> {noformat}
> DatabaseName=database_name;User=user;PortNumber=5432;ServerName=server_name;Password=password;
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list