diff options
author | Brett Porter <brett@apache.org> | 2007-08-03 08:10:29 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2007-08-03 08:10:29 +0000 |
commit | a40c80e2e114ca8782012de512fe8e4b5de90ccb (patch) | |
tree | 9b5e5d547157e8f3e884451b2a4a1d672e57ba34 /archiva-database | |
parent | b3f3de4a98e6eb18c8f8f43900d663f5a6c29765 (diff) | |
download | archiva-a40c80e2e114ca8782012de512fe8e4b5de90ccb.tar.gz archiva-a40c80e2e114ca8782012de512fe8e4b5de90ccb.zip |
[MRM-446] search by checksum was not working due to a case mismatch
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@562380 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-database')
-rw-r--r-- | archiva-database/src/main/java/org/apache/maven/archiva/database/constraints/ArtifactsByChecksumConstraint.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/constraints/ArtifactsByChecksumConstraint.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/constraints/ArtifactsByChecksumConstraint.java index 397ff44a9..f814730fb 100644 --- a/archiva-database/src/main/java/org/apache/maven/archiva/database/constraints/ArtifactsByChecksumConstraint.java +++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/constraints/ArtifactsByChecksumConstraint.java @@ -37,10 +37,10 @@ public class ArtifactsByChecksumConstraint public static final String SHA1 = "SHA1"; public static final String MD5 = "MD5"; - + /** * Create constraint for checksum (without providing type) - * + * * @param desiredChecksum the checksum (either SHA1 or MD5) */ public ArtifactsByChecksumConstraint( String desiredChecksum ) @@ -50,13 +50,13 @@ public class ArtifactsByChecksumConstraint /** * Create constraint for specific checksum. - * + * * @param desiredChecksum the checksum (either SHA1 or MD5) - * @param type the type of checksum (either {@link #SHA1} or {@link #MD5}) + * @param type the type of checksum (either {@link #SHA1} or {@link #MD5}) */ public ArtifactsByChecksumConstraint( String desiredChecksum, String type ) { - if( StringUtils.isEmpty( type ) ) + if ( StringUtils.isEmpty( type ) ) { // default for no specified type. whereClause = "this.checksumSHA1 == desiredChecksum || this.checksumMD5 == desiredChecksum"; @@ -72,8 +72,8 @@ public class ArtifactsByChecksumConstraint whereClause = "this.checksum" + type.trim() + " == desiredChecksum"; } - declParams = new String[]{ "String desiredChecksum" }; - params = new Object[]{ desiredChecksum }; + declParams = new String[]{"String desiredChecksum"}; + params = new Object[]{desiredChecksum.toLowerCase()}; } public String getSortColumn() |