code: private Collection<InetSocketAddress> buildWhiteListCollection(String whiteList)
      {
          String[] list = whiteList.split(Constants.COMMA);
          Collection<InetSocketAddress> whiteListCollection = new ArrayList<InetSocketAddress>();
  
          PersistenceUnitMetadata persistenceUnitMetadata = kunderaMetadata.getApplicationMetadata()
                  .getPersistenceUnitMetadata(getPersistenceUnit());
          Properties props = persistenceUnitMetadata.getProperties();
          int defaultPort = 9042;
  
          if (externalProperties != null && externalProperties.get(PersistenceProperties.KUNDERA_PORT) != null)
          {
              try
              {
                  defaultPort = Integer.parseInt((String) externalProperties.get(PersistenceProperties.KUNDERA_PORT));
              }
              catch (NumberFormatException e)
              {
                  logger.error("Port in persistence.xml should be integer");
              }
          }
  
          else
          {
              try
              {
                  defaultPort = Integer.parseInt((String) props.get(PersistenceProperties.KUNDERA_PORT));
              }
              catch (NumberFormatException e)
              {
                  logger.error("Port in persistence.xml should be integer");
              }
          }
  
          for (String node : list)
          {
              if (node.indexOf(Constants.COLON) > 0)
              {
                  String[] parts = node.split(Constants.COLON);
                  whiteListCollection.add(new InetSocketAddress(parts[0], Integer.parseInt(parts[1])));
              }
              else
              {
                  whiteListCollection.add(new InetSocketAddress(node, defaultPort));
              }
          }
          return whiteListCollection;
      }
docs: Builds the white list collection.
  
  @param whiteList
  the white list
  @return the collection