kashiwazakinenji / chromedevtools

Automatically exported from code.google.com/p/chromedevtools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

newOpenConnection method of SocketConnectionFactory throws NullPointerException if connectionLoggerFactory is null #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Google Chrome version:
SDK + Eclipse Debugger version(s): sdk 0.1.3 + eclipse n/a
OS + version: Windows XP and Windows 7

What steps will reproduce the problem?
1. Browser chromeBrowser = factory.create(addr, null);
2. tabFetcher = chromeBrowser.createTabFetcher();
3.

What is the expected result?
Should return a TabFetcher

What happens instead?
A NullPointerException is thrown

Please provide any additional information below. If possible, attach a
(reduced) test-case.

This method from the SocketConnectionFactory doesn't handle when the 
connectionLoggerFactory is null although the comments in the BrowserFactory 
create methods say that it may be null.

public SocketConnection newOpenConnection(NetListener netListener) throws 
IOException {
    SocketConnection connection = new SocketConnection(endpoint, 
connectionTimeoutMs,
       -> connectionLoggerFactory.newConnectionLogger() <-, handshaker);
    connection.setNetListener(netListener);
    connection.start();
    return connection;
  }

Original issue reported on code.google.com by rolyv19@gmail.com on 17 Nov 2009 at 3:05

GoogleCodeExporter commented 8 years ago
Oh yeah, it was stupid bug.
Do you feel like sending a patch perhaps? Or I'll fix it myself in a couple of 
days.

Peter

Original comment by peter.ry...@gmail.com on 17 Nov 2009 at 7:04

GoogleCodeExporter commented 8 years ago
http://codereview.chromium.org/432003/

Fix is in svn r. 274.

Original comment by peter.ry...@gmail.com on 23 Nov 2009 at 4:43