Fixing the sort issue

revert-70aa11f8
geethkokila 10 years ago
parent 48a2062f64
commit 30b01fc3bc

@ -33,6 +33,7 @@ import org.wso2.carbon.policy.mgt.core.mgt.ProfileManager;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.List;
public class PolicyManagerImpl implements PolicyManager {
@ -494,6 +495,7 @@ public class PolicyManagerImpl implements PolicyManager {
// policyDAO.getTimesOfPolicy(policy);
// policyDAO.getLocationsOfPolicy(policy);
}
Collections.sort(policyList);
} catch (PolicyManagerDAOException e) {
String msg = "Error occurred while getting all the policies.";
@ -525,6 +527,7 @@ public class PolicyManagerImpl implements PolicyManager {
}
}
Collections.sort(policies);
} catch (PolicyManagerDAOException e) {
String msg = "Error occurred while getting the policies for device identifier (" +
deviceIdentifier.getId() + " - " + deviceIdentifier.getType() + ")";
@ -560,6 +563,7 @@ public class PolicyManagerImpl implements PolicyManager {
}
}
Collections.sort(policies);
// } catch (PolicyManagerDAOException e) {
// String msg = "Error occurred while getting all the policies.";
// log.error(msg, e);
@ -603,6 +607,7 @@ public class PolicyManagerImpl implements PolicyManager {
log.error(msg, e);
throw new PolicyManagementException(msg, e);
}
Collections.sort(policies);
return policies;
}
@ -629,6 +634,7 @@ public class PolicyManagerImpl implements PolicyManager {
log.error(msg, e);
throw new PolicyManagementException(msg, e);
}
Collections.sort(policies);
return policies;
}

Loading…
Cancel
Save