usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [10/50] [abbrv] Miscellaneous changes
Date Thu, 06 Feb 2014 10:21:28 GMT
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/rest/src/test/java/org/usergrid/rest/management/organizations/OrganizationsResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/usergrid/rest/management/organizations/OrganizationsResourceIT.java
b/stack/rest/src/test/java/org/usergrid/rest/management/organizations/OrganizationsResourceIT.java
index ecaa8a4..1fc7477 100644
--- a/stack/rest/src/test/java/org/usergrid/rest/management/organizations/OrganizationsResourceIT.java
+++ b/stack/rest/src/test/java/org/usergrid/rest/management/organizations/OrganizationsResourceIT.java
@@ -78,7 +78,7 @@ public class OrganizationsResourceIT extends AbstractRestIT {
             EntityManager em = setup.getEmf().getEntityManager( CassandraService.MANAGEMENT_APPLICATION_ID
);
             User user = em.get( ui.getUuid(), User.class );
             assertEquals( "Test User", user.getName() );
-            assertEquals( "Apigee", ( String ) user.getProperty( "company" ) );
+            assertEquals( "Apigee", user.getProperty( "company" ));
 
             OrganizationInfo orgInfo = setup.getMgmtSvc().getOrganizationByName( "test-org-1"
);
             assertEquals( 5L, orgInfo.getProperties().get( "securityLevel" ) );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/management/ActivationState.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/management/ActivationState.java b/stack/services/src/main/java/org/usergrid/management/ActivationState.java
index 4836a6f..aaf0b43 100644
--- a/stack/services/src/main/java/org/usergrid/management/ActivationState.java
+++ b/stack/services/src/main/java/org/usergrid/management/ActivationState.java
@@ -3,6 +3,6 @@ package org.usergrid.management;
 
 public enum ActivationState {
 
-    UNKNOWN, UNCONFIRMED, CONFIRMED_AWAITING_ACTIVATION, ACTIVATED;
+    UNKNOWN, UNCONFIRMED, CONFIRMED_AWAITING_ACTIVATION, ACTIVATED
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/management/cassandra/ManagementServiceImpl.java
b/stack/services/src/main/java/org/usergrid/management/cassandra/ManagementServiceImpl.java
index f7cc99c..238ebdd 100644
--- a/stack/services/src/main/java/org/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -1251,9 +1251,8 @@ public class ManagementServiceImpl implements ManagementService {
 
             boolean testUserEnabled = parseBoolean( properties.getProperty( PROPERTIES_SETUP_TEST_ACCOUNT
) );
 
-            boolean userIsTestUser = !testUserEnabled ? false :
-                                     properties.getProperty( PROPERTIES_SYSADMIN_LOGIN_EMAIL
)
-                                               .equals( userInfo.getEmail() );
+            boolean userIsTestUser = testUserEnabled && properties.getProperty(PROPERTIES_SYSADMIN_LOGIN_EMAIL)
+                    .equals(userInfo.getEmail());
 
             if ( !userIsSuperAdmin && !userIsTestUser ) {
 
@@ -2454,8 +2453,7 @@ public class ManagementServiceImpl implements ManagementService {
         Boolean registration_requires_admin_approval = ( Boolean ) em
                 .getProperty( new SimpleEntityRef( Application.ENTITY_TYPE, applicationId
),
                         REGISTRATION_REQUIRES_ADMIN_APPROVAL );
-        return registration_requires_admin_approval != null ? registration_requires_admin_approval.booleanValue()
:
-               false;
+        return registration_requires_admin_approval != null && registration_requires_admin_approval.booleanValue();
     }
 
 
@@ -2465,8 +2463,7 @@ public class ManagementServiceImpl implements ManagementService {
         Boolean registration_requires_email_confirmation = ( Boolean ) em
                 .getProperty( new SimpleEntityRef( Application.ENTITY_TYPE, applicationId
),
                         REGISTRATION_REQUIRES_EMAIL_CONFIRMATION );
-        return registration_requires_email_confirmation != null ?
-               registration_requires_email_confirmation.booleanValue() : false;
+        return registration_requires_email_confirmation != null && registration_requires_email_confirmation.booleanValue();
     }
 
 
@@ -2475,7 +2472,7 @@ public class ManagementServiceImpl implements ManagementService {
         Boolean notify_admin_of_new_users = ( Boolean ) em
                 .getProperty( new SimpleEntityRef( Application.ENTITY_TYPE, applicationId
),
                         NOTIFY_ADMIN_OF_NEW_USERS );
-        return notify_admin_of_new_users != null ? notify_admin_of_new_users.booleanValue()
: false;
+        return notify_admin_of_new_users != null && notify_admin_of_new_users.booleanValue();
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/security/providers/FoursquareProvider.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/security/providers/FoursquareProvider.java
b/stack/services/src/main/java/org/usergrid/security/providers/FoursquareProvider.java
index 0c953c7..6e3dbe8 100644
--- a/stack/services/src/main/java/org/usergrid/security/providers/FoursquareProvider.java
+++ b/stack/services/src/main/java/org/usergrid/security/providers/FoursquareProvider.java
@@ -82,7 +82,7 @@ public class FoursquareProvider extends AbstractProvider {
         String fq_user_username = ( String ) fq_user.get( "id" );
         String fq_user_email = ( String ) ( ( Map<?, ?> ) fq_user.get( "contact" )
).get( "email" );
         String fq_user_picture = ( String ) ( ( Map<?, ?> ) fq_user.get( "photo" )
).get( "suffix" );
-        String fq_user_name = new String( "" );
+        String fq_user_name = "";
 
         // Grab the last check-in so we can store that as the user location
         Map<String, Object> fq_location =

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/security/providers/PingIdentityProvider.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/security/providers/PingIdentityProvider.java
b/stack/services/src/main/java/org/usergrid/security/providers/PingIdentityProvider.java
index 5930c28..a6de36c 100644
--- a/stack/services/src/main/java/org/usergrid/security/providers/PingIdentityProvider.java
+++ b/stack/services/src/main/java/org/usergrid/security/providers/PingIdentityProvider.java
@@ -136,8 +136,8 @@ public class PingIdentityProvider extends AbstractProvider {
     public static long extractExpiration( User user ) {
         Long expiration = ( Long ) user.getProperty( "expiration" );
         if ( expiration == null ) {
-            expiration = new Long( 7200 );
+            expiration = (long) 7200;
         }
-        return expiration.longValue() * 1000;
+        return expiration * 1000;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/security/shiro/CustomPermission.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/security/shiro/CustomPermission.java
b/stack/services/src/main/java/org/usergrid/security/shiro/CustomPermission.java
index 7d510ae..7a6375e 100644
--- a/stack/services/src/main/java/org/usergrid/security/shiro/CustomPermission.java
+++ b/stack/services/src/main/java/org/usergrid/security/shiro/CustomPermission.java
@@ -185,10 +185,7 @@ public class CustomPermission extends WildcardPermission {
             if ( matcher.match( p1, p2 ) ) {
                 return true;
             }
-            if ( matcher.match( normalizeIfPath( p1 ), normalizeIfPath( p2 ) ) ) {
-                return true;
-            }
-            return false;
+            return matcher.match(normalizeIfPath(p1), normalizeIfPath(p2));
         }
         return p1.equalsIgnoreCase( p2 );
     }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/security/shiro/PrincipalCredentialsToken.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/security/shiro/PrincipalCredentialsToken.java
b/stack/services/src/main/java/org/usergrid/security/shiro/PrincipalCredentialsToken.java
index 6b69878..ec44c7c 100644
--- a/stack/services/src/main/java/org/usergrid/security/shiro/PrincipalCredentialsToken.java
+++ b/stack/services/src/main/java/org/usergrid/security/shiro/PrincipalCredentialsToken.java
@@ -129,11 +129,11 @@ public class PrincipalCredentialsToken implements org.apache.shiro.authc.Authent
 
 
     public boolean isDisabled() {
-        return ( principal != null ) ? principal.isDisabled() : false;
+        return (principal != null) && principal.isDisabled();
     }
 
 
     public boolean isActivated() {
-        return ( principal != null ) ? principal.isActivated() : true;
+        return (principal == null) || principal.isActivated();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/security/shiro/Realm.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/security/shiro/Realm.java b/stack/services/src/main/java/org/usergrid/security/shiro/Realm.java
index 1b6e612..03f9a5a 100644
--- a/stack/services/src/main/java/org/usergrid/security/shiro/Realm.java
+++ b/stack/services/src/main/java/org/usergrid/security/shiro/Realm.java
@@ -276,7 +276,7 @@ public class Realm extends AuthorizingRealm {
                 // They have access to organizations and organization
                 // applications
 
-                UserInfo user = ( ( AdminUserPrincipal ) principal ).getUser();
+                UserInfo user = principal.getUser();
 
                 if ( superUserEnabled && ( superUser != null ) && superUser.equals(
user.getUsername() ) ) {
                     // The system user has access to everything
@@ -349,7 +349,7 @@ public class Realm extends AuthorizingRealm {
                 UUID applicationId = ( ( ApplicationUserPrincipal ) principal ).getApplicationId();
 
                 AccessTokenCredentials tokenCredentials =
-                        ( ( ApplicationUserPrincipal ) principal ).getAccessTokenCredentials();
+                        principal.getAccessTokenCredentials();
                 TokenInfo token = null;
                 if ( tokenCredentials != null ) {
                     try {
@@ -388,7 +388,7 @@ public class Realm extends AuthorizingRealm {
                     logger.error( "Unable to get user default role permissions", e );
                 }
 
-                UserInfo user = ( ( ApplicationUserPrincipal ) principal ).getUser();
+                UserInfo user = principal.getUser();
                 try {
                     Set<String> permissions = em.getUserPermissions( user.getUuid()
);
                     grant( info, principal, applicationId, permissions );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/security/shiro/utils/SubjectUtils.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/security/shiro/utils/SubjectUtils.java
b/stack/services/src/main/java/org/usergrid/security/shiro/utils/SubjectUtils.java
index 204cd13..de66a05 100644
--- a/stack/services/src/main/java/org/usergrid/security/shiro/utils/SubjectUtils.java
+++ b/stack/services/src/main/java/org/usergrid/security/shiro/utils/SubjectUtils.java
@@ -54,10 +54,7 @@ public class SubjectUtils {
         if ( currentUser == null ) {
             return true;
         }
-        if ( !currentUser.isAuthenticated() && !currentUser.isRemembered() ) {
-            return true;
-        }
-        return false;
+        return !currentUser.isAuthenticated() && !currentUser.isRemembered();
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/security/tokens/cassandra/TokenServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/security/tokens/cassandra/TokenServiceImpl.java
b/stack/services/src/main/java/org/usergrid/security/tokens/cassandra/TokenServiceImpl.java
index 481c308..7d8fe72 100644
--- a/stack/services/src/main/java/org/usergrid/security/tokens/cassandra/TokenServiceImpl.java
+++ b/stack/services/src/main/java/org/usergrid/security/tokens/cassandra/TokenServiceImpl.java
@@ -2,12 +2,7 @@ package org.usergrid.security.tokens.cassandra;
 
 
 import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.UUID;
+import java.util.*;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -86,20 +81,22 @@ public class TokenServiceImpl implements TokenService {
     private static final ByteBufferSerializer BUFF_SER = ByteBufferSerializer.get();
     private static final StringSerializer STR_SER = StringSerializer.get();
 
-    private static final HashSet<String> TOKEN_PROPERTIES = new HashSet<String>();
+    private static final Set<String> TOKEN_PROPERTIES ;
 
 
     static {
-        TOKEN_PROPERTIES.add( TOKEN_UUID );
-        TOKEN_PROPERTIES.add( TOKEN_TYPE );
-        TOKEN_PROPERTIES.add( TOKEN_CREATED );
-        TOKEN_PROPERTIES.add( TOKEN_ACCESSED );
-        TOKEN_PROPERTIES.add( TOKEN_INACTIVE );
-        TOKEN_PROPERTIES.add( TOKEN_PRINCIPAL_TYPE );
-        TOKEN_PROPERTIES.add( TOKEN_ENTITY );
-        TOKEN_PROPERTIES.add( TOKEN_APPLICATION );
-        TOKEN_PROPERTIES.add( TOKEN_STATE );
-        TOKEN_PROPERTIES.add( TOKEN_DURATION );
+        HashSet<String> set = new HashSet<String>();
+        set.add( TOKEN_UUID );
+        set.add( TOKEN_TYPE );
+        set.add( TOKEN_CREATED );
+        set.add( TOKEN_ACCESSED );
+        set.add( TOKEN_INACTIVE );
+        set.add( TOKEN_PRINCIPAL_TYPE );
+        set.add( TOKEN_ENTITY );
+        set.add( TOKEN_APPLICATION );
+        set.add( TOKEN_STATE );
+        set.add( TOKEN_DURATION );
+        TOKEN_PROPERTIES = Collections.unmodifiableSet(set);
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/services/ServiceAction.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/services/ServiceAction.java b/stack/services/src/main/java/org/usergrid/services/ServiceAction.java
index 7fdef55..83f1945 100644
--- a/stack/services/src/main/java/org/usergrid/services/ServiceAction.java
+++ b/stack/services/src/main/java/org/usergrid/services/ServiceAction.java
@@ -17,5 +17,5 @@ package org.usergrid.services;
 
 
 public enum ServiceAction {
-    POST, GET, PUT, DELETE, HEAD, OPTIONS;
+    POST, GET, PUT, DELETE, HEAD, OPTIONS
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/services/ServiceInfo.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/services/ServiceInfo.java b/stack/services/src/main/java/org/usergrid/services/ServiceInfo.java
index f1bb7d1..2765253 100644
--- a/stack/services/src/main/java/org/usergrid/services/ServiceInfo.java
+++ b/stack/services/src/main/java/org/usergrid/services/ServiceInfo.java
@@ -184,7 +184,7 @@ public class ServiceInfo {
         }
 
         String eType = determineType( collections, first, last - 1 );
-        if ( eType != "entity" ) {
+        if (!eType.equals("entity")) {
             return "/entities:" + eType + "/*/" + collections[last];
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/services/ServiceManager.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/services/ServiceManager.java b/stack/services/src/main/java/org/usergrid/services/ServiceManager.java
index 672c50f..a4778e5 100644
--- a/stack/services/src/main/java/org/usergrid/services/ServiceManager.java
+++ b/stack/services/src/main/java/org/usergrid/services/ServiceManager.java
@@ -17,10 +17,7 @@ package org.usergrid.services;
 
 
 import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.UUID;
+import java.util.*;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 
@@ -125,9 +122,7 @@ public class ServiceManager {
 
     private void setServicePackagePrefixes( String packages ) {
         List<String> packagePrefixes = new ArrayList<String>();
-        for ( String prefix : package_prefixes ) {
-            packagePrefixes.add( prefix );
-        }
+        Collections.addAll(packagePrefixes, package_prefixes);
 
         String[] prefixes = packages.split( ";" );
         for ( String prefix : prefixes ) {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/services/ServiceRequest.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/services/ServiceRequest.java b/stack/services/src/main/java/org/usergrid/services/ServiceRequest.java
index 70b9bdc..083ae22 100644
--- a/stack/services/src/main/java/org/usergrid/services/ServiceRequest.java
+++ b/stack/services/src/main/java/org/usergrid/services/ServiceRequest.java
@@ -324,7 +324,7 @@ public class ServiceRequest {
                 String q = p.toString();
                 if ( isNotBlank( q ) ) {
                     try {
-                        sb.append( "ql=" + URLEncoder.encode( q, "UTF-8" ) );
+                        sb.append("ql=").append(URLEncoder.encode(q, "UTF-8"));
                     }
                     catch ( UnsupportedEncodingException e ) {
                         logger.error( "Unable to encode url", e );
@@ -336,14 +336,14 @@ public class ServiceRequest {
                     if ( has_prev_param ) {
                         sb.append( '&' );
                     }
-                    sb.append( "limit=" + limit );
+                    sb.append("limit=").append(limit);
                     has_prev_param = true;
                 }
                 if ( p.getQuery().getStartResult() != null ) {
                     if ( has_prev_param ) {
                         sb.append( '&' );
                     }
-                    sb.append( "start=" + p.getQuery().getStartResult() );
+                    sb.append("start=").append(p.getQuery().getStartResult());
                     has_prev_param = true;
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/services/src/main/java/org/usergrid/services/applications/ApplicationsService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/usergrid/services/applications/ApplicationsService.java
b/stack/services/src/main/java/org/usergrid/services/applications/ApplicationsService.java
index ace9962..0f1b433 100644
--- a/stack/services/src/main/java/org/usergrid/services/applications/ApplicationsService.java
+++ b/stack/services/src/main/java/org/usergrid/services/applications/ApplicationsService.java
@@ -102,7 +102,7 @@ public class ApplicationsService extends AbstractService {
             }
             else if ( context.parameterCount() > 0 ) {
                 if ( context.getParameters().get( 0 ) instanceof QueryParameter ) {
-                    return getApplicationCounters( ( ( QueryParameter ) context.getParameters().get(
0 ) ).getQuery() );
+                    return getApplicationCounters( context.getParameters().get( 0 ).getQuery()
);
                 }
             }
         }
@@ -165,12 +165,9 @@ public class ApplicationsService extends AbstractService {
 
 
     private boolean isReservedCollection( String collection ) {
-        if ( StringUtils.equalsIgnoreCase( "applications", collection ) || StringUtils
-                .equalsIgnoreCase( "application", collection ) ) {
-            return true;
-        }
+        return StringUtils.equalsIgnoreCase("applications", collection) || StringUtils
+                .equalsIgnoreCase("application", collection);
 
-        return false;
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/test-utils/src/main/java/org/usergrid/NoExitSecurityManager.java
----------------------------------------------------------------------
diff --git a/stack/test-utils/src/main/java/org/usergrid/NoExitSecurityManager.java b/stack/test-utils/src/main/java/org/usergrid/NoExitSecurityManager.java
index ff3da16..1730bd6 100644
--- a/stack/test-utils/src/main/java/org/usergrid/NoExitSecurityManager.java
+++ b/stack/test-utils/src/main/java/org/usergrid/NoExitSecurityManager.java
@@ -31,7 +31,7 @@ public class NoExitSecurityManager extends java.rmi.RMISecurityManager {
         Thread thread = Thread.currentThread();
 
         try {
-            thread.sleep( 100L );
+            Thread.sleep(100L);
         }
         catch ( InterruptedException e ) {
             LOG.error( "failed to sleep", e );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/test-utils/src/main/java/org/usergrid/cassandra/AvailablePortFinder.java
----------------------------------------------------------------------
diff --git a/stack/test-utils/src/main/java/org/usergrid/cassandra/AvailablePortFinder.java
b/stack/test-utils/src/main/java/org/usergrid/cassandra/AvailablePortFinder.java
index 1029e29..54c35a5 100644
--- a/stack/test-utils/src/main/java/org/usergrid/cassandra/AvailablePortFinder.java
+++ b/stack/test-utils/src/main/java/org/usergrid/cassandra/AvailablePortFinder.java
@@ -189,7 +189,7 @@ public class AvailablePortFinder {
 
             try {
                 s = new ServerSocket( i );
-                result.add( new Integer( i ) );
+                result.add(i);
             }
             catch ( IOException e ) {
                 // Do nothing

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d2f3a156/stack/test-utils/src/main/java/org/usergrid/cassandra/CassandraResource.java
----------------------------------------------------------------------
diff --git a/stack/test-utils/src/main/java/org/usergrid/cassandra/CassandraResource.java
b/stack/test-utils/src/main/java/org/usergrid/cassandra/CassandraResource.java
index 63f0c75..ec31d90 100644
--- a/stack/test-utils/src/main/java/org/usergrid/cassandra/CassandraResource.java
+++ b/stack/test-utils/src/main/java/org/usergrid/cassandra/CassandraResource.java
@@ -205,26 +205,8 @@ public class CassandraResource extends ExternalResource {
 
     @Override
     public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append( "\n" );
-        sb.append( "cassandra.yaml = " ).append( new File( tempDir, "cassandra.yaml" ) );
-        sb.append( "\n" );
-        sb.append( RPC_PORT_KEY ).append( " = " ).append( rpcPort );
-        sb.append( "\n" );
-        sb.append( STORAGE_PORT_KEY ).append( " = " ).append( storagePort );
-        sb.append( "\n" );
-        sb.append( SSL_STORAGE_PORT_KEY ).append( " = " ).append( sslStoragePort );
-        sb.append( "\n" );
-        sb.append( NATIVE_TRANSPORT_PORT_KEY ).append( " = " ).append( nativeTransportPort
);
-        sb.append( "\n" );
-        sb.append( DATA_FILE_DIR_KEY ).append( " = " ).append( new File( tempDir, "data"
).toString() );
-        sb.append( "\n" );
-        sb.append( COMMIT_FILE_DIR_KEY ).append( " = " ).append( new File( tempDir, "commitlog"
).toString() );
-        sb.append( "\n" );
-        sb.append( SAVED_CACHES_DIR_KEY ).append( " = " ).append( new File( tempDir, "saved_caches"
).toString() );
-        sb.append( "\n" );
-
-        return sb.toString();
+
+        return "\n" + "cassandra.yaml = " + new File(tempDir, "cassandra.yaml") + "\n" +
RPC_PORT_KEY + " = " + rpcPort + "\n" + STORAGE_PORT_KEY + " = " + storagePort + "\n" + SSL_STORAGE_PORT_KEY
+ " = " + sslStoragePort + "\n" + NATIVE_TRANSPORT_PORT_KEY + " = " + nativeTransportPort
+ "\n" + DATA_FILE_DIR_KEY + " = " + new File(tempDir, "data").toString() + "\n" + COMMIT_FILE_DIR_KEY
+ " = " + new File(tempDir, "commitlog").toString() + "\n" + SAVED_CACHES_DIR_KEY + " = "
+ new File(tempDir, "saved_caches").toString() + "\n";
     }
 
 


Mime
View raw message