← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 977: Reduced code more clearly

 

------------------------------------------------------------
revno: 977
committer: hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2009-11-04 16:15:04 +0700
message:
  Reduced code more clearly
  
  //        String pathToClassName = object.getClass().getName();
  //
  //        int start = pathToClassName.lastIndexOf( "." );
  //
  //        String objectClassName = pathToClassName.substring( start + 1, pathToClassName.length() );
modified:
  dhis-2/dhis-i18n/dhis-i18n-db/src/main/java/org/hisp/dhis/i18n/I18nObject.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-i18n/dhis-i18n-db/src/main/java/org/hisp/dhis/i18n/I18nObject.java'
--- dhis-2/dhis-i18n/dhis-i18n-db/src/main/java/org/hisp/dhis/i18n/I18nObject.java	2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-i18n/dhis-i18n-db/src/main/java/org/hisp/dhis/i18n/I18nObject.java	2009-11-04 09:15:04 +0000
@@ -66,12 +66,6 @@
             return false;
         }
 
-        String pathToClassName = object.getClass().getName();
-
-        int start = pathToClassName.lastIndexOf( "." );
-
-        String objectClassName = pathToClassName.substring( start + 1, pathToClassName.length() );
-
-        return className.equalsIgnoreCase( objectClassName );
+        return className.equalsIgnoreCase( object.getClass().getSimpleName() );
     }
 }