Project

General

Profile

« Previous | Next » 

Revision e4afb5d7

Added by Andreas Müller about 9 years ago

fix MatchMode.prepend bug

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/query/MatchMode.java
60 60
                queryString = appendWildcard(queryString);
61 61
                queryString = prependWildcard(queryString);
62 62
                break;
63
        default:
64
            // Fall through for EXACT - Nothing to do //
65
            break;
63
            case EXACT:
64
            	break;  //Nothing to do
65
            default:
66
            	throw new RuntimeException ("Unsupported Matchmode: " + this.toString());
66 67
        }
67 68
        return queryString;
68 69
    }
......
73 74
     */
74 75
    private String prependWildcard(String queryString) {
75 76
        if(!queryString.startsWith(wildcardStr)){
76
            queryString += wildcardStr;
77
            queryString = wildcardStr + queryString;
77 78
        }
78 79
        return queryString;
79 80
    }

Also available in: Unified diff