# FindBugs Report

## Project Information

Project:

FindBugs version: 3.0.1

Code analyzed:

- E:\bfproject\main\TelephonyService\components\TelephonyService\build\TelephonyService.jar

## Metrics

4427 lines of code analyzed, in 114 classes, in 14 packages.

Metric | Total | Density*
--- | --- | ---
High Priority Warnings | 17 | 3.84
Medium Priority Warnings | 36 | 8.13
Total Warnings | 53 | 11.97

(* Defects per Thousand lines of non-commenting source statements)

## Contents

- Bad practice Warnings
- Correctness Warnings
- Experimental Warnings
- Internationalization Warnings
- Malicious code vulnerability Warnings
- Multithreaded correctness Warnings
- Performance Warnings
- Dodgy code Warnings
- Details

# Summary

Warning Type | Number
--- | ---
Bad practice Warnings | 3
Correctness Warnings | 6
Experimental Warnings | 4
Internationalization Warnings | 3
Malicious code vulnerability Warnings | 20
Multithreaded correctness Warnings | 1
Performance Warnings | 11
Dodgy code Warnings | 5
Total | 53

# Warnings

Click on a warning row to see full context information.

## Bad practice Warnings

Code | Warning
--- | ---
DE | com.adobe.connectpro.telephony.service.main.InitService.initGlobal(GlobalSettings, ServletContext) might ignore java.lang.Exception
| Bug type DE_MIGHT_IGNORE (click for details) In class com.adobe.connectpro.telephony.service.main.InitService In method com.adobe.connectpro.telephony.service.main.InitService.initGlobal(GlobalSettings, ServletContext) Exception class java.lang.Exception At InitService.java:[line 192] At InitService.java:[line 192]
RV | Exceptional return value of java.io.File.mkdirs() ignored in com.adobe.connectpro.telephony.adaptor.impl.AdaptorInstanceHandler.addPendingAudioDownload(String, String[], String[])
| Bug type RV_RETURN_VALUE_IGNORED_BAD_PRACTICE (click for details) In class com.adobe.connectpro.telephony.adaptor.impl.AdaptorInstanceHandler In method com.adobe.connectpro.telephony.adaptor.impl.AdaptorInstanceHandler.addPendingAudioDownload(String, String[], String[]) Called method java.io.File.mkdirs() At AdaptorInstanceHandler.java:[line 88]
RV | Exceptional return value of java.io.File.mkdir() ignored in com.adobe.connectpro.telephony.adaptor.impl.AdaptorInstanceHandler.audioDownloadComplete(String, boolean)
| Bug type RV_RETURN_VALUE_IGNORED_BAD_PRACTICE (click for details) In class com.adobe.connectpro.telephony.adaptor.impl.AdaptorInstanceHandler In method com.adobe.connectpro.telephony.adaptor.impl.AdaptorInstanceHandler.audioDownloadComplete(String, boolean) Called method java.io.File.mkdir() At AdaptorInstanceHandler.java:[line 138]

## Correctness Warnings

Code | Warning
--- | ---
NP | Possible null pointer dereference of target in com.adobe.connectpro.telephony.interservice.ServiceAPICallerBasic.openConnectionCheckRedirects(HttpURLConnection, String, Map)
| Bug type NP_NULL_ON_SOME_PATH (click for details) In class com.adobe.connectpro.telephony.interservice.ServiceAPICallerBasic In method com.adobe.connectpro.telephony.interservice.ServiceAPICallerBasic.openConnectionCheckRedirects(HttpURLConnection, String, Map) Value loaded from target Dereferenced at ServiceAPICallerBasic.java:[line 253] Null value at ServiceAPICallerBasic.java:[line 238] Known null at ServiceAPICallerBasic.java:[line 239]
NP | Possible null pointer dereference of target in com.adobe.connectpro.telephony.interservice.ServiceAPICallerBasic.openConnectionCheckRedirects(HttpURLConnection, String, Map)
| Bug type NP_NULL_ON_SOME_PATH (click for details) In class com.adobe.connectpro.telephony.interservice.ServiceAPICallerBasic In method com.adobe.connectpro.telephony.interservice.ServiceAPICallerBasic.openConnectionCheckRedirects(HttpURLConnection, String, Map) Value loaded from target Dereferenced at ServiceAPICallerBasic.java:[line 253] Known null at ServiceAPICallerBasic.java:[line 246]
NP | Possible null pointer dereference of sharedSecret in com.adobe.connectpro.telephony.service.servlet.XMLApiServlet.doPost(HttpServletRequest, HttpServletResponse)
| Bug type NP_NULL_ON_SOME_PATH (click for details) In class com.adobe.connectpro.telephony.service.servlet.XMLApiServlet In method com.adobe.connectpro.telephony.service.servlet.XMLApiServlet.doPost(HttpServletRequest, HttpServletResponse) Value loaded from sharedSecret Dereferenced at XMLApiServlet.java:[line 86] Known null at XMLApiServlet.java:[line 79]
NP | Possible null pointer dereference of inputStreamAES in com.adobe.connectpro.telephony.service.util.EncryptUtil.initKey(String)
| Bug type NP_NULL_ON_SOME_PATH (click for details) In class com.adobe.connectpro.telephony.service.util.EncryptUtil In method com.adobe.connectpro.telephony.service.util.EncryptUtil.initKey(String) Value loaded from inputStreamAES Dereferenced at EncryptUtil.java:[line 169] Null value at EncryptUtil.java:[line 166] Known null at EncryptUtil.java:[line 167]
NP | Possible null pointer dereference of inputStreamDES in com.adobe.connectpro.telephony.service.util.EncryptUtil.initKey(String)
| Bug type NP_NULL_ON_SOME_PATH (click for details) In class com.adobe.connectpro.telephony.service.util.EncryptUtil In method com.adobe.connectpro.telephony.service.util.EncryptUtil.initKey(String) Value loaded from inputStreamDES Dereferenced at EncryptUtil.java:[line 153] Null value at EncryptUtil.java:[line 149] Known null at EncryptUtil.java:[line 150]
USELESS_STRING | Invocation of toString on args in com.adobe.connectpro.telephony.service.rtmp.RTMPConnection.onResolve(String, Object[])
| Bug type DMI_INVOKING_TOSTRING_ON_ARRAY (click for details) In class com.adobe.connectpro.telephony.service.rtmp.RTMPConnection In method com.adobe.connectpro.telephony.service.rtmp.RTMPConnection.onResolve(String, Object[]) Local variable named args At RTMPConnection.java:[line 111]

## Experimental Warnings

Code | Warning
--- | ---
OBL | com.adobe.connectpro.telephony.service.main.InitService.initGlobal(GlobalSettings, ServletContext) may fail to clean up java.io.OutputStream
| Bug type OBL_UNSATISFIED_OBLIGATION (click for details) In class com.adobe.connectpro.telephony.service.main.InitService In method com.adobe.connectpro.telephony.service.main.InitService.initGlobal(GlobalSettings, ServletContext) Reference type java.io.OutputStream 1 instances of obligation remaining Obligation to clean up resource created at InitService.java:[line 164] is not discharged Path continues at InitService.java:[line 171] Path continues at InitService.java:[line 174] Path continues at InitService.java:[line 175] Path continues at InitService.java:[line 176] Path continues at InitService.java:[line 177] Path continues at InitService.java:[line 179] Path continues at InitService.java:[line 181] Path continues at InitService.java:[line 182] Path continues at InitService.java:[line 186] Path continues at InitService.java:[line 187] Path continues at InitService.java:[line 188] Path continues at InitService.java:[line 189] Path continues at InitService.java:[line 190] Path continues at InitService.java:[line 195] Path continues at InitService.java:[line 197] Path continues at InitService.java:[line 198] Path continues at InitService.java:[line 199] Path continues at InitService.java:[line 201] Path continues at InitService.java:[line 202] Path continues at InitService.java:[line 204] Path continues at InitService.java:[line 205] Path continues at InitService.java:[line 206] Path continues at InitService.java:[line 208] Path continues at InitService.java:[line 211] Path continues at InitService.java:[line 212] Remaining obligations: {OutputStream x 1}
OBL | com.adobe.connectpro.telephony.service.prefs.ConfigReader.initialize(String) may fail to clean up java.io.InputStream
| Bug type OBL_UNSATISFIED_OBLIGATION (click for details) In class com.adobe.connectpro.telephony.service.prefs.ConfigReader In method com.adobe.connectpro.telephony.service.prefs.ConfigReader.initialize(String) Reference type java.io.InputStream 1 instances of obligation remaining Obligation to clean up resource created at ConfigReader.java:[line 37] is not discharged Path continues at ConfigReader.java:[line 44] Path continues at ConfigReader.java:[line 45] Remaining obligations: {InputStream x 1}
OBL | com.adobe.connectpro.telephony.service.util.EncryptUtil.initKey(String) may fail to clean up java.io.InputStream on checked exception
| Bug type OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE (click for details) In class com.adobe.connectpro.telephony.service.util.EncryptUtil In method com.adobe.connectpro.telephony.service.util.EncryptUtil.initKey(String) Reference type java.io.InputStream 1 instances of obligation remaining Obligation to clean up resource created at EncryptUtil.java:[line 145] is not discharged Path continues at EncryptUtil.java:[line 149] Path continues at EncryptUtil.java:[line 153] Remaining obligations: {InputStream x 1}
OBL | com.adobe.connectpro.telephony.service.util.EncryptUtil.initPublicKey(String) may fail to clean up java.io.InputStream on checked exception
| Bug type OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE (click for details) In class com.adobe.connectpro.telephony.service.util.EncryptUtil In method com.adobe.connectpro.telephony.service.util.EncryptUtil.initPublicKey(String) Reference type java.io.InputStream 1 instances of obligation remaining Obligation to clean up resource created at EncryptUtil.java:[line 178] is not discharged Path continues at EncryptUtil.java:[line 181] Remaining obligations: {InputStream x 1}

## Internationalization Warnings

Code | Warning
--- | ---
Dm | Found reliance on default encoding in com.adobe.connectpro.telephony.service.prefs.capabilities.AdaptorCapabilities.parse(): String.getBytes()
| Bug type DM_DEFAULT_ENCODING (click for details) In class com.adobe.connectpro.telephony.service.prefs.capabilities.AdaptorCapabilities In method com.adobe.connectpro.telephony.service.prefs.capabilities.AdaptorCapabilities.parse() Called method String.getBytes() At AdaptorCapabilities.java:[line 343]
Dm | Found reliance on default encoding in com.adobe.connectpro.telephony.service.util.TextUtil.elementToString(Element): new String(byte[])
| Bug type DM_DEFAULT_ENCODING (click for details) In class com.adobe.connectpro.telephony.service.util.TextUtil In method com.adobe.connectpro.telephony.service.util.TextUtil.elementToString(Element) Called method new String(byte[]) At TextUtil.java:[line 1120]
Dm | Found reliance on default encoding in com.adobe.connectpro.telephony.service.util.TextUtil.generateMessageDigest(String, String): String.getBytes()
| Bug type DM_DEFAULT_ENCODING (click for details) In class com.adobe.connectpro.telephony.service.util.TextUtil In method com.adobe.connectpro.telephony.service.util.TextUtil.generateMessageDigest(String, String) Called method String.getBytes() At TextUtil.java:[line 261]

## Malicious code vulnerability Warnings

Code | Warning
--- | ---
EI | com.adobe.connectpro.telephony.adaptor.impl.RecordingInfo.getDownloadFiles() may expose internal representation by returning RecordingInfo.downloadFiles
| Bug type EI_EXPOSE_REP (click for details) In class com.adobe.connectpro.telephony.adaptor.impl.RecordingInfo In method com.adobe.connectpro.telephony.adaptor.impl.RecordingInfo.getDownloadFiles() Field com.adobe.connectpro.telephony.adaptor.impl.RecordingInfo.downloadFiles At RecordingInfo.java:[line 23]
EI2 | new com.adobe.connectpro.telephony.adaptor.impl.RecordingInfo(String, String[], String) may expose internal representation by storing an externally mutable object into RecordingInfo.downloadFiles
| Bug type EI_EXPOSE_REP2 (click for details) In class com.adobe.connectpro.telephony.adaptor.impl.RecordingInfo In method new com.adobe.connectpro.telephony.adaptor.impl.RecordingInfo(String, String[], String) Field com.adobe.connectpro.telephony.adaptor.impl.RecordingInfo.downloadFiles Local variable named downloadFiles At RecordingInfo.java:[line 12]
MS | com.adobe.connectpro.telephony.interservice.APIException.ERROR_ANY isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.interservice.APIException Field com.adobe.connectpro.telephony.interservice.APIException.ERROR_ANY At APIException.java:[line 7]
MS | com.adobe.connectpro.telephony.interservice.APIException.ERROR_API_RESPONSE_PARSING isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.interservice.APIException Field com.adobe.connectpro.telephony.interservice.APIException.ERROR_API_RESPONSE_PARSING At APIException.java:[line 10]
MS | com.adobe.connectpro.telephony.interservice.APIException.ERROR_SERVER_CONNECTING isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.interservice.APIException Field com.adobe.connectpro.telephony.interservice.APIException.ERROR_SERVER_CONNECTING At APIException.java:[line 9]
MS | com.adobe.connectpro.telephony.service.global.Constants.BREEZE_COOKIE_NAME isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.service.global.Constants Field com.adobe.connectpro.telephony.service.global.Constants.BREEZE_COOKIE_NAME At Constants.java:[line 12]
MS | com.adobe.connectpro.telephony.service.global.Constants.GENERAL_CONFIG_FILENAME isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.service.global.Constants Field com.adobe.connectpro.telephony.service.global.Constants.GENERAL_CONFIG_FILENAME At Constants.java:[line 5]
MS | com.adobe.connectpro.telephony.service.global.Constants.TELEPHONY_CAPABILITIES_FILENAME isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.service.global.Constants Field com.adobe.connectpro.telephony.service.global.Constants.TELEPHONY_CAPABILITIES_FILENAME At Constants.java:[line 7]
MS | com.adobe.connectpro.telephony.service.global.Constants.TELEPHONY_PROVIDERS_FILENAME isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.service.global.Constants Field com.adobe.connectpro.telephony.service.global.Constants.TELEPHONY_PROVIDERS_FILENAME At Constants.java:[line 8]
MS | com.adobe.connectpro.telephony.service.global.Constants.TELEPHONY_SETTINGS_FILENAME isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.service.global.Constants Field com.adobe.connectpro.telephony.service.global.Constants.TELEPHONY_SETTINGS_FILENAME At Constants.java:[line 6]
MS | com.adobe.connectpro.telephony.service.main.TelephonyManager.m_adaptorCapabilities should be package protected
| Bug type MS_PKGPROTECT (click for details) In class com.adobe.connectpro.telephony.service.main.TelephonyManager Field com.adobe.connectpro.telephony.service.main.TelephonyManager.m_adaptorCapabilities At TelephonyManager.java:[line 95]
MS | com.adobe.connectpro.telephony.service.main.TelephonyManager.m_adaptorSettings should be package protected
| Bug type MS_PKGPROTECT (click for details) In class com.adobe.connectpro.telephony.service.main.TelephonyManager Field com.adobe.connectpro.telephony.service.main.TelephonyManager.m_adaptorSettings At TelephonyManager.java:[line 98]
MS | com.adobe.connectpro.telephony.service.main.TelephonyManager.m_providerSettings should be package protected
| Bug type MS_PKGPROTECT (click for details) In class com.adobe.connectpro.telephony.service.main.TelephonyManager Field com.adobe.connectpro.telephony.service.main.TelephonyManager.m_providerSettings At TelephonyManager.java:[line 102]
MS | com.adobe.connectpro.telephony.service.main.TelephonyManager.actionMap isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.service.main.TelephonyManager Field com.adobe.connectpro.telephony.service.main.TelephonyManager.actionMap At TelephonyManager.java:[line 66]
MS | com.adobe.connectpro.telephony.service.main.TelephonyManager.m_adaptorInstanceHandlers isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.service.main.TelephonyManager Field com.adobe.connectpro.telephony.service.main.TelephonyManager.m_adaptorInstanceHandlers At TelephonyManager.java:[line 92]
MS | Public static com.adobe.connectpro.telephony.service.prefs.capabilities.AdaptorCapabilities.getV2CapIds() may expose internal representation by returning AdaptorCapabilities.m_v2capIds
| Bug type MS_EXPOSE_REP (click for details) In class com.adobe.connectpro.telephony.service.prefs.capabilities.AdaptorCapabilities In method com.adobe.connectpro.telephony.service.prefs.capabilities.AdaptorCapabilities.getV2CapIds() Field com.adobe.connectpro.telephony.service.prefs.capabilities.AdaptorCapabilities.m_v2capIds At AdaptorCapabilities.java:[line 160]
MS | com.adobe.connectpro.telephony.service.util.EncryptUtil.AESKey should be package protected
| Bug type MS_PKGPROTECT (click for details) In class com.adobe.connectpro.telephony.service.util.EncryptUtil Field com.adobe.connectpro.telephony.service.util.EncryptUtil.AESKey At EncryptUtil.java:[line 35]
MS | com.adobe.connectpro.telephony.service.util.EncryptUtil.DESKey should be package protected
| Bug type MS_PKGPROTECT (click for details) In class com.adobe.connectpro.telephony.service.util.EncryptUtil Field com.adobe.connectpro.telephony.service.util.EncryptUtil.DESKey At EncryptUtil.java:[line 34]
MS | com.adobe.connectpro.telephony.service.util.EncryptUtil.DEFAULT_INIT_VECTOR isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.service.util.EncryptUtil Field com.adobe.connectpro.telephony.service.util.EncryptUtil.DEFAULT_INIT_VECTOR At EncryptUtil.java:[line 37]
MS | com.adobe.connectpro.telephony.service.util.EncryptUtil.INIT_VECTOR_STR isn't final but should be
| Bug type MS_SHOULD_BE_FINAL (click for details) In class com.adobe.connectpro.telephony.service.util.EncryptUtil Field com.adobe.connectpro.telephony.service.util.EncryptUtil.INIT_VECTOR_STR At EncryptUtil.java:[line 38]

## Multithreaded correctness Warnings

Code | Warning
--- | ---
DC | Possible doublecheck on com.adobe.connectpro.telephony.service.global.GlobalSettings.instance in com.adobe.connectpro.telephony.service.global.GlobalSettings.getInstance()
| Bug type DC_DOUBLECHECK (click for details) In class com.adobe.connectpro.telephony.service.global.GlobalSettings In method com.adobe.connectpro.telephony.service.global.GlobalSettings.getInstance() On field com.adobe.connectpro.telephony.service.global.GlobalSettings.instance At GlobalSettings.java:[lines 45-49]

## Performance Warnings

Code | Warning
--- | ---
Dm | com.adobe.connectpro.telephony.service.action.BreezeCapabilityList.execute(RTMPConnection, AdaptorInstanceHandler, Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
| Bug type DM_BOOLEAN_CTOR (click for details) In class com.adobe.connectpro.telephony.service.action.BreezeCapabilityList In method com.adobe.connectpro.telephony.service.action.BreezeCapabilityList.execute(RTMPConnection, AdaptorInstanceHandler, Map) At BreezeCapabilityList.java:[line 38]
Dm | com.adobe.connectpro.telephony.service.action.BridgeCapabilityList.execute(RTMPConnection, AdaptorInstanceHandler, Map) invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead
| Bug type DM_BOOLEAN_CTOR (click for details) In class com.adobe.connectpro.telephony.service.action.BridgeCapabilityList In method com.adobe.connectpro.telephony.service.action.BridgeCapabilityList.execute(RTMPConnection, AdaptorInstanceHandler, Map) At BridgeCapabilityList.java:[line 38]
Dm | com.adobe.connectpro.telephony.service.action.BridgeCapabilityList.execute(RTMPConnection, AdaptorInstanceHandler, Map) invokes inefficient new String(String) constructor
| Bug type DM_STRING_CTOR (click for details) In class com.adobe.connectpro.telephony.service.action.BridgeCapabilityList In method com.adobe.connectpro.telephony.service.action.BridgeCapabilityList.execute(RTMPConnection, AdaptorInstanceHandler, Map) At BridgeCapabilityList.java:[line 34]
SBSC | com.adobe.connectpro.telephony.service.prefs.capabilities.AdaptorCapabilities.toString() concatenates strings using + in a loop
| Bug type SBSC_USE_STRINGBUFFER_CONCATENATION (click for details) In class com.adobe.connectpro.telephony.service.prefs.capabilities.AdaptorCapabilities In method com.adobe.connectpro.telephony.service.prefs.capabilities.AdaptorCapabilities.toString() At AdaptorCapabilities.java:[line 335]
SBSC | com.adobe.connectpro.telephony.service.servlet.XMLApiServlet.logRequestParams(Map, String) concatenates strings using + in a loop
| Bug type SBSC_USE_STRINGBUFFER_CONCATENATION (click for details) In class com.adobe.connectpro.telephony.service.servlet.XMLApiServlet In method com.adobe.connectpro.telephony.service.servlet.XMLApiServlet.logRequestParams(Map, String) At XMLApiServlet.java:[line 180]
SBSC | com.adobe.connectpro.telephony.service.util.TextUtil.byteToHex(byte[]) concatenates strings using + in a loop
| Bug type SBSC_USE_STRINGBUFFER_CONCATENATION (click for details) In class com.adobe.connectpro.telephony.service.util.TextUtil In method com.adobe.connectpro.telephony.service.util.TextUtil.byteToHex(byte[]) At TextUtil.java:[line 107]
UrF | Unread field: com.adobe.connectpro.telephony.service.prefs.TelephonyCapabilities.logger
| Bug type URF_UNREAD_FIELD (click for details) In class com.adobe.connectpro.telephony.service.prefs.TelephonyCapabilities Field com.adobe.connectpro.telephony.service.prefs.TelephonyCapabilities.logger At TelephonyCapabilities.java:[line 39]
UrF | Unread field: com.adobe.connectpro.telephony.service.rtmp.RTMPConnection.isDestroyed
| Bug type URF_UNREAD_FIELD (click for details) In class com.adobe.connectpro.telephony.service.rtmp.RTMPConnection Field com.adobe.connectpro.telephony.service.rtmp.RTMPConnection.isDestroyed At RTMPConnection.java:[line 28]
WMI | com.adobe.connectpro.telephony.service.prefs.TelephonyCapabilities.updateCapabilites() makes inefficient use of keySet iterator instead of entrySet iterator
| Bug type WMI_WRONG_MAP_ITERATOR (click for details) In class com.adobe.connectpro.telephony.service.prefs.TelephonyCapabilities In method com.adobe.connectpro.telephony.service.prefs.TelephonyCapabilities.updateCapabilites() Field com.adobe.connectpro.telephony.service.prefs.TelephonyCapabilities.m_telephonyAdaptors At TelephonyCapabilities.java:[line 154]
WMI | com.adobe.connectpro.telephony.service.util.InterfaceUtils.toTelephonyUserInfo(Map) makes inefficient use of keySet iterator instead of entrySet iterator
| Bug type WMI_WRONG_MAP_ITERATOR (click for details) In class com.adobe.connectpro.telephony.service.util.InterfaceUtils In method com.adobe.connectpro.telephony.service.util.InterfaceUtils.toTelephonyUserInfo(Map) At InterfaceUtils.java:[line 163]
WMI | com.adobe.connectpro.telephony.service.util.TextUtil.mapToString(Map) makes inefficient use of keySet iterator instead of entrySet iterator
| Bug type WMI_WRONG_MAP_ITERATOR (click for details) In class com.adobe.connectpro.telephony.service.util.TextUtil In method com.adobe.connectpro.telephony.service.util.TextUtil.mapToString(Map) At TextUtil.java:[line 591]

## Dodgy code Warnings

Code | Warning
--- | ---
DLS | Dead store to adaptorId in com.adobe.connectpro.telephony.adaptor.impl.AdaptorInstanceHandler.createConnection(Map)
| Bug type DLS_DEAD_LOCAL_STORE (click for details) In class com.adobe.connectpro.telephony.adaptor.impl.AdaptorInstanceHandler In method com.adobe.connectpro.telephony.adaptor.impl.AdaptorInstanceHandler.createConnection(Map) Local variable named adaptorId At AdaptorInstanceHandler.java:[line 286]
DLS | Dead store to capabilities in com.adobe.connectpro.telephony.service.action.ConferenceReconnect.execute(RTMPConnection, AdaptorInstanceHandler, Map)
| Bug type DLS_DEAD_LOCAL_STORE (click for details) In class com.adobe.connectpro.telephony.service.action.ConferenceReconnect In method com.adobe.connectpro.telephony.service.action.ConferenceReconnect.execute(RTMPConnection, AdaptorInstanceHandler, Map) Local variable named capabilities At ConferenceReconnect.java:[line 34]
DLS | Dead store to adaptorInstance in com.adobe.connectpro.telephony.service.action.HealthCheck.execute(RTMPConnection, AdaptorInstanceHandler, Map)
| Bug type DLS_DEAD_LOCAL_STORE (click for details) In class com.adobe.connectpro.telephony.service.action.HealthCheck In method com.adobe.connectpro.telephony.service.action.HealthCheck.execute(RTMPConnection, AdaptorInstanceHandler, Map) Local variable named adaptorInstance At HealthCheck.java:[line 17]
DLS | Dead store to capabilities in com.adobe.connectpro.telephony.service.action.InitConferenceSession.execute(RTMPConnection, AdaptorInstanceHandler, Map)
| Bug type DLS_DEAD_LOCAL_STORE (click for details) In class com.adobe.connectpro.telephony.service.action.InitConferenceSession In method com.adobe.connectpro.telephony.service.action.InitConferenceSession.execute(RTMPConnection, AdaptorInstanceHandler, Map) Local variable named capabilities At InitConferenceSession.java:[line 19]
NP | Possible null pointer dereference in com.adobe.connectpro.telephony.service.util.IOUtils.deleteFolder(File) due to return value of called method
| Bug type NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE (click for details) In class com.adobe.connectpro.telephony.service.util.IOUtils In method com.adobe.connectpro.telephony.service.util.IOUtils.deleteFolder(File) Value loaded from ? Dereferenced at IOUtils.java:[line 51] Known null at IOUtils.java:[line 51]

# Details

## DC_DOUBLECHECK: Possible double check of field

This method may contain an instance of double-checked locking. This idiom is not correct according to the semantics of the Java memory model. For more information, see the web page http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html.

## DE_MIGHT_IGNORE: Method might ignore exception

This method might ignore an exception. In general, exceptions should be handled or reported in some way, or they should be thrown out of the method.

## DLS_DEAD_LOCAL_STORE: Dead store to local variable

This instruction assigns a value to a local variable, but the value is not read or used in any subsequent instruction. Often, this indicates an error, because the value computed is never used.

Note that Sun's javac compiler often generates dead stores for final local variables. Because FindBugs is a bytecode-based tool, there is no easy way to eliminate these false positives.

## DM_BOOLEAN_CTOR: Method invokes inefficient Boolean constructor; use Boolean.valueOf(...) instead

Creating new instances of `java.lang.Boolean` wastes memory, since `Boolean` objects are immutable and there are only two useful values of this type. Use the `Boolean.valueOf()` method (or Java 1.5 autoboxing) to create `Boolean` objects instead.

## DM_STRING_CTOR: Method invokes inefficient new String(String) constructor

Using the `java.lang.String(String)` constructor wastes memory because the object so constructed will be functionally indistinguishable from the `String` passed as a parameter. Just use the argument `String` directly.

## DM_DEFAULT_ENCODING: Reliance on default encoding

Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behaviour to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly.

## EI_EXPOSE_REP: May expose internal representation by returning reference to mutable object

Returning a reference to a mutable object value stored in one of the object's fields exposes the internal representation of the object. If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Returning a new copy of the object is better approach in many situations.

## EI_EXPOSE_REP2: May expose internal representation by incorporating reference to mutable object

This code stores a reference to an externally mutable object into the internal representation of the object. If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important properties, you will need to do something different. Storing a copy of the object is better approach in many situations.

## MS_SHOULD_BE_FINAL: Field isn't final but should be

This static field public but not final, and could be changed by malicious code or by accident from another package. The field could be made final to avoid this vulnerability.

## MS_PKGPROTECT: Field should be package protected

A mutable static field could be changed by malicious code or by accident. The field could be made package protected to avoid this vulnerability.

## MS_EXPOSE_REP: Public static method may expose internal representation by returning array

A public static method returns a reference to an array that is part of the static state of the class. Any code that calls this method can freely modify the underlying array. One fix is to return a copy of the array.

## NP_NULL_ON_SOME_PATH: Possible null pointer dereference

There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a `NullPointerException` when the code is executed. Of course, the problem might be that the branch or statement is infeasible and that the null pointer exception can't ever be executed; deciding that is beyond the ability of FindBugs.

## NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE: Possible null pointer dereference due to return value of called method

The return value from a method is dereferenced without a null check, and the return value of that method is one that should generally be checked for null. This may lead to a `NullPointerException` when the code is executed.

## OBL_UNSATISFIED_OBLIGATION: Method may fail to clean up stream or resource

This method may fail to clean up (close, dispose of) a stream, database object, or other resource requiring an explicit cleanup operation.

In general, if a method opens a stream or other resource, the method should use a try/finally block to ensure that the stream or resource is cleaned up before the method returns.

This bug pattern is essentially the same as the OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE bug patterns, but is based on a different (and hopefully better) static analysis technique. We are interested is getting feedback about the usefulness of this bug pattern. To send feedback, either:

- send email to findbugs@cs.umd.edu
- file a bug report: http://findbugs.sourceforge.net/reportingBugs.html

In particular, the false-positive suppression heuristics for this bug pattern have not been extensively tuned, so reports about false positives are helpful to us.

See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes, for a description of the analysis technique.

## OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE: Method may fail to clean up stream or resource on checked exception

This method may fail to clean up (close, dispose of) a stream, database object, or other resource requiring an explicit cleanup operation.

In general, if a method opens a stream or other resource, the method should use a try/finally block to ensure that the stream or resource is cleaned up before the method returns.

This bug pattern is essentially the same as the OS_OPEN_STREAM and ODR_OPEN_DATABASE_RESOURCE bug patterns, but is based on a different (and hopefully better) static analysis technique. We are interested is getting feedback about the usefulness of this bug pattern. To send feedback, either:

- send email to findbugs@cs.umd.edu
- file a bug report: http://findbugs.sourceforge.net/reportingBugs.html

In particular, the false-positive suppression heuristics for this bug pattern have not been extensively tuned, so reports about false positives are helpful to us.

See Weimer and Necula, Finding and Preventing Run-Time Error Handling Mistakes, for a description of the analysis technique.

## RV_RETURN_VALUE_IGNORED_BAD_PRACTICE: Method ignores exceptional return value

This method returns a value that is not checked. The return value should be checked since it can indicate an unusual or unexpected function execution. For example, the `File.delete()` method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value.

## SBSC_USE_STRINGBUFFER_CONCATENATION: Method concatenates strings using + in a loop

The method seems to be building a String using concatenation in a loop. In each iteration, the String is converted to a StringBuffer/StringBuilder, appended to, and converted back to a String. This can lead to a cost quadratic in the number of iterations, as the growing string is recopied in each iteration.

Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 1.5) explicitly.

For example:

      // This is bad
      String s = "";
      for (int i = 0; i < field.length; ++i) {
        s = s + field[i];
      }

      // This is better
      StringBuffer buf = new StringBuffer();
      for (int i = 0; i < field.length; ++i) {
        buf.append(field[i]);
      }
      String s = buf.toString();

## URF_UNREAD_FIELD: Unread field

This field is never read. Consider removing it from the class.

## DMI_INVOKING_TOSTRING_ON_ARRAY: Invocation of toString on an array

The code invokes toString on an array, which will generate a fairly useless result such as [C@16f0472. Consider using Arrays.toString to convert the array into a readable String that gives the contents of the array. See Programming Puzzlers, chapter 3, puzzle 12.

## WMI_WRONG_MAP_ITERATOR: Inefficient use of keySet iterator instead of entrySet iterator

This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.