← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9273: Codestyle

 

------------------------------------------------------------
revno: 9273
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-12-11 22:20:25 +0100
message:
  Codestyle
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java	2012-12-07 14:32:11 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/EmailMessageSender.java	2012-12-11 21:20:25 +0000
@@ -60,6 +60,7 @@
     private static final String FROM_ADDRESS = "noreply@xxxxxxxxx";
     private static final String FROM_NAME = "DHIS2 Message [No reply]";
     private static final String SUBJECT_PREFIX = "[DHIS2] ";
+    private static final String LOCALHOST = "localhost";
     private static final String LB = System.getProperty( "line.separator" );
 
     // -------------------------------------------------------------------------
@@ -152,7 +153,7 @@
         email.setHostName( hostName );
         email.setFrom( FROM_ADDRESS, FROM_NAME );
 
-        if (hostName.equals( "localhost"))
+        if ( hostName.equals( LOCALHOST ) )
         {
             email.setSmtpPort( LOCAL_SMTP_PORT );
         }
@@ -162,7 +163,7 @@
             email.setAuthenticator( new DefaultAuthenticator( username, password ) );
             email.setTLS( true );
         }
-        
+
         return email;
     }
 }