[BUG?] Repeated conditional tests, LazyBSONObject.java

67 views
Skip to first unread message

Eun-Jeong Shin

unread,
May 20, 2015, 9:12:30 PM5/20/15
to mongod...@googlegroups.com
Hi, all.

While I was testing project via "FindBugs", I got this error message as below. 
Could you take a look?

File name : LazyBSONObject.java
Line # : 173
Source : below line is repetitive.

binaryType == BsonBinarySubType.BINARY.getValue()

Message : 
***driver/src/main/org/bson/LazyBSONObject.java:173 Repeated conditional test in org.bson.LazyBSONObject.readValue(BsonBinaryReader) [Scary(8), Normal confidence]


Screen Shot 2015-05-20 at 6.11.11 PM.png

Ross Lawley

unread,
May 22, 2015, 6:13:28 AM5/22/15
to mongod...@googlegroups.com
Hi,

Thanks again! I'm fixing as part of the wider findbugs review (https://jira.mongodb.org/browse/JAVA-1823). Findbugs 3.0.0 missed this but upgrading to 3.0.1 triggers it so upgrading as part of our test suite.

Seems the cause was automated refactoring during the code base changes from 2.x series to 3.x

Ross

Eun-Jeong Shin

unread,
May 22, 2015, 2:19:36 PM5/22/15
to mongod...@googlegroups.com
Thank you! Glad that this suggestion is accepted! 
Reply all
Reply to author
Forward
0 new messages