[Osgi-messages] SF.net SVN: osgi:[253] papoose-cmpn/trunk/event/src/main/java/org/papoose/ event/E
Status: Beta
Brought to you by:
maguro
|
From: <osg...@li...> - 2010-02-24 18:28:55
|
Revision: 253
http://osgi.svn.sourceforge.net/osgi/?rev=253&view=rev
Author: maguro
Date: 2010-02-24 18:28:47 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
Check arguments
Modified Paths:
--------------
papoose-cmpn/trunk/event/src/main/java/org/papoose/event/EventAdminImpl.java
Modified: papoose-cmpn/trunk/event/src/main/java/org/papoose/event/EventAdminImpl.java
===================================================================
--- papoose-cmpn/trunk/event/src/main/java/org/papoose/event/EventAdminImpl.java 2010-02-24 18:16:15 UTC (rev 252)
+++ papoose-cmpn/trunk/event/src/main/java/org/papoose/event/EventAdminImpl.java 2010-02-24 18:28:47 UTC (rev 253)
@@ -76,6 +76,10 @@
public EventAdminImpl(BundleContext context, ExecutorService executor, ScheduledExecutorService scheduledExecutor)
{
+ if (context == null) throw new IllegalArgumentException("Bundle context is null");
+ if (executor == null) throw new IllegalArgumentException("Executor service is null");
+ if (scheduledExecutor == null) throw new IllegalArgumentException("Scheduled executor service is null");
+
this.context = context;
this.tracker = new ServiceTracker(context, EventHandler.class.getName(), new ServiceTrackerCustomizer()
{
@@ -106,6 +110,7 @@
public void setTimeout(int timeout)
{
+ if (timeout < 1) return;
this.timeout = timeout;
}
@@ -116,6 +121,7 @@
public void setTimeUnit(TimeUnit timeUnit)
{
+ if (timeUnit == null) return;
this.timeUnit = timeUnit;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|