Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Compatibility for Spring 1.2+

Help
2010-03-21
2013-04-08
  • Aly González
    Aly González
    2010-03-21

    IN HibernatConfigure.JAVA CHANGE THIS

    Pattern pattern = Pattern.compile((String)matchIterator.next());

    FOR THIS:

    String stringPattern ;
    Object item = matchIterator.next();
    try {
    stringPattern = (String)item; // Spring 1.2
    }
    catch(Exception e){
    TypedStringValue typedStringValue  = (TypedStringValue)item; //  Spring 1.2+
    stringPattern = typedStringValue.getValue();
    }
    Pattern pattern = Pattern.compile(stringPattern);