incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmue...@apache.org
Subject [2/4] changed all licenses to ASLv2
Date Mon, 16 Jan 2012 16:17:18 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.doc/boilerplate-header.html.txt
----------------------------------------------------------------------
diff --git a/weinre.doc/boilerplate-header.html.txt b/weinre.doc/boilerplate-header.html.txt
index 73acd31..77ae9ed 100644
--- a/weinre.doc/boilerplate-header.html.txt
+++ b/weinre.doc/boilerplate-header.html.txt
@@ -1,10 +1,22 @@
 <!doctype html>
 
 <!--
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2010, 2011 IBM Corporation
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
 -->
 
 <html>

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.doc/boilerplate-trailer.html.txt
----------------------------------------------------------------------
diff --git a/weinre.doc/boilerplate-trailer.html.txt b/weinre.doc/boilerplate-trailer.html.txt
index f2244a0..78ba0b4 100644
--- a/weinre.doc/boilerplate-trailer.html.txt
+++ b/weinre.doc/boilerplate-trailer.html.txt
@@ -1,10 +1,22 @@
 
 
 <!--
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2010, 2011 IBM Corporation
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
 -->
 
 <div class="toc">

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.doc/css/main.css
----------------------------------------------------------------------
diff --git a/weinre.doc/css/main.css b/weinre.doc/css/main.css
index ba071e2..8e4078d 100644
--- a/weinre.doc/css/main.css
+++ b/weinre.doc/css/main.css
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2010, 2011 IBM Corporation
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 body {

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.doc/scripts/main.js
----------------------------------------------------------------------
diff --git a/weinre.doc/scripts/main.js b/weinre.doc/scripts/main.js
index ce6c8f2..68dc5b0 100644
--- a/weinre.doc/scripts/main.js
+++ b/weinre.doc/scripts/main.js
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 //-----------------------------------------------------------------------------
@@ -16,12 +28,12 @@ function addClickToExpandImageHandlers() {
     for (var i=0; i<elements.length; i++) {
         var element = elements[i]
         if (!hasClass(element, "expand-on-click")) continue
-     
+
         addClass(element, "width-transition")
-        element._original_width_ = element.width 
+        element._original_width_ = element.width
         element._contracted_     = true
         element.width            = element.width / 2
-        
+
         element.addEventListener("click", clickToExpand, false)
     }
 }
@@ -29,20 +41,20 @@ function addClickToExpandImageHandlers() {
 //-----------------------------------------------------------------------------
 function clickToExpand(event) {
     var element = this
-    
+
     if (element._contracted_) {
         element.width = element._original_width_
     }
     else {
         element.width = element._original_width_ / 2
     }
-    
+
     element._contracted_ = ! element._contracted_
-    
+
 //     if (hasClass(element, "contracted")) {
 //         removeClass(element, "contracted")
 //     }
-//     
+//
 //     else {
 //         addClass(element,    "contracted")
 //     }
@@ -60,7 +72,7 @@ function hasClass(element, className) {
 //-----------------------------------------------------------------------------
 function addClass(element, className) {
     if (hasClass(element, className)) return
-    
+
     element.className += " " + className
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/interfaces/WeinreClientCommands.idl
----------------------------------------------------------------------
diff --git a/weinre.server/interfaces/WeinreClientCommands.idl b/weinre.server/interfaces/WeinreClientCommands.idl
index d0f86cb..9c4707e 100644
--- a/weinre.server/interfaces/WeinreClientCommands.idl
+++ b/weinre.server/interfaces/WeinreClientCommands.idl
@@ -1,15 +1,27 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 // messages from the client to the server
 
 module weinre {
     interface WeinreClientCommands {
-    
+
         void registerClient(out string clientId);
 
         void getTargets(out Object[] targets);
@@ -17,9 +29,9 @@ module weinre {
 
         void connectTarget(in string clientId, in string targetId);
         void disconnectTarget(in string clientId);
-        
+
         void getExtensions(out string[] extensions)
-        
+
         void logDebug(   in string message );
         void logInfo(    in string message );
         void logWarning( in string message );

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/interfaces/WeinreClientEvents.idl
----------------------------------------------------------------------
diff --git a/weinre.server/interfaces/WeinreClientEvents.idl b/weinre.server/interfaces/WeinreClientEvents.idl
index 4e9f0d9..612ed27 100644
--- a/weinre.server/interfaces/WeinreClientEvents.idl
+++ b/weinre.server/interfaces/WeinreClientEvents.idl
@@ -1,15 +1,27 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 // messages from the server to the client
 
 module weinre {
     interface WeinreClientEvents {
-    
+
         void clientRegistered(Object client);
         void targetRegistered(Object target);
 
@@ -18,9 +30,9 @@ module weinre {
 
         void connectionCreated(string clientId, string targetId);
         void connectionDestroyed(string clientId, string targetId);
-        
+
         void sendCallback(string callbackId, Object result);
-        
+
         void serverProperties(Object properties);
     };
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/interfaces/WeinreExtraClientCommands.idl
----------------------------------------------------------------------
diff --git a/weinre.server/interfaces/WeinreExtraClientCommands.idl b/weinre.server/interfaces/WeinreExtraClientCommands.idl
index 5d6fe5c..c28b747 100644
--- a/weinre.server/interfaces/WeinreExtraClientCommands.idl
+++ b/weinre.server/interfaces/WeinreExtraClientCommands.idl
@@ -1,15 +1,27 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 // extra messages from the client to the target
 
 module weinre {
     interface WeinreExtraClientCommands {
-    
+
         void getDatabases(out Object[] databaseRecords);
 
     };

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/interfaces/WeinreExtraTargetEvents.idl
----------------------------------------------------------------------
diff --git a/weinre.server/interfaces/WeinreExtraTargetEvents.idl b/weinre.server/interfaces/WeinreExtraTargetEvents.idl
index 58a6b72..0f2ca54 100644
--- a/weinre.server/interfaces/WeinreExtraTargetEvents.idl
+++ b/weinre.server/interfaces/WeinreExtraTargetEvents.idl
@@ -1,15 +1,27 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 // extra messages from the target to the client
 
 module weinre {
     interface WeinreExtraTargetEvents {
-    
+
         void databaseOpened(in Object databaseRecord);
 
     };

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/interfaces/WeinreTargetCommands.idl
----------------------------------------------------------------------
diff --git a/weinre.server/interfaces/WeinreTargetCommands.idl b/weinre.server/interfaces/WeinreTargetCommands.idl
index ed3f051..253229c 100644
--- a/weinre.server/interfaces/WeinreTargetCommands.idl
+++ b/weinre.server/interfaces/WeinreTargetCommands.idl
@@ -1,15 +1,27 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 // messages from the target to the server
 
 module weinre {
     interface WeinreTargetCommands {
-    
+
         void registerTarget(int url, out string targetId);
 
         void sendClientCallback(string callbackId, Object args);

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/interfaces/WeinreTargetEvents.idl
----------------------------------------------------------------------
diff --git a/weinre.server/interfaces/WeinreTargetEvents.idl b/weinre.server/interfaces/WeinreTargetEvents.idl
index 5326b4b..b9060fb 100644
--- a/weinre.server/interfaces/WeinreTargetEvents.idl
+++ b/weinre.server/interfaces/WeinreTargetEvents.idl
@@ -1,20 +1,32 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 // messages from the server to the target
 
 module weinre {
     interface WeinreTargetEvents {
-    
+
         void connectionCreated(string clientId, string targetId);
         void connectionDestroyed(string clientId, string targetId);
-        
+
         void sendCallback(string callbackId, Object result);
-        
+
     };
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/Channel.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/Channel.java b/weinre.server/src/weinre/server/Channel.java
index 0e19b12..6401e42 100644
--- a/weinre.server/src/weinre/server/Channel.java
+++ b/weinre.server/src/weinre/server/Channel.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Copyright (c) 2010, 2011 IBM Corporation
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/ChannelManager.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/ChannelManager.java b/weinre.server/src/weinre/server/ChannelManager.java
index 77f326a..2926b09 100644
--- a/weinre.server/src/weinre/server/ChannelManager.java
+++ b/weinre.server/src/weinre/server/ChannelManager.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -19,11 +31,11 @@ public class ChannelManager {
 
     private Map<String, Channel>              channelMap;
     private List<ChannelManagerEventListener> eventListeners;
-    
+
     //---------------------------------------------------------------
     private ChannelManager() {
         super();
-        
+
         channelMap     = new HashMap<String, Channel>();
         eventListeners = new ArrayList<ChannelManagerEventListener>();
     }
@@ -32,7 +44,7 @@ public class ChannelManager {
     public void addEventListener(ChannelManagerEventListener listener) {
         eventListeners.add(listener);
     }
-    
+
     //---------------------------------------------------------------
     public void removeEventListener(ChannelManagerEventListener listener) {
         eventListeners.add(listener);
@@ -44,7 +56,7 @@ public class ChannelManager {
             listener.channelRegistered(channel);
         }
     }
-    
+
     //---------------------------------------------------------------
     private void fireDeregisteredEvent(Channel channel) {
         for (ChannelManagerEventListener listener: eventListeners) {
@@ -56,43 +68,43 @@ public class ChannelManager {
     public Channel getChannel(String channelName) {
         return channelMap.get(channelName);
     }
-    
+
     //---------------------------------------------------------------
     public Channel getChannel(String channelName, String remoteAddress) {
         Channel channel = getChannel(channelName);
         if (null == channel) return null;
-        
+
         if (!channel.getRemoteAddress().equals(remoteAddress)) return null;
-        
+
         return channel;
     }
-    
+
     //---------------------------------------------------------------
     public List<Channel> getChannels() {
         return new ArrayList<Channel>(channelMap.values());
     }
-    
+
     //---------------------------------------------------------------
     public Channel registerChannel(String pathPrefix, String channelName, String id, String remoteHost, String remoteAddress) {
         if (channelMap.containsKey(channelName)) return null;
-        
+
         Channel channel = new Channel(pathPrefix, channelName, id, remoteHost, remoteAddress);
         channelMap.put(channelName, channel);
-        
+
         fireRegisteredEvent(channel);
-        
+
         return channel;
     }
-    
+
     //---------------------------------------------------------------
     public Channel deregisterChannel(String channelName) {
         Channel channel = getChannel(channelName);
         if (null == channel) return null;
-        
+
         fireDeregisteredEvent(channel);
-        
+
         channelMap.remove(channelName);
-        
+
         return channel;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/ChannelManagerEventListener.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/ChannelManagerEventListener.java b/weinre.server/src/weinre/server/ChannelManagerEventListener.java
index e97ef7c..f15f2dd 100644
--- a/weinre.server/src/weinre/server/ChannelManagerEventListener.java
+++ b/weinre.server/src/weinre/server/ChannelManagerEventListener.java
@@ -1,18 +1,30 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
 
 //-------------------------------------------------------------------
 public interface ChannelManagerEventListener {
-    
+
     //---------------------------------------------------------------
     public void channelRegistered(Channel channel);
-    
+
     //---------------------------------------------------------------
     public void channelDeregistered(Channel channel);
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/Client.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/Client.java b/weinre.server/src/weinre/server/Client.java
index 4eed575..d2118cc 100644
--- a/weinre.server/src/weinre/server/Client.java
+++ b/weinre.server/src/weinre/server/Client.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -15,7 +27,7 @@ import org.apache.wink.json4j.JSONObject;
 public class Client extends Connector {
 
     private Target connectedTarget;
-    
+
     //---------------------------------------------------------------
     public Client(Channel channel) {
         super(channel);
@@ -26,18 +38,18 @@ public class Client extends Connector {
     public boolean isClient() {
         return true;
     }
-    
+
     //---------------------------------------------------------------
     public Target getConnectedTarget() {
         return connectedTarget;
     }
-    
+
     //---------------------------------------------------------------
     protected void _connect(Target target) {
         if (null == target) return;
-        
+
         Lock.lock();
-        
+
         try {
             connectedTarget = target;
         }
@@ -45,13 +57,13 @@ public class Client extends Connector {
             Lock.unlock();
         }
     }
-    
+
     //---------------------------------------------------------------
     protected void _disconnect(Target target) {
         if (null == target) return;
-        
+
         Lock.lock();
-        
+
         try {
             connectedTarget = null;
         }
@@ -59,22 +71,22 @@ public class Client extends Connector {
             Lock.unlock();
         }
     }
-    
+
     //---------------------------------------------------------------
     public JSONObject getDescription() {
       JSONObject result = new JSONObject();
-      
+
       try {
           result.put("channel",            getChannel().getName());
           result.put("id",                 getChannel().getId());
           result.put("hostName",           getChannel().getRemoteHost());
           result.put("connectedTargetIds", new JSONArray());
-      } 
+      }
       catch (JSONException e) {
           throw new RuntimeException(e);
       }
 
       return result;
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/ConnectionManager.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/ConnectionManager.java b/weinre.server/src/weinre/server/ConnectionManager.java
index 7a3ccc1..88994cc 100644
--- a/weinre.server/src/weinre/server/ConnectionManager.java
+++ b/weinre.server/src/weinre/server/ConnectionManager.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -17,15 +29,15 @@ import java.util.Map;
 public class ConnectionManager {
 
     static final public ConnectionManager $ = new ConnectionManager();
-    
+
     private Map<String,Client> clientMap;
     private Map<String,Target> targetMap;
-    private boolean            listening = false; 
+    private boolean            listening = false;
 
     //---------------------------------------------------------------
     private ConnectionManager() {
         super();
-        
+
         clientMap = Collections.synchronizedMap(new HashMap<String,Client>());
         targetMap = Collections.synchronizedMap(new HashMap<String,Target>());
     }
@@ -34,9 +46,9 @@ public class ConnectionManager {
     public void startChannelListener() {
         if (listening) return;
         listening = true;
-        
+
         ChannelManager.$.addEventListener(new ChannelManagerEventListener() {
-            
+
             @Override
             public void channelRegistered(Channel channel) {
             }
@@ -51,7 +63,7 @@ public class ConnectionManager {
             }
         });
     }
-    
+
     //---------------------------------------------------------------
     public void addClient(Client client) {
         clientMap.put(client.getName(), client);
@@ -89,26 +101,26 @@ public class ConnectionManager {
     //---------------------------------------------------------------
     public List<Client> getClients(String id) {
         List<Client> result = new ArrayList<Client>();
-        
+
         for (Client client: clientMap.values()) {
             if (client.getId().equals(id)) {
                 result.add(client);
             }
         }
-        
+
         return result;
     }
 
     //---------------------------------------------------------------
     public List<Target> getTargets(String id) {
         List<Target> result = new ArrayList<Target>();
-        
+
         for (Target target: targetMap.values()) {
             if (target.getId().equals(id)) {
                 result.add(target);
             }
         }
-        
+
         return result;
     }
 
@@ -120,10 +132,10 @@ public class ConnectionManager {
         if (connectedTarget == target) return;
 
         disconnect(client, connectedTarget);
-        
+
         client._connect(target);
         target._connect(client);
-        
+
         _sendConnectionCreatedEvent(client, target);
     }
 
@@ -141,12 +153,12 @@ public class ConnectionManager {
     private void _sendConnectionCreatedEvent(Client client, Target target) {
         _sendConnectionEvent(client, target, "connectionCreated");
     }
-    
+
     //---------------------------------------------------------------
     private void _sendConnectionDestroyedEvent(Client client, Target target) {
         _sendConnectionEvent(client, target, "connectionDestroyed");
     }
-    
+
     //---------------------------------------------------------------
     private void _sendConnectionEvent(Client client, Target target, String message) {
         String clientName = client.getChannel().getName();
@@ -155,7 +167,7 @@ public class ConnectionManager {
         _sendAllClientsEvent("WeinreClientEvents", client.getId(), message, clientName, targetName);
         target.getChannel().sendEvent("WeinreTargetEvents", message, clientName, targetName);
     }
-    
+
     //---------------------------------------------------------------
     private void _sendAllClientsEvent(String intfName, String id, String message, Object... args) {
         for (Client aClient: getClients(id)) {
@@ -166,7 +178,7 @@ public class ConnectionManager {
     //---------------------------------------------------------------
     protected void closeConnector(Connector connector) {
         if (null == connector) return;
-        
+
         if (connector.isClient()) _closeClient((Client)connector);
         if (connector.isTarget()) _closeTarget((Target)connector);
     }
@@ -179,21 +191,21 @@ public class ConnectionManager {
         if (null != target) {
             disconnect(client, target);
         }
-        
+
         _removeClient(client);
     }
-    
+
     //---------------------------------------------------------------
     private void _closeTarget(Target target) {
         if (null == target) return;
 
         List<Client> clients = target.getConnectedClients();
-        
+
         for (Client client: clients) {
             disconnect(client, target);
         }
-        
+
         _removeTarget(target);
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/Connector.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/Connector.java b/weinre.server/src/weinre/server/Connector.java
index 80c2895..5497895 100644
--- a/weinre.server/src/weinre/server/Connector.java
+++ b/weinre.server/src/weinre/server/Connector.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -18,78 +30,78 @@ import org.apache.wink.json4j.JSONObject;
 abstract public class Connector {
 
     static final protected Lock Lock = new ReentrantLock();
-    
+
     private Channel channel;
-    
+
     //---------------------------------------------------------------
     public Connector(Channel channel) {
         super();
-        
+
         this.channel = channel;
         channel._setConnector(this);
     }
-    
+
     //---------------------------------------------------------------
     protected void _register() {
         if (isClient()) ConnectionManager.$.addClient((Client) this);
         if (isTarget()) ConnectionManager.$.addTarget((Target) this);
     }
-    
+
     //---------------------------------------------------------------
     public Channel getChannel() {
         return channel;
     }
-    
+
     //---------------------------------------------------------------
     public String getName() {
         return channel.getName();
     }
-    
+
     //---------------------------------------------------------------
     public String getId() {
         return channel.getId();
     }
-    
+
     //---------------------------------------------------------------
     public List<Connector> getConnections() {
         List<Connector> result = new ArrayList<Connector>();
-        
+
         if (isClient()) {
             Connector target = ((Client) this).getConnectedTarget();
             if (null != target) {
                 result.add(target);
             }
         }
-        
+
         else if (isTarget()) {
             result.addAll(((Target) this).getConnectedClients());
         }
-        
+
         else {
             throw new RuntimeException("connector which isn't a client or target");
         }
-        
+
         return result;
     }
-    
+
     //---------------------------------------------------------------
     abstract public JSONObject getDescription();
-    
+
     //---------------------------------------------------------------
     public boolean isClosed() {
         return channel.isClosed();
     }
-    
+
     //---------------------------------------------------------------
     public boolean isClient() {
         return false;
     }
-    
+
     //---------------------------------------------------------------
     public boolean isTarget() {
         return false;
     }
-    
+
     //---------------------------------------------------------------
     public String toString() {
         return getClass().getName() + "{" + channel + "}";

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/ConsoleOutputStream.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/ConsoleOutputStream.java b/weinre.server/src/weinre/server/ConsoleOutputStream.java
index dc62c2d..307addc 100644
--- a/weinre.server/src/weinre/server/ConsoleOutputStream.java
+++ b/weinre.server/src/weinre/server/ConsoleOutputStream.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -23,7 +35,7 @@ public class ConsoleOutputStream extends OutputStream {
     static public PrintStream newPrintStream(Main main, PrintStream originalStream, boolean stdout) {
         return new PrintStream(new ConsoleOutputStream(main, originalStream, stdout));
     }
-    
+
     //---------------------------------------------------------------
     public ConsoleOutputStream(Main main, PrintStream originalStream, boolean stdout) {
         this.main           = main;
@@ -31,17 +43,17 @@ public class ConsoleOutputStream extends OutputStream {
         this.stdout         = stdout;
         this.stringBuffer   = new StringBuffer();
     }
-    
+
     //---------------------------------------------------------------
     @Override
     public void write(int c) throws IOException {
         if (c == 0x0D) return;
-        
+
         if (c != 0x0A) {
             stringBuffer.append(Character.toChars(c));
             return;
         }
-        
+
         String line = stringBuffer.toString();
         stringBuffer = new StringBuffer();
         _writeLine(line);
@@ -50,7 +62,7 @@ public class ConsoleOutputStream extends OutputStream {
     //---------------------------------------------------------------
     private void _writeLine(String line) {
         originalStream.println(line);
-        
+
         main.addServerConsoleMessage(line, stdout);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/ExtensionManager.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/ExtensionManager.java b/weinre.server/src/weinre/server/ExtensionManager.java
index 3977e86..6831904 100644
--- a/weinre.server/src/weinre/server/ExtensionManager.java
+++ b/weinre.server/src/weinre/server/ExtensionManager.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -17,50 +29,50 @@ import org.eclipse.jetty.util.resource.Resource;
 
 //-------------------------------------------------------------------
 public class ExtensionManager {
-    static private File     weinreHomeDir = null;     
-    static private File     weinreExtDir  = null;    
+    static private File     weinreHomeDir = null;
+    static private File     weinreExtDir  = null;
     static private long     weinreExtDate = 0L;
     static private String[] extensions    = null;
-    
+
     static private String[] EMPTY_STRING_ARRAY = {};
 
     //---------------------------------------------------------------
     static {
         initExtensions();
     }
-    
+
     //---------------------------------------------------------------
     static public String[] getExtensions() {
         if (null == weinreExtDir) return extensions;
-        
+
         if (weinreExtDate != weinreExtDir.lastModified()) {
             initExtensions();
         }
-        
+
         return extensions;
     }
-    
+
     //---------------------------------------------------------------
     // path: /client/extensions/weinre-ext-sample/extension.html
     static public Resource getResource(String path) throws MalformedURLException {
         if (null == weinreExtDir) return null;
-        
+
         File resourceFile = new File(weinreExtDir, path.substring(18));
         if (!resourceFile.exists()) return null;
-        
+
         try {
             return Resource.newResource(resourceFile.toURI().toURL().toExternalForm(), false);
-        } 
+        }
         catch (IOException e) {
             throw new MalformedURLException();
         }
     }
-    
+
     //---------------------------------------------------------------
     static private void initExtensions() {
-        
+
         extensions = EMPTY_STRING_ARRAY;
-            
+
         weinreHomeDir = new File(System.getProperty("user.home"), ".weinre");
         if (!weinreHomeDir.isDirectory()) {
             Main.info("extensions not enabled: ~/.weinre is not a directory");
@@ -73,23 +85,23 @@ public class ExtensionManager {
             Main.info("extensions not enabled: ~/.weinre/extensions is not a directory");
             return;
         }
-        
+
         List<String> extensionList = new ArrayList<String>();
-        
+
         String[] entries = weinreExtDir.list();
         for (String entry: entries) {
             if (entry.startsWith(".")) continue;
-            
+
             File extDir = new File(weinreExtDir, entry);
             if (!extDir.isDirectory()) continue;
-            
+
             File extensionHtml = new File(extDir, "extension.html");
             if (!extensionHtml.isFile()) continue;
-            
+
             extensionList.add(entry);
         }
-        
+
         extensions = extensionList.toArray(EMPTY_STRING_ARRAY);
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/Main.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/Main.java b/weinre.server/src/weinre/server/Main.java
index 4968fee..c762142 100644
--- a/weinre.server/src/weinre/server/Main.java
+++ b/weinre.server/src/weinre/server/Main.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -19,10 +31,10 @@ import weinre.server.http.HttpServer;
 
 //-------------------------------------------------------------------
 public class Main {
-    
+
     private static ServerSettings  Settings;
     private static Logger          Logger;
-    
+
     public  Server       server;
     private PrintStream  consoleStdout;
     private PrintStream  consoleStderr;
@@ -30,7 +42,7 @@ public class Main {
     //---------------------------------------------------------------
     static public void main(String[] args) throws Throwable {
         Main main = new Main(args);
-        
+
         main.run();
     }
 
@@ -53,43 +65,43 @@ public class Main {
     //---------------------------------------------------------------
     public Main(String[] args) {
         super();
-        
+
         Settings = ServerSettings.getOptions(args);
         if (null == Settings) System.exit(0);
-        
+
         if (null != Settings.getMessageLog()) {
             Settings.getMessageLog().println("[");
         }
-        
+
         Runtime.getRuntime().addShutdownHook(onShutdownThread());
-        
+
         consoleStdout = ConsoleOutputStream.newPrintStream(this, System.out, true);
         consoleStderr = ConsoleOutputStream.newPrintStream(this, System.err, false);
 
         System.setOut(consoleStdout);
         System.setErr(consoleStderr);
     }
-    
+
     //---------------------------------------------------------------
     public void run() throws Throwable, Exception {
         httpServerStart();
         httpServerWaitTillDone();
         exit();
     }
-    
+
     //---------------------------------------------------------------
     private Thread onShutdownThread() {
         return new Thread(new Runnable() {
             public void run() {
                 PrintWriter messageLog = Settings.getMessageLog();
                 if (null == messageLog) return;
-                
+
                 messageLog.println("null ]");
                 messageLog.close();
             }
         });
     }
-    
+
     //---------------------------------------------------------------
     public int exit() {
         if (null != server) {
@@ -107,8 +119,8 @@ public class Main {
                 warn("exception stopping the server: " + e);
                 e.printStackTrace();
             }
-        } 
-        
+        }
+
         System.exit(0);
         return 0;
     }
@@ -117,7 +129,7 @@ public class Main {
     public void httpServerStart() {
         // get the default logger - this should be the first thing to touch the log
         Logger defaultLog = Log.getLog();
-        
+
         if (defaultLog instanceof StdErrLog) {
             ((StdErrLog) defaultLog).setHideStacks(true);
         }
@@ -125,7 +137,7 @@ public class Main {
         // create a special logger for weinre messages
         Logger = org.eclipse.jetty.util.log.Log.getLogger("weinre");
         Logger.setDebugEnabled(Settings.getVerbose());
-        
+
         server = null;
         try {
             server = new HttpServer(this, Settings).run();
@@ -133,7 +145,7 @@ public class Main {
         catch (Throwable e) {
             severeError("exception launching server: " + e);
         }
-        
+
         ConnectionManager.$.startChannelListener();
         WatchDog.start();
         MessageHandler.start();
@@ -148,20 +160,20 @@ public class Main {
             severeError("exception waiting for server to stop: " + e);
         }
     }
-    
+
     //---------------------------------------------------------------
     public void serverStarted() {
     }
-    
+
     //---------------------------------------------------------------
     public void addServerConsoleMessage(String line, boolean stdout) {
     }
-    
+
     //---------------------------------------------------------------
     public int severeError(String message) {
         Logger.warn(message);
         Logger.warn("exiting...");
         return exit();
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/MessageHandler.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/MessageHandler.java b/weinre.server/src/weinre/server/MessageHandler.java
index bbddc9f..da878ba 100644
--- a/weinre.server/src/weinre/server/MessageHandler.java
+++ b/weinre.server/src/weinre/server/MessageHandler.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -24,40 +36,40 @@ public class MessageHandler {
     //---------------------------------------------------------------
     static public void start() {
         final MessageHandler messageHandler = new MessageHandler();
-        
+
         Runnable runnable = new Runnable() {
             public void run() {
                 while (true) {
-                    try { 
+                    try {
                         messageHandler.handleMessages();
-                        Thread.sleep(250); 
-                    } 
+                        Thread.sleep(250);
+                    }
                     catch(InterruptedException e) {
                         throw new RuntimeException(e);
                     }
                 }
             }
         };
-        
+
         Thread thread = new Thread(runnable, messageHandler.getClass().toString());
         thread.start();
     }
-    
+
     //---------------------------------------------------------------
     private MessageHandler() {
         messageLog = Main.getSettings().getMessageLog();
     }
-    
+
     //---------------------------------------------------------------
     private void handleMessages() throws InterruptedException {
         List<Channel> channels = ChannelManager.$.getChannels();
-        
+
         for (Channel channel: channels) {
             List<String> requestss = channel.getRequests(0);
-            
+
             for (String requests: requestss) {
                 JSONArray acc;
-                
+
                 try {
                     acc = new JSONArray(requests);
                 }
@@ -65,7 +77,7 @@ public class MessageHandler {
                     Main.warn("error parsing requests: " + e + ": '" + requests + "'");
                     continue;
                 }
-                
+
                 int size = acc.length();
                 for (int i=0; i<size; i++) {
                     JSONObject accRequest;
@@ -74,18 +86,18 @@ public class MessageHandler {
                         request = acc.getString(i);
                         accRequest = new JSONObject(request);
                         accRequest.put("_from", channel.getName() + "#" + channel.getId());
-                        
+
                         if (null != messageLog) {
                             messageLog.print(accRequest.toString(true));
                             messageLog.println(",");
                         }
-                        
+
                     }
                     catch (JSONException e) {
                         Main.warn("error parsing request: " + e + ": '" + request + "'");
                         continue;
                     }
-                        
+
                     String intfName;
                     String methodName;
                     JSONArray args;
@@ -96,22 +108,22 @@ public class MessageHandler {
                     } catch (JSONException e) {
                         throw new RuntimeException(e);
                     }
-                    
+
                     if (null == intfName) {
                         Main.warn("no interface specified in request: " + request);
                         continue;
                     }
-                    
+
                     if (null == methodName) {
                         Main.warn("no methodName specified in request: " + request);
                         continue;
                     }
-                    
+
                     if (null == args) {
                         Main.warn("no args specified in request: " + request);
                         continue;
                     }
-       
+
                     serviceMethodInvoker(channel, intfName, methodName, args);
                 }
             }
@@ -129,7 +141,7 @@ public class MessageHandler {
             String methodSignatureParms = intfName + "." + methodName + "(" + argsJSON.toString() + ")";
             Main.debug(channel.getName() + ": recv " + methodSignatureParms);
         }
-        
+
         try {
             service = channel.getService(intfName);
         }
@@ -137,35 +149,35 @@ public class MessageHandler {
             Main.warn("unable to get service object for: " + methodSignature + "; " + e);
             return;
         }
-        
+
         if (null == service) {
             redirectToConnections(channel, intfName, methodName, argsJSON);
             return;
         }
-        
+
         Class serviceClass = service.getClass();
-        
+
         List<Object> args = new ArrayList<Object>(argsJSON);
-        
+
         for (Method method: serviceClass.getMethods()) {
             if (!method.getName().equals(methodName)) continue;
-            
+
             if (method.getParameterTypes().length != args.size() + 1) {
                 Main.warn("invalid number of parameters specified for : " + methodSignature);
                 return;
             }
-            
+
             args.add(0, channel);
-            
+
             try {
                 method.invoke(service, args.toArray());
-            } 
+            }
             catch (IllegalArgumentException e) {
                 Main.warn("illegal argument exception invoking : " + methodSignature + "; " + e);
-            } 
+            }
             catch (IllegalAccessException e) {
                 Main.warn("illegal access exception invoking : " + methodSignature + "; " + e);
-            } 
+            }
             catch (InvocationTargetException e) {
                 Throwable te = e.getTargetException();
                 Main.warn("invocation target exception invoking : " + methodSignature + "; " + te);
@@ -174,7 +186,7 @@ public class MessageHandler {
             catch (RuntimeException e) {
                 Main.warn("invocation runtime exception invoking : " + methodSignature + "; " + e);
             }
-            
+
             return;
         }
 
@@ -185,13 +197,13 @@ public class MessageHandler {
     private void redirectToConnections(Channel channel, String interfaceName, String methodName, JSONArray args) {
         Connector connector = channel.getConnector();
         if (null == connector) return;
-        
+
         List<Connector> connections = connector.getConnections();
-        
+
         for (Connector connection: connections) {
             connection.getChannel().sendEvent(interfaceName, methodName, args.toArray());
-        } 
+        }
     }
 
-    
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/MessageQueue.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/MessageQueue.java b/weinre.server/src/weinre/server/MessageQueue.java
index 09937ea..3c464eb 100644
--- a/weinre.server/src/weinre/server/MessageQueue.java
+++ b/weinre.server/src/weinre/server/MessageQueue.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -15,10 +27,10 @@ import java.util.concurrent.TimeUnit;
 
 /**
  * A type of blocking queue.
- * 
+ *
  * - can be shutdown; subsequent add() or getAll() calls throw ISE
  * - getAll() takes all items off the queue
- * - if there are simultaneous getAll() calls, queued items may be split between them 
+ * - if there are simultaneous getAll() calls, queued items may be split between them
  * - current use case calls for one reader, so previous item not relevant
  */
 public class MessageQueue<E> {
@@ -26,26 +38,26 @@ public class MessageQueue<E> {
     private BlockingQueue<E> queue;
     private boolean          closed;
     private Object           closeLock;
-    
+
     //---------------------------------------------------------------
     public MessageQueue() {
         super();
-        
+
         queue     = new LinkedBlockingQueue<E>();
         closed    = false;
         closeLock = new Object();
     }
-    
+
     //---------------------------------------------------------------
     public void shutdown() {
         synchronized(closeLock) {
             if (closed) return;
-            
+
             closed = true;
             queue.clear();
         }
     }
-    
+
     //---------------------------------------------------------------
     public void add(E item) {
         synchronized(closeLock) {
@@ -54,7 +66,7 @@ public class MessageQueue<E> {
 
         queue.add(item);
     }
-    
+
     //---------------------------------------------------------------
     public List<E> getAll(int timeout, TimeUnit timeUnit) throws InterruptedException {
         synchronized(closeLock) {
@@ -63,10 +75,10 @@ public class MessageQueue<E> {
 
         // create our result list
         List<E> result = new LinkedList<E>();
-        
+
         // wait for the first item
         E item = queue.poll(timeout, timeUnit);
-        
+
         // nothing there?  return empty list
         if (null == item) return result;
 
@@ -78,11 +90,11 @@ public class MessageQueue<E> {
         while ((item = queue.poll()) != null) {
             result.add(item);
         }
-        
+
         // return list
         return result;
     }
-    
+
     //---------------------------------------------------------------
     public String toString()  {
         return getClass().getName() + "{" + queue.size() + "}";

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/ServerSettings.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/ServerSettings.java b/weinre.server/src/weinre/server/ServerSettings.java
index a2c73c7..4a43094 100644
--- a/weinre.server/src/weinre/server/ServerSettings.java
+++ b/weinre.server/src/weinre/server/ServerSettings.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -33,7 +45,7 @@ import org.apache.commons.cli.PosixParser;
 public class ServerSettings {
 
     final static private String BoundHostAllConstant = "-all-";
-    
+
     private int         httpPort           = 8080;
     private String      boundHost          = "localhost";
 //  private boolean     useProxy           = false;
@@ -43,7 +55,7 @@ public class ServerSettings {
     private int         deathTimeoutSeconds;
     private Properties  fileProperties;
     private PrintWriter messageLog;
-    
+
     //---------------------------------------------------------------
     static public ServerSettings getOptions(String[] commandLine) {
         ServerSettings settings = new ServerSettings();
@@ -53,14 +65,14 @@ public class ServerSettings {
     //---------------------------------------------------------------
     private ServerSettings() {
         super();
-        
+
         fileProperties = fromPropertiesFile();
     }
 
     //---------------------------------------------------------------
     private Options getOptions() {
         Options options = new Options();
-       
+
         options.addOption("?",            false, "display help");
         options.addOption("h", "help",    false, "display help");
         options.addOption("httpPort",     true,  "tcp/ip port to use for the http server");
@@ -71,7 +83,7 @@ public class ServerSettings {
         options.addOption("readTimeout",  true,  "seconds before timing out HTTP GETs");
         options.addOption("deathTimeout", true,  "seconds before considering connector dead");
         options.addOption("messageLog",   true,  "file to log messages to");
-       
+
         return options;
     }
 
@@ -87,20 +99,20 @@ public class ServerSettings {
         result.put("reuseAddr",    this.reuseAddr + "");
         result.put("readTimeout",  this.readTimeoutSeconds + "");
         result.put("deathTimeout", this.deathTimeoutSeconds + "");
-        
+
         return result;
     }
 
     //---------------------------------------------------------------
     private Properties fromPropertiesFile() {
         Properties result = Utility.readPropertiesFile("server.properties");
-        
+
         // ya, Properties doesn't trim space off values
         for (String key: result.stringPropertyNames()) {
             String val = result.getProperty(key);
             result.setProperty(key, val.trim());
         }
-        
+
         return result;
     }
 
@@ -112,7 +124,7 @@ public class ServerSettings {
         CommandLine       commandLine;
         try {
             commandLine = parser.parse(options, commandLineArgs);
-        } 
+        }
         catch (ParseException e) {
             error(e.getMessage());
             return null;
@@ -145,14 +157,14 @@ public class ServerSettings {
     //---------------------------------------------------------------
     private int getIntFromOption(CommandLine commandLine, String name, int defaultValue, int min, int max) {
         int result = defaultValue;
-        
+
         String stringValue = commandLine.getOptionValue(name);
         if (null == stringValue) {
             stringValue = fileProperties.getProperty(name);
         }
 
         if (null == stringValue) return defaultValue;
-            
+
         try {
             result = Integer.parseInt(stringValue);
         }
@@ -160,14 +172,14 @@ public class ServerSettings {
             error(name + " parameter must be numeric");
             return result;
         }
-        
+
         if ((result < min) || (result > 0x00FFFF)) {
             error(name + " parameter must be between " + min + " and " + max);
         }
 
         return result;
     }
-    
+
     //---------------------------------------------------------------
     private String getStringFromOption(CommandLine commandLine, String name, String defaultValue) {
         String stringValue = commandLine.getOptionValue(name);
@@ -176,21 +188,21 @@ public class ServerSettings {
         }
 
         if (null == stringValue) return defaultValue;
-        
+
         return stringValue;
     }
-    
+
     //---------------------------------------------------------------
     private boolean getBooleanFromOption(CommandLine commandLine, String name, boolean defaultValue) {
         boolean result = defaultValue;
-        
+
         String stringValue = commandLine.getOptionValue(name);
         if (null == stringValue) {
             stringValue = fileProperties.getProperty(name);
         }
 
         if (null == stringValue) return defaultValue;
-            
+
         result = Boolean.parseBoolean(stringValue);
 
         return result;
@@ -198,20 +210,20 @@ public class ServerSettings {
 
     //---------------------------------------------------------------
     private PrintWriter getPrintWriterFromOption(CommandLine commandLine, String name) {
-        
+
         String fileName = commandLine.getOptionValue(name);
         if (null == fileName) {
             fileName = fileProperties.getProperty(name);
         }
 
         if (null == fileName) return null;
-        
+
         File file = new File(fileName);
-        
+
         try {
             FileWriter fileWriter = new FileWriter(file);
             return new PrintWriter(fileWriter);
-        } 
+        }
         catch (IOException e) {
             error(name + " parameter file name '" + fileName + "' cannot be opened for writing.");
             return null;
@@ -222,28 +234,28 @@ public class ServerSettings {
     private void error(String message) {
         System.out.println("error with command-line option: " + message);
     }
-    
+
     //---------------------------------------------------------------
     private void printHelp(Options options) {
         new HelpFormatter().printHelp("java -jar weinre.jar [options]", options);
     }
-    
+
     //---------------------------------------------------------------
     public int getHttpPort() {
         return httpPort;
     }
-    
+
     //---------------------------------------------------------------
     public String getBoundHost() {
         return boundHost;
     }
-    
+
     //---------------------------------------------------------------
     public String[] getBoundHosts() {
         if (getBoundHostValue() != null) {
             return new String[] { getBoundHost() };
         }
-        
+
         ArrayList<String> hosts = new ArrayList<String>();
         List<NetworkInterface> networkInterfaces;
         try {
@@ -252,45 +264,45 @@ public class ServerSettings {
         catch (SocketException e) {
             return new String[]{"localhost"};
         }
-    
+
         for (NetworkInterface networkInterface: networkInterfaces) {
             List<InetAddress> inetAddresses = Collections.list(networkInterface.getInetAddresses());
-            
+
             for (InetAddress inetAddress: inetAddresses) {
                 hosts.add(inetAddress.getHostName());
             }
         }
-        
+
         return hosts.toArray(new String[]{});
     }
-    
+
     //---------------------------------------------------------------
     public String getBoundHostValue() {
         if (BoundHostAllConstant.equals(boundHost)) return null;
-        
+
         return boundHost;
     }
-    
+
     //---------------------------------------------------------------
     public boolean getVerbose() {
         return verbose;
     }
-    
+
     //---------------------------------------------------------------
     public int getReadTimeoutSeconds() {
         return readTimeoutSeconds;
     }
-    
+
     //---------------------------------------------------------------
     public int getDeathTimeoutSeconds() {
         return deathTimeoutSeconds;
     }
-    
+
     //---------------------------------------------------------------
     public boolean useProxy() {
         return false; // useProxy;
     }
-    
+
     //---------------------------------------------------------------
     public boolean reuseAddr() {
         return reuseAddr;
@@ -307,12 +319,12 @@ public class ServerSettings {
         if (null == hostName) return "localhost";
         return hostName;
     }
-        
+
     //---------------------------------------------------------------
     @SuppressWarnings("unused")
     private String getSuperNiceHostName() {
         String hostName = getBoundHost();
-        
+
         // get the host address used
         InetAddress inetAddress;
         try {

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/Target.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/Target.java b/weinre.server/src/weinre/server/Target.java
index ec6a986..8bb3113 100644
--- a/weinre.server/src/weinre/server/Target.java
+++ b/weinre.server/src/weinre/server/Target.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -20,31 +32,31 @@ public class Target extends Connector {
 
     private List<Client> connectedClients;
     private String       url;
-    
+
     //---------------------------------------------------------------
     public Target(Channel channel, String url) {
         super(channel);
-        
+
         connectedClients = new ArrayList<Client>();
         this.url = url;
         _register();
 
     }
-    
+
     //---------------------------------------------------------------
     public String getURL() {
         return this.url;
     }
-    
+
     //---------------------------------------------------------------
     public boolean isTarget() {
         return true;
     }
-    
+
     //---------------------------------------------------------------
     public List<Client> getConnectedClients() {
         List<Client> result = new LinkedList<Client>();
-        
+
         Lock.lock();
         try {
             result.addAll(connectedClients);
@@ -52,32 +64,32 @@ public class Target extends Connector {
         finally {
             Lock.unlock();
         }
-        
+
         return result;
     }
-    
+
     //---------------------------------------------------------------
     protected void _connect(Client client) {
         if (null == client) return;
-        
+
         Lock.lock();
-        
+
         try {
             if (connectedClients.contains(client)) return;
-        
+
             connectedClients.add(client);
         }
         finally {
             Lock.unlock();
         }
     }
-    
+
     //---------------------------------------------------------------
     protected void _disconnect(Client client) {
         if (null == client) return;
-        
+
         Lock.lock();
-        
+
         try {
             if (!connectedClients.contains(client)) return;
 
@@ -91,7 +103,7 @@ public class Target extends Connector {
     //---------------------------------------------------------------
     public JSONObject getDescription() {
         JSONObject result = new JSONObject();
-        
+
         try {
             result.put("channel",            getChannel().getName());
             result.put("id",                 getChannel().getId());
@@ -101,8 +113,8 @@ public class Target extends Connector {
         } catch (JSONException e) {
             throw new RuntimeException(e);
         }
-        
+
         return result;
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/Utility.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/Utility.java b/weinre.server/src/weinre/server/Utility.java
index 260cc2b..cc1dca4 100644
--- a/weinre.server/src/weinre/server/Utility.java
+++ b/weinre.server/src/weinre/server/Utility.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -16,7 +28,7 @@ import java.util.Properties;
 
 //-------------------------------------------------------------------
 public class Utility {
-    
+
     static private int SequenceNumber = 1 + new SecureRandom().nextInt(Integer.MAX_VALUE - 1);
 
     //---------------------------------------------------------------
@@ -25,16 +37,16 @@ public class Utility {
     //---------------------------------------------------------------
     static public synchronized int getNextSequenceNumber() {
         int result = SequenceNumber;
-        
+
         SequenceNumber = (result == Integer.MAX_VALUE) ? 1 : result + 1;
-        
+
         return result;
     }
-    
+
     //---------------------------------------------------------------
     static public String reverse(String string) {
         char[] responseChars = string.toCharArray();
-        
+
         for (int i=0; i<responseChars.length/2; i++) {
             char tmp                                = responseChars[responseChars.length-i-1];
             responseChars[responseChars.length-i-1] = responseChars[i];
@@ -42,32 +54,32 @@ public class Utility {
         }
         return String.valueOf(responseChars);
     }
-    
+
     //---------------------------------------------------------------
     static public byte[] reverse(byte[] data, int offset, int length) {
         byte[] response = new byte[length];
-        
+
         for (int i=0; i<length; i++) {
             response[i] = data[offset + length - i - 1];
         }
 
         return response;
     }
-    
+
     //---------------------------------------------------------------
     static public Properties readPropertiesFile(String fileName) {
         Properties result = new Properties();
-        
+
         String userHome = System.getProperty("user.home");
         if (null == userHome) {
             Main.warn("System property user.home not set!");
             return result;
         }
-        
+
         File file = new File(new File(userHome, ".weinre"), fileName);
-        
+
         if (!file.exists()) return result;
-        
+
         FileReader fr = null;
         try {
             fr = new FileReader(file);
@@ -79,13 +91,13 @@ public class Utility {
         finally {
             try { if (fr != null) fr.close(); } catch (Exception e) {}
         }
-        
+
         // ya, Properties doesn't trim space off values
         for (String key: result.stringPropertyNames()) {
             String val = result.getProperty(key);
             result.setProperty(key, val.trim());
         }
-        
+
         return result;
     }
 
@@ -96,7 +108,7 @@ public class Utility {
             Main.warn("System property user.home not set!");
             return;
         }
-        
+
         File file = new File(userHome, ".weinre");
         if (!file.exists()) {
             if (!file.mkdir()) {
@@ -104,12 +116,12 @@ public class Utility {
                 return;
             }
         }
-        
+
         if (!file.isDirectory()) {
             Main.warn("can't write ~/.weinre/" + fileName + " since ~/.weinre is not a directory");
             return;
         }
-        
+
         file = new File(file, fileName);
         FileWriter fw = null;
         try {

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/WatchDog.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/WatchDog.java b/weinre.server/src/weinre/server/WatchDog.java
index 9aa6553..327e287 100644
--- a/weinre.server/src/weinre/server/WatchDog.java
+++ b/weinre.server/src/weinre/server/WatchDog.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server;
@@ -13,31 +25,31 @@ import java.util.List;
 public class WatchDog {
 
     public static long ChannelLivelinessTimeout = 5000;
-    
+
     //---------------------------------------------------------------
     static public void start() {
 
         final WatchDog watchDog = new WatchDog();
-        
+
         Runnable runnable = new Runnable() {
-            public void run() { watchDog.run(); } 
+            public void run() { watchDog.run(); }
         };
-        
+
         Thread thread = new Thread(runnable, watchDog.getClass().getName());
-        
+
         thread.start();
     }
-    
+
     //---------------------------------------------------------------
     private WatchDog() {
         super();
     }
-    
+
     //---------------------------------------------------------------
     private void run() {
         while(true) {
             sleep();
-            
+
             checkForDeadChannels();
         }
     }
@@ -45,24 +57,24 @@ public class WatchDog {
     //---------------------------------------------------------------
     private void checkForDeadChannels() {
         List<Channel> channels = ChannelManager.$.getChannels();
-        
+
         int deathTimeout = Main.getSettings().getDeathTimeoutSeconds() * 1000;
-        
+
         long currentTime = System.currentTimeMillis();
         for (Channel channel: channels) {
             long lastRead = channel.getLastRead();
-            
+
             if (currentTime - lastRead > deathTimeout) {
                 channel.close();
             }
         }
     }
-    
+
     //---------------------------------------------------------------
     private void sleep() {
         try {
             Thread.sleep(1000);
-        } 
+        }
         catch (InterruptedException e) {
             throw new RuntimeException(e);
         }

http://git-wip-us.apache.org/repos/asf/incubator-cordova-weinre/blob/c1d74e2c/weinre.server/src/weinre/server/http/ClassPathResourceHandler.java
----------------------------------------------------------------------
diff --git a/weinre.server/src/weinre/server/http/ClassPathResourceHandler.java b/weinre.server/src/weinre/server/http/ClassPathResourceHandler.java
index f6eccda..fc0e88f 100644
--- a/weinre.server/src/weinre/server/http/ClassPathResourceHandler.java
+++ b/weinre.server/src/weinre/server/http/ClassPathResourceHandler.java
@@ -1,8 +1,20 @@
 /*
- * weinre is available under *either* the terms of the modified BSD license *or* the
- * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
- * 
- * Copyright (c) 2010, 2011 IBM Corporation
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
 package weinre.server.http;
@@ -24,7 +36,7 @@ public class ClassPathResourceHandler extends ResourceHandler {
     //---------------------------------------------------------------
     public ClassPathResourceHandler(String pathPrefix) {
         super();
-        
+
         this.pathPrefix = pathPrefix;
     }
 
@@ -38,17 +50,17 @@ public class ClassPathResourceHandler extends ResourceHandler {
         if (path.startsWith("/client/extensions/")) {
             return ExtensionManager.getResource(path);
         }
-        
+
         path = pathPrefix + path;
         URL url = getClass().getClassLoader().getResource(path);
         if (url != null)
             try {
                 return Resource.newResource(url);
-            } 
+            }
             catch (IOException e) {
                 throw new MalformedURLException();
             }
-        
+
         return null;
     }
 


Mime
View raw message