ee/src/main/java/org/jboss/as/ee/component/deployers/EarApplicationNameProcessor.java
private String getEarName(final DeploymentUnit deploymentUnit) {
        final String duName = deploymentUnit.getName();
        if (duName.endsWith(".ear")) {
            return duName.substring(0, duName.length() - ".ear".length());
        }
        return null;
    }
private String getEarName(final DeploymentUnit deploymentUnit) {
        final String duName = deploymentUnit.getName();
        if (duName.endsWith(".ear")) {
            return duName.substring(0, duName.length() - ".ear".length());
        }
        return null;
    }
private String getEarName ( final DeploymentUnit deploymentUnit ) { final String duName = deploymentUnit . getName ( ) ; if ( duName . endsWith ( ".ear" ) ) { return duName . substring ( 0 , duName . length ( ) - ".ear" . length ( ) ) ; } return null ; }
Returns the name (stripped off the .ear suffix) of the passed <code>deploymentUnit</code>.
Returns null if the passed <code>deploymentUnit</code>'s name doesn't end with .ear suffix.

@param deploymentUnit Deployment unit
@return
Returns the name ( stripped off the . ear suffix ) of the passed <code > deploymentUnit< / code > . Returns null if the passed <code > deploymentUnit< / code > s name doesn t end with . ear suffix .