← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6454: Minor fix

 

------------------------------------------------------------
revno: 6454
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-03-30 14:49:52 +0200
message:
  Minor fix
modified:
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.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-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java	2012-02-27 14:53:31 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/AboutAction.java	2012-03-30 12:49:52 +0000
@@ -48,10 +48,7 @@
 import com.opensymphony.xwork2.Action;
 
 /**
- * @author Hans S. Toemmerholt
- * @version $Id: AboutAction.java 3255 2007-04-23 09:58:06Z andegje $
- * @modifier Dang Duy Hieu
- * @since 2010-05-04
+ * @author Dang Duy Hieu
  */
 public class AboutAction
     implements Action
@@ -196,25 +193,23 @@
 
         InputStream in = classLoader.getResourceAsStream( "build.properties" );
 
-        if ( in == null )
+        if ( in != null )
         {
-            throw new IllegalStateException( "build.properties not found" );
+            Properties properties = new Properties();
+    
+            properties.load( in );
+    
+            version = properties.getProperty( "build.version" );
+    
+            revision = properties.getProperty( "build.revision" );
+    
+            String buildTime = properties.getProperty( "build.time" );
+
+            DateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" );
+
+            this.buildTime = dateFormat.parse( buildTime );
         }
-
-        Properties properties = new Properties();
-
-        properties.load( in );
-
-        version = properties.getProperty( "build.version" );
-
-        revision = properties.getProperty( "build.revision" );
-
-        String buildTime = properties.getProperty( "build.time" );
-
-        DateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" );
-
-        this.buildTime = dateFormat.parse( buildTime );
-
+        
         HttpServletRequest request = ServletActionContext.getRequest();
 
         // ---------------------------------------------------------------------