public static String getAbsolutePath(final String parentPath, final String relativePath) {
        if (parentPath == null || relativePath == null)
            return null;

        if (parentPath.isEmpty() || relativePath.isEmpty()) {
            return null;
        }

        final File parentFile = new File(FilenameUtil.normalize(parentPath));
        final File relativeFile = new File(FilenameUtil.normalize(relativePath));
        File dir = null;

        if (parentFile.isAbsolute() && (!relativeFile.isAbsolute())) {
            if (parentFile.isDirectory()) {
                dir = parentFile;
            } else {
                dir = parentFile.getParentFile();
            }

            final File absoluteFile = new File(dir, relativeFile.getPath());
            return FilenameUtil.normalize(absoluteFile.getAbsolutePath());
        }
        return relativePath;
    }