Fwd: Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call.

From: Mike Kienenberger (mkienen..mail.com)
Date: Wed Feb 28 2007 - 10:12:43 EST

  • Next message: Andrus Adamchik: "Re: Is maven-cayenne-build-plugin supposed to be 1.4 compatible? replace(String, String) is a java 1.5 method call."

    Is maven-cayenne-build-plugin supposed to be 1.4 compatible?

    If so, there's one error that prevents this:

    maven-cayenne-build-plugin/src/main/java/org.apache.cayenne.maven.plugin.confluence/DocPageRenderer.java:line
    219 has

                matcher.appendReplacement(replacementBuffer,
    matcher.group(0).replace(
                        "+",
                        "%20"));

    replace(String, String) is a java 1.5 method call.

    replaceAll(String, String) might work, but you'd have to escape the
    regular expression characters.

    This method would also work, but I don't think commons lang is a
    dependency. You could simply copy the code for this method, though,
    into a common utility class -- using replace(String, String) is a
    common 1.5/1.4 error, and it'd be worthwhile to have a simple
    replacement when it happens.

    http://jakarta.apache.org/commons/lang/apidocs/org/apache/commons/lang/StringUtils.html#replace(java.lang.String,%20java.lang.String,%20java.lang.String)



    This archive was generated by hypermail 2.0.0 : Wed Feb 28 2007 - 10:13:14 EST