Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1295

MergerTestCase.shouldMergeXaDsAndConnector fails with JDK8 due to different order of elements in collection

XMLWordPrintable

    • Hide

      Run IronJacamar testsuite with JDK8
      for single test:

      ant -Dmodule=common -Dtest=org.jboss.jca.common.metadata.merge.MergerTestCase one-test
      
      Show
      Run IronJacamar testsuite with JDK8 for single test: ant -Dmodule=common -Dtest=org.jboss.jca.common.metadata.merge.MergerTestCase one-test

      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

      Merger.ConfigPropertyFactory.createConfigProperty(
                     Merger.ConfigPropertyFactory.Prototype.XADATASOURCEPROPERTIES,
                     "DatabaseName=database_name;User=user;ServerName=server_name;PortNumber=5432;" + "Password=password;"))
      

      but String generated by Merger.java#L399

      StringBuffer valueBuf = new StringBuffer();
      for (Entry<String, String> xaConfigProperty : xads.getXaDataSourceProperty().entrySet())
      {
         valueBuf.append(xaConfigProperty.getKey());
         valueBuf.append("=");
         valueBuf.append(xaConfigProperty.getValue());
         valueBuf.append(";");
      }
      

      differs on JDK7 and JDK8
      JDK7:

      DatabaseName=database_name;User=user;ServerName=server_name;PortNumber=5432;Password=password;
      

      JDK8:

      DatabaseName=database_name;User=user;PortNumber=5432;ServerName=server_name;Password=password;
      

              msimka@redhat.com Martin Simka
              msimka@redhat.com Martin Simka
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: