aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2011-11-23 15:24:23 +0000
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2011-11-23 15:24:23 +0000
commit97c97514d72251932e19c311e7cf933bb37a38fd (patch)
tree7d02cb462049f453875fe924e376847cf8c9c07c /src/net/java/sip/communicator
parent4793652a944a90d9e47f98f3a725f4c50a2f3ebd (diff)
downloadjitsi-97c97514d72251932e19c311e7cf933bb37a38fd.zip
jitsi-97c97514d72251932e19c311e7cf933bb37a38fd.tar.gz
jitsi-97c97514d72251932e19c311e7cf933bb37a38fd.tar.bz2
Fixes possible NullPointerExceptions related to packet logging, resources.
Diffstat (limited to 'src/net/java/sip/communicator')
-rw-r--r--src/net/java/sip/communicator/impl/certificate/CertificateVerificationActivator.java4
-rw-r--r--src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java2
-rw-r--r--src/net/java/sip/communicator/impl/fileaccess/FileAccessServiceImpl.java4
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/NeomediaActivator.java14
-rwxr-xr-xsrc/net/java/sip/communicator/impl/neomedia/RTPConnectorInputStream.java12
-rwxr-xr-xsrc/net/java/sip/communicator/impl/neomedia/RTPConnectorOutputStream.java12
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/RTPConnectorTCPInputStream.java30
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/RTPConnectorTCPOutputStream.java27
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/RTPConnectorUDPInputStream.java27
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/RTPConnectorUDPOutputStream.java27
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/device/DeviceConfiguration.java12
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/device/JmfDeviceDetector.java4
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/device/VideoMediaDeviceSession.java9
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/format/ParameterizedVideoFormat.java5
-rw-r--r--src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractBufferCaptureDevice.java2
-rw-r--r--src/net/java/sip/communicator/impl/netaddr/NetaddrActivator.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java5
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/ProtocolIconJabberImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/SipActivator.java10
-rw-r--r--src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java2
-rw-r--r--src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java27
-rw-r--r--src/net/java/sip/communicator/impl/version/VersionActivator.java2
-rw-r--r--src/net/java/sip/communicator/service/httputil/HttpUtilActivator.java4
-rw-r--r--src/net/java/sip/communicator/service/protocol/ProtocolProviderActivator.java3
-rw-r--r--src/net/java/sip/communicator/service/protocol/media/ProtocolMediaActivator.java3
25 files changed, 154 insertions, 99 deletions
diff --git a/src/net/java/sip/communicator/impl/certificate/CertificateVerificationActivator.java b/src/net/java/sip/communicator/impl/certificate/CertificateVerificationActivator.java
index 56504ee..40067d6 100644
--- a/src/net/java/sip/communicator/impl/certificate/CertificateVerificationActivator.java
+++ b/src/net/java/sip/communicator/impl/certificate/CertificateVerificationActivator.java
@@ -76,6 +76,10 @@ public class CertificateVerificationActivator
*/
public void stop(BundleContext bc) throws Exception
{
+ configService = null;
+ fileAccessService = null;
+ resourcesService = null;
+ credService = null;
}
/**
diff --git a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java
index 099d9bc..02ca490 100644
--- a/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/configuration/ConfigurationServiceImpl.java
@@ -1069,7 +1069,7 @@ public class ConfigurationServiceImpl
catch (ClassNotFoundException cnfe)
{
}
- if (clazz != null
+ if ((clazz != null)
&& ConfigurationStore.class.isAssignableFrom(clazz))
defaultConfigurationStoreClass
= (Class<? extends ConfigurationStore>) clazz;
diff --git a/src/net/java/sip/communicator/impl/fileaccess/FileAccessServiceImpl.java b/src/net/java/sip/communicator/impl/fileaccess/FileAccessServiceImpl.java
index c5f9de6..ede6095 100644
--- a/src/net/java/sip/communicator/impl/fileaccess/FileAccessServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/fileaccess/FileAccessServiceImpl.java
@@ -386,9 +386,7 @@ public class FileAccessServiceImpl implements FileAccessService
// would be the home directory (i.e. the Desktop folder).
if (OSUtils.IS_WINDOWS && getMajorOSVersion() <= 5)
{
- FileSystemView fsv = FileSystemView.getFileSystemView();
-
- downloadDir = fsv.getHomeDirectory();
+ downloadDir = FileSystemView.getFileSystemView().getHomeDirectory();
}
// For all other operating systems we return the Downloads folder.
else
diff --git a/src/net/java/sip/communicator/impl/neomedia/NeomediaActivator.java b/src/net/java/sip/communicator/impl/neomedia/NeomediaActivator.java
index e3ec691..8cdcf93 100644
--- a/src/net/java/sip/communicator/impl/neomedia/NeomediaActivator.java
+++ b/src/net/java/sip/communicator/impl/neomedia/NeomediaActivator.java
@@ -266,6 +266,12 @@ public class NeomediaActivator
{
mediaServiceImpl.stop();
mediaServiceRegistration.unregister();
+
+ configurationService = null;
+ fileAccessService = null;
+ networkAddressManagerService = null;
+ resources = null;
+ uiService = null;
}
/**
@@ -389,12 +395,10 @@ public class NeomediaActivator
{
if (packetLoggingService == null)
{
- ServiceReference plReference
- = bundleContext.getServiceReference(
- PacketLoggingService.class.getName());
-
packetLoggingService
- = (PacketLoggingService)bundleContext.getService(plReference);
+ = ServiceUtils.getService(
+ bundleContext,
+ PacketLoggingService.class);
}
return packetLoggingService;
}
diff --git a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorInputStream.java b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorInputStream.java
index f974838..9e9b904 100755
--- a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorInputStream.java
+++ b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorInputStream.java
@@ -262,11 +262,15 @@ public abstract class RTPConnectorInputStream
break;
}
- if(RTPConnectorOutputStream.logPacket(numberOfPackets)
- && NeomediaActivator.getPacketLogging().isLoggingEnabled(
- PacketLoggingService.ProtocolName.RTP))
+ if(RTPConnectorOutputStream.logPacket(numberOfPackets))
{
- doLogPacket(p);
+ PacketLoggingService packetLogging
+ = NeomediaActivator.getPacketLogging();
+
+ if ((packetLogging != null)
+ && packetLogging.isLoggingEnabled(
+ PacketLoggingService.ProtocolName.RTP))
+ doLogPacket(p);
}
pkt = createRawPacket(p);
diff --git a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorOutputStream.java b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorOutputStream.java
index f45b770..9728cd3 100755
--- a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorOutputStream.java
+++ b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorOutputStream.java
@@ -227,11 +227,15 @@ public abstract class RTPConnectorOutputStream
{
sendToTarget(packet, target);
- if(logPacket(numberOfPackets)
- && NeomediaActivator.getPacketLogging().isLoggingEnabled(
- PacketLoggingService.ProtocolName.RTP))
+ if(logPacket(numberOfPackets))
{
- doLogPacket(packet, target);
+ PacketLoggingService packetLogging
+ = NeomediaActivator.getPacketLogging();
+
+ if ((packetLogging != null)
+ && packetLogging.isLoggingEnabled(
+ PacketLoggingService.ProtocolName.RTP))
+ doLogPacket(packet, target);
}
}
catch (IOException ex)
diff --git a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorTCPInputStream.java b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorTCPInputStream.java
index 9b1db2b..f0154f8 100644
--- a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorTCPInputStream.java
+++ b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorTCPInputStream.java
@@ -86,19 +86,23 @@ public class RTPConnectorTCPInputStream
if(socket.getLocalAddress() == null)
return;
- NeomediaActivator.getPacketLogging()
- .logPacket(
- PacketLoggingService.ProtocolName.RTP,
- p.getAddress() != null ?
- p.getAddress().getAddress() : new byte[]{0,0,0,0},
- p.getPort(),
- socket.getLocalAddress().getAddress(),
- socket.getLocalPort(),
- PacketLoggingService.TransportName.TCP,
- false,
- p.getData(),
- p.getOffset(),
- p.getLength());
+ PacketLoggingService packetLogging
+ = NeomediaActivator.getPacketLogging();
+
+ if (packetLogging != null)
+ packetLogging.logPacket(
+ PacketLoggingService.ProtocolName.RTP,
+ (p.getAddress() != null)
+ ? p.getAddress().getAddress()
+ : new byte[] { 0,0,0,0 },
+ p.getPort(),
+ socket.getLocalAddress().getAddress(),
+ socket.getLocalPort(),
+ PacketLoggingService.TransportName.TCP,
+ false,
+ p.getData(),
+ p.getOffset(),
+ p.getLength());
}
/**
diff --git a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorTCPOutputStream.java b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorTCPOutputStream.java
index ea53859..b72243a 100644
--- a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorTCPOutputStream.java
+++ b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorTCPOutputStream.java
@@ -60,18 +60,21 @@ public class RTPConnectorTCPOutputStream
@Override
protected void doLogPacket(RawPacket packet, InetSocketAddress target)
{
- NeomediaActivator.getPacketLogging()
- .logPacket(
- PacketLoggingService.ProtocolName.RTP,
- socket.getLocalAddress().getAddress(),
- socket.getLocalPort(),
- target.getAddress().getAddress(),
- target.getPort(),
- PacketLoggingService.TransportName.TCP,
- true,
- packet.getBuffer(),
- packet.getOffset(),
- packet.getLength());
+ PacketLoggingService packetLogging
+ = NeomediaActivator.getPacketLogging();
+
+ if (packetLogging != null)
+ packetLogging.logPacket(
+ PacketLoggingService.ProtocolName.RTP,
+ socket.getLocalAddress().getAddress(),
+ socket.getLocalPort(),
+ target.getAddress().getAddress(),
+ target.getPort(),
+ PacketLoggingService.TransportName.TCP,
+ true,
+ packet.getBuffer(),
+ packet.getOffset(),
+ packet.getLength());
}
/**
diff --git a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorUDPInputStream.java b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorUDPInputStream.java
index e79065c..3ca3888 100644
--- a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorUDPInputStream.java
+++ b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorUDPInputStream.java
@@ -70,18 +70,21 @@ public class RTPConnectorUDPInputStream
if(socket.getLocalAddress() == null)
return;
- NeomediaActivator.getPacketLogging()
- .logPacket(
- PacketLoggingService.ProtocolName.RTP,
- p.getAddress().getAddress(),
- p.getPort(),
- socket.getLocalAddress().getAddress(),
- socket.getLocalPort(),
- PacketLoggingService.TransportName.UDP,
- false,
- p.getData(),
- p.getOffset(),
- p.getLength());
+ PacketLoggingService packetLogging
+ = NeomediaActivator.getPacketLogging();
+
+ if (packetLogging != null)
+ packetLogging.logPacket(
+ PacketLoggingService.ProtocolName.RTP,
+ p.getAddress().getAddress(),
+ p.getPort(),
+ socket.getLocalAddress().getAddress(),
+ socket.getLocalPort(),
+ PacketLoggingService.TransportName.UDP,
+ false,
+ p.getData(),
+ p.getOffset(),
+ p.getLength());
}
/**
diff --git a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorUDPOutputStream.java b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorUDPOutputStream.java
index fa52196..98fb4e7 100644
--- a/src/net/java/sip/communicator/impl/neomedia/RTPConnectorUDPOutputStream.java
+++ b/src/net/java/sip/communicator/impl/neomedia/RTPConnectorUDPOutputStream.java
@@ -62,18 +62,21 @@ public class RTPConnectorUDPOutputStream
@Override
protected void doLogPacket(RawPacket packet, InetSocketAddress target)
{
- NeomediaActivator.getPacketLogging()
- .logPacket(
- PacketLoggingService.ProtocolName.RTP,
- socket.getLocalAddress().getAddress(),
- socket.getLocalPort(),
- target.getAddress().getAddress(),
- target.getPort(),
- PacketLoggingService.TransportName.UDP,
- true,
- packet.getBuffer(),
- packet.getOffset(),
- packet.getLength());
+ PacketLoggingService packetLogging
+ = NeomediaActivator.getPacketLogging();
+
+ if (packetLogging != null)
+ packetLogging.logPacket(
+ PacketLoggingService.ProtocolName.RTP,
+ socket.getLocalAddress().getAddress(),
+ socket.getLocalPort(),
+ target.getAddress().getAddress(),
+ target.getPort(),
+ PacketLoggingService.TransportName.UDP,
+ true,
+ packet.getBuffer(),
+ packet.getOffset(),
+ packet.getLength());
}
/**
diff --git a/src/net/java/sip/communicator/impl/neomedia/device/DeviceConfiguration.java b/src/net/java/sip/communicator/impl/neomedia/device/DeviceConfiguration.java
index 480cb69..33e20d0 100644
--- a/src/net/java/sip/communicator/impl/neomedia/device/DeviceConfiguration.java
+++ b/src/net/java/sip/communicator/impl/neomedia/device/DeviceConfiguration.java
@@ -6,19 +6,21 @@
*/
package net.java.sip.communicator.impl.neomedia.device;
-import java.awt.Dimension;
+import java.awt.*;
import java.beans.*;
import java.io.*;
import java.util.*;
+import java.util.List;
import javax.media.*;
import javax.media.format.*;
import net.java.sip.communicator.impl.neomedia.*;
+import net.java.sip.communicator.impl.neomedia.codec.*;
import net.java.sip.communicator.impl.neomedia.codec.video.*;
import net.java.sip.communicator.impl.neomedia.jmfext.media.renderer.audio.*;
-import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.configuration.*;
+import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.util.*;
/**
@@ -432,7 +434,8 @@ public class DeviceConfiguration
{
new AVFrameFormat(),
new VideoFormat(VideoFormat.RGB),
- new VideoFormat(VideoFormat.YUV)
+ new VideoFormat(VideoFormat.YUV),
+ new VideoFormat(Constants.H264)
};
for (Format format : formats)
@@ -591,7 +594,8 @@ public class DeviceConfiguration
{
new AVFrameFormat(),
new VideoFormat(VideoFormat.RGB),
- new VideoFormat(VideoFormat.YUV)
+ new VideoFormat(VideoFormat.YUV),
+ new VideoFormat(Constants.H264)
};
Set<CaptureDeviceInfo> videoCaptureDevices =
new HashSet<CaptureDeviceInfo>();
diff --git a/src/net/java/sip/communicator/impl/neomedia/device/JmfDeviceDetector.java b/src/net/java/sip/communicator/impl/neomedia/device/JmfDeviceDetector.java
index d859a98..7806d66 100644
--- a/src/net/java/sip/communicator/impl/neomedia/device/JmfDeviceDetector.java
+++ b/src/net/java/sip/communicator/impl/neomedia/device/JmfDeviceDetector.java
@@ -94,9 +94,7 @@ public class JmfDeviceDetector
String author = (String)Registry.get(PROP_REGISTRY_AUTHOR);
if(author != null)
- {
return;
- }
Registry.set(PROP_ALLOW_CAPTURE_FROM_APPLETS, new Boolean(true));
Registry.set(PROP_ALLOW_SAVE_FILE_FROM_APPLETS, new Boolean(true));
@@ -147,9 +145,7 @@ public class JmfDeviceDetector
/* remove video devices */
for(CaptureDeviceInfo dev : copyDevInfos)
- {
CaptureDeviceManager.removeDevice(dev);
- }
// XXX repopulates only the desktop streaming devices for the moment
try
diff --git a/src/net/java/sip/communicator/impl/neomedia/device/VideoMediaDeviceSession.java b/src/net/java/sip/communicator/impl/neomedia/device/VideoMediaDeviceSession.java
index e825def..ffdc1a1 100644
--- a/src/net/java/sip/communicator/impl/neomedia/device/VideoMediaDeviceSession.java
+++ b/src/net/java/sip/communicator/impl/neomedia/device/VideoMediaDeviceSession.java
@@ -139,7 +139,8 @@ public class VideoMediaDeviceSession
* @param device the video <tt>MediaDevice</tt> the use of which by a
* <tt>MediaStream</tt> is to be represented by the new instance
*/
- public VideoMediaDeviceSession(AbstractMediaDevice device,
+ public VideoMediaDeviceSession(
+ AbstractMediaDevice device,
MediaDeviceSession session)
{
this(device);
@@ -1209,8 +1210,8 @@ public class VideoMediaDeviceSession
public void setOutputSize(Dimension size)
{
if((size != null && outputSize == null)
- || (size == null && outputSize != null)
- || (size != null && outputSize != null && !outputSize.equals(size)))
+ || (size == null && outputSize != null)
+ || (size != null && outputSize != null && !outputSize.equals(size)))
outputsizeChanged = true;
outputSize = size;
@@ -1404,7 +1405,7 @@ public class VideoMediaDeviceSession
encoder.setPacketizationMode(packetizationMode);
}
- // additionnal codec settings
+ // additional codec settings
{
Map<String, String> settings =
mediaFormat.getAdditionalCodecSettings();
diff --git a/src/net/java/sip/communicator/impl/neomedia/format/ParameterizedVideoFormat.java b/src/net/java/sip/communicator/impl/neomedia/format/ParameterizedVideoFormat.java
index adf5fc5..390f698 100644
--- a/src/net/java/sip/communicator/impl/neomedia/format/ParameterizedVideoFormat.java
+++ b/src/net/java/sip/communicator/impl/neomedia/format/ParameterizedVideoFormat.java
@@ -242,10 +242,7 @@ public class ParameterizedVideoFormat
@Override
public boolean matches(Format format)
{
- if (!super.matches(format))
- return false;
-
- return formatParametersMatch(format);
+ return super.matches(format) && formatParametersMatch(format);
}
/**
diff --git a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractBufferCaptureDevice.java b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractBufferCaptureDevice.java
index 077c6a3..7a12f0e 100644
--- a/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractBufferCaptureDevice.java
+++ b/src/net/java/sip/communicator/impl/neomedia/jmfext/media/protocol/AbstractBufferCaptureDevice.java
@@ -11,7 +11,7 @@ import java.lang.reflect.*;
import java.util.*;
import javax.media.*;
-import javax.media.Controls;
+import javax.media.Controls; // disambiguation
import javax.media.control.*;
import javax.media.protocol.*;
diff --git a/src/net/java/sip/communicator/impl/netaddr/NetaddrActivator.java b/src/net/java/sip/communicator/impl/netaddr/NetaddrActivator.java
index 603dece..a2295c0 100644
--- a/src/net/java/sip/communicator/impl/netaddr/NetaddrActivator.java
+++ b/src/net/java/sip/communicator/impl/netaddr/NetaddrActivator.java
@@ -146,6 +146,9 @@ public class NetaddrActivator
networkAMS.stop();
if (logger.isInfoEnabled())
logger.info("Network Address Manager Service ...[STOPPED]");
+
+ configurationService = null;
+ packetLoggingService = null;
}
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java b/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java
index 1590516..4f1b127 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/JabberActivator.java
@@ -221,6 +221,11 @@ public class JabberActivator
uriHandlerImpl.dispose();
uriHandlerImpl = null;
}
+
+ configurationService = null;
+ mediaService = null;
+ networkAddressManagerService = null;
+ credentialsService = null;
}
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolIconJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolIconJabberImpl.java
index cdce5e4..956cacb 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolIconJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolIconJabberImpl.java
@@ -149,6 +149,9 @@ public class ProtocolIconJabberImpl
if(is == null)
is = getResources().getImageInputStreamForPath(imagePath);
+ if(is == null)
+ return new byte[0];
+
byte[] icon = null;
try {
icon = new byte[is.available()];
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/SipActivator.java b/src/net/java/sip/communicator/impl/protocol/sip/SipActivator.java
index cdc6251..2c7ff8c 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/SipActivator.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/SipActivator.java
@@ -337,5 +337,15 @@ public class SipActivator
uriHandlerSipImpl.dispose();
uriHandlerSipImpl = null;
}
+
+ configurationService = null;
+ networkAddressManagerService = null;
+ mediaService = null;
+ versionService = null;
+ uiService = null;
+ hidService = null;
+ packetLoggingService = null;
+ certService = null;
+ fileService = null;
}
}
diff --git a/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java b/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java
index 1a2d52d..0bebe76 100644
--- a/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java
+++ b/src/net/java/sip/communicator/impl/resources/ResourceManagementActivator.java
@@ -46,6 +46,8 @@ public class ResourceManagementActivator
public void stop(BundleContext bc) throws Exception
{
bc.removeServiceListener(resPackImpl);
+
+ configService = null;
}
/**
diff --git a/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java b/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java
index 9169ad8..d02fc46 100644
--- a/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java
@@ -644,10 +644,14 @@ public class ResourceManagementServiceImpl
}
else
{
- stringResources = languagePack.getResources(locale);
+ stringResources
+ = (languagePack == null)
+ ? null
+ : languagePack.getResources(locale);
}
- String resourceString = stringResources.get(key);
+ String resourceString
+ = (stringResources == null) ? null : stringResources.get(key);
if (resourceString == null)
{
@@ -735,7 +739,7 @@ public class ResourceManagementServiceImpl
*/
public String getSettingsString(String key)
{
- return settingsResources.get(key);
+ return (settingsResources == null) ? null : settingsResources.get(key);
}
/**
@@ -746,7 +750,7 @@ public class ResourceManagementServiceImpl
*/
public int getSettingsInt(String key)
{
- String resourceString = settingsResources.get(key);
+ String resourceString = getSettingsString(key);
if (resourceString == null)
{
@@ -765,7 +769,7 @@ public class ResourceManagementServiceImpl
*/
public URL getSettingsURL(String urlKey)
{
- String path = settingsResources.get(urlKey);
+ String path = getSettingsString(urlKey);
if (path == null || path.length() == 0)
{
@@ -783,16 +787,7 @@ public class ResourceManagementServiceImpl
*/
public InputStream getSettingsInputStream(String streamKey)
{
- String path = settingsResources.get(streamKey);
-
- if (path == null || path.length() == 0)
- {
- logger.warn("Missing resource for key: " + streamKey);
- return null;
- }
-
- return settingsPack.getClass()
- .getClassLoader().getResourceAsStream(path);
+ return getSettingsInputStream(streamKey, settingsPack.getClass());
}
/**
@@ -807,7 +802,7 @@ public class ResourceManagementServiceImpl
public InputStream getSettingsInputStream( String streamKey,
Class<?> resourceClass)
{
- String path = settingsResources.get(streamKey);
+ String path = getSettingsString(streamKey);
if (path == null || path.length() == 0)
{
diff --git a/src/net/java/sip/communicator/impl/version/VersionActivator.java b/src/net/java/sip/communicator/impl/version/VersionActivator.java
index 00df6f4..2e99ef4 100644
--- a/src/net/java/sip/communicator/impl/version/VersionActivator.java
+++ b/src/net/java/sip/communicator/impl/version/VersionActivator.java
@@ -126,5 +126,7 @@ public class VersionActivator
public void stop(BundleContext context) throws Exception
{
versionServReg.unregister();
+
+ configurationService = null;
}
}
diff --git a/src/net/java/sip/communicator/service/httputil/HttpUtilActivator.java b/src/net/java/sip/communicator/service/httputil/HttpUtilActivator.java
index 9398f78..75b751c 100644
--- a/src/net/java/sip/communicator/service/httputil/HttpUtilActivator.java
+++ b/src/net/java/sip/communicator/service/httputil/HttpUtilActivator.java
@@ -105,6 +105,10 @@ public class HttpUtilActivator
throws
Exception
{
+ guiCertificateVerification = null;
+ credentialsService = null;
+ resourceService = null;
+ configurationService = null;
}
/**
diff --git a/src/net/java/sip/communicator/service/protocol/ProtocolProviderActivator.java b/src/net/java/sip/communicator/service/protocol/ProtocolProviderActivator.java
index 328d694..e71de40 100644
--- a/src/net/java/sip/communicator/service/protocol/ProtocolProviderActivator.java
+++ b/src/net/java/sip/communicator/service/protocol/ProtocolProviderActivator.java
@@ -187,5 +187,8 @@ public class ProtocolProviderActivator
if (bundleContext.equals(ProtocolProviderActivator.bundleContext))
ProtocolProviderActivator.bundleContext = null;
+
+ configurationService = null;
+ resourceService = null;
}
}
diff --git a/src/net/java/sip/communicator/service/protocol/media/ProtocolMediaActivator.java b/src/net/java/sip/communicator/service/protocol/media/ProtocolMediaActivator.java
index 9f37656..3f7f406 100644
--- a/src/net/java/sip/communicator/service/protocol/media/ProtocolMediaActivator.java
+++ b/src/net/java/sip/communicator/service/protocol/media/ProtocolMediaActivator.java
@@ -80,6 +80,9 @@ public class ProtocolMediaActivator
*/
public void stop(BundleContext context) throws Exception
{
+ configurationService = null;
+ mediaService = null;
+ networkAddressManagerService = null;
}
/**