java - Why "Numeric overflow in expression" warning occurs -


using intellij 15.0.3 + java 8u65...

lower = system.currenttimemillis(); long upper = lower + 31536000000l; //add year-ish 

works fine. if do:

lower = system.currenttimemillis(); long upper = lower + (1000l*60*60*24*365);  

intellij gives warning "numeric overflow in expression". i'd understand if in fact true, , consistently warning on both expressions, it's not.

anyone know why 2nd expression generates warning? i'd rather have breakdown way number because it's easier other devs on project understand it's doing (though suppose comment). code still compiles find warnings in builds itch can't scratch.

edit responses... think caching issue in intellij... if know copy/paste above don't warning. if try edit after paste 1 or 2 times out of 10 warning popping in.

i have tried on machine. same version of intellij, newer java 1.8.0_66. if copy paste code , assume lower long, don't warning. if remove "l" warning (obviously). if put "l" warning doesn't go away. if close , reopen intellij warning goes away.

added issue tracker: idea-151378


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -