aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/plugins
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2014-03-24 01:36:21 +0000
committerOlivier Lamy <olamy@apache.org>2014-03-24 01:36:21 +0000
commitfddb0ca9cfcee7194315b58217187c2303ea9fd1 (patch)
tree67d43c103894a8f17c38c01d7e0bf3224e640c20 /archiva-modules/plugins
parentc6afb274c0d0680c35e041531b130def0e2da998 (diff)
downloadarchiva-fddb0ca9cfcee7194315b58217187c2303ea9fd1.tar.gz
archiva-fddb0ca9cfcee7194315b58217187c2303ea9fd1.zip
fix truncating datas in unit and wrong StringUtils usage
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1580690 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins')
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraUtils.java8
-rw-r--r--archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java12
2 files changed, 16 insertions, 4 deletions
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraUtils.java b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraUtils.java
index 3482f5994..f1b8c7118 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraUtils.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/main/java/org/apache/archiva/metadata/repository/cassandra/CassandraUtils.java
@@ -76,7 +76,7 @@ public class CassandraUtils
public static String getStringValue( ColumnSlice<String, String> columnSlice, String columnName )
{
- if ( StringUtils.isNotEmpty( columnName ) )
+ if ( StringUtils.isEmpty( columnName ) )
{
return null;
}
@@ -87,7 +87,7 @@ public class CassandraUtils
public static Long getLongValue( ColumnSlice<String, Long> columnSlice, String columnName )
{
- if ( StringUtils.isNotEmpty( columnName ) )
+ if ( StringUtils.isEmpty( columnName ) )
{
return null;
}
@@ -99,7 +99,7 @@ public class CassandraUtils
public static String getAsStringValue( ColumnSlice<String, Long> columnSlice, String columnName )
{
StringSerializer ss = StringSerializer.get();
- if ( StringUtils.isNotEmpty( columnName ) )
+ if ( StringUtils.isEmpty( columnName ) )
{
return null;
}
@@ -111,7 +111,7 @@ public class CassandraUtils
public static Long getAsLongValue( ColumnSlice<String, String> columnSlice, String columnName )
{
LongSerializer ls = LongSerializer.get();
- if ( StringUtils.isNotEmpty( columnName ) )
+ if ( StringUtils.isEmpty( columnName ) )
{
return null;
}
diff --git a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
index ed71dc7c7..e501b8266 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
+++ b/archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
@@ -85,6 +85,18 @@ public class CassandraMetadataRepositoryTest
cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
"repository" );
+ cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
+ "projectversionmetadatamodel" );
+
+ cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
+ "artifactmetadatamodel" );
+
+ cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
+ "metadatafacetmodel" );
+
+ cassandraArchivaManager.getCluster().truncate( cassandraArchivaManager.getKeyspace().getKeyspaceName(),
+ "metadatafacetmodel" );
+
}
}