docs: public static List<BuildPlatform> validatePlatforms( List<BuildPlatform> platforms ) throws MojoExecutionException
      {
          if ( platforms == null )
          {
              platforms = new ArrayList<BuildPlatform>();
              platforms.add( new BuildPlatform() );
          }
          else
          {
              Set<String> platformNames = new HashSet<String>();
              for ( BuildPlatform platform : platforms )
              {
                  if ( platformNames.contains( platform.getName() ) )
                  {
                      throw new MojoExecutionException( "Duplicate platform '" + platform.getName()
                              + "' in configuration, platform names must be unique" );
                  }
                  platformNames.add( platform.getName() );
                  platform.identifyPrimaryConfiguration();
              }
          }
          return platforms;
      }