Merge "Fix array-related errorprone warnings"

This commit is contained in:
Cole Faust
2022-08-22 22:51:09 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 2 deletions

View File

@@ -790,7 +790,7 @@ public class PduParser {
try { try {
if (LOCAL_LOGV) { if (LOCAL_LOGV) {
Log.v(LOG_TAG, "parseHeaders: CONTENT_TYPE: " + headerField + Log.v(LOG_TAG, "parseHeaders: CONTENT_TYPE: " + headerField +
contentType.toString()); Arrays.toString(contentType));
} }
headers.setTextString(contentType, PduHeaders.CONTENT_TYPE); headers.setTextString(contentType, PduHeaders.CONTENT_TYPE);
} catch(NullPointerException e) { } catch(NullPointerException e) {

View File

@@ -8,6 +8,7 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.net.Socket; import java.net.Socket;
import java.util.Arrays;
/** /**
* Handles reading and writing of messages with socket buffers. Uses a Handler * Handles reading and writing of messages with socket buffers. Uses a Handler
@@ -47,7 +48,7 @@ public class ChatManager implements Runnable {
} }
// Send the obtained bytes to the UI Activity // Send the obtained bytes to the UI Activity
Log.d(TAG, "Rec:" + String.valueOf(buffer)); Log.d(TAG, "Rec:" + Arrays.toString(buffer));
handler.obtainMessage(WiFiServiceDiscoveryActivity.MESSAGE_READ, handler.obtainMessage(WiFiServiceDiscoveryActivity.MESSAGE_READ,
bytes, -1, buffer).sendToTarget(); bytes, -1, buffer).sendToTarget();
} catch (IOException e) { } catch (IOException e) {