NullPointerException when device on selected COM port does not return a name

Not sure if this is the correct forum for this, as it's more a bug report than a request for help.
I've also posted a bug report in github.

I'm receiving the following error with the newly downloaded Arduino IDE 1.6.5-r4, when compiling any sketch.

at cc.arduino.LoadVIDPIDSpecificPreferences.load(

I need to have my Arduino Pro Mini board (most likely a Chinese knock-off) connected via USB and have that COM port selected for this error to show up. The port shows up as e.g. COM4, with no additional parenthesis like my Arduino Uno which shows up as COM7 (Arduino Uno).

Disconnecting this device (i.e. selecting none), or connecting and selecting my Arduino Uno, allows me to compile.

Source file at fault:

This file is new as of 1.6.5-r4

Line 48:
int VIDPIDIndex = findVIDPIDIndex(prefs, boardPort.getPrefs().get("vid").toUpperCase(), boardPort.getPrefs().get("pid").toUpperCase());

One, or likely both, of the boardPort.getPrefs().get(String) functions returns null, which throws this exception when calling .toUpperCase() on a null value (default return value from java.util.LinkedHashMap.get() when no match is found).