mirror of https://github.com/apache/archiva.git
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:
parent
c6afb274c0
commit
fddb0ca9cf
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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" );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue