Fix lgtm.com alert: cast int to long before multiplication

The integer multiplication has the potential to overflow before the
result is being cast to the 'long' result.

Details:
https://lgtm.com/projects/g/keycloak/keycloak/snapshot/dist-7900299-1490802114895/files/saml-core/src/main/java/org/keycloak/saml/processing/core/saml/v2/util/XMLTimeUtil.java#V133
This commit is contained in:
Bas van Schaik 2017-04-28 14:54:47 +01:00
parent 2df1175315
commit ff6dbd6bde

View file

@ -130,7 +130,7 @@ public class XMLTimeUtil {
* @return
*/
public static long inMilis(int valueInMins) {
return valueInMins * 60 * 1000;
return (long) valueInMins * 60 * 1000;
}
/**