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
This commit is contained in:
Olivier Lamy 2014-03-24 01:36:21 +00:00
parent c6afb274c0
commit fddb0ca9cf
2 changed files with 16 additions and 4 deletions

View File

@ -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;
}

View File

@ -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" );
}
}