You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by fu...@apache.org on 2008/01/07 15:54:14 UTC

svn commit: r609623 - in /felix/trunk/upnp: basedriver/src/main/java/org/apache/felix/upnp/basedriver/Activator.java samples/tv/src/main/java/org/apache/felix/upnp/sample/tv/TvDevice.java

Author: furfari
Date: Mon Jan  7 06:54:13 2008
New Revision: 609623

URL: http://svn.apache.org/viewvc?rev=609623&view=rev
Log:
fixed bug due to automatic box and unboxing  ....

Modified:
    felix/trunk/upnp/basedriver/src/main/java/org/apache/felix/upnp/basedriver/Activator.java
    felix/trunk/upnp/samples/tv/src/main/java/org/apache/felix/upnp/sample/tv/TvDevice.java

Modified: felix/trunk/upnp/basedriver/src/main/java/org/apache/felix/upnp/basedriver/Activator.java
URL: http://svn.apache.org/viewvc/felix/trunk/upnp/basedriver/src/main/java/org/apache/felix/upnp/basedriver/Activator.java?rev=609623&r1=609622&r2=609623&view=diff
==============================================================================
--- felix/trunk/upnp/basedriver/src/main/java/org/apache/felix/upnp/basedriver/Activator.java (original)
+++ felix/trunk/upnp/basedriver/src/main/java/org/apache/felix/upnp/basedriver/Activator.java Mon Jan  7 06:54:13 2008
@@ -138,15 +138,15 @@
 	 * @since 0.3
 	 */
 	private void doInitUPnPStack() {
-		Boolean useOnlyIPV4 = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.NET_ONLY_IPV4_PROP,"true"));
+		boolean useOnlyIPV4 = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.NET_ONLY_IPV4_PROP,"true")).booleanValue();
 	    if (useOnlyIPV4) UPnP.setEnable(UPnP.USE_ONLY_IPV4_ADDR);
     	else UPnP.setDisable(UPnP.USE_ONLY_IPV4_ADDR);
 
-		Boolean useOnlyIPV6 = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.NET_ONLY_IPV6_PROP,"true"));
+		boolean useOnlyIPV6 = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.NET_ONLY_IPV6_PROP,"true")).booleanValue();
 	    if (useOnlyIPV6) UPnP.setEnable(UPnP.USE_ONLY_IPV6_ADDR);
     	else UPnP.setDisable(UPnP.USE_ONLY_IPV6_ADDR);
 
-		Boolean useLoopback = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.NET_USE_LOOPBACK_PROP,"true"));
+		boolean useLoopback = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.NET_USE_LOOPBACK_PROP,"true")).booleanValue();
     	if (useLoopback) UPnP.setEnable(UPnP.USE_LOOPBACK_ADDR);
     	else UPnP.setDisable(UPnP.USE_LOOPBACK_ADDR);
     	
@@ -161,7 +161,7 @@
 	 * @throws InvalidSyntaxException
 	 */
 	private void doInitExporter() throws InvalidSyntaxException {		
-		Boolean useExporter = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.EXPORTER_ENABLED_PROP,"true"));
+		boolean useExporter = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.EXPORTER_ENABLED_PROP,"true")).booleanValue();
       	if (!useExporter) return;
    		      	
 		this.queue = new RootDeviceExportingQueue();
@@ -178,7 +178,7 @@
 	 * @since 0.3
 	 */
 	private void doInitImporter() {
-		Boolean useImporter = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.IMPORTER_ENABLED_PROP,"true"));
+		boolean useImporter = Boolean.valueOf(getPropertyDefault(Activator.bc,Constants.IMPORTER_ENABLED_PROP,"true")).booleanValue();
       	if (!useImporter) return;
    		
    		

Modified: felix/trunk/upnp/samples/tv/src/main/java/org/apache/felix/upnp/sample/tv/TvDevice.java
URL: http://svn.apache.org/viewvc/felix/trunk/upnp/samples/tv/src/main/java/org/apache/felix/upnp/sample/tv/TvDevice.java?rev=609623&r1=609622&r2=609623&view=diff
==============================================================================
--- felix/trunk/upnp/samples/tv/src/main/java/org/apache/felix/upnp/sample/tv/TvDevice.java (original)
+++ felix/trunk/upnp/samples/tv/src/main/java/org/apache/felix/upnp/sample/tv/TvDevice.java Mon Jan  7 06:54:13 2008
@@ -253,7 +253,7 @@
 			LinkedDevices.add(deviceId);
 		if (deviceId.indexOf("Clock") != -1){
 				Long time = (Long) events.get("Time");
-				clockTime = new Date(time).toString();				
+				clockTime = new Date(time.longValue()).toString();				
 		}
 		else if (deviceId.indexOf("AirCon") != -1)
 				airconTemp = (String) events.get("Temp");