forked from phoedos/pmd
Allow byte[] data and byte data[] as no-varargs last argument
This commit is contained in:
@@ -1771,7 +1771,8 @@ having to deal with the creation of an array.
|
||||
[position()=last()]
|
||||
[@Array='true']
|
||||
[@Varargs='false']
|
||||
[not (./Type/ReferenceType[@Array='true'][PrimitiveType[@Image='byte']] or ./Type/ReferenceType[@Array='true'][ClassOrInterfaceType[@Image='Byte']])]
|
||||
[not (./Type/ReferenceType[@Array='true'][PrimitiveType[@Image='byte']] or ./Type/ReferenceType[ClassOrInterfaceType[@Image='Byte']])]
|
||||
[not (./Type/PrimitiveType[@Image='byte'])]
|
||||
]]></value>
|
||||
</property>
|
||||
</properties>
|
||||
|
@@ -69,6 +69,7 @@ method, do not varargs, allow byte[] as not varargs
|
||||
<code><![CDATA[
|
||||
public class Foo {
|
||||
public void bar(File file, byte[] data) { }
|
||||
public void bar2(File file, byte data[]) { }
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
@@ -80,6 +81,7 @@ method, do not varargs, allow Byte[] as not varargs
|
||||
<code><![CDATA[
|
||||
public class Foo {
|
||||
public void bar(File file, Byte[] data) { }
|
||||
public void bar(File file, Byte data[]) { }
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
Reference in New Issue
Block a user