Code inspection bug in Intellij X?

If I have code like this:
setExpiry(new Long(timestamp).longValue() * 1000);

Intellij suggests in the code inspection tool that it can be changed to do use the parse method instead. However when applying that fix through the inspect code window, the code results in something like:
setExpiry(Long * 1000);

I had to manually go to the class and revert the change and then using the bulb suggestion icon perform the change which I want to be like this:
setExpiry(Long.parseLong(timestamp) * 1000);

Have other people experienced this issue as well?

Cheers
Surya

0

Hello Surya,

This does look like a bug. Please file an issue at http://youtrack.jetbrains.net/

If I have code like this:
setExpiry(new Long(timestamp).longValue() * 1000);
Intellij suggests in the code inspection tool that it can be changed
to do use the parse method instead. However when applying that fix
through the inspect code window, the code results in something like:

setExpiry(Long * 1000);

I had to manually go to the class and revert the change and then using
the bulb suggestion icon perform the change which I want to be like
this:

setExpiry(Long.parseLong(timestamp) * 1000);

Have other people experienced this issue as well?

Cheers
Surya
---
Original message URL:
http://devnet.jetbrains.net/message/5281068#5281068


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

请先登录再写评论。