Package | Total Files | Files with Violations | Priority 1 | Priority 2 | Priority 3 |
---|---|---|---|---|---|
All Packages | 42 | 42 | - | - | 684 |
org/bson | 14 | 14 | - | - | 220 |
org/bson/codecs | 16 | 16 | - | - | 153 |
org/bson/codecs/configuration | 3 | 3 | - | - | 48 |
org/bson/io | 2 | 2 | - | - | 129 |
org/bson/json | 5 | 5 | - | - | 95 |
org/bson/types | 2 | 2 | - | - | 39 |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 24 | [SRC]def 'should be array type'() { [MSG]Method "should be array type" has a dynamic return type |
MethodReturnTypeRequired | 3 | 29 | [SRC]def 'should construct empty array'() { [MSG]Method "should construct empty array" has a dynamic return type |
VariableTypeRequired | 3 | 31 | [SRC]def array = new BsonArray() [MSG]The type is not specified for variable "array" |
MethodReturnTypeRequired | 3 | 39 | [SRC]def 'should construct from a list'() { [MSG]Method "should construct from a list" has a dynamic return type |
VariableTypeRequired | 3 | 41 | [SRC]def list = [BsonBoolean.TRUE, BsonBoolean.FALSE] [MSG]The type is not specified for variable "list" |
VariableTypeRequired | 3 | 44 | [SRC]def array = new BsonArray(list) [MSG]The type is not specified for variable "array" |
MethodReturnTypeRequired | 3 | 52 | [SRC]def 'should parse json'() { [MSG]Method "should parse json" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 30 | [SRC]def 'should skip value #value'() { [MSG]Method "should skip value #value" has a dynamic return type |
VariableTypeRequired | 3 | 32 | [SRC]def document = new BsonDocument('name', value) [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 33 | [SRC]def reader = new BsonBinaryReader(toBson(document)) [MSG]The type is not specified for variable "reader" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 24 | [SRC]def 'should be uuid only for legacy and uuid types'() { [MSG]Method "should be uuid only for legacy and uuid types" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 30 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
MethodReturnTypeRequired | 3 | 37 | [SRC]def 'should read all types'() { [MSG]Method "should read all types" has a dynamic return type |
VariableTypeRequired | 3 | 39 | [SRC]def doc = new BsonDocument( [MSG]The type is not specified for variable "doc" |
VariableTypeRequired | 3 | 67 | [SRC]def decodedDoc = new BsonDocumentCodec().decode(new Bson..r().build()) [MSG]The type is not specified for variable "decodedDoc" |
MethodReturnTypeRequired | 3 | 73 | [SRC]def 'should fail, ReadBSONType can only be called when S..t VALUE'() { [MSG]Method "should fail, ReadBSONType can only be called when State is TYPE, not VALUE" has a dynamic return type |
VariableTypeRequired | 3 | 75 | [SRC]def reader = new BsonDocumentReader(nullDoc) [MSG]The type is not specified for variable "reader" |
MethodReturnTypeRequired | 3 | 87 | [SRC]def 'should fail, ReadBSONType can only be called when S..ot NAME'() { [MSG]Method "should fail, ReadBSONType can only be called when State is TYPE, not NAME" has a dynamic return type |
VariableTypeRequired | 3 | 89 | [SRC]def reader = new BsonDocumentReader(nullDoc) [MSG]The type is not specified for variable "reader" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 29 | [SRC]def 'conversion methods should behave correctly for the ..py path'() { [MSG]Method "conversion methods should behave correctly for the happy path" has a dynamic return type |
VariableTypeRequired | 3 | 32 | [SRC]def bsonNull = new BsonNull() [MSG]The type is not specified for variable "bsonNull" |
VariableTypeRequired | 3 | 33 | [SRC]def bsonInt32 = new BsonInt32(42) [MSG]The type is not specified for variable "bsonInt32" |
VariableTypeRequired | 3 | 34 | [SRC]def bsonInt64 = new BsonInt64(52L) [MSG]The type is not specified for variable "bsonInt64" |
VariableTypeRequired | 3 | 35 | [SRC]def bsonDecimal128 = new BsonDecimal128(Decimal128.parse('1.0')) [MSG]The type is not specified for variable "bsonDecimal128" |
VariableTypeRequired | 3 | 36 | [SRC]def bsonBoolean = new BsonBoolean(true) [MSG]The type is not specified for variable "bsonBoolean" |
VariableTypeRequired | 3 | 37 | [SRC]def bsonDateTime = new BsonDateTime(new Date().getTime()) [MSG]The type is not specified for variable "bsonDateTime" |
VariableTypeRequired | 3 | 38 | [SRC]def bsonDouble = new BsonDouble(62.0) [MSG]The type is not specified for variable "bsonDouble" |
VariableTypeRequired | 3 | 39 | [SRC]def bsonString = new BsonString('the fox ...') [MSG]The type is not specified for variable "bsonString" |
VariableTypeRequired | 3 | 40 | [SRC]def minKey = new BsonMinKey() [MSG]The type is not specified for variable "minKey" |
VariableTypeRequired | 3 | 41 | [SRC]def maxKey = new BsonMaxKey() [MSG]The type is not specified for variable "maxKey" |
VariableTypeRequired | 3 | 42 | [SRC]def javaScript = new BsonJavaScript('int i = 0;') [MSG]The type is not specified for variable "javaScript" |
VariableTypeRequired | 3 | 43 | [SRC]def objectId = new BsonObjectId(new ObjectId()) [MSG]The type is not specified for variable "objectId" |
VariableTypeRequired | 3 | 44 | [SRC]def scope = new BsonJavaScriptWithScope('int x = y', new..onInt32(1))) [MSG]The type is not specified for variable "scope" |
VariableTypeRequired | 3 | 45 | [SRC]def regularExpression = new BsonRegularExpression('^test..*xyz$', 'i') [MSG]The type is not specified for variable "regularExpression" |
VariableTypeRequired | 3 | 46 | [SRC]def symbol = new BsonSymbol('ruby stuff') [MSG]The type is not specified for variable "symbol" |
VariableTypeRequired | 3 | 47 | [SRC]def timestamp = new BsonTimestamp(0x12345678, 5) [MSG]The type is not specified for variable "timestamp" |
VariableTypeRequired | 3 | 48 | [SRC]def undefined = new BsonUndefined() [MSG]The type is not specified for variable "undefined" |
VariableTypeRequired | 3 | 49 | [SRC]def binary = new BsonBinary((byte) 80, [5, 4, 3, 2, 1] as byte[]) [MSG]The type is not specified for variable "binary" |
VariableTypeRequired | 3 | 50 | [SRC]def bsonArray = new BsonArray([new BsonInt32(1), new Bso..olean(true), [MSG]The type is not specified for variable "bsonArray" |
VariableTypeRequired | 3 | 53 | [SRC]def bsonDocument = new BsonDocument('a', new BsonInt32(1)) [MSG]The type is not specified for variable "bsonDocument" |
VariableTypeRequired | 3 | 55 | [SRC]def root = new BsonDocument( [MSG]The type is not specified for variable "root" |
MethodReturnTypeRequired | 3 | 145 | [SRC]def 'is<type> methods should return false for missing keys'() { [MSG]Method "is<type> methods should return false for missing keys" has a dynamic return type |
VariableTypeRequired | 3 | 147 | [SRC]def root = new BsonDocument() [MSG]The type is not specified for variable "root" |
Indentation | 3 | 150 | [SRC]!root.isNull('null') [MSG]The statement on line 150 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 151 | [SRC]!root.isNumber('number') [MSG]The statement on line 151 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 152 | [SRC]!root.isInt32('int32') [MSG]The statement on line 152 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 153 | [SRC]!root.isInt64('int64') [MSG]The statement on line 153 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 154 | [SRC]!root.isDecimal128('decimal128') [MSG]The statement on line 154 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 155 | [SRC]!root.isBoolean('boolean') [MSG]The statement on line 155 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 156 | [SRC]!root.isDateTime('date') [MSG]The statement on line 156 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 157 | [SRC]!root.isDouble('double') [MSG]The statement on line 157 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 158 | [SRC]!root.isString('string') [MSG]The statement on line 158 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 159 | [SRC]!root.isObjectId('objectId') [MSG]The statement on line 159 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 160 | [SRC]!root.isTimestamp('timestamp') [MSG]The statement on line 160 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 161 | [SRC]!root.isBinary('binary') [MSG]The statement on line 161 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 162 | [SRC]!root.isArray('array') [MSG]The statement on line 162 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
Indentation | 3 | 163 | [SRC]!root.isDocument('document') [MSG]The statement on line 163 in class org.bson.BsonDocumentSpecification is at the incorrect indent level: Expected column 9 but was 13 |
MethodReturnTypeRequired | 3 | 166 | [SRC]def 'get methods should return default values for missing keys'() { [MSG]Method "get methods should return default values for missing keys" has a dynamic return type |
VariableTypeRequired | 3 | 168 | [SRC]def bsonNull = new BsonNull() [MSG]The type is not specified for variable "bsonNull" |
VariableTypeRequired | 3 | 169 | [SRC]def bsonInt32 = new BsonInt32(42) [MSG]The type is not specified for variable "bsonInt32" |
VariableTypeRequired | 3 | 170 | [SRC]def bsonInt64 = new BsonInt64(52L) [MSG]The type is not specified for variable "bsonInt64" |
VariableTypeRequired | 3 | 171 | [SRC]def bsonDecimal128 = new BsonDecimal128(Decimal128.parse('1.0')) [MSG]The type is not specified for variable "bsonDecimal128" |
VariableTypeRequired | 3 | 172 | [SRC]def bsonBoolean = new BsonBoolean(true) [MSG]The type is not specified for variable "bsonBoolean" |
VariableTypeRequired | 3 | 173 | [SRC]def bsonDateTime = new BsonDateTime(new Date().getTime()) [MSG]The type is not specified for variable "bsonDateTime" |
VariableTypeRequired | 3 | 174 | [SRC]def bsonDouble = new BsonDouble(62.0) [MSG]The type is not specified for variable "bsonDouble" |
VariableTypeRequired | 3 | 175 | [SRC]def bsonString = new BsonString('the fox ...') [MSG]The type is not specified for variable "bsonString" |
VariableTypeRequired | 3 | 176 | [SRC]def objectId = new BsonObjectId(new ObjectId()) [MSG]The type is not specified for variable "objectId" |
VariableTypeRequired | 3 | 177 | [SRC]def regularExpression = new BsonRegularExpression('^test..*xyz$', 'i') [MSG]The type is not specified for variable "regularExpression" |
VariableTypeRequired | 3 | 178 | [SRC]def timestamp = new BsonTimestamp(0x12345678, 5) [MSG]The type is not specified for variable "timestamp" |
VariableTypeRequired | 3 | 179 | [SRC]def binary = new BsonBinary((byte) 80, [5, 4, 3, 2, 1] as byte[]) [MSG]The type is not specified for variable "binary" |
VariableTypeRequired | 3 | 180 | [SRC]def bsonArray = new BsonArray([new BsonInt32(1), new Bso..olean(true), [MSG]The type is not specified for variable "bsonArray" |
VariableTypeRequired | 3 | 184 | [SRC]def bsonDocument = new BsonDocument('a', new BsonInt32(1)) [MSG]The type is not specified for variable "bsonDocument" |
VariableTypeRequired | 3 | 185 | [SRC]def root = new BsonDocument() [MSG]The type is not specified for variable "root" |
MethodReturnTypeRequired | 3 | 206 | [SRC]def 'clone should make a deep copy of all mutable BsonValue types'() { [MSG]Method "clone should make a deep copy of all mutable BsonValue types" has a dynamic return type |
VariableTypeRequired | 3 | 208 | [SRC]def document = new BsonDocument('d', new BsonDocument()...onInt32(1))) [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 219 | [SRC]def clone = document.clone() [MSG]The type is not specified for variable "clone" |
MethodReturnTypeRequired | 3 | 242 | [SRC]def 'get methods should throw if key is absent'() { [MSG]Method "get methods should throw if key is absent" has a dynamic return type |
VariableTypeRequired | 3 | 244 | [SRC]def root = new BsonDocument() [MSG]The type is not specified for variable "root" |
MethodReturnTypeRequired | 3 | 331 | [SRC]def 'should get first key'() { [MSG]Method "should get first key" has a dynamic return type |
VariableTypeRequired | 3 | 333 | [SRC]def document = new BsonDocument('i', new BsonInt32(2)) [MSG]The type is not specified for variable "document" |
MethodReturnTypeRequired | 3 | 339 | [SRC]def 'getFirstKey should throw NoSuchElementException if ..s empty'() { [MSG]Method "getFirstKey should throw NoSuchElementException if the document is empty" has a dynamic return type |
VariableTypeRequired | 3 | 341 | [SRC]def document = new BsonDocument() [MSG]The type is not specified for variable "document" |
MethodReturnTypeRequired | 3 | 350 | [SRC]def 'should create BsonReader'() { [MSG]Method "should create BsonReader" has a dynamic return type |
VariableTypeRequired | 3 | 352 | [SRC]def document = documentWithValuesOfEveryType() [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 355 | [SRC]def reader = document.asBsonReader() [MSG]The type is not specified for variable "reader" |
MethodReturnTypeRequired | 3 | 364 | [SRC]def 'should serialize and deserialize'() { [MSG]Method "should serialize and deserialize" has a dynamic return type |
VariableTypeRequired | 3 | 366 | [SRC]def document = new BsonDocument('d', new BsonDocument()...onInt32(1))) [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 377 | [SRC]def baos = new ByteArrayOutputStream() [MSG]The type is not specified for variable "baos" |
VariableTypeRequired | 3 | 378 | [SRC]def oos = new ObjectOutputStream(baos) [MSG]The type is not specified for variable "oos" |
VariableTypeRequired | 3 | 382 | [SRC]def bais = new ByteArrayInputStream(baos.toByteArray()) [MSG]The type is not specified for variable "bais" |
VariableTypeRequired | 3 | 383 | [SRC]def ois = new ObjectInputStream(bais) [MSG]The type is not specified for variable "ois" |
VariableTypeRequired | 3 | 384 | [SRC]def deserializedDocument = ois.readObject() [MSG]The type is not specified for variable "deserializedDocument" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
FieldTypeRequired | 3 | 25 | [SRC]def document = new Document() [MSG]The type is not specified for field "document" |
FieldTypeRequired | 3 | 31 | [SRC]def wrapper = new BsonDocumentWrapper(document, new DocumentCodec()) [MSG]The type is not specified for field "wrapper" |
MethodReturnTypeRequired | 3 | 33 | [SRC]def 'should serialize and deserialize'() { [MSG]Method "should serialize and deserialize" has a dynamic return type |
VariableTypeRequired | 3 | 35 | [SRC]def baos = new ByteArrayOutputStream() [MSG]The type is not specified for variable "baos" |
VariableTypeRequired | 3 | 36 | [SRC]def oos = new ObjectOutputStream(baos) [MSG]The type is not specified for variable "oos" |
VariableTypeRequired | 3 | 40 | [SRC]def bais = new ByteArrayInputStream(baos.toByteArray()) [MSG]The type is not specified for variable "bais" |
VariableTypeRequired | 3 | 41 | [SRC]def ois = new ObjectInputStream(bais) [MSG]The type is not specified for variable "ois" |
VariableTypeRequired | 3 | 42 | [SRC]def deserializedDocument = ois.readObject() [MSG]The type is not specified for variable "deserializedDocument" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 27 | [SRC]def 'should write all types'() { [MSG]Method "should write all types" has a dynamic return type |
VariableTypeRequired | 3 | 29 | [SRC]def encodedDoc = new BsonDocument(); [MSG]The type is not specified for variable "encodedDoc" |
MethodReturnTypeRequired | 3 | 37 | [SRC]def 'should pipe all types'() { [MSG]Method "should pipe all types" has a dynamic return type |
VariableTypeRequired | 3 | 39 | [SRC]def document = new BsonDocument() [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 40 | [SRC]def reader = new BsonDocumentReader(documentWithValuesOfEveryType()) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 41 | [SRC]def writer = new BsonDocumentWriter(document) [MSG]The type is not specified for variable "writer" |
MethodReturnTypeRequired | 3 | 50 | [SRC]def 'should pipe all types with extra elements'() { [MSG]Method "should pipe all types with extra elements" has a dynamic return type |
VariableTypeRequired | 3 | 52 | [SRC]def document = new BsonDocument() [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 53 | [SRC]def reader = new BsonDocumentReader(new BsonDocument()) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 54 | [SRC]def writer = new BsonDocumentWriter(document) [MSG]The type is not specified for variable "writer" |
VariableTypeRequired | 3 | 56 | [SRC]def extraElements = [] [MSG]The type is not specified for variable "extraElements" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 25 | [SRC]def 'should convert to int value'() { [MSG]Method "should convert to int value" has a dynamic return type |
MethodReturnTypeRequired | 3 | 38 | [SRC]def 'should convert to long value'() { [MSG]Method "should convert to long value" has a dynamic return type |
MethodReturnTypeRequired | 3 | 49 | [SRC]def 'should convert to double value'() { [MSG]Method "should convert to double value" has a dynamic return type |
MethodReturnTypeRequired | 3 | 62 | [SRC]def 'should convert to decimal128 value'() { [MSG]Method "should convert to decimal128 value" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 23 | [SRC]def 'should get type'() { [MSG]Method "should get type" has a dynamic return type |
MethodReturnTypeRequired | 3 | 28 | [SRC]def 'should sort options'() { [MSG]Method "should sort options" has a dynamic return type |
MethodReturnTypeRequired | 3 | 33 | [SRC]def 'should accept invalid options'() { [MSG]Method "should accept invalid options" has a dynamic return type |
MethodReturnTypeRequired | 3 | 38 | [SRC]def 'should allow null options'() { [MSG]Method "should allow null options" has a dynamic return type |
MethodReturnTypeRequired | 3 | 44 | [SRC]def 'should get regular expression'() { [MSG]Method "should get regular expression" has a dynamic return type |
MethodReturnTypeRequired | 3 | 49 | [SRC]def 'equivalent values should be equal and have same hashcode'() { [MSG]Method "equivalent values should be equal and have same hashcode" has a dynamic return type |
VariableTypeRequired | 3 | 51 | [SRC]def first = new BsonRegularExpression('abc', 'uxsmi') [MSG]The type is not specified for variable "first" |
VariableTypeRequired | 3 | 52 | [SRC]def second = new BsonRegularExpression('abc', 'imsxu') [MSG]The type is not specified for variable "second" |
MethodReturnTypeRequired | 3 | 59 | [SRC]def 'should convert to string'() { [MSG]Method "should convert to string" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 28 | [SRC]def 'bsonType should get expected value'() { [MSG]Method "bsonType should get expected value" has a dynamic return type |
MethodReturnTypeRequired | 3 | 34 | [SRC]def 'compareTo should sort the timestamps as unsigned values'() { [MSG]Method "compareTo should sort the timestamps as unsigned values" has a dynamic return type |
VariableTypeRequired | 3 | 35 | [SRC]def timestamps = [new BsonTimestamp(Long.MIN_VALUE), [MSG]The type is not specified for variable "timestamps" |
MethodReturnTypeRequired | 3 | 54 | [SRC]def 'constructors should initialize instance'() { [MSG]Method "constructors should initialize instance" has a dynamic return type |
VariableTypeRequired | 3 | 56 | [SRC]def tsFromValue = new BsonTimestamp(value) [MSG]The type is not specified for variable "tsFromValue" |
VariableTypeRequired | 3 | 57 | [SRC]def tsFromSecondsAndIncrement = new BsonTimestamp(seconds, increment) [MSG]The type is not specified for variable "tsFromSecondsAndIncrement" |
MethodReturnTypeRequired | 3 | 80 | [SRC]def 'no args constructor should initialize instance'() { [MSG]Method "no args constructor should initialize instance" has a dynamic return type |
VariableTypeRequired | 3 | 82 | [SRC]def tsFromValue = new BsonTimestamp() [MSG]The type is not specified for variable "tsFromValue" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 24 | [SRC]def 'is methods should return true for the correct type'() { [MSG]Method "is methods should return true for the correct type" has a dynamic return type |
MethodReturnTypeRequired | 3 | 49 | [SRC]def 'is methods should return false for the incorrect type'() { [MSG]Method "is methods should return false for the incorrect type" has a dynamic return type |
MethodReturnTypeRequired | 3 | 74 | [SRC]def 'as methods should return false for the incorrect type'() { [MSG]Method "as methods should return false for the incorrect type" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 25 | [SRC]def shouldThrowExceptionForBooleanWhenWritingBeforeStart..Document() { [MSG]Method "shouldThrowExceptionForBooleanWhenWritingBeforeStartingDocument" has a dynamic return type |
MethodReturnTypeRequired | 3 | 36 | [SRC]def shouldThrowExceptionForArrayWhenWritingBeforeStartingDocument() { [MSG]Method "shouldThrowExceptionForArrayWhenWritingBeforeStartingDocument" has a dynamic return type |
MethodReturnTypeRequired | 3 | 47 | [SRC]def shouldThrowExceptionForNullWhenWritingBeforeStartingDocument() { [MSG]Method "shouldThrowExceptionForNullWhenWritingBeforeStartingDocument" has a dynamic return type |
MethodReturnTypeRequired | 3 | 58 | [SRC]def shouldThrowExceptionForStringWhenStateIsValue() { [MSG]Method "shouldThrowExceptionForStringWhenStateIsValue" has a dynamic return type |
MethodReturnTypeRequired | 3 | 70 | [SRC]def shouldThrowExceptionWhenEndingAnArrayWhenStateIsValue() { [MSG]Method "shouldThrowExceptionWhenEndingAnArrayWhenStateIsValue" has a dynamic return type |
MethodReturnTypeRequired | 3 | 82 | [SRC]def shouldThrowExceptionWhenWritingASecondName() { [MSG]Method "shouldThrowExceptionWhenWritingASecondName" has a dynamic return type |
MethodReturnTypeRequired | 3 | 95 | [SRC]def shouldThrowExceptionWhenEndingADocumentBeforeValueIsWritten() { [MSG]Method "shouldThrowExceptionWhenEndingADocumentBeforeValueIsWritten" has a dynamic return type |
MethodReturnTypeRequired | 3 | 108 | [SRC]def shouldThrowAnExceptionWhenTryingToWriteASecondValue() { [MSG]Method "shouldThrowAnExceptionWhenTryingToWriteASecondValue" has a dynamic return type |
MethodReturnTypeRequired | 3 | 122 | [SRC]def shouldThrowAnExceptionWhenTryingToWriteJavaScript() { [MSG]Method "shouldThrowAnExceptionWhenTryingToWriteJavaScript" has a dynamic return type |
MethodReturnTypeRequired | 3 | 136 | [SRC]def shouldThrowAnExceptionWhenWritingANameInAnArray() { [MSG]Method "shouldThrowAnExceptionWhenWritingANameInAnArray" has a dynamic return type |
MethodReturnTypeRequired | 3 | 151 | [SRC]def shouldThrowAnExceptionWhenEndingDocumentInTheMiddleO..gAnArray() { [MSG]Method "shouldThrowAnExceptionWhenEndingDocumentInTheMiddleOfWritingAnArray" has a dynamic return type |
MethodReturnTypeRequired | 3 | 166 | [SRC]def shouldThrowAnExceptionWhenEndingAnArrayInASubDocument() { [MSG]Method "shouldThrowAnExceptionWhenEndingAnArrayInASubDocument" has a dynamic return type |
MethodReturnTypeRequired | 3 | 184 | [SRC]def shouldThrowAnExceptionWhenWritingANameInAnArrayEvenW..sInArray() { [MSG]Method "shouldThrowAnExceptionWhenWritingANameInAnArrayEvenWhenSubDocumentExistsInArray" has a dynamic return type |
MethodReturnTypeRequired | 3 | 204 | [SRC]def shouldThrowExceptionWhenWritingObjectsIntoNestedArrays() { [MSG]Method "shouldThrowExceptionWhenWritingObjectsIntoNestedArrays" has a dynamic return type |
MethodReturnTypeRequired | 3 | 224 | [SRC]def shouldThrowAnExceptionWhenAttemptingToEndAnArrayThat..tStarted() { [MSG]Method "shouldThrowAnExceptionWhenAttemptingToEndAnArrayThatWasNotStarted" has a dynamic return type |
MethodReturnTypeRequired | 3 | 239 | [SRC]def shouldThrowAnErrorIfTryingToWriteNamesIntoAJavascriptScope1() { [MSG]Method "shouldThrowAnErrorIfTryingToWriteNamesIntoAJavascriptScope1" has a dynamic return type |
MethodReturnTypeRequired | 3 | 254 | [SRC]def shouldThrowAnErrorIfTryingToWriteNamesIntoAJavascriptScope2() { [MSG]Method "shouldThrowAnErrorIfTryingToWriteNamesIntoAJavascriptScope2" has a dynamic return type |
MethodReturnTypeRequired | 3 | 269 | [SRC]def shouldThrowAnErrorIfTryingToWriteNamesIntoAJavascriptScope3() { [MSG]Method "shouldThrowAnErrorIfTryingToWriteNamesIntoAJavascriptScope3" has a dynamic return type |
MethodReturnTypeRequired | 3 | 284 | [SRC]def shouldThrowAnErrorIfTryingToWriteNamesIntoAJavascriptScope4() { [MSG]Method "shouldThrowAnErrorIfTryingToWriteNamesIntoAJavascriptScope4" has a dynamic return type |
MethodReturnTypeRequired | 3 | 299 | [SRC]def shouldThrowAnErrorIfKeyContainsNullCharacter() { [MSG]Method "shouldThrowAnErrorIfKeyContainsNullCharacter" has a dynamic return type |
MethodReturnTypeRequired | 3 | 312 | [SRC]def shouldNotThrowAnErrorIfValueContainsNullCharacter() { [MSG]Method "shouldNotThrowAnErrorIfValueContainsNullCharacter" has a dynamic return type |
MethodReturnTypeRequired | 3 | 324 | [SRC]def shouldNotThrowAnExceptionIfCorrectlyStartingAndEndin..ocuments() { [MSG]Method "shouldNotThrowAnExceptionIfCorrectlyStartingAndEndingDocumentsAndSubDocuments" has a dynamic return type |
MethodReturnTypeRequired | 3 | 341 | [SRC]def shouldThrowOnInvalidFieldName() { [MSG]Method "shouldThrowOnInvalidFieldName" has a dynamic return type |
MethodReturnTypeRequired | 3 | 356 | [SRC]def shouldThrowOnInvalidFieldNameNestedInDocument() { [MSG]Method "shouldThrowOnInvalidFieldNameNestedInDocument" has a dynamic return type |
MethodReturnTypeRequired | 3 | 375 | [SRC]def shouldThrowOnInvalidFieldNameNestedInDocumentInArray() { [MSG]Method "shouldThrowOnInvalidFieldNameNestedInDocumentInArray" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 31 | [SRC]def 'should throw if mark without resetting previous mar..er writer) { [MSG]Method "should throw if mark without resetting previous mark" has a dynamic return type |
MethodReturnTypeRequired | 3 | 66 | [SRC]def 'should throw if reset without mark'(BsonWriter writer) { [MSG]Method "should throw if reset without mark" has a dynamic return type |
MethodReturnTypeRequired | 3 | 100 | [SRC]def 'Lookahead should work at various states'(BsonWriter writer) { [MSG]Method "Lookahead should work at various states" has a dynamic return type |
MethodReturnTypeRequired | 3 | 246 | [SRC]def 'Lookahead should work at various states with Mark'(..er writer) { [MSG]Method "Lookahead should work at various states with Mark" has a dynamic return type |
MethodReturnTypeRequired | 3 | 430 | [SRC]def 'should peek binary subtype and size'(BsonWriter writer) { [MSG]Method "should peek binary subtype and size" has a dynamic return type |
VariableTypeRequired | 3 | 452 | [SRC]def subType = reader.peekBinarySubType() [MSG]The type is not specified for variable "subType" |
VariableTypeRequired | 3 | 453 | [SRC]def size = reader.peekBinarySize() [MSG]The type is not specified for variable "size" |
VariableTypeRequired | 3 | 454 | [SRC]def binary = reader.readBinaryData() [MSG]The type is not specified for variable "binary" |
VariableTypeRequired | 3 | 455 | [SRC]def longValue = reader.readInt64('int64') [MSG]The type is not specified for variable "longValue" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
FieldTypeRequired | 3 | 38 | [SRC]static emptyDocument = new BsonDocument() [MSG]The type is not specified for field "emptyDocument" |
FieldTypeRequired | 3 | 39 | [SRC]static emptyRawDocument = new RawBsonDocument(emptyDocum..entCodec()); [MSG]The type is not specified for field "emptyRawDocument" |
FieldTypeRequired | 3 | 40 | [SRC]static document = new BsonDocument() [MSG]The type is not specified for field "document" |
MethodReturnTypeRequired | 3 | 46 | [SRC]def 'constructors should throw if parameters are invalid'() { [MSG]Method "constructors should throw if parameters are invalid" has a dynamic return type |
MethodReturnTypeRequired | 3 | 96 | [SRC]def 'byteBuffer should contain the correct bytes'() { [MSG]Method "byteBuffer should contain the correct bytes" has a dynamic return type |
VariableTypeRequired | 3 | 98 | [SRC]def byteBuf = rawDocument.getByteBuffer() [MSG]The type is not specified for variable "byteBuf" |
VariableTypeRequired | 3 | 106 | [SRC]def actualBytes = new byte[58] [MSG]The type is not specified for variable "actualBytes" |
MethodReturnTypeRequired | 3 | 116 | [SRC]def 'parse should through if parameter is invalid'() { [MSG]Method "parse should through if parameter is invalid" has a dynamic return type |
MethodReturnTypeRequired | 3 | 124 | [SRC]def 'should parse json'() { [MSG]Method "should parse json" has a dynamic return type |
MethodReturnTypeRequired | 3 | 129 | [SRC]def 'containKey should throw if the key name is null'() { [MSG]Method "containKey should throw if the key name is null" has a dynamic return type |
MethodReturnTypeRequired | 3 | 140 | [SRC]def 'containsKey should find an existing key'() { [MSG]Method "containsKey should find an existing key" has a dynamic return type |
MethodReturnTypeRequired | 3 | 151 | [SRC]def 'containsKey should not find a non-existing key'() { [MSG]Method "containsKey should not find a non-existing key" has a dynamic return type |
MethodReturnTypeRequired | 3 | 164 | [SRC]def 'containValue should find an existing value'() { [MSG]Method "containValue should find an existing value" has a dynamic return type |
MethodReturnTypeRequired | 3 | 175 | [SRC]def 'containValue should not find a non-existing value'() { [MSG]Method "containValue should not find a non-existing value" has a dynamic return type |
MethodReturnTypeRequired | 3 | 185 | [SRC]def 'isEmpty should return false when the document is not empty'() { [MSG]Method "isEmpty should return false when the document is not empty" has a dynamic return type |
MethodReturnTypeRequired | 3 | 193 | [SRC]def 'isEmpty should return true when the document is empty'() { [MSG]Method "isEmpty should return true when the document is empty" has a dynamic return type |
MethodReturnTypeRequired | 3 | 198 | [SRC]def 'should get correct size when the document is empty'() { [MSG]Method "should get correct size when the document is empty" has a dynamic return type |
MethodReturnTypeRequired | 3 | 203 | [SRC]def 'should get correct key set when the document is empty'() { [MSG]Method "should get correct key set when the document is empty" has a dynamic return type |
MethodReturnTypeRequired | 3 | 208 | [SRC]def 'should get correct values set when the document is empty'() { [MSG]Method "should get correct values set when the document is empty" has a dynamic return type |
MethodReturnTypeRequired | 3 | 213 | [SRC]def 'should get correct entry set when the document is empty'() { [MSG]Method "should get correct entry set when the document is empty" has a dynamic return type |
MethodReturnTypeRequired | 3 | 218 | [SRC]def 'should get correct size'() { [MSG]Method "should get correct size" has a dynamic return type |
MethodReturnTypeRequired | 3 | 226 | [SRC]def 'should get correct key set'() { [MSG]Method "should get correct key set" has a dynamic return type |
MethodReturnTypeRequired | 3 | 234 | [SRC]def 'should get correct values set'() { [MSG]Method "should get correct values set" has a dynamic return type |
MethodReturnTypeRequired | 3 | 242 | [SRC]def 'should get correct entry set'() { [MSG]Method "should get correct entry set" has a dynamic return type |
MethodReturnTypeRequired | 3 | 253 | [SRC]def 'should get first key'() { [MSG]Method "should get first key" has a dynamic return type |
MethodReturnTypeRequired | 3 | 261 | [SRC]def 'getFirstKey should throw NoSuchElementException if ..s empty'() { [MSG]Method "getFirstKey should throw NoSuchElementException if the document is empty" has a dynamic return type |
MethodReturnTypeRequired | 3 | 269 | [SRC]def 'should create BsonReader'() { [MSG]Method "should create BsonReader" has a dynamic return type |
VariableTypeRequired | 3 | 271 | [SRC]def reader = document.asBsonReader() [MSG]The type is not specified for variable "reader" |
MethodReturnTypeRequired | 3 | 280 | [SRC]def 'toJson should return equivalent JSON'() { [MSG]Method "toJson should return equivalent JSON" has a dynamic return type |
MethodReturnTypeRequired | 3 | 288 | [SRC]def 'toJson should respect default JsonWriterSettings'() { [MSG]Method "toJson should respect default JsonWriterSettings" has a dynamic return type |
VariableTypeRequired | 3 | 290 | [SRC]def writer = new StringWriter(); [MSG]The type is not specified for variable "writer" |
MethodReturnTypeRequired | 3 | 302 | [SRC]def 'toJson should respect JsonWriterSettings'() { [MSG]Method "toJson should respect JsonWriterSettings" has a dynamic return type |
VariableTypeRequired | 3 | 304 | [SRC]def jsonWriterSettings = new JsonWriterSettings(JsonMode.SHELL) [MSG]The type is not specified for variable "jsonWriterSettings" |
VariableTypeRequired | 3 | 305 | [SRC]def writer = new StringWriter(); [MSG]The type is not specified for variable "writer" |
MethodReturnTypeRequired | 3 | 317 | [SRC]def 'all write methods should throw UnsupportedOperationException'() { [MSG]Method "all write methods should throw UnsupportedOperationException" has a dynamic return type |
VariableTypeRequired | 3 | 319 | [SRC]def rawDocument = createRawDocumenFromDocument() [MSG]The type is not specified for variable "rawDocument" |
MethodReturnTypeRequired | 3 | 352 | [SRC]def 'should decode'() { [MSG]Method "should decode" has a dynamic return type |
MethodReturnTypeRequired | 3 | 359 | [SRC]def 'hashCode should equal hash code of identical BsonDocument'() { [MSG]Method "hashCode should equal hash code of identical BsonDocument" has a dynamic return type |
MethodReturnTypeRequired | 3 | 367 | [SRC]def 'equals should equal identical BsonDocument'() { [MSG]Method "equals should equal identical BsonDocument" has a dynamic return type |
MethodReturnTypeRequired | 3 | 378 | [SRC]def 'clone should make a deep copy'() { [MSG]Method "clone should make a deep copy" has a dynamic return type |
MethodReturnTypeRequired | 3 | 395 | [SRC]def 'should serialize and deserialize'() { [MSG]Method "should serialize and deserialize" has a dynamic return type |
VariableTypeRequired | 3 | 397 | [SRC]def baos = new ByteArrayOutputStream() [MSG]The type is not specified for variable "baos" |
VariableTypeRequired | 3 | 398 | [SRC]def oos = new ObjectOutputStream(baos) [MSG]The type is not specified for variable "oos" |
VariableTypeRequired | 3 | 402 | [SRC]def bais = new ByteArrayInputStream(baos.toByteArray()) [MSG]The type is not specified for variable "bais" |
VariableTypeRequired | 3 | 403 | [SRC]def ois = new ObjectInputStream(bais) [MSG]The type is not specified for variable "ois" |
VariableTypeRequired | 3 | 404 | [SRC]def deserializedDocument = ois.readObject() [MSG]The type is not specified for variable "deserializedDocument" |
BlockEndsWithBlankLine | 3 | 411 | [MSG]Code block ends with a blank line. |
VariableTypeRequired | 3 | 433 | [SRC]def strippedBytes = new byte[size] [MSG]The type is not specified for variable "strippedBytes" |
VariableTypeRequired | 3 | 439 | [SRC]def outputBuffer = new BasicOutputBuffer(1024) [MSG]The type is not specified for variable "outputBuffer" |
VariableTypeRequired | 3 | 441 | [SRC]def bytes = outputBuffer.getInternalBuffer() [MSG]The type is not specified for variable "bytes" |
VariableTypeRequired | 3 | 447 | [SRC]def unstrippedBytes = new byte[size + 2] [MSG]The type is not specified for variable "unstrippedBytes" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 32 | [SRC]def 'should encode and decode atomic boolean'() { [MSG]Method "should encode and decode atomic boolean" has a dynamic return type |
VariableTypeRequired | 3 | 34 | [SRC]def codec = new AtomicBooleanCodec() [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 35 | [SRC]def atomicBoolean = new AtomicBoolean(true) [MSG]The type is not specified for variable "atomicBoolean" |
VariableTypeRequired | 3 | 36 | [SRC]def document = new BsonDocument() [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 39 | [SRC]def writer = new BsonDocumentWriter(document) [MSG]The type is not specified for variable "writer" |
VariableTypeRequired | 3 | 49 | [SRC]def reader = new BsonDocumentReader(document) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 52 | [SRC]def value = codec.decode(reader, DecoderContext.builder().build()) [MSG]The type is not specified for variable "value" |
MethodReturnTypeRequired | 3 | 58 | [SRC]def 'should encode and decode atomic integer'() { [MSG]Method "should encode and decode atomic integer" has a dynamic return type |
VariableTypeRequired | 3 | 60 | [SRC]def codec = new AtomicIntegerCodec() [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 61 | [SRC]def atomicInteger = new AtomicInteger(1) [MSG]The type is not specified for variable "atomicInteger" |
VariableTypeRequired | 3 | 62 | [SRC]def document = new BsonDocument() [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 65 | [SRC]def writer = new BsonDocumentWriter(document) [MSG]The type is not specified for variable "writer" |
VariableTypeRequired | 3 | 75 | [SRC]def reader = new BsonDocumentReader(document) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 78 | [SRC]def value = codec.decode(reader, DecoderContext.builder().build()) [MSG]The type is not specified for variable "value" |
MethodReturnTypeRequired | 3 | 84 | [SRC]def 'should encode and decode atomic long'() { [MSG]Method "should encode and decode atomic long" has a dynamic return type |
VariableTypeRequired | 3 | 86 | [SRC]def codec = new AtomicLongCodec() [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 87 | [SRC]def atomicLong = new AtomicLong(1L) [MSG]The type is not specified for variable "atomicLong" |
VariableTypeRequired | 3 | 88 | [SRC]def document = new BsonDocument() [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 91 | [SRC]def writer = new BsonDocumentWriter(document) [MSG]The type is not specified for variable "writer" |
VariableTypeRequired | 3 | 101 | [SRC]def reader = new BsonDocumentReader(document) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 104 | [SRC]def value = codec.decode(reader, DecoderContext.builder().build()) [MSG]The type is not specified for variable "value" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 29 | [SRC]def 'should round trip BigDecimal successfully'() { [MSG]Method "should round trip BigDecimal successfully" has a dynamic return type |
VariableTypeRequired | 3 | 31 | [SRC]def codec = new BigDecimalCodec() [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 32 | [SRC]def bsonDecimal128 = new BsonDecimal128(new Decimal128(bigDecimal)) [MSG]The type is not specified for variable "bsonDecimal128" |
VariableTypeRequired | 3 | 35 | [SRC]def writer = new BsonDocumentWriter(new BsonDocument()) [MSG]The type is not specified for variable "writer" |
BlockEndsWithBlankLine | 3 | 66 | [MSG]Code block ends with a blank line. |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 56 | [SRC]def 'should encode and decode all default types'() { [MSG]Method "should encode and decode all default types" has a dynamic return type |
VariableTypeRequired | 3 | 58 | [SRC]def doc = new BsonDocument( [MSG]The type is not specified for variable "doc" |
VariableTypeRequired | 3 | 93 | [SRC]def decodedDoc = new BsonDocumentCodec().decode(reader, ..r().build()) [MSG]The type is not specified for variable "decodedDoc" |
MethodReturnTypeRequired | 3 | 119 | [SRC]def 'should respect encodeIdFirst property in encoder context'() { [MSG]Method "should respect encodeIdFirst property in encoder context" has a dynamic return type |
VariableTypeRequired | 3 | 121 | [SRC]def doc = new BsonDocument( [MSG]The type is not specified for variable "doc" |
VariableTypeRequired | 3 | 139 | [SRC]def encodedDocument = new BsonDocument() [MSG]The type is not specified for variable "encodedDocument" |
MethodReturnTypeRequired | 3 | 159 | [SRC]def 'should encode nested raw documents'() { [MSG]Method "should encode nested raw documents" has a dynamic return type |
VariableTypeRequired | 3 | 161 | [SRC]def doc = new BsonDocument('a', BsonBoolean.TRUE) [MSG]The type is not specified for variable "doc" |
VariableTypeRequired | 3 | 162 | [SRC]def rawDoc = new RawBsonDocument(doc, new BsonDocumentCodec()); [MSG]The type is not specified for variable "rawDoc" |
VariableTypeRequired | 3 | 163 | [SRC]def docWithNestedRawDoc = new BsonDocument('a', rawDoc)...st(rawDoc))) [MSG]The type is not specified for variable "docWithNestedRawDoc" |
VariableTypeRequired | 3 | 166 | [SRC]def encodedDocument = new BsonDocument() [MSG]The type is not specified for variable "encodedDocument" |
MethodReturnTypeRequired | 3 | 174 | [SRC]def 'should determine if document has an id'() { [MSG]Method "should determine if document has an id" has a dynamic return type |
MethodReturnTypeRequired | 3 | 180 | [SRC]def 'should get document id'() { [MSG]Method "should get document id" has a dynamic return type |
MethodReturnTypeRequired | 3 | 186 | [SRC]def 'should generate document id if absent'() { [MSG]Method "should generate document id if absent" has a dynamic return type |
VariableTypeRequired | 3 | 188 | [SRC]def document = new BsonDocument() [MSG]The type is not specified for variable "document" |
MethodReturnTypeRequired | 3 | 197 | [SRC]def 'should not generate document id if present'() { [MSG]Method "should not generate document id if present" has a dynamic return type |
VariableTypeRequired | 3 | 199 | [SRC]def document = new BsonDocument('_id', new BsonInt32(1)) [MSG]The type is not specified for variable "document" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 37 | [SRC]def 'should have defaults for all BSON types'() { [MSG]Method "should have defaults for all BSON types" has a dynamic return type |
VariableTypeRequired | 3 | 39 | [SRC]def map = new BsonTypeClassMap() [MSG]The type is not specified for variable "map" |
MethodReturnTypeRequired | 3 | 64 | [SRC]def 'should obey replacements'() { [MSG]Method "should obey replacements" has a dynamic return type |
VariableTypeRequired | 3 | 66 | [SRC]def map = new BsonTypeClassMap([(BsonType.DATE_TIME): java.sql.Date]) [MSG]The type is not specified for variable "map" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
FieldTypeRequired | 3 | 28 | [SRC]def bsonTypeClassMap = new BsonTypeClassMap() [MSG]The type is not specified for field "bsonTypeClassMap" |
FieldTypeRequired | 3 | 29 | [SRC]def registry = fromRegistries(fromProviders(new Document..Provider())) [MSG]The type is not specified for field "registry" |
FieldTypeRequired | 3 | 30 | [SRC]def bsonTypeCodecMap = new BsonTypeCodecMap(bsonTypeClas..p, registry) [MSG]The type is not specified for field "bsonTypeCodecMap" |
MethodReturnTypeRequired | 3 | 32 | [SRC]def 'should map types to codecs'() { [MSG]Method "should map types to codecs" has a dynamic return type |
MethodReturnTypeRequired | 3 | 55 | [SRC]def 'should throw exception for unmapped type'() { [MSG]Method "should throw exception for unmapped type" has a dynamic return type |
MethodReturnTypeRequired | 3 | 63 | [SRC]def 'should throw exception for unregistered codec'() { [MSG]Method "should throw exception for unregistered codec" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
FieldTypeRequired | 3 | 47 | [SRC]def provider = new BsonValueCodecProvider() [MSG]The type is not specified for field "provider" |
FieldTypeRequired | 3 | 48 | [SRC]def codecRegistry = fromProviders(provider) [MSG]The type is not specified for field "codecRegistry" |
MethodReturnTypeRequired | 3 | 50 | [SRC]def 'should get correct codec'() { [MSG]Method "should get correct codec" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 29 | [SRC]def 'should get encoder class'() { [MSG]Method "should get encoder class" has a dynamic return type |
MethodReturnTypeRequired | 3 | 33 | [SRC]def 'when encoding a character, should throw if it is null'() { [MSG]Method "when encoding a character, should throw if it is null" has a dynamic return type |
VariableTypeRequired | 3 | 35 | [SRC]def writer = new BsonDocumentWriter(new BsonDocument()) [MSG]The type is not specified for variable "writer" |
MethodReturnTypeRequired | 3 | 44 | [SRC]def 'should encode a character'() { [MSG]Method "should encode a character" has a dynamic return type |
VariableTypeRequired | 3 | 46 | [SRC]def writer = new BsonDocumentWriter(new BsonDocument()) [MSG]The type is not specified for variable "writer" |
MethodReturnTypeRequired | 3 | 58 | [SRC]def 'should decode a character'() { [MSG]Method "should decode a character" has a dynamic return type |
VariableTypeRequired | 3 | 60 | [SRC]def reader = new BsonDocumentReader(new BsonDocument('st..tring('c'))) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 65 | [SRC]def character = codec.decode(reader, DecoderContext.builder().build()) [MSG]The type is not specified for variable "character" |
MethodReturnTypeRequired | 3 | 71 | [SRC]def 'when decoding a string whose length is not 1, shoul..ception'() { [MSG]Method "when decoding a string whose length is not 1, should throw a BsonInvalidOperationException" has a dynamic return type |
VariableTypeRequired | 3 | 73 | [SRC]def reader = new BsonDocumentReader(new BsonDocument('st..ring('cc'))) [MSG]The type is not specified for variable "reader" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 34 | [SRC]def 'should encode code with scope as java script follow..f scope'() { [MSG]Method "should encode code with scope as java script followed by document of scope" has a dynamic return type |
MethodReturnTypeRequired | 3 | 54 | [SRC]def 'should decode code with scope'() { [MSG]Method "should decode code with scope" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 60 | [SRC]def 'should encode and decode all default types with all..er writer) { [MSG]Method "should encode and decode all default types with all readers and writers" has a dynamic return type |
VariableTypeRequired | 3 | 62 | [SRC]def originalDocument = new Document() [MSG]The type is not specified for variable "originalDocument" |
VariableTypeRequired | 3 | 104 | [SRC]def decodedDoc = new DocumentCodec().decode(reader, Deco..r().build()) [MSG]The type is not specified for variable "decodedDoc" |
MethodReturnTypeRequired | 3 | 143 | [SRC]def 'should decode binary subtypes for UUID'() { [MSG]Method "should decode binary subtypes for UUID" has a dynamic return type |
VariableTypeRequired | 3 | 145 | [SRC]def reader = new BsonBinaryReader(ByteBuffer.wrap(bytes as byte[])) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 148 | [SRC]def document = new DocumentCodec().decode(reader, Decode..r().build()) [MSG]The type is not specified for variable "document" |
MethodReturnTypeRequired | 3 | 161 | [SRC]def 'should respect encodeIdFirst property in encoder context'() { [MSG]Method "should respect encodeIdFirst property in encoder context" has a dynamic return type |
VariableTypeRequired | 3 | 163 | [SRC]def originalDocument = new Document('x', 2) [MSG]The type is not specified for variable "originalDocument" |
VariableTypeRequired | 3 | 169 | [SRC]def encodedDocument = new BsonDocument() [MSG]The type is not specified for variable "encodedDocument" |
MethodReturnTypeRequired | 3 | 189 | [SRC]def 'should apply transformer to decoded values'() { [MSG]Method "should apply transformer to decoded values" has a dynamic return type |
VariableTypeRequired | 3 | 191 | [SRC]def codec = new DocumentCodec(fromProviders([new ValueCo..rovider()]), [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 195 | [SRC]def doc = codec.decode(new BsonDocumentReader(new BsonDo..r().build()) [MSG]The type is not specified for variable "doc" |
MethodReturnTypeRequired | 3 | 202 | [SRC]def 'should generate id if absent'() { [MSG]Method "should generate id if absent" has a dynamic return type |
VariableTypeRequired | 3 | 204 | [SRC]def document = new Document() [MSG]The type is not specified for variable "document" |
MethodReturnTypeRequired | 3 | 213 | [SRC]def 'should not generate id if present'() { [MSG]Method "should not generate id if present" has a dynamic return type |
VariableTypeRequired | 3 | 215 | [SRC]def document = new Document('_id', 1) [MSG]The type is not specified for variable "document" |
MethodReturnTypeRequired | 3 | 224 | [SRC]def 'should determine if id is present'() { [MSG]Method "should determine if id is present" has a dynamic return type |
MethodReturnTypeRequired | 3 | 230 | [SRC]def 'should get id if present'() { [MSG]Method "should get id if present" has a dynamic return type |
MethodReturnTypeRequired | 3 | 236 | [SRC]def 'should throw if getting id when absent'() { [MSG]Method "should throw if getting id when absent" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 26 | [SRC]def 'should provide codec for Iterables'() { [MSG]Method "should provide codec for Iterables" has a dynamic return type |
VariableTypeRequired | 3 | 28 | [SRC]def provider = new IterableCodecProvider() [MSG]The type is not specified for variable "provider" |
VariableTypeRequired | 3 | 29 | [SRC]def registry = fromProviders(provider, new BsonValueCode..cProvider()) [MSG]The type is not specified for variable "registry" |
MethodReturnTypeRequired | 3 | 37 | [SRC]def 'should not provide codec for non-Iterables'() { [MSG]Method "should not provide codec for non-Iterables" has a dynamic return type |
VariableTypeRequired | 3 | 39 | [SRC]def provider = new IterableCodecProvider() [MSG]The type is not specified for variable "provider" |
VariableTypeRequired | 3 | 40 | [SRC]def registry = fromProviders(provider, new BsonValueCode..cProvider()) [MSG]The type is not specified for variable "registry" |
MethodReturnTypeRequired | 3 | 46 | [SRC]def 'identical instances should be equal and have same hash code'() { [MSG]Method "identical instances should be equal and have same hash code" has a dynamic return type |
VariableTypeRequired | 3 | 48 | [SRC]def first = new IterableCodecProvider() [MSG]The type is not specified for variable "first" |
VariableTypeRequired | 3 | 49 | [SRC]def second = new IterableCodecProvider() [MSG]The type is not specified for variable "second" |
MethodReturnTypeRequired | 3 | 58 | [SRC]def 'unidentical instances should not be equal'() { [MSG]Method "unidentical instances should not be equal" has a dynamic return type |
VariableTypeRequired | 3 | 60 | [SRC]def first = new IterableCodecProvider() [MSG]The type is not specified for variable "first" |
VariableTypeRequired | 3 | 61 | [SRC]def second = new IterableCodecProvider(new BsonTypeClass..N: String])) [MSG]The type is not specified for variable "second" |
VariableTypeRequired | 3 | 62 | [SRC]def third = new IterableCodecProvider(new BsonTypeClassM..ject from -> [MSG]The type is not specified for variable "third" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
FieldTypeRequired | 3 | 31 | [SRC]static final REGISTRY = fromProviders(new ValueCodecProv..cProvider(), [MSG]The type is not specified for field "REGISTRY" |
MethodReturnTypeRequired | 3 | 34 | [SRC]def 'should have Iterable encoding class'() { [MSG]Method "should have Iterable encoding class" has a dynamic return type |
VariableTypeRequired | 3 | 36 | [SRC]def codec = new IterableCodec(REGISTRY, new BsonTypeClassMap()) [MSG]The type is not specified for variable "codec" |
MethodReturnTypeRequired | 3 | 42 | [SRC]def 'should encode an Iterable to a BSON array'() { [MSG]Method "should encode an Iterable to a BSON array" has a dynamic return type |
VariableTypeRequired | 3 | 44 | [SRC]def codec = new IterableCodec(REGISTRY, new BsonTypeClassMap()) [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 45 | [SRC]def writer = new BsonDocumentWriter(new BsonDocument()) [MSG]The type is not specified for variable "writer" |
MethodReturnTypeRequired | 3 | 57 | [SRC]def 'should decode a BSON array to an Iterable'() { [MSG]Method "should decode a BSON array to an Iterable" has a dynamic return type |
VariableTypeRequired | 3 | 59 | [SRC]def codec = new IterableCodec(REGISTRY, new BsonTypeClassMap()) [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 60 | [SRC]def reader = new BsonDocumentReader(parse('{array : [1, ..3, null]}')) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 65 | [SRC]def iterable = codec.decode(reader, DecoderContext.builder().build()) [MSG]The type is not specified for variable "iterable" |
MethodReturnTypeRequired | 3 | 72 | [SRC]def 'should decode a BSON array of arrays to an Iterable..erables'() { [MSG]Method "should decode a BSON array of arrays to an Iterable of Iterables" has a dynamic return type |
VariableTypeRequired | 3 | 74 | [SRC]def codec = new IterableCodec(REGISTRY, new BsonTypeClassMap()) [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 75 | [SRC]def reader = new BsonDocumentReader(parse('{array : [[1,.., 4, 5]]}')) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 80 | [SRC]def iterable = codec.decode(reader, DecoderContext.builder().build()) [MSG]The type is not specified for variable "iterable" |
MethodReturnTypeRequired | 3 | 87 | [SRC]def 'should use provided transformer'() { [MSG]Method "should use provided transformer" has a dynamic return type |
VariableTypeRequired | 3 | 89 | [SRC]def codec = new IterableCodec(REGISTRY, new BsonTypeClas..ject from -> [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 92 | [SRC]def reader = new BsonDocumentReader(parse('{array : [1, 2, 3]}')) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 97 | [SRC]def iterable = codec.decode(reader, DecoderContext.builder().build()) [MSG]The type is not specified for variable "iterable" |
MethodReturnTypeRequired | 3 | 104 | [SRC]def 'should decode binary subtypes for UUID'() { [MSG]Method "should decode binary subtypes for UUID" has a dynamic return type |
VariableTypeRequired | 3 | 106 | [SRC]def codec = new IterableCodec(REGISTRY, new BsonTypeClassMap(), null) [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 107 | [SRC]def reader = new BsonDocumentReader(parse(document)) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 112 | [SRC]def iterable = codec.decode(reader, DecoderContext.builder().build()) [MSG]The type is not specified for variable "iterable" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 60 | [SRC]def 'should encode and decode all default types with all..er writer) { [MSG]Method "should encode and decode all default types with all readers and writers" has a dynamic return type |
VariableTypeRequired | 3 | 62 | [SRC]def originalDocument = [:] [MSG]The type is not specified for variable "originalDocument" |
VariableTypeRequired | 3 | 104 | [SRC]def decodedDoc = new MapCodec().decode(reader, DecoderCo..r().build()) [MSG]The type is not specified for variable "decodedDoc" |
MethodReturnTypeRequired | 3 | 142 | [SRC]def 'should decode binary subtypes for UUID'() { [MSG]Method "should decode binary subtypes for UUID" has a dynamic return type |
VariableTypeRequired | 3 | 144 | [SRC]def reader = new BsonBinaryReader(ByteBuffer.wrap(bytes as byte[])) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 147 | [SRC]def document = new MapCodec().decode(reader, DecoderCont..r().build()) [MSG]The type is not specified for variable "document" |
MethodReturnTypeRequired | 3 | 160 | [SRC]def 'should apply transformer to decoded values'() { [MSG]Method "should apply transformer to decoded values" has a dynamic return type |
VariableTypeRequired | 3 | 162 | [SRC]def codec = new MapCodec(fromProviders([new ValueCodecPr..rovider()]), [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 166 | [SRC]def doc = codec.decode(new BsonDocumentReader(new BsonDo..r().build()) [MSG]The type is not specified for variable "doc" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
FieldTypeRequired | 3 | 33 | [SRC]def codec = new RawBsonDocumentCodec() [MSG]The type is not specified for field "codec" |
FieldTypeRequired | 3 | 34 | [SRC]def document = new BsonDocument([new BsonElement('b1', B..ean.FALSE)]) [MSG]The type is not specified for field "document" |
FieldTypeRequired | 3 | 35 | [SRC]def documentBytes = [15, 0, 0, 0, 8, 98, 49, 0, 1, 8, 98..] as byte[]; [MSG]The type is not specified for field "documentBytes" |
MethodReturnTypeRequired | 3 | 37 | [SRC]def 'should get encoder class'() { [MSG]Method "should get encoder class" has a dynamic return type |
MethodReturnTypeRequired | 3 | 42 | [SRC]def 'should encode'() { [MSG]Method "should encode" has a dynamic return type |
VariableTypeRequired | 3 | 44 | [SRC]def document = new BsonDocument() [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 45 | [SRC]def writer = new BsonDocumentWriter(document) [MSG]The type is not specified for variable "writer" |
MethodReturnTypeRequired | 3 | 54 | [SRC]def 'should decode'() { [MSG]Method "should decode" has a dynamic return type |
VariableTypeRequired | 3 | 56 | [SRC]def reader = new BsonBinaryReader(new ByteBufferBsonInpu..entBytes)))) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 60 | [SRC]def bytes = new byte[buffer.getByteBuffer().remaining()] [MSG]The type is not specified for variable "bytes" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 29 | [SRC]def 'should return Undefined class'() { [MSG]Method "should return Undefined class" has a dynamic return type |
MethodReturnTypeRequired | 3 | 34 | [SRC]def 'should decode undefined type from BsonReader'() { [MSG]Method "should decode undefined type from BsonReader" has a dynamic return type |
VariableTypeRequired | 3 | 39 | [SRC]def result = codec.decode(reader, DecoderContext.builder().build()) [MSG]The type is not specified for variable "result" |
MethodReturnTypeRequired | 3 | 47 | [SRC]def 'should encode undefined type to BsonWriter'() { [MSG]Method "should encode undefined type to BsonWriter" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 40 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
MethodReturnTypeRequired | 3 | 45 | [SRC]def 'should decode different types of UUID'(UuidCodec co..OException { [MSG]Method "should decode different types of UUID" has a dynamic return type |
BlockStartsWithBlankLine | 3 | 46 | [MSG]Code block starts with a blank line. |
BlockEndsWithBlankLine | 3 | 107 | [MSG]Code block ends with a blank line. |
MethodReturnTypeRequired | 3 | 110 | [SRC]def 'should encode different types of UUIDs'(Byte bsonSubType, [MSG]Method "should encode different types of UUIDs" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
FieldTypeRequired | 3 | 36 | [SRC]private final provider = new ValueCodecProvider() [MSG]The type is not specified for field "provider" |
FieldTypeRequired | 3 | 37 | [SRC]private final registry = CodecRegistries.fromProviders(provider) [MSG]The type is not specified for field "registry" |
MethodReturnTypeRequired | 3 | 39 | [SRC]def 'should provide supported codecs'() { [MSG]Method "should provide supported codecs" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 33 | [SRC]def 'fromCodec should return a SingleCodecRegistry'() { [MSG]Method "fromCodec should return a SingleCodecRegistry" has a dynamic return type |
VariableTypeRequired | 3 | 35 | [SRC]def registry = fromCodecs(new UuidCodec(), new LongCodec()) [MSG]The type is not specified for variable "registry" |
MethodReturnTypeRequired | 3 | 43 | [SRC]def 'fromProvider should return ProvidersCodecRegistry'() { [MSG]Method "fromProvider should return ProvidersCodecRegistry" has a dynamic return type |
VariableTypeRequired | 3 | 45 | [SRC]def registry = fromProviders(new BsonValueCodecProvider()) [MSG]The type is not specified for variable "registry" |
MethodReturnTypeRequired | 3 | 52 | [SRC]def 'fromProviders should return ProvidersCodecRegistry'() { [MSG]Method "fromProviders should return ProvidersCodecRegistry" has a dynamic return type |
VariableTypeRequired | 3 | 54 | [SRC]def providers = fromProviders([new BsonValueCodecProvide..Provider()]) [MSG]The type is not specified for variable "providers" |
MethodReturnTypeRequired | 3 | 62 | [SRC]def 'fromRegistries should return ProvidersCodecRegistry'() { [MSG]Method "fromRegistries should return ProvidersCodecRegistry" has a dynamic return type |
VariableTypeRequired | 3 | 63 | [SRC]def uuidCodec = new UuidCodec() [MSG]The type is not specified for variable "uuidCodec" |
VariableTypeRequired | 3 | 65 | [SRC]def registry = fromRegistries(fromCodecs(uuidCodec), fro..Provider())) [MSG]The type is not specified for variable "registry" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 25 | [SRC]def 'should return the cached codec if a codec for the c.. exists'() { [MSG]Method "should return the cached codec if a codec for the class exists" has a dynamic return type |
VariableTypeRequired | 3 | 27 | [SRC]def codec = new MinKeyCodec() [MSG]The type is not specified for variable "codec" |
VariableTypeRequired | 3 | 28 | [SRC]def cache = new CodecCache() [MSG]The type is not specified for variable "cache" |
MethodReturnTypeRequired | 3 | 35 | [SRC]def 'should throw if codec for class does not exist'() { [MSG]Method "should throw if codec for class does not exist" has a dynamic return type |
VariableTypeRequired | 3 | 37 | [SRC]def cache = new CodecCache() [MSG]The type is not specified for variable "cache" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 41 | [SRC]def 'should throw if supplied codecProviders is null or ..ty list'() { [MSG]Method "should throw if supplied codecProviders is null or an empty list" has a dynamic return type |
MethodReturnTypeRequired | 3 | 55 | [SRC]def 'should throw a CodecConfigurationException if codec..t found'() { [MSG]Method "should throw a CodecConfigurationException if codec not found" has a dynamic return type |
MethodReturnTypeRequired | 3 | 63 | [SRC]def 'get should return registered codec'() { [MSG]Method "get should return registered codec" has a dynamic return type |
VariableTypeRequired | 3 | 65 | [SRC]def minKeyCodec = new MinKeyCodec() [MSG]The type is not specified for variable "minKeyCodec" |
VariableTypeRequired | 3 | 66 | [SRC]def registry = new ProvidersCodecRegistry([new SingleCod..nKeyCodec)]) [MSG]The type is not specified for variable "registry" |
MethodReturnTypeRequired | 3 | 72 | [SRC]def 'get should return the codec from the first source t..has one'() { [MSG]Method "get should return the codec from the first source that has one" has a dynamic return type |
VariableTypeRequired | 3 | 74 | [SRC]def minKeyCodec1 = new MinKeyCodec() [MSG]The type is not specified for variable "minKeyCodec1" |
VariableTypeRequired | 3 | 75 | [SRC]def minKeyCodec2 = new MinKeyCodec() [MSG]The type is not specified for variable "minKeyCodec2" |
VariableTypeRequired | 3 | 76 | [SRC]def registry = new ProvidersCodecRegistry([new SingleCod..KeyCodec2)]) [MSG]The type is not specified for variable "registry" |
MethodReturnTypeRequired | 3 | 82 | [SRC]def 'should handle cycles'() { [MSG]Method "should handle cycles" has a dynamic return type |
VariableTypeRequired | 3 | 84 | [SRC]def registry = new ProvidersCodecRegistry([new ClassMode..Provider()]) [MSG]The type is not specified for variable "registry" |
VariableTypeRequired | 3 | 93 | [SRC]def top = new Top('Bob', [MSG]The type is not specified for variable "top" |
VariableTypeRequired | 3 | 96 | [SRC]def writer = new BsonBinaryWriter(new BasicOutputBuffer()) [MSG]The type is not specified for variable "writer" |
MethodReturnTypeRequired | 3 | 107 | [SRC]def 'get should use the codecCache'() { [MSG]Method "get should use the codecCache" has a dynamic return type |
VariableTypeRequired | 3 | 109 | [SRC]def provider = Mock(CodecProvider) [MSG]The type is not specified for variable "provider" |
VariableTypeRequired | 3 | 112 | [SRC]def registry = new ProvidersCodecRegistry([provider]) [MSG]The type is not specified for variable "registry" |
MethodReturnTypeRequired | 3 | 127 | [SRC]def 'get with codec registry should return the codec fro..has one'() { [MSG]Method "get with codec registry should return the codec from the first source that has one" has a dynamic return type |
VariableTypeRequired | 3 | 129 | [SRC]def provider = new ProvidersCodecRegistry([new ClassMode..([Simple])]) [MSG]The type is not specified for variable "provider" |
VariableTypeRequired | 3 | 130 | [SRC]def registry = Mock(CodecRegistry) [MSG]The type is not specified for variable "registry" |
MethodReturnTypeRequired | 3 | 136 | [SRC]def 'get with codec registry should return null if codec..t found'() { [MSG]Method "get with codec registry should return null if codec not found" has a dynamic return type |
VariableTypeRequired | 3 | 138 | [SRC]def provider = new ProvidersCodecRegistry([new ClassMode..der([Top])]) [MSG]The type is not specified for variable "provider" |
VariableTypeRequired | 3 | 139 | [SRC]def registry = Mock(CodecRegistry) [MSG]The type is not specified for variable "registry" |
MethodReturnTypeRequired | 3 | 145 | [SRC]def 'get with codec registry should pass the outer regis..oviders'() { [MSG]Method "get with codec registry should pass the outer registry to its providers" has a dynamic return type |
VariableTypeRequired | 3 | 147 | [SRC]def provider = new ProvidersCodecRegistry([new ClassMode..([Simple])]) [MSG]The type is not specified for variable "provider" |
VariableTypeRequired | 3 | 148 | [SRC]def registry = Mock(CodecRegistry) [MSG]The type is not specified for variable "registry" |
VariableTypeRequired | 3 | 245 | [SRC]def name = reader.readString() [MSG]The type is not specified for variable "name" |
VariableTypeRequired | 3 | 246 | [SRC]def other = null [MSG]The type is not specified for variable "other" |
VariableTypeRequired | 3 | 247 | [SRC]def nested = null [MSG]The type is not specified for variable "nested" |
VariableTypeRequired | 3 | 249 | [SRC]def type = reader.readBsonType() [MSG]The type is not specified for variable "type" |
VariableTypeRequired | 3 | 299 | [SRC]def name = reader.readString() [MSG]The type is not specified for variable "name" |
VariableTypeRequired | 3 | 300 | [SRC]def type = reader.readBsonType() [MSG]The type is not specified for variable "type" |
VariableTypeRequired | 3 | 302 | [SRC]def top = null [MSG]The type is not specified for variable "top" |
MethodParameterTypeRequired | 3 | 364 | [SRC]boolean equals(final o) { [MSG]"o" parameter of "equals" method is dynamically typed |
MethodParameterTypeRequired | 3 | 413 | [SRC]boolean equals(final o) { [MSG]"o" parameter of "equals" method is dynamically typed |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 25 | [SRC]def 'position and size should be 0 after constructor'() { [MSG]Method "position and size should be 0 after constructor" has a dynamic return type |
VariableTypeRequired | 3 | 27 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 34 | [SRC]def 'should write a byte'() { [MSG]Method "should write a byte" has a dynamic return type |
VariableTypeRequired | 3 | 36 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 47 | [SRC]def 'should write bytes'() { [MSG]Method "should write bytes" has a dynamic return type |
VariableTypeRequired | 3 | 49 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 60 | [SRC]def 'should write bytes from offset until length'() { [MSG]Method "should write bytes from offset until length" has a dynamic return type |
VariableTypeRequired | 3 | 62 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 73 | [SRC]def 'should write a little endian Int32'() { [MSG]Method "should write a little endian Int32" has a dynamic return type |
VariableTypeRequired | 3 | 75 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 86 | [SRC]def 'should write a little endian Int64'() { [MSG]Method "should write a little endian Int64" has a dynamic return type |
VariableTypeRequired | 3 | 88 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 99 | [SRC]def 'should write a double'() { [MSG]Method "should write a double" has a dynamic return type |
VariableTypeRequired | 3 | 101 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 112 | [SRC]def 'should write an ObjectId'() { [MSG]Method "should write an ObjectId" has a dynamic return type |
VariableTypeRequired | 3 | 114 | [SRC]def objectIdAsByteArray = [12, 11, 10, 9, 8, 7, 6, 5, 4,..1] as byte[] [MSG]The type is not specified for variable "objectIdAsByteArray" |
VariableTypeRequired | 3 | 115 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 126 | [SRC]def 'should write an empty string'() { [MSG]Method "should write an empty string" has a dynamic return type |
VariableTypeRequired | 3 | 128 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 139 | [SRC]def 'should write an ASCII string'() { [MSG]Method "should write an ASCII string" has a dynamic return type |
VariableTypeRequired | 3 | 141 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 152 | [SRC]def 'should write a UTF-8 string'() { [MSG]Method "should write a UTF-8 string" has a dynamic return type |
VariableTypeRequired | 3 | 154 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 165 | [SRC]def 'should write an empty CString'() { [MSG]Method "should write an empty CString" has a dynamic return type |
VariableTypeRequired | 3 | 167 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 178 | [SRC]def 'should write an ASCII CString'() { [MSG]Method "should write an ASCII CString" has a dynamic return type |
VariableTypeRequired | 3 | 180 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 191 | [SRC]def 'should write a UTF-8 CString'() { [MSG]Method "should write a UTF-8 CString" has a dynamic return type |
VariableTypeRequired | 3 | 193 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 204 | [SRC]def 'null character in CString should throw Serializatio..ception'() { [MSG]Method "null character in CString should throw SerializationException" has a dynamic return type |
VariableTypeRequired | 3 | 206 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 215 | [SRC]def 'null character in String should not throw Serializa..ception'() { [MSG]Method "null character in String should not throw SerializationException" has a dynamic return type |
VariableTypeRequired | 3 | 217 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 226 | [SRC]def 'write Int32 at position should throw with invalid position'() { [MSG]Method "write Int32 at position should throw with invalid position" has a dynamic return type |
VariableTypeRequired | 3 | 228 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 244 | [SRC]def 'should write Int32 at position'() { [MSG]Method "should write Int32 at position" has a dynamic return type |
VariableTypeRequired | 3 | 246 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 266 | [SRC]def 'truncate should throw with invalid position'() { [MSG]Method "truncate should throw with invalid position" has a dynamic return type |
VariableTypeRequired | 3 | 268 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 284 | [SRC]def 'should truncate to position'() { [MSG]Method "should truncate to position" has a dynamic return type |
VariableTypeRequired | 3 | 286 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 298 | [SRC]def 'should grow'() { [MSG]Method "should grow" has a dynamic return type |
VariableTypeRequired | 3 | 300 | [SRC]def bsonOutput = new BasicOutputBuffer(4) [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 312 | [SRC]def 'should get byte buffer as little endian'() { [MSG]Method "should get byte buffer as little endian" has a dynamic return type |
VariableTypeRequired | 3 | 314 | [SRC]def bsonOutput = new BasicOutputBuffer(4) [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 323 | [SRC]def 'should get internal buffer'() { [MSG]Method "should get internal buffer" has a dynamic return type |
VariableTypeRequired | 3 | 325 | [SRC]def bsonOutput = new BasicOutputBuffer(4) [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 334 | [SRC]def 'should close'() { [MSG]Method "should close" has a dynamic return type |
VariableTypeRequired | 3 | 336 | [SRC]def bsonOutput = new BasicOutputBuffer() [MSG]The type is not specified for variable "bsonOutput" |
MethodReturnTypeRequired | 3 | 346 | [SRC]def getBytes(final BasicOutputBuffer basicOutputBuffer) { [MSG]Method "getBytes" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 28 | [SRC]def 'constructor should throw of buffer is null'() { [MSG]Method "constructor should throw of buffer is null" has a dynamic return type |
MethodReturnTypeRequired | 3 | 36 | [SRC]def 'position should start at 0'() { [MSG]Method "position should start at 0" has a dynamic return type |
VariableTypeRequired | 3 | 38 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..w byte[4]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 44 | [SRC]def 'should read a byte'() { [MSG]Method "should read a byte" has a dynamic return type |
VariableTypeRequired | 3 | 46 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 53 | [SRC]def 'should read into a byte array'() { [MSG]Method "should read into a byte array" has a dynamic return type |
VariableTypeRequired | 3 | 55 | [SRC]def bytes = [11, 12, 13] as byte[] [MSG]The type is not specified for variable "bytes" |
VariableTypeRequired | 3 | 56 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..rap(bytes))) [MSG]The type is not specified for variable "stream" |
VariableTypeRequired | 3 | 57 | [SRC]def bytesRead = new byte[bytes.length] [MSG]The type is not specified for variable "bytesRead" |
BlockEndsWithBlankLine | 3 | 63 | [MSG]Code block ends with a blank line. |
MethodReturnTypeRequired | 3 | 66 | [SRC]def 'should read into a byte array at offset until length'() { [MSG]Method "should read into a byte array at offset until length" has a dynamic return type |
VariableTypeRequired | 3 | 68 | [SRC]def bytes = [11, 12, 13] as byte[] [MSG]The type is not specified for variable "bytes" |
VariableTypeRequired | 3 | 69 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..rap(bytes))) [MSG]The type is not specified for variable "stream" |
VariableTypeRequired | 3 | 70 | [SRC]def bytesRead = new byte[bytes.length + 2] [MSG]The type is not specified for variable "bytesRead" |
MethodReturnTypeRequired | 3 | 78 | [SRC]def 'should read a little endian Int32'() { [MSG]Method "should read a little endian Int32" has a dynamic return type |
VariableTypeRequired | 3 | 80 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 87 | [SRC]def 'should read a little endian Int64'() { [MSG]Method "should read a little endian Int64" has a dynamic return type |
VariableTypeRequired | 3 | 89 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 96 | [SRC]def 'should read a double'() { [MSG]Method "should read a double" has a dynamic return type |
VariableTypeRequired | 3 | 98 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 105 | [SRC]def 'should read ObjectId'() { [MSG]Method "should read ObjectId" has a dynamic return type |
VariableTypeRequired | 3 | 107 | [SRC]def objectIdAsByteArray = [12, 11, 10, 9, 8, 7, 6, 5, 4,..1] as byte[] [MSG]The type is not specified for variable "objectIdAsByteArray" |
VariableTypeRequired | 3 | 108 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..ByteArray))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 115 | [SRC]def 'should read an empty string'() { [MSG]Method "should read an empty string" has a dynamic return type |
VariableTypeRequired | 3 | 117 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 124 | [SRC]def 'should read a one byte string'() { [MSG]Method "should read a one byte string" has a dynamic return type |
VariableTypeRequired | 3 | 126 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 136 | [SRC]def 'should read an invalid one byte string'() { [MSG]Method "should read an invalid one byte string" has a dynamic return type |
VariableTypeRequired | 3 | 138 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 145 | [SRC]def 'should read an ASCII string'() { [MSG]Method "should read an ASCII string" has a dynamic return type |
VariableTypeRequired | 3 | 147 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 154 | [SRC]def 'should read a UTF-8 string'() { [MSG]Method "should read a UTF-8 string" has a dynamic return type |
VariableTypeRequired | 3 | 156 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 163 | [SRC]def 'should read an empty CString'() { [MSG]Method "should read an empty CString" has a dynamic return type |
VariableTypeRequired | 3 | 165 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 172 | [SRC]def 'should read a one byte CString'() { [MSG]Method "should read a one byte CString" has a dynamic return type |
VariableTypeRequired | 3 | 174 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 184 | [SRC]def 'should read an invalid one byte CString'() { [MSG]Method "should read an invalid one byte CString" has a dynamic return type |
VariableTypeRequired | 3 | 186 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 193 | [SRC]def 'should read an ASCII CString'() { [MSG]Method "should read an ASCII CString" has a dynamic return type |
VariableTypeRequired | 3 | 195 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 202 | [SRC]def 'should read a UTF-8 CString'() { [MSG]Method "should read a UTF-8 CString" has a dynamic return type |
VariableTypeRequired | 3 | 204 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 211 | [SRC]def 'should read from position'() { [MSG]Method "should read from position" has a dynamic return type |
VariableTypeRequired | 3 | 213 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 222 | [SRC]def 'should skip CString'() { [MSG]Method "should skip CString" has a dynamic return type |
VariableTypeRequired | 3 | 224 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 233 | [SRC]def 'should skip'() { [MSG]Method "should skip" has a dynamic return type |
VariableTypeRequired | 3 | 235 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 244 | [SRC]def 'reset should throw when there is no mark'() { [MSG]Method "reset should throw when there is no mark" has a dynamic return type |
VariableTypeRequired | 3 | 246 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 255 | [SRC]def 'should reset to the mark'() { [MSG]Method "should reset to the mark" has a dynamic return type |
VariableTypeRequired | 3 | 257 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 273 | [SRC]def 'should have remaining when there are more bytes'() { [MSG]Method "should have remaining when there are more bytes" has a dynamic return type |
VariableTypeRequired | 3 | 275 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 281 | [SRC]def 'should not have remaining when there are no more bytes'() { [MSG]Method "should not have remaining when there are no more bytes" has a dynamic return type |
VariableTypeRequired | 3 | 283 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 289 | [SRC]def 'should close the stream'() { [MSG]Method "should close the stream" has a dynamic return type |
VariableTypeRequired | 3 | 291 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 301 | [SRC]def 'should throw BsonSerializationException reading a b..ailable'() { [MSG]Method "should throw BsonSerializationException reading a byte if no byte is available" has a dynamic return type |
VariableTypeRequired | 3 | 303 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 312 | [SRC]def 'should throw BsonSerializationException reading an ..ailable'() { [MSG]Method "should throw BsonSerializationException reading an Int32 if less than 4 bytes are available" has a dynamic return type |
VariableTypeRequired | 3 | 314 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 323 | [SRC]def 'should throw BsonSerializationException reading an ..ailable'() { [MSG]Method "should throw BsonSerializationException reading an Int64 if less than 8 bytes are available" has a dynamic return type |
VariableTypeRequired | 3 | 325 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 334 | [SRC]def 'should throw BsonSerializationException reading a d..ailable'() { [MSG]Method "should throw BsonSerializationException reading a double if less than 8 bytes are available" has a dynamic return type |
VariableTypeRequired | 3 | 336 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 345 | [SRC]def 'should throw BsonSerializationException reading an ..ailable'() { [MSG]Method "should throw BsonSerializationException reading an ObjectId if less than 12 bytes are available" has a dynamic return type |
VariableTypeRequired | 3 | 347 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 356 | [SRC]def 'should throw BsonSerializationException reading int..ailable'() { [MSG]Method "should throw BsonSerializationException reading into a byte array if not enough bytes are available" has a dynamic return type |
VariableTypeRequired | 3 | 358 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 367 | [SRC]def 'should throw BsonSerializationException reading par..ailable'() { [MSG]Method "should throw BsonSerializationException reading partially into a byte array if not enough bytes are available" has a dynamic return type |
VariableTypeRequired | 3 | 369 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 378 | [SRC]def 'should throw BsonSerializationException if the leng..ositive'() { [MSG]Method "should throw BsonSerializationException if the length of a BSON string is not positive" has a dynamic return type |
VariableTypeRequired | 3 | 380 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 389 | [SRC]def 'should throw BsonSerializationException if a BSON s..minated'() { [MSG]Method "should throw BsonSerializationException if a BSON string is not null-terminated" has a dynamic return type |
VariableTypeRequired | 3 | 391 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
MethodReturnTypeRequired | 3 | 400 | [SRC]def 'should throw BsonSerializationException if a one-by..minated'() { [MSG]Method "should throw BsonSerializationException if a one-byte BSON string is not null-terminated" has a dynamic return type |
VariableTypeRequired | 3 | 402 | [SRC]def stream = new ByteBufferBsonInput(new ByteBufNIO(Byte..as byte[]))) [MSG]The type is not specified for variable "stream" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 26 | [SRC]def 'encodes #encoded into #decoded'() { [MSG]Method "encodes #encoded into #decoded" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 31 | [SRC]def 'should skip value #value'() { [MSG]Method "should skip value #value" has a dynamic return type |
VariableTypeRequired | 3 | 33 | [SRC]def document = new BsonDocument('name', value) [MSG]The type is not specified for variable "document" |
VariableTypeRequired | 3 | 34 | [SRC]def reader = new JsonReader(document.toJson()) [MSG]The type is not specified for variable "reader" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 24 | [SRC]def 'test defaults'() { [MSG]Method "test defaults" has a dynamic return type |
VariableTypeRequired | 3 | 26 | [SRC]def settings = new JsonWriterSettings(); [MSG]The type is not specified for variable "settings" |
MethodReturnTypeRequired | 3 | 42 | [SRC]def 'test output mode'() { [MSG]Method "test output mode" has a dynamic return type |
VariableTypeRequired | 3 | 44 | [SRC]def settings = JsonWriterSettings.builder().outputMode(J..ELL).build() [MSG]The type is not specified for variable "settings" |
MethodReturnTypeRequired | 3 | 50 | [SRC]def 'test indent defaults'() { [MSG]Method "test indent defaults" has a dynamic return type |
VariableTypeRequired | 3 | 52 | [SRC]def settings = JsonWriterSettings.builder().indent(true).build() [MSG]The type is not specified for variable "settings" |
MethodReturnTypeRequired | 3 | 60 | [SRC]def 'test indent settings'() { [MSG]Method "test indent settings" has a dynamic return type |
VariableTypeRequired | 3 | 62 | [SRC]def settings = JsonWriterSettings.builder() [MSG]The type is not specified for variable "settings" |
MethodReturnTypeRequired | 3 | 70 | [SRC]def 'test max length setting'() { [MSG]Method "test max length setting" has a dynamic return type |
VariableTypeRequired | 3 | 72 | [SRC]def settings = JsonWriterSettings.builder() [MSG]The type is not specified for variable "settings" |
MethodReturnTypeRequired | 3 | 79 | [SRC]def 'test constructors'() { [MSG]Method "test constructors" has a dynamic return type |
VariableTypeRequired | 3 | 81 | [SRC]def settings = new JsonWriterSettings() [MSG]The type is not specified for variable "settings" |
BlockEndsWithBlankLine | 3 | 123 | [MSG]Code block ends with a blank line. |
MethodReturnTypeRequired | 3 | 126 | [SRC]def 'should use legacy extended json converters for strict mode'() { [MSG]Method "should use legacy extended json converters for strict mode" has a dynamic return type |
VariableTypeRequired | 3 | 128 | [SRC]def settings = JsonWriterSettings.builder().outputMode(J..ICT).build() [MSG]The type is not specified for variable "settings" |
MethodReturnTypeRequired | 3 | 150 | [SRC]def 'should use extended json converters for extended json mode'() { [MSG]Method "should use extended json converters for extended json mode" has a dynamic return type |
VariableTypeRequired | 3 | 152 | [SRC]def settings = JsonWriterSettings.builder().outputMode(J..DED).build() [MSG]The type is not specified for variable "settings" |
MethodReturnTypeRequired | 3 | 174 | [SRC]def 'should use shell converters for shell mode'() { [MSG]Method "should use shell converters for shell mode" has a dynamic return type |
VariableTypeRequired | 3 | 176 | [SRC]def settings = JsonWriterSettings.builder().outputMode(J..ELL).build() [MSG]The type is not specified for variable "settings" |
MethodReturnTypeRequired | 3 | 198 | [SRC]def 'should set converters'() { [MSG]Method "should set converters" has a dynamic return type |
VariableTypeRequired | 3 | 200 | [SRC]def binaryConverter = new ShellBinaryConverter() [MSG]The type is not specified for variable "binaryConverter" |
VariableTypeRequired | 3 | 201 | [SRC]def booleanConverter = new JsonBooleanConverter() [MSG]The type is not specified for variable "booleanConverter" |
VariableTypeRequired | 3 | 202 | [SRC]def dateTimeConverter = new ShellDateTimeConverter() [MSG]The type is not specified for variable "dateTimeConverter" |
VariableTypeRequired | 3 | 203 | [SRC]def decimal128Converter = new ShellDecimal128Converter() [MSG]The type is not specified for variable "decimal128Converter" |
VariableTypeRequired | 3 | 204 | [SRC]def doubleConverter = new JsonDoubleConverter() [MSG]The type is not specified for variable "doubleConverter" |
VariableTypeRequired | 3 | 205 | [SRC]def int32Converter = new JsonInt32Converter() [MSG]The type is not specified for variable "int32Converter" |
VariableTypeRequired | 3 | 206 | [SRC]def int64Converter = new ShellInt64Converter() [MSG]The type is not specified for variable "int64Converter" |
VariableTypeRequired | 3 | 207 | [SRC]def javaScriptConverter = new JsonJavaScriptConverter() [MSG]The type is not specified for variable "javaScriptConverter" |
VariableTypeRequired | 3 | 208 | [SRC]def maxKeyConverter = new ShellMaxKeyConverter() [MSG]The type is not specified for variable "maxKeyConverter" |
VariableTypeRequired | 3 | 209 | [SRC]def minKeyConverter = new ShellMinKeyConverter() [MSG]The type is not specified for variable "minKeyConverter" |
VariableTypeRequired | 3 | 210 | [SRC]def nullConverter = new JsonNullConverter() [MSG]The type is not specified for variable "nullConverter" |
VariableTypeRequired | 3 | 211 | [SRC]def objectIdConverter = new ShellObjectIdConverter() [MSG]The type is not specified for variable "objectIdConverter" |
VariableTypeRequired | 3 | 212 | [SRC]def regularExpressionConverter = new ShellRegularExpressionConverter() [MSG]The type is not specified for variable "regularExpressionConverter" |
VariableTypeRequired | 3 | 213 | [SRC]def stringConverter = new JsonStringConverter() [MSG]The type is not specified for variable "stringConverter" |
VariableTypeRequired | 3 | 214 | [SRC]def symbolConverter = new JsonSymbolConverter() [MSG]The type is not specified for variable "symbolConverter" |
VariableTypeRequired | 3 | 215 | [SRC]def timestampConverter = new ShellTimestampConverter() [MSG]The type is not specified for variable "timestampConverter" |
VariableTypeRequired | 3 | 216 | [SRC]def undefinedConverter = new ShellUndefinedConverter() [MSG]The type is not specified for variable "undefinedConverter" |
VariableTypeRequired | 3 | 219 | [SRC]def settings = JsonWriterSettings.builder() [MSG]The type is not specified for variable "settings" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
FieldTypeRequired | 3 | 33 | [SRC]def stringWriter = new StringWriter(); [MSG]The type is not specified for field "stringWriter" |
FieldTypeRequired | 3 | 34 | [SRC]def writer = new JsonWriter(stringWriter) [MSG]The type is not specified for field "writer" |
FieldTypeRequired | 3 | 35 | [SRC]def jsonWithValuesOfEveryType = documentWithValuesOfEver..r().build()) [MSG]The type is not specified for field "jsonWithValuesOfEveryType" |
MethodReturnTypeRequired | 3 | 37 | [SRC]def 'should pipe all types'() { [MSG]Method "should pipe all types" has a dynamic return type |
VariableTypeRequired | 3 | 39 | [SRC]def reader = new BsonDocumentReader(documentWithValuesOfEveryType()) [MSG]The type is not specified for variable "reader" |
MethodReturnTypeRequired | 3 | 48 | [SRC]def 'should pipe all types with capped length'() { [MSG]Method "should pipe all types with capped length" has a dynamic return type |
VariableTypeRequired | 3 | 50 | [SRC]def reader = new BsonDocumentReader(documentWithValuesOfEveryType()) [MSG]The type is not specified for variable "reader" |
VariableTypeRequired | 3 | 51 | [SRC]def writer = new JsonWriter(stringWriter, JsonWriterSett..th).build()) [MSG]The type is not specified for variable "writer" |
MethodReturnTypeRequired | 3 | 65 | [SRC]def shouldThrowAnExceptionWhenWritingNullName() { [MSG]Method "shouldThrowAnExceptionWhenWritingNullName" has a dynamic return type |
MethodReturnTypeRequired | 3 | 76 | [SRC]def shouldThrowAnExceptionWhenWritingNullValue() { [MSG]Method "shouldThrowAnExceptionWhenWritingNullValue" has a dynamic return type |
MethodReturnTypeRequired | 3 | 142 | [SRC]def shouldThrowAnExceptionWhenWritingNullMemberValue() { [MSG]Method "shouldThrowAnExceptionWhenWritingNullMemberValue" has a dynamic return type |
MethodReturnTypeRequired | 3 | 207 | [SRC]def shouldThrowAnExceptionWhenWritingNullMemberName() { [MSG]Method "shouldThrowAnExceptionWhenWritingNullMemberName" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 30 | [SRC]def setup() { [MSG]Method "setup" has a dynamic return type |
MethodReturnTypeRequired | 3 | 35 | [SRC]def 'should write empty document'() { [MSG]Method "should write empty document" has a dynamic return type |
MethodReturnTypeRequired | 3 | 44 | [SRC]def 'should write empty array'() { [MSG]Method "should write empty array" has a dynamic return type |
MethodReturnTypeRequired | 3 | 53 | [SRC]def 'should write null'() { [MSG]Method "should write null" has a dynamic return type |
MethodReturnTypeRequired | 3 | 63 | [SRC]def 'should write boolean'() { [MSG]Method "should write boolean" has a dynamic return type |
MethodReturnTypeRequired | 3 | 74 | [SRC]def 'should write number'() { [MSG]Method "should write number" has a dynamic return type |
MethodReturnTypeRequired | 3 | 84 | [SRC]def 'should write string'() { [MSG]Method "should write string" has a dynamic return type |
MethodReturnTypeRequired | 3 | 94 | [SRC]def 'should write unquoted string'() { [MSG]Method "should write unquoted string" has a dynamic return type |
MethodReturnTypeRequired | 3 | 104 | [SRC]def 'should write document'() { [MSG]Method "should write document" has a dynamic return type |
MethodReturnTypeRequired | 3 | 115 | [SRC]def 'should write array'() { [MSG]Method "should write array" has a dynamic return type |
MethodReturnTypeRequired | 3 | 126 | [SRC]def 'should write array of values'() { [MSG]Method "should write array of values" has a dynamic return type |
MethodReturnTypeRequired | 3 | 140 | [SRC]def 'should write strings'() { [MSG]Method "should write strings" has a dynamic return type |
Indentation | 3 | 156 | [SRC]'abc\u0000def' | '"abc\\u0000def"' [MSG]The statement on line 156 in class org.bson.json.StrictCharacterStreamJsonWriterSpecification is at the incorrect indent level: Expected column 9 but was 14 |
Indentation | 3 | 166 | [SRC]'\u0080' | '"\\u0080"' [MSG]The statement on line 166 in class org.bson.json.StrictCharacterStreamJsonWriterSpecification is at the incorrect indent level: Expected column 9 but was 14 |
Indentation | 3 | 167 | [SRC]'\u0080\u0081' | '"\\u0080\\u0081"' [MSG]The statement on line 167 in class org.bson.json.StrictCharacterStreamJsonWriterSpecification is at the incorrect indent level: Expected column 9 but was 19 |
Indentation | 3 | 168 | [SRC]'\u0080\u0081\u0082' | '"\\u0080\\u0081\\u0082"' [MSG]The statement on line 168 in class org.bson.json.StrictCharacterStreamJsonWriterSpecification is at the incorrect indent level: Expected column 9 but was 24 |
MethodReturnTypeRequired | 3 | 171 | [SRC]def 'should indent one element'() { [MSG]Method "should indent one element" has a dynamic return type |
MethodReturnTypeRequired | 3 | 184 | [SRC]def 'should indent one element with indent and newline characters'() { [MSG]Method "should indent one element with indent and newline characters" has a dynamic return type |
MethodReturnTypeRequired | 3 | 201 | [SRC]def 'should indent two elements'() { [MSG]Method "should indent two elements" has a dynamic return type |
MethodReturnTypeRequired | 3 | 215 | [SRC]def 'should indent embedded document'() { [MSG]Method "should indent embedded document" has a dynamic return type |
MethodReturnTypeRequired | 3 | 231 | [SRC]def shouldThrowExceptionForBooleanWhenWritingBeforeStart..Document() { [MSG]Method "shouldThrowExceptionForBooleanWhenWritingBeforeStartingDocument" has a dynamic return type |
MethodReturnTypeRequired | 3 | 239 | [SRC]def shouldThrowExceptionForNameWhenWritingBeforeStartingDocument() { [MSG]Method "shouldThrowExceptionForNameWhenWritingBeforeStartingDocument" has a dynamic return type |
MethodReturnTypeRequired | 3 | 247 | [SRC]def shouldThrowExceptionForStringWhenStateIsValue() { [MSG]Method "shouldThrowExceptionForStringWhenStateIsValue" has a dynamic return type |
MethodReturnTypeRequired | 3 | 258 | [SRC]def shouldThrowExceptionWhenEndingAnArrayWhenStateIsValue() { [MSG]Method "shouldThrowExceptionWhenEndingAnArrayWhenStateIsValue" has a dynamic return type |
MethodReturnTypeRequired | 3 | 269 | [SRC]def shouldThrowExceptionWhenWritingASecondName() { [MSG]Method "shouldThrowExceptionWhenWritingASecondName" has a dynamic return type |
MethodReturnTypeRequired | 3 | 281 | [SRC]def shouldThrowExceptionWhenEndingADocumentBeforeValueIsWritten() { [MSG]Method "shouldThrowExceptionWhenEndingADocumentBeforeValueIsWritten" has a dynamic return type |
MethodReturnTypeRequired | 3 | 293 | [SRC]def shouldThrowAnExceptionWhenTryingToWriteAValue() { [MSG]Method "shouldThrowAnExceptionWhenTryingToWriteAValue" has a dynamic return type |
MethodReturnTypeRequired | 3 | 301 | [SRC]def shouldThrowAnExceptionWhenWritingANameInAnArray() { [MSG]Method "shouldThrowAnExceptionWhenWritingANameInAnArray" has a dynamic return type |
MethodReturnTypeRequired | 3 | 313 | [SRC]def shouldThrowAnExceptionWhenEndingDocumentInTheMiddleO..gAnArray() { [MSG]Method "shouldThrowAnExceptionWhenEndingDocumentInTheMiddleOfWritingAnArray" has a dynamic return type |
MethodReturnTypeRequired | 3 | 325 | [SRC]def shouldThrowAnExceptionWhenEndingAnArrayInASubDocument() { [MSG]Method "shouldThrowAnExceptionWhenEndingAnArrayInASubDocument" has a dynamic return type |
MethodReturnTypeRequired | 3 | 338 | [SRC]def shouldThrowAnExceptionWhenEndingAnArrayWhenValueIsExpected() { [MSG]Method "shouldThrowAnExceptionWhenEndingAnArrayWhenValueIsExpected" has a dynamic return type |
MethodReturnTypeRequired | 3 | 350 | [SRC]def shouldThrowAnExceptionWhenWritingANameInAnArrayEvenW..sInArray() { [MSG]Method "shouldThrowAnExceptionWhenWritingANameInAnArrayEvenWhenSubDocumentExistsInArray" has a dynamic return type |
MethodReturnTypeRequired | 3 | 364 | [SRC]def shouldThrowAnExceptionWhenAttemptingToEndAnArrayThat..tStarted() { [MSG]Method "shouldThrowAnExceptionWhenAttemptingToEndAnArrayThatWasNotStarted" has a dynamic return type |
MethodReturnTypeRequired | 3 | 377 | [SRC]def shouldThrowAnExceptionWhenWritingNullName() { [MSG]Method "shouldThrowAnExceptionWhenWritingNullName" has a dynamic return type |
BlockEndsWithBlankLine | 3 | 386 | [MSG]Code block ends with a blank line. |
MethodReturnTypeRequired | 3 | 389 | [SRC]def shouldThrowAnExceptionWhenWritingNullValue() { [MSG]Method "shouldThrowAnExceptionWhenWritingNullValue" has a dynamic return type |
MethodReturnTypeRequired | 3 | 413 | [SRC]def shouldThrowAnExceptionWhenWritingNullMemberValue() { [MSG]Method "shouldThrowAnExceptionWhenWritingNullMemberValue" has a dynamic return type |
MethodReturnTypeRequired | 3 | 436 | [SRC]def shouldThrowAnExceptionWhenWritingNullMemberName() { [MSG]Method "shouldThrowAnExceptionWhenWritingNullMemberName" has a dynamic return type |
BlockEndsWithBlankLine | 3 | 481 | [MSG]Code block ends with a blank line. |
MethodReturnTypeRequired | 3 | 484 | [SRC]def shouldStopAtMaxLength() { [MSG]Method "shouldStopAtMaxLength" has a dynamic return type |
VariableTypeRequired | 3 | 486 | [SRC]def fullJsonText = '{ "n" : null }' [MSG]The type is not specified for variable "fullJsonText" |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 32 | [SRC]def 'should have correct constants'() { [MSG]Method "should have correct constants" has a dynamic return type |
MethodReturnTypeRequired | 3 | 41 | [SRC]def 'should construct from high and low'() { [MSG]Method "should construct from high and low" has a dynamic return type |
VariableTypeRequired | 3 | 43 | [SRC]def decimal = fromIEEE754BIDEncoding(0x3040000000000000L..0000000001L) [MSG]The type is not specified for variable "decimal" |
MethodReturnTypeRequired | 3 | 50 | [SRC]def 'should construct from simple string'() { [MSG]Method "should construct from simple string" has a dynamic return type |
MethodReturnTypeRequired | 3 | 64 | [SRC]def 'should round exactly'() { [MSG]Method "should round exactly" has a dynamic return type |
MethodReturnTypeRequired | 3 | 72 | [SRC]def 'should clamp positive exponents'() { [MSG]Method "should clamp positive exponents" has a dynamic return type |
MethodReturnTypeRequired | 3 | 91 | [SRC]def 'should clamp negative exponents'() { [MSG]Method "should clamp negative exponents" has a dynamic return type |
MethodReturnTypeRequired | 3 | 106 | [SRC]def 'should construct from long'() { [MSG]Method "should construct from long" has a dynamic return type |
MethodReturnTypeRequired | 3 | 113 | [SRC]def 'should construct from large BigDecimal'() { [MSG]Method "should construct from large BigDecimal" has a dynamic return type |
MethodReturnTypeRequired | 3 | 122 | [SRC]def 'should convert to simple BigDecimal'() { [MSG]Method "should convert to simple BigDecimal" has a dynamic return type |
MethodReturnTypeRequired | 3 | 135 | [SRC]def 'should convert to large BigDecimal'() { [MSG]Method "should convert to large BigDecimal" has a dynamic return type |
MethodReturnTypeRequired | 3 | 153 | [SRC]def 'should convert invalid representations of 0 as BigDecimal 0'() { [MSG]Method "should convert invalid representations of 0 as BigDecimal 0" has a dynamic return type |
MethodReturnTypeRequired | 3 | 159 | [SRC]def 'should detect infinity'() { [MSG]Method "should detect infinity" has a dynamic return type |
MethodReturnTypeRequired | 3 | 173 | [SRC]def 'should detect NaN'() { [MSG]Method "should detect NaN" has a dynamic return type |
MethodReturnTypeRequired | 3 | 184 | [SRC]def 'should convert NaN to string'() { [MSG]Method "should convert NaN to string" has a dynamic return type |
MethodReturnTypeRequired | 3 | 189 | [SRC]def 'should convert NaN from string'() { [MSG]Method "should convert NaN from string" has a dynamic return type |
MethodReturnTypeRequired | 3 | 199 | [SRC]def 'should not convert NaN to BigDecimal'() { [MSG]Method "should not convert NaN to BigDecimal" has a dynamic return type |
MethodReturnTypeRequired | 3 | 207 | [SRC]def 'should convert infinity to string'() { [MSG]Method "should convert infinity to string" has a dynamic return type |
MethodReturnTypeRequired | 3 | 213 | [SRC]def 'should convert infinity from string'() { [MSG]Method "should convert infinity from string" has a dynamic return type |
MethodReturnTypeRequired | 3 | 235 | [SRC]def 'should convert finite to string'() { [MSG]Method "should convert finite to string" has a dynamic return type |
MethodReturnTypeRequired | 3 | 263 | [SRC]def 'should convert invalid representations of 0 to string'() { [MSG]Method "should convert invalid representations of 0 to string" has a dynamic return type |
MethodReturnTypeRequired | 3 | 270 | [SRC]def 'test equals'() { [MSG]Method "test equals" has a dynamic return type |
VariableTypeRequired | 3 | 272 | [SRC]def d1 = fromIEEE754BIDEncoding(0x3040000000000000L, 0x0..0000000001L) [MSG]The type is not specified for variable "d1" |
VariableTypeRequired | 3 | 273 | [SRC]def d2 = fromIEEE754BIDEncoding(0x3040000000000000L, 0x0..0000000001L) [MSG]The type is not specified for variable "d2" |
VariableTypeRequired | 3 | 274 | [SRC]def d3 = fromIEEE754BIDEncoding(0x3040000000000001L, 0x0..0000000001L) [MSG]The type is not specified for variable "d3" |
VariableTypeRequired | 3 | 275 | [SRC]def d4 = fromIEEE754BIDEncoding(0x3040000000000000L, 0x0..0000000011L) [MSG]The type is not specified for variable "d4" |
MethodReturnTypeRequired | 3 | 286 | [SRC]def 'test hashCode'() { [MSG]Method "test hashCode" has a dynamic return type |
MethodReturnTypeRequired | 3 | 291 | [SRC]def 'should not convert infinity to BigDecimal'() { [MSG]Method "should not convert infinity to BigDecimal" has a dynamic return type |
MethodReturnTypeRequired | 3 | 302 | [SRC]def 'should not convert negative zero to BigDecimal'() { [MSG]Method "should not convert negative zero to BigDecimal" has a dynamic return type |
MethodReturnTypeRequired | 3 | 313 | [SRC]def 'should not round inexactly'() { [MSG]Method "should not round inexactly" has a dynamic return type |
MethodReturnTypeRequired | 3 | 337 | [SRC]def 'should not clamp large exponents if no extra precis..ailable'() { [MSG]Method "should not clamp large exponents if no extra precision is available" has a dynamic return type |
MethodReturnTypeRequired | 3 | 355 | [SRC]def 'should not clamp small exponents if no extra precis..scarded'() { [MSG]Method "should not clamp small exponents if no extra precision can be discarded" has a dynamic return type |
MethodReturnTypeRequired | 3 | 373 | [SRC]def 'should throw IllegalArgumentException if BigDecimal..o large'() { [MSG]Method "should throw IllegalArgumentException if BigDecimal is too large" has a dynamic return type |
Rule Name | Priority | Line # | Source Line / Message |
---|---|---|---|
MethodReturnTypeRequired | 3 | 29 | [SRC]def 'should return correct type for each typed method'() { [MSG]Method "should return correct type for each typed method" has a dynamic return type |
MethodReturnTypeRequired | 3 | 68 | [SRC]def 'should parse a valid JSON string to a Document'() { [MSG]Method "should parse a valid JSON string to a Document" has a dynamic return type |
MethodReturnTypeRequired | 3 | 88 | [SRC]def 'test parse method with mode'() { [MSG]Method "test parse method with mode" has a dynamic return type |
MethodReturnTypeRequired | 3 | 101 | [SRC]def 'should throw an exception when parsing an invalid J.. String'() { [MSG]Method "should throw an exception when parsing an invalid JSON String" has a dynamic return type |
MethodReturnTypeRequired | 3 | 109 | [SRC]def 'should cast to correct type'() { [MSG]Method "should cast to correct type" has a dynamic return type |
MethodReturnTypeRequired | 3 | 120 | [SRC]def 'should throw ClassCastException when value is the wrong type'() { [MSG]Method "should throw ClassCastException when value is the wrong type" has a dynamic return type |
# | Rule Name | Description |
---|---|---|
1 | AbstractClassName | Verifies that the name of an abstract class matches a regular expression specified in the regex property. If that property is null or empty, then this rule is not applied (i.e., it does nothing). It defaults to null, so this rule must be explicitly configured to be active. This rule ignores interfaces. |
2 | AbstractClassWithPublicConstructor | Checks for abstract classes that define a public constructor, which is useless and confusing. |
3 | AbstractClassWithoutAbstractMethod | The abstract class does not contain any abstract methods. An abstract class suggests an incomplete implementation, which is to be completed by subclasses implementing the abstract methods. If the class is intended to be used as a base class only (not to be instantiated direcly) a protected constructor can be provided prevent direct instantiation. |
4 | AddEmptyString | Finds empty string literals which are being added. This is an inefficient way to convert any type to a String. |
5 | AssertWithinFinallyBlock | Checks for assert statements within a finally block. An assert can throw an exception, hiding the original exception, if there is one. |
6 | AssignCollectionSort | The Collections.sort() method mutates the list and returns the list as a value. If you are assigning the result of sort() to a variable, then you probably don't realize that you're also modifying the original list as well. This is frequently the cause of subtle bugs. |
7 | AssignCollectionUnique | The Collections.unique() method mutates the list and returns the list as a value. If you are assigning the result of unique() to a variable, then you probably don't realize that you're also modifying the original list as well. This is frequently the cause of subtle bugs. |
8 | AssignmentInConditional | An assignment operator (=) was used in a conditional test. This is usually a typo, and the comparison operator (==) was intended. |
9 | AssignmentToStaticFieldFromInstanceMethod | Checks for assignment to a static field from an instance method. |
10 | BigDecimalInstantiation | Checks for calls to the BigDecimal constructors that take a double parameter, which may result in an unexpected BigDecimal value. |
11 | BitwiseOperatorInConditional | Checks for bitwise operations in conditionals, if you need to do a bitwise operation then it is best practice to extract a temp variable. |
12 | BlockEndsWithBlankLine | Checks that code blocks such as method bodies, closures and control structure bodies do not end with an empty line. |
13 | BlockStartsWithBlankLine | Checks that code blocks such as method bodies, closures and control structure bodies do not start with an empty line. |
14 | BooleanGetBoolean | This rule catches usages of java.lang.Boolean.getBoolean(String) which reads a boolean from the System properties. It is often mistakenly used to attempt to read user input or parse a String into a boolean. It is a poor piece of API to use; replace it with System.properties['prop']. |
15 | BooleanMethodReturnsNull | Method with Boolean return type returns explicit null. A method that returns either Boolean.TRUE, Boolean.FALSE or null is an accident waiting to happen. This method can be invoked as though it returned a value of type boolean, and the compiler will insert automatic unboxing of the Boolean value. If a null value is returned, this will result in a NullPointerException. |
16 | BracesForClass | Checks the location of the opening brace ({) for classes. By default, requires them on the same line, but the sameLine property can be set to false to override this. |
17 | BracesForForLoop | Checks the location of the opening brace ({) for for loops. By default, requires them on the same line, but the sameLine property can be set to false to override this. |
18 | BracesForIfElse | Checks the location of the opening brace ({) for if statements. By default, requires them on the same line, but the sameLine property can be set to false to override this. |
19 | BracesForMethod | Checks the location of the opening brace ({) for constructors and methods. By default, requires them on the same line, but the sameLine property can be set to false to override this. |
20 | BracesForTryCatchFinally | Checks the location of the opening brace ({) for try statements. By default, requires them on the line, but the sameLine property can be set to false to override this. |
21 | BrokenNullCheck | Looks for faulty checks for null that can cause a NullPointerException. |
22 | BrokenOddnessCheck | The code uses x % 2 == 1 to check to see if a value is odd, but this won't work for negative numbers (e.g., (-5) % 2 == -1). If this code is intending to check for oddness, consider using x & 1 == 1, or x % 2 != 0. |
23 | BuilderMethodWithSideEffects | A builder method is defined as one that creates objects. As such, they should never be of void return type. If a method is named build, create, or make, then it should always return a value. |
24 | BusyWait | Busy waiting (forcing a Thread.sleep() while waiting on a condition) should be avoided. Prefer using the gate and barrier objects in the java.util.concurrent package. |
25 | CatchArrayIndexOutOfBoundsException | Check the size of the array before accessing an array element rather than catching ArrayIndexOutOfBoundsException. |
26 | CatchError | Catching Error is dangerous; it can catch exceptions such as ThreadDeath and OutOfMemoryError. |
27 | CatchException | Catching Exception is often too broad or general. It should usually be restricted to framework or infrastructure code, rather than application code. |
28 | CatchIllegalMonitorStateException | Dubious catching of IllegalMonitorStateException. IllegalMonitorStateException is generally only thrown in case of a design flaw in your code (calling wait or notify on an object you do not hold a lock on). |
29 | CatchIndexOutOfBoundsException | Check that an index is valid before accessing an indexed element rather than catching IndexOutOfBoundsException. |
30 | CatchNullPointerException | Catching NullPointerException is never appropriate. It should be avoided in the first place with proper null checking, and it can mask underlying errors. |
31 | CatchRuntimeException | Catching RuntimeException is often too broad or general. It should usually be restricted to framework or infrastructure code, rather than application code. |
32 | CatchThrowable | Catching Throwable is dangerous; it can catch exceptions such as ThreadDeath and OutOfMemoryError. |
33 | ChainedTest | A test method that invokes another test method is a chained test; the methods are dependent on one another. Tests should be isolated, and not be dependent on one another. |
34 | ClassForName | Using Class.forName(...) is a common way to add dynamic behavior to a system. However, using this method can cause resource leaks because the classes can be pinned in memory for long periods of time. |
35 | ClassName | Verifies that the name of a class matches a regular expression. By default it checks that the class name starts with an uppercase letter and is followed by zero or more word characters (letters, numbers or underscores). The regex property specifies the regular expression used to validate the class name. |
36 | ClassNameSameAsFilename | Reports files containing only one top level class / enum / interface which is named differently than the file. |
37 | ClassNameSameAsSuperclass | Checks for any class that has an identical name to its superclass, other than the package. This can be very confusing. |
38 | ClassSize | Checks if the size of a class exceeds the number of lines specified by the maxLines property (1000). |
39 | CloneableWithoutClone | A class that implements java.lang.Cloneable should define a clone() method. |
40 | CloseWithoutCloseable | If a class defines a "void close()" then that class should implement java.io.Closeable. |
41 | ClosureAsLastMethodParameter | If a method is called and the last parameter is an inline closure then it can be declared outside of the method call brackets. |
42 | ClosureStatementOnOpeningLineOfMultipleLineClosure | Checks for closure logic on first line (after ->) for a multi-line closure. |
43 | CollectAllIsDeprecated | collectAll{} is deprecated since Groovy 1.8.1. Use collectNested instead{}. |
44 | CompareToWithoutComparable | If you implement a compareTo method then you should also implement the Comparable interface. If you don't then you could possibly get an exception if the Groovy == operator is invoked on your object. This is an issue fixed in Groovy 1.8 but present in previous versions. |
45 | ComparisonOfTwoConstants | Checks for expressions where a comparison operator or equals() or compareTo() is used to compare two constants to each other or two literals that contain only constant values., e.g.: 23 == 67, Boolean.FALSE != false, 0.17 <= 0.99, "abc" > "ddd", [a:1] <=> [a:2], [1,2].equals([3,4]) or [a:false, b:true].compareTo(['a':34.5, b:Boolean.TRUE]. |
46 | ConfusingClassNamedException | This class is not derived from another exception, but ends with 'Exception'. This will be confusing to users of this class. |
47 | ConfusingMethodName | Checks for confusing method names. The referenced methods have names that differ only by capitalization. This is very confusing because if the capitalization were identical then one of the methods would override the other. |
48 | ConfusingMultipleReturns | Multiple return values can be used to set several variables at once. To use multiple return values, the left hand side of the assignment must be enclosed in parenthesis. If not, then you are not using multiple return values, you're only assigning the last element. |
49 | ConfusingTernary | In a ternary expression avoid negation in the test. For example, rephrase: "(x != y) ? diff : same" as: "(x == y) ? same : diff". Consistent use of this rule makes the code easier to read. Also, this resolves trivial ordering problems, such as "does the error case go first?" or "does the common case go first?". |
50 | ConsecutiveLiteralAppends | Violations occur when method calls to append(Object) are chained together with literals as parameters. The chained calls can be joined into one invocation. |
51 | ConsecutiveStringConcatenation | Catches concatenation of two string literals on the same line. These can safely by joined. |
52 | ConstantAssertExpression | Checks for assert statements where the assert boolean condition expression is a constant or literal value. |
53 | ConstantIfExpression | Checks for if statements with a constant value for the if expression, such as true, false, null, or a literal constant value. |
54 | ConstantTernaryExpression | Checks for ternary expressions with a constant value for the boolean expression, such as true, false, null, or a literal constant value. |
55 | ConstantsOnlyInterface | An interface should be used only to model a behaviour of a class: using an interface as a container of constants is a poor usage pattern. |
56 | CouldBeElvis | Catch an if block that could be written as an elvis expression. |
57 | CoupledTestCase | This rule finds test cases that are coupled to other test cases, either by invoking static methods on another test case or by creating instances of another test case. If you require shared logic in test cases then extract that logic to a new class where it can properly be reused. |
58 | CyclomaticComplexity | Checks the cyclomatic complexity for methods/classes.A method (or "closure field") with a cyclomatic complexity value greater than the maxMethodComplexity property (20) causes a violation. Likewise, a class that has an (average method) cyclomatic complexityvalue greater than the maxClassAverageMethodComplexity property (20) causes a violation. |
59 | DeadCode | Dead code appears after a return statement or an exception is thrown. If code appears after one of these statements then it will never be executed and can be safely deleted. |
60 | DoubleCheckedLocking | This rule detects double checked locking, where a 'lock hint' is tested for null before initializing an object within a synchronized block. Double checked locking does not guarantee correctness and is an anti-pattern. |
61 | DoubleNegative | There is no point in using a double negative, it is always positive. For instance !!x can always be simplified to x. And !(!x) can as well. |
62 | DuplicateCaseStatement | Check for duplicate case statements in a switch block, such as two equal integers or strings. |
63 | DuplicateImport | Duplicate import statements are unnecessary. |
64 | DuplicateListLiteral | Code containing duplicate List literals can usually be improved by declaring the List as a constant field. |
65 | DuplicateMapKey | A map literal is created with duplicated key. The map entry will be overwritten. |
66 | DuplicateSetValue | A Set literal is created with duplicate constant value. A set cannot contain two elements with the same value. |
67 | ElseBlockBraces | Use braces for else blocks, even for a single statement. By default, braces are not required for an else if it is followed immediately by an if. Set the bracesRequiredForElseIf property to true to require braces is that situation as well. |
68 | EmptyCatchBlock | In most cases, exceptions should not be caught and ignored (swallowed). |
69 | EmptyClass | Reports classes without methods, fields or properties. Why would you need a class like this? |
70 | EmptyElseBlock | Empty else blocks are confusing and serve no purpose. |
71 | EmptyFinallyBlock | Empty finally blocks are confusing and serve no purpose. |
72 | EmptyForStatement | Empty for statements are confusing and serve no purpose. |
73 | EmptyIfStatement | Empty if statements are confusing and serve no purpose. |
74 | EmptyInstanceInitializer | An empty class instance initializer was found. It is safe to remove it. |
75 | EmptyMethod | A method was found without an implementation. If the method is overriding or implementing a parent method, then mark it with the @Override annotation. |
76 | EmptyMethodInAbstractClass | An empty method in an abstract class should be abstract instead, as developer may rely on this empty implementation rather than code the appropriate one. |
77 | EmptyStaticInitializer | An empty static initializer was found. It is safe to remove it. |
78 | EmptySwitchStatement | Empty switch statements are confusing and serve no purpose. |
79 | EmptySynchronizedStatement | Empty synchronized statements are confusing and serve no purpose. |
80 | EmptyTryBlock | Empty try blocks are confusing and serve no purpose. |
81 | EmptyWhileStatement | Empty while statements are confusing and serve no purpose. |
82 | EnumCustomSerializationIgnored | Checks for enums that define writeObject() or writeReplace() methods, or declare serialPersistentFields or serialVersionUID fields, all of which are ignored for enums. |
83 | EqualsAndHashCode | If either the boolean equals(Object) or the int hashCode() methods are overridden within a class, then both must be overridden. |
84 | EqualsOverloaded | The class has an equals method, but the parameter of the method is not of type Object. It is not overriding equals but instead overloading it. |
85 | ExceptionExtendsError | Errors are system exceptions. Do not extend them. |
86 | ExceptionExtendsThrowable | Checks for classes that extend java.lang.Throwable. Custom exception classes should subclass java.lang.Exception or one of its descendants. |
87 | ExceptionNotThrown | Checks for an exception constructor call without a throw as the last statement within a catch block. |
88 | ExplicitArrayListInstantiation | This rule checks for the explicit instantiation of an ArrayList using the no-arg constructor. In Groovy, it is best to write new ArrayList() as [], which creates the same object. |
89 | ExplicitCallToDivMethod | This rule detects when the div(Object) method is called directly in code instead of using the / operator. A groovier way to express this: a.div(b) is this: a / b |
90 | ExplicitCallToGetAtMethod | This rule detects when the getAt(Object) method is called directly in code instead of using the [] index operator. A groovier way to express this: a.getAt(b) is this: a[b] |
91 | ExplicitCallToLeftShiftMethod | This rule detects when the leftShift(Object) method is called directly in code instead of using the << operator. A groovier way to express this: a.leftShift(b) is this: a << b |
92 | ExplicitCallToMinusMethod | This rule detects when the minus(Object) method is called directly in code instead of using the - operator. A groovier way to express this: a.minus(b) is this: a - b |
93 | ExplicitCallToModMethod | This rule detects when the mod(Object) method is called directly in code instead of using the % operator. A groovier way to express this: a.mod(b) is this: a % b |
94 | ExplicitCallToMultiplyMethod | This rule detects when the minus(Object) method is called directly in code instead of using the * operator. A groovier way to express this: a.multiply(b) is this: a * b |
95 | ExplicitCallToOrMethod | This rule detects when the or(Object) method is called directly in code instead of using the | operator. A groovier way to express this: a.or(b) is this: a | b |
96 | ExplicitCallToPlusMethod | This rule detects when the plus(Object) method is called directly in code instead of using the + operator. A groovier way to express this: a.plus(b) is this: a + b |
97 | ExplicitCallToPowerMethod | This rule detects when the power(Object) method is called directly in code instead of using the ** operator. A groovier way to express this: a.power(b) is this: a ** b |
98 | ExplicitCallToRightShiftMethod | This rule detects when the rightShift(Object) method is called directly in code instead of using the >> operator. A groovier way to express this: a.rightShift(b) is this: a >> b |
99 | ExplicitCallToXorMethod | This rule detects when the xor(Object) method is called directly in code instead of using the ^ operator. A groovier way to express this: a.xor(b) is this: a ^ b |
100 | ExplicitGarbageCollection | Calls to System.gc(), Runtime.getRuntime().gc(), and System.runFinalization() are not advised. Code should have the same behavior whether the garbage collection is disabled using the option -Xdisableexplicitgc or not. Moreover, "modern" jvms do a very good job handling garbage collections. If memory usage issues unrelated to memory leaks develop within an application, it should be dealt with JVM options rather than within the code itself. |
101 | ExplicitHashMapInstantiation | This rule checks for the explicit instantiation of a HashMap using the no-arg constructor. In Groovy, it is best to write new HashMap() as [:], which creates the same object. |
102 | ExplicitHashSetInstantiation | This rule checks for the explicit instantiation of a HashSet using the no-arg constructor. In Groovy, it is best to write new HashSet() as [] as Set, which creates the same object. |
103 | ExplicitLinkedHashMapInstantiation | This rule checks for the explicit instantiation of a LinkedHashMap using the no-arg constructor. In Groovy, it is best to write new LinkedHashMap() as [:], which creates the same object. |
104 | ExplicitLinkedListInstantiation | This rule checks for the explicit instantiation of a LinkedList using the no-arg constructor. In Groovy, it is best to write new LinkedList() as [] as Queue, which creates the same object. |
105 | ExplicitStackInstantiation | This rule checks for the explicit instantiation of a Stack using the no-arg constructor. In Groovy, it is best to write new Stack() as [] as Stack, which creates the same object. |
106 | ExplicitTreeSetInstantiation | This rule checks for the explicit instantiation of a TreeSet using the no-arg constructor. In Groovy, it is best to write new TreeSet() as [] as SortedSet, which creates the same object. |
107 | FieldName | Verifies that the name of each field matches a regular expression. By default it checks that non-'final' field names start with a lowercase letter and contains only letters or numbers, and 'final' field names start with an uppercase letter and contain only uppercase letters, numbers and underscores. The regex property specifies the default regular expression used to validate field names. The finalRegex property specifies the regular expression to validate 'final' field names. The staticRegex property specifies the regular expression to validate 'static' field names. The staticFinalRegex property specifies the regular expression to validate 'static final' field names. The ignoreFieldNames property (serialVersionUID)can specify field names that should be ignored, optionally containing wildcard characters ('*' or '?'). |
108 | FieldTypeRequired | Checks that field types are explicitly specified (and not using def). |
109 | FileCreateTempFile | The File.createTempFile() method is insecure, and has been deprecated by the ESAPI secure coding library. It has been replaced by the ESAPI Randomizer.getRandomFilename(String) method. |
110 | FinalClassWithProtectedMember | This rule finds classes marked final that contain protected methods. If a class is final then it may not be subclassed, and there is therefore no point in having a method with protected visibility. Either the class should not be final or the method should be private or protected. |
111 | ForLoopShouldBeWhileLoop | A for loop without an init and update statement can be simplified to a while loop. |
112 | ForStatementBraces | Use braces for for statements, even for a single statement. |
113 | GStringAsMapKey | A GString should not be used as a map key since its hashcode is not guaranteed to be stable. Consider calling key.toString(). |
114 | GStringExpressionWithinString | Check for regular (single quote) strings containing a GString-type expression (${...}). |
115 | GroovyLangImmutable | The groovy.lang.Immutable annotation has been deprecated and replaced by groovy.transform.Immutable. Do not use the Immutable in groovy.lang. |
116 | HardCodedWindowsFileSeparator | This rule finds usages of a Windows file separator within the constructor call of a File object. It is better to use the Unix file separator or use the File.separator constant. |
117 | HardCodedWindowsRootDirectory | This rule find cases where a File object is constructed with a windows-based path. This is not portable, and using the File.listRoots() method is a better alternative. |
118 | HashtableIsObsolete | The java.util.Hashtable class is effectively obsolete. Use the Java Collections Framework classes instead, including HashMap or ConcurrentHashMap. See the JDK javadoc. |
119 | IfStatementBraces | Use braces for if statements, even for a single statement. |
120 | IfStatementCouldBeTernary | Checks for if statements where both the if and else blocks contain only a single return statement with a constant or literal value |
121 | IllegalClassMember | Checks for classes containing fields/properties/methods matching configured illegal member modifiers or not matching any of the configured allowed member modifiers. |
122 | IllegalClassReference | Checks for reference to any of the classes configured in classNames. |
123 | IllegalPackageReference | Checks for reference to any of the packages configured in packageNames. |
124 | IllegalRegex | Checks for a specified illegal regular expression within the source code. The regex property specifies the regular expression to check for. It is required and cannot be null or empty. |
125 | IllegalString | Checks for a specified illegal string within the source code. |
126 | IllegalSubclass | Checks for classes that extend one of the specified set of illegal superclasses configured in superclassNames. |
127 | ImplementationAsType | Checks for use of a predefined set of concrete classes (e.g. ArrayList, Hashtable, ConcurrentHashMap) when specifying the type of a method parameter, closure parameter, constructor parameter, method return type or field type. The associated interfaces should be used to specify the type instead. |
128 | ImportFromSamePackage | An import of a class that is within the same package is unnecessary. |
129 | ImportFromSunPackages | Avoid importing anything from the 'sun.*' packages. These packages are not portable and are likely to change. |
130 | InconsistentPropertyLocking | Class contains similarly-named get and set methods where one method of the pair is marked either @WithReadLock or @WithWriteLock and the other is not locked at all. |
131 | InconsistentPropertySynchronization | Class contains similarly-named get and set methods where the set method is synchronized and the get method is not, or the get method is synchronized and the set method is not. |
132 | Indentation | Check indentation for class and method declarations, and initial statements. |
133 | InsecureRandom | Reports usages of java.util.Random, which can produce very predictable results. If two instances of Random are created with the same seed and sequence of method calls, they will generate the exact same results. Use java.security.SecureRandom instead, which provides a cryptographically strong random number generator. SecureRandom uses PRNG, which means they are using a deterministic algorithm to produce a pseudo-random number from a true random seed. SecureRandom produces non-deterministic output. |
134 | Instanceof | Checks for use of the instanceof operator. Use the ignoreTypeNames property to configure ignored type names. |
135 | IntegerGetInteger | This rule catches usages of java.lang.Integer.getInteger(String, ...) which reads an Integer from the System properties. It is often mistakenly used to attempt to read user input or parse a String into an Integer. It is a poor piece of API to use; replace it with System.properties['prop']. |
136 | InterfaceName | Verifies that the name of an interface matches a regular expression specified in the regex property. If that property is null or empty, then this rule is not applied (i.e., it does nothing). It defaults to null, so this rule must be explicitly configured to be active. |
137 | InterfaceNameSameAsSuperInterface | Checks for any interface that has an identical name to its super-interface, other than the package. This can be very confusing. |
138 | InvertedCondition | An inverted condition is one where a constant expression is used on the left hand side of the equals comparision. Such conditions can be confusing especially when used in assertions where the expected value is by convention placed on the right hand side of the comparision. |
139 | InvertedIfElse | An inverted if-else statement is one in which there is a single if statement with a single else branch and the boolean test of the if is negated. For instance if (!x) false else true. It is usually clearer to write this as if (x) true else false. |
140 | JUnitAssertAlwaysFails | Checks for JUnit assert() method calls with constant arguments such that the assertion always fails. This includes: assertTrue(false), assertFalse(true) and assertNull(CONSTANT). |
141 | JUnitAssertAlwaysSucceeds | Checks for JUnit assert() method calls with constant arguments such that the assertion always succeeds. This includes: assertTrue(true), assertFalse(false) and assertNull(null). |
142 | JUnitFailWithoutMessage | This rule detects JUnit calling the fail() method without an argument. For better error reporting you should always provide a message. |
143 | JUnitLostTest | Checks for classes that import JUnit 4 classes and contain a public, instance, void, no-arg method named test* that is not annotated with @Test. |
144 | JUnitPublicField | Checks for public field on a JUnit test class |
145 | JUnitPublicNonTestMethod | Checks if a JUnit test class contains public methods other than standard test methods, JUnit framework methods or methods with JUnit annotations. |
146 | JUnitPublicProperty | Checks for public properties defined on JUnit test classes. There should be no need to expose a public property on a test class. |
147 | JUnitSetUpCallsSuper | Checks that if the JUnit setUp() method is defined, that it includes a call to super.setUp(). |
148 | JUnitStyleAssertions | This rule detects calling JUnit style assertions like assertEquals, assertTrue, assertFalse, assertNull, assertNotNull. Groovy 1.7 ships with a feature called the "power assert", which is an assert statement with better error reporting. This is preferable to the JUnit assertions. |
149 | JUnitTearDownCallsSuper | Checks that if the JUnit tearDown() method is defined, that it includes a call to super.tearDown(). |
150 | JUnitTestMethodWithoutAssert | This rule searches for test methods that do not contain assert statements. Either the test method is missing assert statements, which is an error, or the test method contains custom assert statements that do not follow a proper assert naming convention. Test methods are defined as public void methods that begin with the work test or have a @Test annotation. By default this rule applies to the default test class names, but this can be changed using the rule's applyToClassNames property. |
151 | JUnitUnnecessarySetUp | Checks for JUnit setUp() methods that contain only a call to super.setUp(). |
152 | JUnitUnnecessaryTearDown | Checks for JUnit tearDown() methods that contain only a call to super.tearDown(). |
153 | JUnitUnnecessaryThrowsException | Check for throws clauses on JUnit test methods. That is not necessary in Groovy. |
154 | JavaIoPackageAccess | This rule reports violations of the Enterprise JavaBeans specification by using the java.io package to access files or the file system. |
155 | LineLength | Checks the maximum length for each line of source code. It checks for number of characters, so lines that include tabs may appear longer than the allowed number when viewing the file. The maximum line length can be configured by setting the length property, which defaults to 120. |
156 | LocaleSetDefault | Checks for calls to Locale.setDefault(), which sets the Locale across the entire JVM. |
157 | LoggerForDifferentClass | Checks for instantiating a logger (Log4J, SLF4J, Logback, Apache Commons Logging or Java Util Logging) for a class other than the current class. |
158 | LoggerWithWrongModifiers | Logger objects should be declared private, static and final. If subclasses should have access to a Logger in a parent class then the Logger should be declared protected, non-static and final. This rule find loggers that are not declared with these modifiers. |
159 | LoggingSwallowsStacktrace | If you are logging an exception then the proper API is to call error(Object, Throwable), which will log the message and the exception stack trace. If you call error(Object) then the stacktrace may not be logged. |
160 | LongLiteralWithLowerCaseL | In Java and Groovy, you can specify long literals with the L or l character, for instance 55L or 24l. It is best practice to always use an uppercase L and never a lowercase l. This is because 11l rendered in some fonts may look like 111 instead of 11L. |
161 | MethodCount | A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.The maxMethods property (30) specifies the threshold. |
162 | MethodParameterTypeRequired | Checks that method parameters are not dynamically typed, that is they are explicitly stated and different than def. |
163 | MethodReturnTypeRequired | Checks that method return types are not dynamic, that is they are explicitly stated and different than def. |
164 | MisorderedStaticImports | Static imports should never be declared after nonstatic imports. |
165 | MissingBlankLineAfterImports | Makes sure there is a blank line after the imports of a source code file. |
166 | MissingBlankLineAfterPackage | Makes sure there is a blank line after the package statement of a source code file. |
167 | MissingNewInThrowStatement | A common Groovy mistake when throwing exceptions is to forget the new keyword. For instance, "throw RuntimeException()" instead of "throw new RuntimeException()". If the error path is not unit tested then the production system will throw a Method Missing exception and hide the root cause. This rule finds constructs like "throw RuntimeException()" that look like a new keyword was meant to be used but forgotten. |
168 | MultipleLoggers | This rule catches classes that have more than one logger object defined. Typically, a class has zero or one logger objects. |
169 | MultipleUnaryOperators | Checks for multiple consecutive unary operators. These are confusing, and are likely typos and bugs. |
170 | NestedBlockDepth | Checks for blocks or closures nested more than maxNestedBlockDepth (5) levels deep. |
171 | NestedForLoop | Reports classes with nested for loops. |
172 | NestedSynchronization | Nested synchronized statements should be avoided. Nested synchronized statements are either useless (if the lock objects are identical) or prone to deadlock. |
173 | NoTabCharacter | Checks that all source files do not contain the tab character |
174 | NoWildcardImports | Wildcard imports, static or otherwise, should not be used. |
175 | NonFinalPublicField | Finds code that violates secure coding principles for mobile code by declaring a member variable public but not final. |
176 | NonFinalSubclassOfSensitiveInterface | The permissions classes such as java.security.Permission and java.security.BasicPermission are designed to be extended. Classes that derive from these permissions classes, however, must prohibit extension. This prohibition ensures that malicious subclasses cannot change the properties of the derived class. Classes that implement sensitive interfaces such as java.security.PrivilegedAction and java.security.PrivilegedActionException must also be declared final for analogous reasons. |
177 | ObjectFinalize | The finalize() method should only be called by the JVM after the object has been garbage collected. |
178 | ObjectOverrideMisspelledMethodName | Verifies that the names of the most commonly overridden methods of Object: equals, hashCode and toString, are correct. |
179 | PackageName | Verifies that the package name for a class matches a regular expression. By default it checks that the package name consists of only lowercase letters, separated by periods. The regex property specifies the regular expression used to validate the package name. The packageNameRequired property indicates whether a package name declaration is required for all classes. |
180 | PackageNameMatchesFilePath | A package source file's path should match the package itself. To find the package-relevant subpath in the file path the groupId needs to be configured. It is expected in every package declaration. |
181 | ParameterCount | Checks if the number of parameters in method/constructor exceeds the number of parameters specified by the maxParameters property. |
182 | ParameterName | Verifies that the name of each parameter matches a regular expression. This rule applies to method parameters, constructor parameters and closure parameters. By default it checks that parameter names start with a lowercase letter and contains only letters or numbers. The regex property specifies the default regular expression used to validate the parameter name. The ignoreParameterNames property (null) can specify parameter names that should be ignored, optionally containing wildcard characters ('*' or '?'). |
183 | ParameterReassignment | Checks for a method or closure parameter being reassigned to a new value within the body of the method/closure, which is a confusing and questionable practice. Use a temporary variable instead. |
184 | PrintStackTrace | Checks for calls to printStackTrace(). |
185 | Println | Checks for calls to this.print(), this.println() or this.printf(). |
186 | PrivateFieldCouldBeFinal | Checks for private fields that are only set within a constructor or field initializer. Such fields can safely be made final. |
187 | PropertyName | Verifies that the name of each property matches a regular expression. By default it checks that property names other than 'static final' start with a lowercase letter and contains only letters or numbers, and 'static final' property names start with an uppercase letter and contain only uppercase letters, numbers and underscores. The regex property specifies the default regular expression used to validate property names. The finalRegex property specifies the regular expression to validate 'final' property names. The staticRegex property specifies the regular expression to validate 'static' property names. The staticFinalRegex property specifies the regular expression to validate 'static final' property names. The ignorePropertyNames property (null) can specify property names that should be ignored, optionally containing wildcard characters ('*' or '?'). |
188 | PublicFinalizeMethod | Creates a violation when the program violates secure coding principles by declaring a finalize() method public. |
189 | PublicInstanceField | Using public fields is considered to be a bad design. Use properties instead. |
190 | RandomDoubleCoercedToZero | The Math.random() method returns a double result greater than or equal to 0.0 and less than 1.0. If you coerce this result into an Integer or int, then it is coerced to zero. Casting the result to int, or assigning it to an int field is probably a bug. |
191 | RemoveAllOnSelf | Don't use removeAll to clear a collection. If you want to remove all elements from a collection c, use c.clear, not c.removeAll(c). Calling c.removeAll(c) to clear a collection is less clear, susceptible to errors from typos, less efficient and for some collections, might throw a ConcurrentModificationException. |
192 | RequiredRegex | Checks for a specified regular expression that must exist within the source code. The regex property specifies the regular expression to check for. It is required and cannot be null or empty. |
193 | RequiredString | Checks for a specified text string that must exist within the source code. The string property specifies the String to check for. It is required and cannot be null or empty. |
194 | ReturnFromFinallyBlock | Returning from a finally block is confusing and can hide the original exception. |
195 | ReturnNullFromCatchBlock | Returning null from a catch block often masks errors and requires the client to handle error codes. In some coding styles this is discouraged. |
196 | ReturnsNullInsteadOfEmptyArray | Consider returning a zero length array rather than null. It is often a better design to return a length zero array rather than a null reference to indicate that there are no results (i.e., an empty list of results). This way, no explicit check for null is needed by clients of the method. |
197 | ReturnsNullInsteadOfEmptyCollection | Consider returning a zero length collection rather than null. It is often a better design to return a length zero collection rather than a null reference to indicate that there are no results (i.e., an empty list of results). This way, no explicit check for null is needed by clients of the method. |
198 | SerialPersistentFields | To use a Serializable object's serialPersistentFields correctly, it must be declared private, static, and final. |
199 | SerialVersionUID | A serialVersionUID is normally intended to be used with Serialization. It needs to be of type long, static, and final. Also, it should have a visibility modifier such as public or private. Providing no modifier creates a Property and Groovy generates a getter, which is probably not intended. |
200 | SerializableClassMustDefineSerialVersionUID | Classes that implement Serializable should define a serialVersionUID. If you don't define serialVersionUID, the system will make one by hashing most of your class's features. Then if you change anything, the UID will change and Java won't let you reload old data. |
201 | SimpleDateFormatMissingLocale | Be sure to specify a Locale when creating a new instance of SimpleDateFormat; the class is locale-sensitive. If you instantiate SimpleDateFormat without a Locale parameter, it will format the date and time according to the default Locale. Both the pattern and the Locale determine the format. For the same pattern, SimpleDateFormat may format a date and time differently if the Locale varies. |
202 | SpaceAfterCatch | Check that there is exactly one space (blank) after the catch keyword and before the opening parenthesis. |
203 | SpaceAfterComma | Checks that there is at least one space or whitespace following each comma. That includes checks for method and closure declaration parameter lists, method call parameter lists, Map literals and List literals. |
204 | SpaceAfterFor | Check that there is exactly one space (blank) after the for keyword and before the opening parenthesis. |
205 | SpaceAfterIf | Check that there is exactly one space (blank) after the if keyword and before the opening parenthesis. |
206 | SpaceAfterOpeningBrace | Check that there is at least one space (blank) or whitespace after each opening brace ("{") for method/class/interface declarations, closure expressions and block statements. |
207 | SpaceAfterSemicolon | Checks that there is at least one space or whitespace following each semicolon separating multiple statements on a single line or the clauses within a classic for loop. |
208 | SpaceAfterSwitch | Check that there is exactly one space (blank) after the switch keyword and before the opening parenthesis. |
209 | SpaceAfterWhile | Check that there is exactly one space (blank) after the while keyword and before the opening parenthesis. |
210 | SpaceAroundClosureArrow | Checks that there is whitespace around the closure arrow (->) symbol |
211 | SpaceAroundOperator | Check that there is at least one space (blank) or whitespace around each binary operator. |
212 | SpaceBeforeClosingBrace | Check that there is at least one space (blank) or whitespace before each closing brace ("}") for method/class/interface declarations, closure expressions and block statements. |
213 | SpockIgnoreRestUsed | If Spock's @IgnoreRest appears on any method, all non-annotated test methods are not executed. This behaviour is almost always unintended. It's fine to use @IgnoreRest locally during development, but when committing code, it should be removed. |
214 | StatelessClass | Checks for fields on classes that should remain "stateless" and reentrant. The ignoreFieldNames property (null) specifies one or more field names that should be ignored. The ignoreFieldTypes property specifies one or more field type names that should be ignored. Both can optionally contain wildcard characters ('*' or '?'). |
215 | StatelessSingleton | There is no point in creating a stateless Singleton because there is nothing within the class that needs guarding and no side effects to calling the constructor. Just create new instances of the object or write a Utility class with static methods. |
216 | StaticCalendarField | Calendar objects should not be used as static fields. Calendars are inherently unsafe for multihtreaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application. |
217 | StaticConnection | Creates violations when a java.sql.Connection object is used as a static field. Database connections stored in static fields will be shared between threads, which is unsafe and can lead to race conditions. |
218 | StaticDateFormatField | DateFormat objects should not be used as static fields. DateFormat are inherently unsafe for multithreaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application. |
219 | StaticMatcherField | Matcher objects should not be used as static fields. Matcher instances are inherently unsafe for multithreaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application. |
220 | StaticSimpleDateFormatField | SimpleDateFormat objects should not be used as static fields. SimpleDateFormat are inherently unsafe for multi-threaded use. Sharing a single instance across thread boundaries without proper synchronization will result in erratic behavior of the application. |
221 | SwallowThreadDeath | Checks for code that catches ThreadDeath without re-throwing it. |
222 | SynchronizedMethod | This rule reports uses of the synchronized keyword on methods. Synchronized methods are the same as synchronizing on 'this', which effectively make your synchronization policy public and modifiable by other objects. To avoid possibilities of deadlock, it is better to synchronize on internal objects. |
223 | SynchronizedOnBoxedPrimitive | The code synchronizes on a boxed primitive constant, such as an Integer. Since Integer objects can be cached and shared, this code could be synchronizing on the same object as other, unrelated code, leading to unresponsiveness and possible deadlock |
224 | SynchronizedOnGetClass | Synchronization on getClass rather than class literal. This instance method synchronizes on this.getClass(). If this class is subclassed, subclasses will synchronize on the class object for the subclass, which isn't likely what was intended. |
225 | SynchronizedOnReentrantLock | Synchronizing on a ReentrantLock field is almost never the intended usage. A ReentrantLock should be obtained using the lock() method and released in a finally block using the unlock() method. |
226 | SynchronizedOnString | Synchronization on a String field can lead to deadlock because Strings are interned by the JVM and can be shared. |
227 | SynchronizedOnThis | This rule reports uses of the synchronized blocks where the synchronization reference is 'this'. Doing this effectively makes your synchronization policy public and modifiable by other objects. To avoid possibilities of deadlock, it is better to synchronize on internal objects. |
228 | SynchronizedReadObjectMethod | Catches Serializable classes that define a synchronized readObject method. By definition, an object created by deserialization is only reachable by one thread, and thus there is no need for readObject() to be synchronized. If the readObject() method itself is causing the object to become visible to another thread, that is an example of very dubious coding style. |
229 | SystemErrPrint | Checks for calls to System.err.print(), System.err.println() or System.err.printf(). |
230 | SystemExit | Web applications should never call System.exit(). A call to System.exit() is probably part of leftover debug code or code imported from a non-J2EE application. |
231 | SystemOutPrint | Checks for calls to System.out.print(), System.out.println() or System.out.printf(). |
232 | SystemRunFinalizersOnExit | Method calls to System.runFinalizersOnExit() should not be allowed. This method is inherently non-thread-safe, may result in data corruption, deadlock, and may effect parts of the program far removed from it's call point. It is deprecated, and it's use strongly discouraged. |
233 | TernaryCouldBeElvis | Checks for ternary expressions where the boolean and true expressions are the same. These can be simplified to an Elvis expression. |
234 | ThisReferenceEscapesConstructor | Reports constructors passing the 'this' reference to other methods. This equals exposing a half-baked objects and can lead to race conditions during initialization. For reference, see Java Concurrency Gotchas by Alex Miller and Java theory and practice: Safe construction techniques by Brian Goetz. |
235 | ThreadGroup | Avoid using ThreadGroup; although it is intended to be used in a threaded environment it contains methods that are not thread safe. |
236 | ThreadLocalNotStaticFinal | ThreadLocal fields should be static and final. In the most common case a java.lang.ThreadLocal instance associates state with a thread. A non-static non-final java.lang.ThreadLocal field associates state with an instance-thread combination. This is seldom necessary and often a bug which can cause memory leaks and possibly incorrect behavior. |
237 | ThreadYield | Method calls to Thread.yield() should not be allowed. This method has no useful guaranteed semantics, and is often used by inexperienced programmers to mask race conditions. |
238 | ThrowError | Checks for throwing an instance of java.lang.Error. |
239 | ThrowException | Checks for throwing an instance of java.lang.Exception. |
240 | ThrowExceptionFromFinallyBlock | Throwing an exception from a finally block is confusing and can hide the original exception. |
241 | ThrowNullPointerException | Checks for throwing an instance of java.lang.NullPointerException. |
242 | ThrowRuntimeException | Checks for throwing an instance of java.lang.RuntimeException. |
243 | ThrowThrowable | Checks for throwing an instance of java.lang.Throwable. |
244 | ToStringReturnsNull | Checks for toString() methods that return null. |
245 | TrailingWhitespace | Checks that no lines of source code end with whitespace characters. |
246 | UnnecessaryBigIntegerInstantiation | It is unnecessary to instantiate BigInteger objects. Instead just use the literal with the 'G' identifier to force the type, such as 8G or 42G. |
247 | UnnecessaryBooleanExpression | Checks for unnecessary boolean expressions, including ANDing (&&) or ORing (||) with true, false, null, or a Map/List/String/Number literal. Also checks for negation (!) of true, false, null, or a Map/List/String/Number literal. |
248 | UnnecessaryBooleanInstantiation | Use Boolean.valueOf() for variable values or Boolean.TRUE and Boolean.FALSE for constant values instead of calling the Boolean() constructor directly or calling Boolean.valueOf(true) or Boolean.valueOf(false). |
249 | UnnecessaryCallForLastElement | This rule checks for excessively verbose methods of accessing the last element of an array or list. For instance, it is possible to access the last element of an array by performing array[array.length - 1], in Groovy it is simpler to either call array.last() or array[-1]. The same is true for lists. This violation is triggered whenever a get, getAt, or array-style access is used with an object size check. |
250 | UnnecessaryCallToSubstring | Calling String.substring(0) always returns the original string. This code is meaningless. |
251 | UnnecessaryCast | Checks for unnecessary cast operations |
252 | UnnecessaryCatchBlock | Violations are triggered when a catch block does nothing but throw the original exception. In this scenario there is usually no need for a catch block, just let the exception be thrown from the original code. This condition frequently occurs when catching an exception for debugging purposes but then forgetting to take the catch statement out. |
253 | UnnecessaryCollectCall | Some method calls to Object.collect(Closure) can be replaced with the spread operator. For instance, list.collect { it.multiply(2) } can be replaced by list*.multiply(2). Warning: if a collection is null, collect will return an empty list, while *. will return null. |
254 | UnnecessaryCollectionCall | Useless call to collections. This call doesn't make sense. For any collection c, calling c.containsAll(c) should always be true, and c.retainAll(c) should have no effect. |
255 | UnnecessaryConstructor | This rule detects when a constructor is not necessary; i.e., when there's only one constructor, it's public, has an empty body, and takes no arguments. |
256 | UnnecessaryDefInFieldDeclaration | If a field has a visibility modifier or a type declaration, then the def keyword is unneeded. For instance, 'static def constraints = {}' is redundant and can be simplified to 'static constraints = {}. |
257 | UnnecessaryDefInMethodDeclaration | If a method has a visibility modifier or a type declaration, then the def keyword is unneeded. For instance 'def private method() {}' is redundant and can be simplified to 'private method() {}'. |
258 | UnnecessaryDefInVariableDeclaration | If a variable has a visibility modifier or a type declaration, then the def keyword is unneeded. For instance 'def private n = 2' is redundant and can be simplified to 'private n = 2'. |
259 | UnnecessaryDotClass | To make a reference to a class, it is unnecessary to specify the '.class' identifier. For instance String.class can be shortened to String. |
260 | UnnecessaryDoubleInstantiation | It is unnecessary to instantiate Double objects. Instead just use the double literal or the 'D' identifier to force the type, such as 123.45d or 0.42d. |
261 | UnnecessaryElseStatement | When an if statement block ends with a return statement the else is unnecessary. The logic in the else branch can be run without being in a new scope. |
262 | UnnecessaryFail | In a unit test, catching an exception and immediately calling Assert.fail() is pointless and hides the stack trace. It is better to rethrow the exception or not catch the exception at all. |
263 | UnnecessaryFinalOnPrivateMethod | A private method is marked final. Private methods cannot be overridden, so marking it final is unnecessary. |
264 | UnnecessaryFloatInstantiation | It is unnecessary to instantiate Float objects. Instead just use the float literal with the 'F' identifier to force the type, such as 123.45F or 0.42f. |
265 | UnnecessaryGString | String objects should be created with single quotes, and GString objects created with double quotes. Creating normal String objects with double quotes is confusing to readers. |
266 | UnnecessaryGroovyImport | A Groovy file does not need to include an import for classes from java.lang, java.util, java.io, java.net, groovy.lang and groovy.util, as well as the classes java.math.BigDecimal and java.math.BigInteger. |
267 | UnnecessaryIfStatement | Checks for if statements where the if and else blocks (or subsequent fall-through to a return) are merely returning true and false constants. These cases can be replaced by a simple return statement. |
268 | UnnecessaryInstanceOfCheck | This rule finds instanceof checks that cannot possibly evaluate to true. For instance, checking that (!variable instanceof String) will never be true because the result of a not expression is always a boolean. |
269 | UnnecessaryInstantiationToGetClass | Avoid instantiating an object just to call getClass() on it; use the .class public member instead. |
270 | UnnecessaryIntegerInstantiation | It is unnecessary to instantiate Integer objects. Instead just use the literal with the 'I' identifier to force the type, such as 8I or 42i. |
271 | UnnecessaryLongInstantiation | It is unnecessary to instantiate Long objects. Instead just use the literal with the 'L' identifier to force the type, such as 8L or 42L. |
272 | UnnecessaryModOne | Any expression mod 1 (exp % 1) is guaranteed to always return zero. This code is probably an error, and should be either (exp & 1) or (exp % 2). |
273 | UnnecessaryNullCheck | Groovy contains the safe dereference operator, which can be used in boolean conditional statements to safely replace explicit "x == null" tests. |
274 | UnnecessaryNullCheckBeforeInstanceOf | There is no need to check for null before an instanceof; the instanceof keyword returns false when given a null argument. |
275 | UnnecessaryOverridingMethod | The overriding method merely calls the same method defined in a superclass |
276 | UnnecessaryPackageReference | Checks for explicit package reference for classes that Groovy imports by default, such as java.lang.String, java.util.Map and groovy.lang.Closure. |
277 | UnnecessaryParenthesesForMethodCallWithClosure | If a method is called and the only parameter to that method is an inline closure then the parentheses of the method call can be omitted. |
278 | UnnecessaryPublicModifier | The 'public' modifier is not required on methods or classes. |
279 | UnnecessaryReturnKeyword | In Groovy, the return keyword is often optional. If a statement is the last line in a method or closure then you do not need to have the return keyword. |
280 | UnnecessarySafeNavigationOperator | Check for the safe navigation operator (?.) applied to constants and literals, which can never be null. |
281 | UnnecessarySelfAssignment | Method contains a pointless self-assignment to a variable or property. |
282 | UnnecessaryStringInstantiation | Use a String literal (e.g., "...") instead of calling the corresponding String constructor (new String("..")) directly. |
283 | UnnecessarySubstring | This rule finds usages of String.substring(int) and String.substring(int, int) that can be replaced by use of the subscript operator. For instance, var.substring(5) can be replaced with var[5..-1]. |
284 | UnnecessaryTernaryExpression | Checks for ternary expressions where the conditional expression always evaluates to a boolean and the true and false expressions are merely returning true and false constants. Also checks for ternary expressions where both expressions are the same constant or variable. |
285 | UnnecessaryToString | Checks for unnecessary calls to toString(). |
286 | UnnecessaryTransientModifier | The field is marked as transient, but the class isn't Serializable, so marking it as transient has no effect. |
287 | UnsafeArrayDeclaration | Triggers a violation when an array is declared public, final, and static. Secure coding principles state that, in most cases, an array declared public, final and static is a bug because arrays are mutable objects. |
288 | UnusedArray | Checks for array allocations that are not assigned or used, unless it is the last statement within a block. |
289 | UnusedImport | Imports for a class that is never referenced within the source file is unnecessary. |
290 | UnusedMethodParameter | This rule finds instances of method parameters not being used. It does not analyze private methods (that is done by the UnusedPrivateMethodParameter rule) or methods marked @Override. |
291 | UnusedObject | Checks for object allocations that are not assigned or used, unless it is the last statement within a block |
292 | UnusedPrivateField | Checks for private fields that are not referenced within the same class. |
293 | UnusedPrivateMethod | Checks for private methods that are not referenced within the same class. |
294 | UnusedPrivateMethodParameter | Checks for parameters to private methods that are not referenced within the method body. |
295 | UnusedVariable | Checks for variables that are never referenced. The ignoreVariableNames property (null) specifies one or more variable names that should be ignored, optionally containing wildcard characters ('*' or '?'). |
296 | UseAssertEqualsInsteadOfAssertTrue | This rule detects JUnit assertions in object equality. These assertions should be made by more specific methods, like assertEquals. |
297 | UseAssertFalseInsteadOfNegation | In unit tests, if a condition is expected to be false then there is no sense using assertTrue with the negation operator. For instance, assertTrue(!condition) can always be simplified to assertFalse(condition) |
298 | UseAssertNullInsteadOfAssertEquals | This rule detects JUnit calling assertEquals where the first or second parameter is null. These assertion should be made against the assertNull method instead. |
299 | UseAssertSameInsteadOfAssertTrue | This rule detects JUnit calling assertTrue where the first or second parameter is an Object#is() call testing for reference equality. These assertion should be made against the assertSame method instead. |
300 | UseAssertTrueInsteadOfAssertEquals | This rule detects JUnit calling assertEquals where the first parameter is a boolean. These assertions should be made by more specific methods, like assertTrue or assertFalse. |
301 | UseAssertTrueInsteadOfNegation | In unit tests, if a condition is expected to be true then there is no sense using assertFalse with the negation operator. For instance, assertFalse(!condition) can always be simplified to assertTrue(condition) |
302 | UseCollectMany | In many case collectMany() yields the same result as collect{}.flatten(). It is easier to understand and more clearly conveys the intent. |
303 | UseCollectNested | Instead of nested collect{}-calls use collectNested{} |
304 | UseOfNotifyMethod | This code calls notify() rather than notifyAll(). Java monitors are often used for multiple conditions. Calling notify() only wakes up one thread, meaning that the thread woken up might not be the one waiting for the condition that the caller just satisfied. |
305 | VariableName | Verifies that the name of each method matches a regular expression. By default it checks that non-'final' variable names start with a lowercase letter and contains only letters or numbers, and 'final' variable names start with an uppercase letter and contain only uppercase letters, numbers and underscores. The regex property specifies the default regular expression used to validate a non-'final' variable name. The finalRegex property specifies the regular expression used to validate 'final' variable names. The ignoreVariableNames property (null) can specify variable names that should be ignored, optionally containing wildcard characters ('*' or '?'). |
306 | VariableTypeRequired | Checks that variable types are explicitly specified in declarations (and not using def) |
307 | VectorIsObsolete | The java.util.Vector class is effectively obsolete. Use the Java Collections Framework classes instead, including ArrayList or Collections.synchronizedList(). See the JDK javadoc. |
308 | VolatileArrayField | Volatile array fields are unsafe because the contents of the array are not treated as volatile. Changing the entire array reference is visible to other threads, but changing an array element is not. |
309 | VolatileLongOrDoubleField | Long or double fields should not be declared as volatile. Java specifies that reads and writes from such fields are atomic, but many JVM's have violated this specification. Unless you are certain of your JVM, it is better to synchronize access to such fields rather than declare them volatile. This rule flags fields marked volatile when their type is double or long or the name of their type is "Double" or "Long". |
310 | WaitOutsideOfWhileLoop | Calls to Object.wait() must be within a while loop. Consider using the Java concurrency utilities instead of wait() and notify(). |
311 | WhileStatementBraces | Use braces for while statements, even for a single statement. |