Project

General

Profile

« Previous | Next » 

Revision 61175

[Users | Trunk]: Get couId optimized

View differences:

modules/dnet-openaire-users/trunk/src/main/java/eu/dnetlib/openaire/usermanagement/utils/RegistryCalls.java
142 142
     */
143 143
    public Integer getCouId(String name) {
144 144
        JsonArray cous = getCous(name);
145
        Integer couId = null;
146 145
        for (JsonElement cou : cous) {
147 146
            if (cou.getAsJsonObject().get("Name").getAsString().toLowerCase().equals(name.toLowerCase())) {
148
                couId = cou.getAsJsonObject().get("Id").getAsInt();
147
                return cou.getAsJsonObject().get("Id").getAsInt();
149 148
            }
150 149
        }
151
        return couId;
150
        return null;
152 151
    }
153 152

  
154 153
    /**

Also available in: Unified diff