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()]
|
[position()=last()]
|
||||||
[@Array='true']
|
[@Array='true']
|
||||||
[@Varargs='false']
|
[@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>
|
]]></value>
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
|
@@ -69,6 +69,7 @@ method, do not varargs, allow byte[] as not varargs
|
|||||||
<code><![CDATA[
|
<code><![CDATA[
|
||||||
public class Foo {
|
public class Foo {
|
||||||
public void bar(File file, byte[] data) { }
|
public void bar(File file, byte[] data) { }
|
||||||
|
public void bar2(File file, byte data[]) { }
|
||||||
}
|
}
|
||||||
]]></code>
|
]]></code>
|
||||||
</test-code>
|
</test-code>
|
||||||
@@ -80,6 +81,7 @@ method, do not varargs, allow Byte[] as not varargs
|
|||||||
<code><![CDATA[
|
<code><![CDATA[
|
||||||
public class Foo {
|
public class Foo {
|
||||||
public void bar(File file, Byte[] data) { }
|
public void bar(File file, Byte[] data) { }
|
||||||
|
public void bar(File file, Byte data[]) { }
|
||||||
}
|
}
|
||||||
]]></code>
|
]]></code>
|
||||||
</test-code>
|
</test-code>
|
||||||
|
Reference in New Issue
Block a user