Source:
public void execute() throws MojoExecutionException, MojoFailureException { try { initGitFlowConfig(); checkUncommittedChanges(); if (fetchRemote) { gitFetchRemoteAndCompare(gitFlowConfig.getDevelopmentBranch()); } String featureName = null; try { while (StringUtils.isBlank(featureName)) { featureName = prompter .prompt("What is a name of feature branch? " + gitFlowConfig.getFeatureBranchPrefix()); if(!isBranchNameRegexCompliant(featureName)){ getLog().warn("The name of the branch is not regex compliant, it does not match: " + featureBranchRegex); featureName = null; continue; } if (!validBranchName(featureName)) { getLog().info("The name of the branch is not valid."); featureName = null; } } } catch (PrompterException e) { getLog().error(e); } featureName = StringUtils.deleteWhitespace(featureName); final boolean featureBranchExists = gitCheckBranchExists(gitFlowConfig .getFeatureBranchPrefix() + featureName); if (featureBranchExists) { throw new MojoFailureException( "Feature branch with that name already exists. Cannot start feature."); } gitCreateAndCheckout(gitFlowConfig.getFeatureBranchPrefix() + featureName, gitFlowConfig.getDevelopmentBranch()); if (!skipFeatureVersion && !tychoBuild) { final String currentVersion = getCurrentProjectVersion(); String version = null; try { final DefaultVersionInfo versionInfo = new DefaultVersionInfo( currentVersion); version = versionInfo.getReleaseVersionString() + "-" + featureName + "-" + Artifact.SNAPSHOT_VERSION; } catch (VersionParseException e) { if (getLog().isDebugEnabled()) { getLog().debug(e); } } if (StringUtils.isNotBlank(version)) { mvnSetVersions(version); gitCommit(commitMessages.getFeatureStartMessage()); } } if (installProject) { mvnCleanInstall(); } } catch (CommandLineException e) { getLog().error(e); } }

Target:
public void execute() throws MojoExecutionException, MojoFailureException { try { initGitFlowConfig(); checkUncommittedChanges(); if (fetchRemote) { gitFetchRemoteAndCompare(gitFlowConfig.getDevelopmentBranch()); } String featureName = null; try { while (isBlank(featureName)) { featureName = prompter .prompt("What is a name of feature branch? " + gitFlowConfig.getFeatureBranchPrefix()); if(isNotBlank(featureName)) { if (!isBranchNameRegexCompliant(featureName)) { getLog().warn("The name of the branch is not regex compliant, it does not match: " + featureBranchRegex); featureName = null; continue; } if (!validBranchName(featureName)) { getLog().info("The name of the branch is not valid."); featureName = null; } } } } catch (PrompterException e) { getLog().error(e); } featureName = StringUtils.deleteWhitespace(featureName); final boolean featureBranchExists = gitCheckBranchExists(gitFlowConfig .getFeatureBranchPrefix() + featureName); if (featureBranchExists) { throw new MojoFailureException( "Feature branch with that name already exists. Cannot start feature."); } gitCreateAndCheckout(gitFlowConfig.getFeatureBranchPrefix() + featureName, gitFlowConfig.getDevelopmentBranch()); if (!skipFeatureVersion && !tychoBuild) { final String currentVersion = getCurrentProjectVersion(); String version = null; try { final DefaultVersionInfo versionInfo = new DefaultVersionInfo( currentVersion); version = versionInfo.getReleaseVersionString() + "-" + featureName + "-" + Artifact.SNAPSHOT_VERSION; } catch (VersionParseException e) { if (getLog().isDebugEnabled()) { getLog().debug(e); } } if (StringUtils.isNotBlank(version)) { mvnSetVersions(version); gitCommit(commitMessages.getFeatureStartMessage()); } } if (installProject) { mvnCleanInstall(); } } catch (CommandLineException e) { getLog().error(e); } }