Skip to content

Commit 37039be

Browse files
committed
Replace inline array copy with Arrays.clone
1 parent 1e3be2f commit 37039be

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

pg/src/main/java/org/bouncycastle/bcpg/LiteralDataPacket.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,6 @@ public String getFileName()
6262
*/
6363
public byte[] getRawFileName()
6464
{
65-
byte[] tmp = new byte[fileName.length];
66-
67-
for (int i = 0; i != tmp.length; i++)
68-
{
69-
tmp[i] = fileName[i];
70-
}
71-
72-
return tmp;
65+
return Arrays.clone(fileName);
7366
}
7467
}

0 commit comments

Comments
 (0)