#1449 [java] AvoidUsingShortType: false positive when casting a variable to short

PMD-5.3.7
closed
java (55)
PMD
3-Major
Bug
5.3.5
AvoidUsingShortType
2016-06-25
2015-12-16
No

Casting a variable to short triggers a AvoidUsingShortType.

ByteBuffer buffer = ByteBuffer.allocate(2);
buffer.putShort((short) "1111".getBytes().length);

Discussion

  • Andreas Dangel

    Andreas Dangel - 2016-01-24
    • status: open --> closed
    • assigned_to: Andreas Dangel
    • Milestone: PMD-Backlog --> PMD-5.3.7
     
  • Andreas Dangel

    Andreas Dangel - 2016-06-25
    • labels: --> java
    • summary: false positive when casting a variable to short --> [java] AvoidUsingShortType: false positive when casting a variable to short
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks