@SuppressWarnings("unchecked")
 private void validateStaticPorts() throws MojoExecutionException, MojoFailureException {
   if (this.staticPorts != null) {
     try {
       @SuppressWarnings("rawtypes")
       BiMap staticPortMap = HashBiMap.create(this.staticPorts.size());
       staticPortMap = MapConstraints.constrainedBiMap(staticPortMap, MapConstraints.notNull());
       staticPortMap.putAll(this.staticPorts);
       this.staticPorts = staticPortMap;
     } catch (NullPointerException npe) {
       throw new MojoExecutionException("Port names and values must not be null.", npe);
     } catch (IllegalArgumentException iae) {
       throw new MojoExecutionException("Port names and values must not be duplicated.", iae);
     }
   }
 }