The following document contains the results of FindBugs Report
FindBugs Version is 1.2.0
Threshold is Low
Effort is Default
| Classes | Bugs | Errors | Missing Classes |
|---|---|---|---|
| 215 | 62 | 0 | 0 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Should com.intel.bluetooth.BluetoothEmulator.requireNativeLibraries() return a zero length array rather than null? | STYLE | PZLA_PREFER_ZERO_LENGTH_ARRAYS | 77 |
| Should com.intel.bluetooth.BluetoothEmulator.retrieveDevices(int) return a zero length array rather than null? | STYLE | PZLA_PREFER_ZERO_LENGTH_ARRAYS | 231 |
| Redundant nullcheck of com.intel.bluetooth.BluetoothEmulator.localDevice, which is known to be non-null in com.intel.bluetooth.BluetoothEmulator.connectionRfCloseClientConnection(long) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 298 |
| Redundant nullcheck of com.intel.bluetooth.BluetoothEmulator.localDevice, which is known to be non-null in com.intel.bluetooth.BluetoothEmulator.rfServerClose(long, ServiceRecordImpl) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 349 |
| Bug | Category | Details | Line |
|---|---|---|---|
| com.intel.bluetooth.EmulatorCommandReceiver.execute(DeviceCommand) invokes System.exit(...), which shuts down the entire virtual machine | BAD_PRACTICE | DM_EXIT | 84 |
| Null pointer dereference of out in com.intel.bluetooth.EmulatorCommandReceiver.threadDump(boolean) | CORRECTNESS | NP_ALWAYS_NULL | 126 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Result of integer multiplication cast to long in com.intel.bluetooth.EmulatorDeviceInquiry.randomWait(long, int) | STYLE | ICAST_INTEGER_MULTIPLY_CAST_TO_LONG | 137 |
| Unconditional wait in com.intel.bluetooth.EmulatorDeviceInquiry.randomWait(long, int) | MT_CORRECTNESS | UW_UNCOND_WAIT | 168 |
| Wait not in loop in com.intel.bluetooth.EmulatorDeviceInquiry.randomWait(long, int) | MT_CORRECTNESS | WA_NOT_IN_LOOP | 168 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Method com.intel.bluetooth.EmulatorLocalDevice.createL2CAPClient(long) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 264 |
| Method com.intel.bluetooth.EmulatorLocalDevice.createL2CAPService(int) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 243 |
| Method com.intel.bluetooth.EmulatorLocalDevice.createL2CAPService(int) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 252 |
| Method com.intel.bluetooth.EmulatorLocalDevice.createL2CAPService(int) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 253 |
| Method com.intel.bluetooth.EmulatorLocalDevice.createRFCOMMClient(long) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 233 |
| Method com.intel.bluetooth.EmulatorLocalDevice.createRFCOMMService() invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 213 |
| Method com.intel.bluetooth.EmulatorLocalDevice.createRFCOMMService() invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 214 |
| Method com.intel.bluetooth.EmulatorLocalDevice.getConnection(long) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 182 |
| Method com.intel.bluetooth.EmulatorLocalDevice.removeConnection(EmulatorConnection) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 190 |
| Method com.intel.bluetooth.EmulatorLocalDevice.removeConnection(EmulatorConnection) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 192 |
| Method com.intel.bluetooth.EmulatorLocalDevice.removeConnection(EmulatorConnection) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 194 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Unconditional wait in com.intel.bluetooth.emu.ConnectedInputStream.receiveFlushBlock() | MT_CORRECTNESS | UW_UNCOND_WAIT | 156 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Should com.intel.bluetooth.emu.ConnectionBufferRFCOMM.rfRead(int) return a zero length array rather than null? | STYLE | PZLA_PREFER_ZERO_LENGTH_ARRAYS | 63 |
| Bug | Category | Details | Line |
|---|---|---|---|
| com.intel.bluetooth.emu.Device.setDevicePower(boolean) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead | PERFORMANCE | DM_BOOLEAN_CTOR | 208 |
| Method com.intel.bluetooth.emu.Device.addConnectionBuffer(long, ConnectionBuffer) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 171 |
| Method com.intel.bluetooth.emu.Device.closeConnection(long) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 195 |
| Method com.intel.bluetooth.emu.Device.getConnectedTo() invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 86 |
| Method com.intel.bluetooth.emu.Device.getConnectionBuffer(long) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 176 |
| Result of integer multiplication cast to long in com.intel.bluetooth.emu.Device.isAlive() | STYLE | ICAST_INTEGER_MULTIPLY_CAST_TO_LONG | 241 |
| Result of integer multiplication cast to long in com.intel.bluetooth.emu.Device.pollCommand() | STYLE | ICAST_INTEGER_MULTIPLY_CAST_TO_LONG | 226 |
| Unconditional wait in com.intel.bluetooth.emu.Device.connectService(String, long) | MT_CORRECTNESS | UW_UNCOND_WAIT | 156 |
| Bug | Category | Details | Line |
|---|---|---|---|
| com.intel.bluetooth.emu.DeviceCommand.getParameters() may expose internal representation by returning DeviceCommand.parameters | MALICIOUS_CODE | EI_EXPOSE_REP | 62 |
| com.intel.bluetooth.emu.DeviceCommand.setParameters(Object[]) may expose internal representation by storing an externally mutable object into DeviceCommand.parameters | MALICIOUS_CODE | EI_EXPOSE_REP2 | 66 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Method com.intel.bluetooth.emu.DeviceManagerServiceImpl.isDiscoverable(DeviceDescriptor) uses the same code for two switch clauses | STYLE | DB_DUPLICATE_SWITCH_CLAUSES | 199 |
| Method com.intel.bluetooth.emu.DeviceManagerServiceImpl.createNewDevice(String, String) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 88 |
| Method com.intel.bluetooth.emu.DeviceManagerServiceImpl.getDevice(long) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 116 |
| Method com.intel.bluetooth.emu.DeviceManagerServiceImpl.getDevice(long) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 119 |
| Method com.intel.bluetooth.emu.DeviceManagerServiceImpl.releaseDevice(long) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 100 |
| Result of integer multiplication cast to long in com.intel.bluetooth.emu.DeviceManagerServiceImpl.isDiscoverable(DeviceDescriptor) | STYLE | ICAST_INTEGER_MULTIPLY_CAST_TO_LONG | 201 |
| Should com.intel.bluetooth.emu.DeviceManagerServiceImpl.searchServices(long, String[]) return a zero length array rather than null? | STYLE | PZLA_PREFER_ZERO_LENGTH_ARRAYS | 302 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Method com.intel.bluetooth.emu.DeviceSDP.getServicesDescriptor(long) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 69 |
| Method com.intel.bluetooth.emu.DeviceSDP.removeServiceRecord(long) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 62 |
| Method com.intel.bluetooth.emu.DeviceSDP.updateServiceRecord(long, ServicesDescriptor) invokes inefficient Long(long) constructor; use Long.valueOf(long) instead | PERFORMANCE | DM_NUMBER_CTOR | 49 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Usage of GetResource in com.intel.bluetooth.emu.EmulatorConfiguration.loadConfigFile() may be unsafe if class is extended | BAD_PRACTICE | UI_INHERITANCE_UNSAFE_GETRESOURCE | 169 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Result of integer multiplication cast to long in com.intel.bluetooth.emu.EmulatorUtils.getNextAvailable(Long[], long, int) | STYLE | ICAST_INTEGER_MULTIPLY_CAST_TO_LONG | 54 |
| Bug | Category | Details | Line |
|---|---|---|---|
| com.intel.bluetooth.emu.MonitorDevice.getConnectedTo() may expose internal representation by returning MonitorDevice.connectedTo | MALICIOUS_CODE | EI_EXPOSE_REP | 82 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Unwritten field: com.intel.bluetooth.emu.MonitorService.displayName | CORRECTNESS | UWF_UNWRITTEN_FIELD | 86 |
| Unwritten field: com.intel.bluetooth.emu.MonitorService.portId | CORRECTNESS | UWF_UNWRITTEN_FIELD | 70 |
| Unwritten field: com.intel.bluetooth.emu.MonitorService.connectionCount | CORRECTNESS | UWF_UNWRITTEN_FIELD | 66 |
| Unwritten field: com.intel.bluetooth.emu.MonitorService.device | CORRECTNESS | UWF_UNWRITTEN_FIELD | 58 |
| Unwritten field: com.intel.bluetooth.emu.MonitorService.internalHandle | CORRECTNESS | UWF_UNWRITTEN_FIELD | 74 |
| Unwritten field: com.intel.bluetooth.emu.MonitorService.listening | CORRECTNESS | UWF_UNWRITTEN_FIELD | 62 |
| Unwritten field: com.intel.bluetooth.emu.MonitorService.sdpAttributes | CORRECTNESS | UWF_UNWRITTEN_FIELD | 78 |
| Unwritten field: com.intel.bluetooth.emu.MonitorService.sdpSize | CORRECTNESS | UWF_UNWRITTEN_FIELD | 82 |
| Bug | Category | Details | Line |
|---|---|---|---|
| Confusing to have methods com.intel.bluetooth.emu.ServiceListener.getPortID() and com.intel.bluetooth.emu.MonitorService.getPortId() | BAD_PRACTICE | NM_CONFUSING | 82 |
| ServiceListener.serverDevice not initialized in constructor | STYLE | UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR | Not available |
| Unconditional wait in com.intel.bluetooth.emu.ServiceListener.accept(Device, boolean, boolean, int) | MT_CORRECTNESS | UW_UNCOND_WAIT | 94 |
| Unconditional wait in com.intel.bluetooth.emu.ServiceListener.connect(Device, boolean, boolean, int, long) | MT_CORRECTNESS | UW_UNCOND_WAIT | 165 |
| Bug | Category | Details | Line |
|---|---|---|---|
| com.intel.bluetooth.emu.ServicesDescriptor.getSdpBinary() may expose internal representation by returning ServicesDescriptor.sdpBinary | MALICIOUS_CODE | EI_EXPOSE_REP | 55 |
| com.intel.bluetooth.emu.ServicesDescriptor.getUuidSet() may expose internal representation by returning ServicesDescriptor.uuidSet | MALICIOUS_CODE | EI_EXPOSE_REP | 51 |
| com.intel.bluetooth.emu.ServicesDescriptor.ServicesDescriptor(String[], byte[], int) may expose internal representation by storing an externally mutable object into ServicesDescriptor.sdpBinary | MALICIOUS_CODE | EI_EXPOSE_REP2 | 46 |
| com.intel.bluetooth.emu.ServicesDescriptor.ServicesDescriptor(String[], byte[], int) may expose internal representation by storing an externally mutable object into ServicesDescriptor.uuidSet | MALICIOUS_CODE | EI_EXPOSE_REP2 | 45 |
| Bug | Category | Details | Line |
|---|---|---|---|
| The class com.intel.bluetooth.rmi.Client$ServiceProxy$1 could be refactored into a named _static_ inner class | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC_ANON | Not available |