mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
06.38.2015 189aff598a4ad62c3c5b0d94b8cb8f51ce1b6928
opendj-logref-doc-maven-plugin/src/main/java/org/forgerock/maven/GenerateMessageFileMojo.java
@@ -162,12 +162,6 @@
        /**
         * Build log reference entry for an log message.
         *
         * @param msgPropKey
         * @param category
         * @param severity
         * @param ordinal
         * @param formatString
         */
        public MessageRefEntry(final String msgPropKey, final Integer ordinal, final String formatString) {
            this.formatString = formatString;
@@ -222,11 +216,10 @@
         */
        @Override
        public int compareTo(MessageRefEntry mre) {
            if (this.ordinal == null || mre.ordinal == null) {
                return 0;
            } else {
            if (this.ordinal != null && mre.ordinal != null) {
                return this.ordinal.compareTo(mre.ordinal);
            }
            return 0;
        }
    }
@@ -292,12 +285,9 @@
        }
        private String getVariablelistHead() {
            StringBuilder builder = new StringBuilder(getXMLPreamble());
            builder.append(" <variablelist xml:id=\"log-ref-").append(this.category).append("\" ")
                    .append(getBaseElementAttrs()).append(">").append(EOL).append("  <title>Log Message Category: ")
                    .append(category).append("</title>").append(EOL);
            return builder.toString();
            return getXMLPreamble()
                + " <variablelist xml:id=\"log-ref-" + this.category + "\" " + getBaseElementAttrs() + ">" + EOL
                + "  <title>Log Message Category: " + category + "</title>" + EOL;
        }
        private String getVariablelistTail() {
@@ -313,21 +303,18 @@
        /**
         * Creates a message property key from a string value.
         *
         * @param keyString3
         * @param key
         *            from properties file
         * @return MessagePropertyKey created from string
         */
        public static MessagePropertyKey parseString(String key) {
            String description;
            Integer ordinal = null;
            int li = key.lastIndexOf("_");
            if (li != -1) {
                description = key.substring(0, li).toUpperCase();
            } else {
            if (li == -1) {
                throw new IllegalArgumentException("Incorrectly formatted key " + key);
            }
            final String description = key.substring(0, li).toUpperCase();
            Integer ordinal = null;
            try {
                String ordString = key.substring(li + 1);
                ordinal = Integer.parseInt(ordString);
@@ -362,12 +349,10 @@
        /** {@inheritDoc} */
        @Override
        public String toString() {
            StringBuilder builder = new StringBuilder(description);
            if (ordinal != null) {
                builder.append("_").append(ordinal);
                return description + "_" + ordinal;
            }
            return builder.toString();
            return description;
        }
        /** {@inheritDoc} */
@@ -379,7 +364,6 @@
                return ordinal.compareTo(k.ordinal);
            }
        }
    }
    /**
@@ -535,7 +519,6 @@
     */
    public void checkDestJava(File dest) throws Exception {
        File descriptorsRegFile = new File(dest.getParentFile(), DESCRIPTORS_REG);
        if (registryFileName != null) {
            // if REGISTRY_FILE_NAME is already set, ensure that we computed the
            // same one
@@ -550,5 +533,4 @@
            registryFileName = descriptorsRegFile.getCanonicalPath();
        }
    }
}
opendj-manifest-classpath-maven-plugin/src/main/java/org/forgerock/maven/GenerateManifestClassPathMojo.java
@@ -136,12 +136,11 @@
        return classpath.toString();
    }
    @SuppressWarnings("unchecked")
    private List<String> getClasspathItems() throws DependencyResolutionRequiredException {
        final List<String> classpathItems = new ArrayList<String>();
        // add project dependencies
        for (String artifactFile : (List<String>) project.getRuntimeClasspathElements()) {
        for (String artifactFile : project.getRuntimeClasspathElements()) {
            final File file = new File(artifactFile);
            if (file.getAbsoluteFile().isFile()) {
                final Artifact artifact = findArtifactWithFile(project.getArtifacts(), file);
@@ -189,10 +188,9 @@
    private Artifact findArtifactWithFile(Set<Artifact> artifacts, File file) {
        for (Artifact artifact : artifacts) {
            if (artifact.getFile() != null) {
                if (artifact.getFile().equals(file)) {
                    return artifact;
                }
            if (artifact.getFile() != null
                    && artifact.getFile().equals(file)) {
                return artifact;
            }
        }
        return null;