flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [42/51] [partial] FLEX-34306 - [BlazeDS] Make the BlazeDS build run on Windows machines - Added some mkdir commands to the ANT Build.java - Did some fine-tuning to resolve some compile errors
Date Mon, 05 May 2014 20:08:56 GMT
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/common/src/flex/messaging/log/LogCategories.java
----------------------------------------------------------------------
diff --git a/modules/common/src/flex/messaging/log/LogCategories.java b/modules/common/src/flex/messaging/log/LogCategories.java
old mode 100755
new mode 100644
index 3f6945b..5267ba2
--- a/modules/common/src/flex/messaging/log/LogCategories.java
+++ b/modules/common/src/flex/messaging/log/LogCategories.java
@@ -1,112 +1,112 @@
-/*
- * 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 flex.messaging.log;
-
-/**
- * @exclude
- *
- * This class contains all the log categories used in our classes. When adding
- * a new log category, make sure the sample configuration file is updated
- * as well.
- *
- */
-public interface LogCategories
-{
-    String CLIENT_FLEXCLIENT = "Client.FlexClient";
-    String CLIENT_FLEXCLIENT_ADAPTIVE = "Client.FlexClient.Adaptive";
-    String CLIENT_MESSAGECLIENT = "Client.MessageClient";
-
-    String CONFIGURATION = "Configuration";
-    String CONFIGURATION_SPRING = "Configuration.Spring";
-
-    String ENDPOINT_GENERAL = "Endpoint.General";
-    String ENDPOINT_AMF = "Endpoint.AMF";
-    String ENDPOINT_NIO_AMF = "Endpoint.NIOAMF";
-    String ENDPOINT_FLEXSESSION = "Endpoint.FlexSession";
-    String ENDPOINT_GATEWAY = "Endpoint.Gateway";
-    String ENDPOINT_HTTP = "Endpoint.HTTP";
-    String ENDPOINT_NIO_HTTP = "Endpoint.NIOHTTP";
-    String ENDPOINT_RTMP = "Endpoint.RTMP";
-    String ENDPOINT_STREAMING_AMF = "Endpoint.StreamingAMF";
-    String ENDPOINT_STREAMING_NIO_AMF = "Endpoint.StreamingNIOAMF";
-    String ENDPOINT_STREAMING_HTTP = "Endpoint.StreamingHTTP";
-    String ENDPOINT_STREAMING_NIO_HTTP = "Endpoint.StreamingNIOHTTP";
-    String ENDPOINT_WEBSOCKET_NIO_AMF = "Endpoint.WebSocketNIOAMF";
-    String ENDPOINT_TYPE = "Endpoint.Type";
-
-    String EXECUTOR = "Executor";
-
-    String MANAGEMENT_GENERAL = "Management.General";
-    String MANAGEMENT_MBEANSERVER = "Management.MBeanServer";
-
-    String MESSAGE_GENERAL = "Message.General";
-    String MESSAGE_COMMAND = "Message.Command";
-    String MESSAGE_DATA = "Message.Data";
-    String MESSAGE_FILTER = "Message.Filter";
-    String MESSAGE_REMOTING = "Message.Remoting";
-    String MESSAGE_RPC = "Message.RPC";
-    String MESSAGE_SELECTOR = "Message.Selector";
-    String MESSAGE_TIMING = "Message.Timing";
-
-    String PROTOCOL_AMFSOCKET = "Protocol.AMFSocket";
-    String PROTOCOL_HTTP = "Protocol.HTTP";
-    String PROTOCOL_RTMP = "Protocol.RTMP";
-    String PROTOCOL_RTMPT = "Protocol.RTMPT";
-
-    String RESOURCE = "Resource";
-
-    String SERVICE_GENERAL = "Service.General";
-    String SERVICE_CLUSTER = "Service.Cluster";
-    String SERVICE_COLLABORATION = "Service.Collaboration";
-    String SERVICE_DATA = "Service.Data"; // Not a category but used by TargetSettings to replace DataService
-    String SERVICE_DATA_GENERAL = "Service.Data.General";
-    String SERVICE_DATA_HIBERNATE = "Service.Data.Hibernate";
-    String SERVICE_DATA_SQL = "Service.Data.SQL";
-    String SERVICE_DATA_TRANSACTION = "Service.Data.Transaction";
-    String SERVICE_ADVANCED_MESSAGING = "Service.AdvancedMessaging";
-    String SERVICE_NOTIFICATION = "Service.Notification";
-    String SERVICE_GATEWAY = "Service.Gateway";
-    String SERVICE_GATEWAY_CONNECTOR = "Service.Gateway.Connector";
-    String SERVICE_HTTP = "Service.HTTP";
-    String SERVICE_MESSAGE = "Service.Message";
-    String SERVICE_MESSAGE_JMS = "Service.Message.JMS";
-    String SERVICE_REMOTING = "Service.Remoting";
-
-    String SECURITY = "Security";
-
-    String SOCKET_SERVER_GENERAL = "SocketServer.General";
-    String SOCKET_SERVER_BYTE_BUFFER_MANAGEMENT = "SocketServer.ByteBufferManagement";
-
-    String SSL = "SSL";
-
-    String STARTUP_MESSAGEBROKER = "Startup.MessageBroker";
-    String STARTUP_SERVICE = "Startup.Service";
-    String STARTUP_DESTINATION = "Startup.Destination";
-
-    String TIMEOUT = "Timeout";
-
-    String TRANSPORT_RELIABLE = "Transport.Reliable";
-    String TRANSPORT_THROTTLE = "Transport.Throttle";
-    String TRANSPORT_THROTTLE_BUFFER = "Transport.Throttle.Buffer";
-    String TRANSPORT_THROTTLE_CONFLATE = "Transport.Throttle.Conflate";
-
-    String WSRP_GENERAL = "WSRP.General";
-
-    String RDS = "RDS";
-
-    String FBSERVICES_INTROSPECTION = "FBServices.Introspection";
-}
+/*
+ * 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 flex.messaging.log;
+
+/**
+ * @exclude
+ *
+ * This class contains all the log categories used in our classes. When adding
+ * a new log category, make sure the sample configuration file is updated
+ * as well.
+ *
+ */
+public interface LogCategories
+{
+    String CLIENT_FLEXCLIENT = "Client.FlexClient";
+    String CLIENT_FLEXCLIENT_ADAPTIVE = "Client.FlexClient.Adaptive";
+    String CLIENT_MESSAGECLIENT = "Client.MessageClient";
+
+    String CONFIGURATION = "Configuration";
+    String CONFIGURATION_SPRING = "Configuration.Spring";
+
+    String ENDPOINT_GENERAL = "Endpoint.General";
+    String ENDPOINT_AMF = "Endpoint.AMF";
+    String ENDPOINT_NIO_AMF = "Endpoint.NIOAMF";
+    String ENDPOINT_FLEXSESSION = "Endpoint.FlexSession";
+    String ENDPOINT_GATEWAY = "Endpoint.Gateway";
+    String ENDPOINT_HTTP = "Endpoint.HTTP";
+    String ENDPOINT_NIO_HTTP = "Endpoint.NIOHTTP";
+    String ENDPOINT_RTMP = "Endpoint.RTMP";
+    String ENDPOINT_STREAMING_AMF = "Endpoint.StreamingAMF";
+    String ENDPOINT_STREAMING_NIO_AMF = "Endpoint.StreamingNIOAMF";
+    String ENDPOINT_STREAMING_HTTP = "Endpoint.StreamingHTTP";
+    String ENDPOINT_STREAMING_NIO_HTTP = "Endpoint.StreamingNIOHTTP";
+    String ENDPOINT_WEBSOCKET_NIO_AMF = "Endpoint.WebSocketNIOAMF";
+    String ENDPOINT_TYPE = "Endpoint.Type";
+
+    String EXECUTOR = "Executor";
+
+    String MANAGEMENT_GENERAL = "Management.General";
+    String MANAGEMENT_MBEANSERVER = "Management.MBeanServer";
+
+    String MESSAGE_GENERAL = "Message.General";
+    String MESSAGE_COMMAND = "Message.Command";
+    String MESSAGE_DATA = "Message.Data";
+    String MESSAGE_FILTER = "Message.Filter";
+    String MESSAGE_REMOTING = "Message.Remoting";
+    String MESSAGE_RPC = "Message.RPC";
+    String MESSAGE_SELECTOR = "Message.Selector";
+    String MESSAGE_TIMING = "Message.Timing";
+
+    String PROTOCOL_AMFSOCKET = "Protocol.AMFSocket";
+    String PROTOCOL_HTTP = "Protocol.HTTP";
+    String PROTOCOL_RTMP = "Protocol.RTMP";
+    String PROTOCOL_RTMPT = "Protocol.RTMPT";
+
+    String RESOURCE = "Resource";
+
+    String SERVICE_GENERAL = "Service.General";
+    String SERVICE_CLUSTER = "Service.Cluster";
+    String SERVICE_COLLABORATION = "Service.Collaboration";
+    String SERVICE_DATA = "Service.Data"; // Not a category but used by TargetSettings to replace DataService
+    String SERVICE_DATA_GENERAL = "Service.Data.General";
+    String SERVICE_DATA_HIBERNATE = "Service.Data.Hibernate";
+    String SERVICE_DATA_SQL = "Service.Data.SQL";
+    String SERVICE_DATA_TRANSACTION = "Service.Data.Transaction";
+    String SERVICE_ADVANCED_MESSAGING = "Service.AdvancedMessaging";
+    String SERVICE_NOTIFICATION = "Service.Notification";
+    String SERVICE_GATEWAY = "Service.Gateway";
+    String SERVICE_GATEWAY_CONNECTOR = "Service.Gateway.Connector";
+    String SERVICE_HTTP = "Service.HTTP";
+    String SERVICE_MESSAGE = "Service.Message";
+    String SERVICE_MESSAGE_JMS = "Service.Message.JMS";
+    String SERVICE_REMOTING = "Service.Remoting";
+
+    String SECURITY = "Security";
+
+    String SOCKET_SERVER_GENERAL = "SocketServer.General";
+    String SOCKET_SERVER_BYTE_BUFFER_MANAGEMENT = "SocketServer.ByteBufferManagement";
+
+    String SSL = "SSL";
+
+    String STARTUP_MESSAGEBROKER = "Startup.MessageBroker";
+    String STARTUP_SERVICE = "Startup.Service";
+    String STARTUP_DESTINATION = "Startup.Destination";
+
+    String TIMEOUT = "Timeout";
+
+    String TRANSPORT_RELIABLE = "Transport.Reliable";
+    String TRANSPORT_THROTTLE = "Transport.Throttle";
+    String TRANSPORT_THROTTLE_BUFFER = "Transport.Throttle.Buffer";
+    String TRANSPORT_THROTTLE_CONFLATE = "Transport.Throttle.Conflate";
+
+    String WSRP_GENERAL = "WSRP.General";
+
+    String RDS = "RDS";
+
+    String FBSERVICES_INTROSPECTION = "FBServices.Introspection";
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/common/src/flex/messaging/log/LogEvent.java
----------------------------------------------------------------------
diff --git a/modules/common/src/flex/messaging/log/LogEvent.java b/modules/common/src/flex/messaging/log/LogEvent.java
old mode 100755
new mode 100644
index 04a168b..1eccc58
--- a/modules/common/src/flex/messaging/log/LogEvent.java
+++ b/modules/common/src/flex/messaging/log/LogEvent.java
@@ -1,116 +1,116 @@
-/*
- * 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 flex.messaging.log;
-
-/**
- * @exclude
- */
-public class LogEvent
-{
-    public static final short NONE = 2000;
-    public static final short FATAL = 1000;
-    public static final short ERROR = 8;
-    public static final short WARN = 6;
-    public static final short INFO = 4;
-    public static final short DEBUG = 2;
-    public static final short ALL = 0;
-
-    /**
-     * Provides access to the level for this log event.
-     * Valid values are:
-     * <ul>
-     * <li><code>LogEvent.DEBUG</code> designates informational
-     * level messages that are fine grained and most helpful when
-     * debugging an application.</li>
-     *
-     * <li><code>LogEvent.INFO</code> designates informational messages
-     * that highlight the progress of the application at
-     * coarse-grained level.</li>
-     *
-     * <li><code>LogEvent.WARN</code> designates events that could be
-     * harmful to the application operation.</li>
-     *
-     * <li><code>LogEvent.ERROR</code> designates error events that might
-     * still allow the application to continue running.</li>
-     *
-     * <li><code>LogEvent.FATAL</code> designates events that are very
-     * harmful and will eventually lead to application failure.</li>
-     *
-     * </ul>
-     */
-    public short level;
-
-    /**
-     * Provides access to the message that was logged.
-     */
-    public String message;
-
-    /**
-     * Logger instance that raised the log event.
-     */
-    public Logger logger;
-
-    /**
-     * Related exception, if applicable.
-     */
-    public Throwable throwable;
-
-    /**
-     * Constructor.
-     *
-     * @param lgr Logger instance that raised the log event.
-     * @param msg Message that was logged.
-     * @param lvl The level for the log event.
-     * @param t Related exception, if applicable.
-     */
-    public LogEvent(Logger lgr, String msg, short lvl, Throwable t)
-    {
-        logger = lgr;
-        message = msg;
-        level = lvl;
-        throwable = t;
-    }
-
-    /**
-     * Returns a string value representing the level specified.
-     *
-     * @param value the level a string is desired for.
-     * @return the level specified in english
-     */
-    public static String getLevelString(short value)
-    {
-        switch (value)
-        {
-            case NONE:
-                return ("NONE");
-            case FATAL:
-                return ("FATAL");
-            case ERROR:
-                return ("ERROR");
-            case WARN:
-                return ("WARN");
-            case INFO:
-                return ("INFO");
-            case DEBUG:
-                return ("DEBUG");
-            case ALL:
-                return ("ALL");
-            default:
-                return ("UNKNOWN");
-        }
-    }
-}
+/*
+ * 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 flex.messaging.log;
+
+/**
+ * @exclude
+ */
+public class LogEvent
+{
+    public static final short NONE = 2000;
+    public static final short FATAL = 1000;
+    public static final short ERROR = 8;
+    public static final short WARN = 6;
+    public static final short INFO = 4;
+    public static final short DEBUG = 2;
+    public static final short ALL = 0;
+
+    /**
+     * Provides access to the level for this log event.
+     * Valid values are:
+     * <ul>
+     * <li><code>LogEvent.DEBUG</code> designates informational
+     * level messages that are fine grained and most helpful when
+     * debugging an application.</li>
+     *
+     * <li><code>LogEvent.INFO</code> designates informational messages
+     * that highlight the progress of the application at
+     * coarse-grained level.</li>
+     *
+     * <li><code>LogEvent.WARN</code> designates events that could be
+     * harmful to the application operation.</li>
+     *
+     * <li><code>LogEvent.ERROR</code> designates error events that might
+     * still allow the application to continue running.</li>
+     *
+     * <li><code>LogEvent.FATAL</code> designates events that are very
+     * harmful and will eventually lead to application failure.</li>
+     *
+     * </ul>
+     */
+    public short level;
+
+    /**
+     * Provides access to the message that was logged.
+     */
+    public String message;
+
+    /**
+     * Logger instance that raised the log event.
+     */
+    public Logger logger;
+
+    /**
+     * Related exception, if applicable.
+     */
+    public Throwable throwable;
+
+    /**
+     * Constructor.
+     *
+     * @param lgr Logger instance that raised the log event.
+     * @param msg Message that was logged.
+     * @param lvl The level for the log event.
+     * @param t Related exception, if applicable.
+     */
+    public LogEvent(Logger lgr, String msg, short lvl, Throwable t)
+    {
+        logger = lgr;
+        message = msg;
+        level = lvl;
+        throwable = t;
+    }
+
+    /**
+     * Returns a string value representing the level specified.
+     *
+     * @param value the level a string is desired for.
+     * @return the level specified in english
+     */
+    public static String getLevelString(short value)
+    {
+        switch (value)
+        {
+            case NONE:
+                return ("NONE");
+            case FATAL:
+                return ("FATAL");
+            case ERROR:
+                return ("ERROR");
+            case WARN:
+                return ("WARN");
+            case INFO:
+                return ("INFO");
+            case DEBUG:
+                return ("DEBUG");
+            case ALL:
+                return ("ALL");
+            default:
+                return ("UNKNOWN");
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/common/src/flex/messaging/log/Logger.java
----------------------------------------------------------------------
diff --git a/modules/common/src/flex/messaging/log/Logger.java b/modules/common/src/flex/messaging/log/Logger.java
old mode 100755
new mode 100644
index e8f622f..a424437
--- a/modules/common/src/flex/messaging/log/Logger.java
+++ b/modules/common/src/flex/messaging/log/Logger.java
@@ -1,402 +1,402 @@
-/*
- * 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 flex.messaging.log;
-
-import flex.messaging.util.PrettyPrinter;
-import flex.messaging.util.StringUtils;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-/**
- * The <code>Logger</code> class is used to log out information. It provides named
- * methods to log information out at the desired level. Each <code>Logger</code>
- * will log information out for a log category that is settable.
- *
- * @exclude
- */
-public class Logger
-{
-    /**
-     * The category this logger send messages for.
-     */
-    private volatile String category;
-
-    /**
-     * The list of targets that this logger will dispatch log events to.
-     */
-    private final ArrayList targets;
-
-    /**
-     * Constructs a <code>Logger</code> instance that will log
-     * information out to the specified category.
-     *
-     * @param category The category to log information for.
-     */
-    public Logger(String category)
-    {
-        this.category = category;
-        targets = new ArrayList();
-    }
-
-    /**
-     * Returns the category this <code>Logger</code> logs information for.
-     *
-     * @return The category this <code>Logger</code> logs information for.
-     */
-    public String getCategory()
-    {
-        return category;
-    }
-
-    /**
-     * Determines whether the <code>Logger</code> has at least one target.
-     * 
-     * @return True if the <code>Logger</code> has one or more targets.
-     */
-    public boolean hasTarget()
-    {
-        synchronized (targets)
-        {
-            return !targets.isEmpty();
-        }
-    }
-    /**
-     * Adds a <code>Target</code> that will format and output log events
-     * generated by this <code>Logger</code>.
-     *
-     * @param target The <code>Target</code> to add.
-     */
-    void addTarget(Target target)
-    {
-        synchronized (targets)
-        {
-            if (!targets.contains(target))
-                targets.add(target);
-        }
-    }
-
-    /**
-     * Removes a <code>Target</code> from this <code>Logger</code>.
-     *
-     * @param target The <code>Target</code> to remove.
-     */
-    void removeTarget(Target target)
-    {
-        synchronized (targets)
-        {
-            targets.remove(target);
-        }
-    }
-
-    /*
-     *  DEBUG
-     */
-    /**
-     * Logs out a debug message.
-     *
-     * @param message The message to log.
-     */
-    public void debug(String message)
-    {
-        log(LogEvent.DEBUG, message, null, null);
-    }
-
-    /**
-     * Logs out a debug message associated with a <code>Throwable</code>.
-     *
-     * @param message The message to log.
-     * @param t The associated <code>Throwable</code>.
-     */
-    public void debug(String message, Throwable t)
-    {
-        log(LogEvent.DEBUG, message, null, t);
-    }
-
-    /**
-     * Logs out a debug message supporting positional parameter substitutions.
-     *
-     * @param message The message to log.
-     * @param parameters Parameters to substitute into the message.
-     */
-    public void debug(String message, Object[] parameters)
-    {
-        log(LogEvent.DEBUG, message, parameters, null);
-    }
-
-    /**
-     * Logs out a debug message supporting positional parameter substitutions and an
-     * associated <code>Throwable</code>.
-     *
-     * @param message The message to log.
-     * @param parameters Parameters to substitute into the message.
-     * @param t The associated <code>Throwable</code>.
-     */
-    public void debug(String message, Object[] parameters, Throwable t)
-    {
-        log(LogEvent.DEBUG, message, parameters, t);
-    }
-
-    /*
-     *  INFO
-     */
-    /**
-     * Logs out an info message.
-     *
-     * @param message The message to log.
-     */
-    public void info(String message)
-    {
-        log(LogEvent.INFO, message, null, null);
-    }
-
-    /**
-     * Logs out an info message associated with a <code>Throwable</code>.
-     *
-     * @param message The message to log.
-     * @param t The associated <code>Throwable</code>.
-     */
-    public void info(String message, Throwable t)
-    {
-        log(LogEvent.INFO, message, null, t);
-    }
-
-    /**
-     * Logs out an info message supporting positional parameter substitutions.
-     *
-     * @param message The message to log.
-     * @param parameters Parameters to substitute into the message.
-     */
-    public void info(String message, Object[] parameters)
-    {
-        log(LogEvent.INFO, message, parameters, null);
-    }
-
-    /**
-     * Logs out an info message supporting positional parameter substitutions and an
-     * associated <code>Throwable</code>.
-     *
-     * @param message The message to log.
-     * @param parameters Parameters to substitute into the message.
-     * @param t The associated <code>Throwable</code>.
-     */
-    public void info(String message, Object[] parameters, Throwable t)
-    {
-        log(LogEvent.INFO, message, parameters, t);
-    }
-
-    /*
-     *  WARN
-     */
-    /**
-     * Logs out a warn message.
-     *
-     * @param message The message to log.
-     */
-    public void warn(String message)
-    {
-        log(LogEvent.WARN, message, null, null);
-    }
-
-    /**
-     * Logs out a warn message associated with a <code>Throwable</code>.
-     *
-     * @param message The message to log.
-     * @param t The associated <code>Throwable</code>.
-     */
-    public void warn(String message, Throwable t)
-    {
-        log(LogEvent.WARN, message, null, t);
-    }
-
-    /**
-     * Logs out a warn message supporting positional parameter substitutions.
-     *
-     * @param message The message to log.
-     * @param parameters Parameters to substitute into the message.
-     */
-    public void warn(String message, Object[] parameters)
-    {
-        log(LogEvent.WARN, message, parameters, null);
-    }
-
-    /**
-     * Logs out a warn message supporting positional parameter substitutions and an
-     * associated <code>Throwable</code>.
-     *
-     * @param message The message to log.
-     * @param parameters Parameters to substitute into the message.
-     * @param t The associated <code>Throwable</code>.
-     */
-    public void warn(String message, Object[] parameters, Throwable t)
-    {
-        log(LogEvent.WARN, message, parameters, t);
-    }
-
-    /*
-     *  ERROR
-     */
-    /**
-     * Logs out an error message.
-     *
-     * @param message The message to log.
-     */
-    public void error(String message)
-    {
-        log(LogEvent.ERROR, message, null, null);
-    }
-
-    /**
-     * Logs out an error message associated with a <code>Throwable</code>.
-     *
-     * @param message The message to log.
-     * @param t The associated <code>Throwable</code>.
-     */
-    public void error(String message, Throwable t)
-    {
-        log(LogEvent.ERROR, message, null, t);
-    }
-
-    /**
-     * Logs out an error message supporting positional parameter substitutions.
-     *
-     * @param message The message to log.
-     * @param parameters Parameters to substitute into the message.
-     */
-    public void error(String message, Object[] parameters)
-    {
-        log(LogEvent.ERROR, message, parameters, null);
-    }
-
-    /**
-     * Logs out an error message supporting positional parameter substitutions and an
-     * associated <code>Throwable</code>.
-     *
-     * @param message The message to log.
-     * @param parameters Parameters to substitute into the message.
-     * @param t The associated <code>Throwable</code>.
-     */
-    public void error(String message, Object[] parameters, Throwable t)
-    {
-        log(LogEvent.ERROR, message, parameters, t);
-    }
-
-    /*
-    *  FATAL
-    */
-    /**
-     * Logs out a fatal message.
-     *
-     * @param message The message to log.
-     */
-    public void fatal(String message)
-    {
-        log(LogEvent.FATAL, message, null, null);
-    }
-
-    /**
-     * Logs out a fatal message associated with a <code>Throwable</code>.
-     *
-     * @param message The message to log.
-     * @param t The associated <code>Throwable</code>.
-     */
-    public void fatal(String message, Throwable t)
-    {
-        log(LogEvent.FATAL, message, null, t);
-    }
-
-    /**
-     * Logs out a fatal message supporting positional parameter substitutions.
-     *
-     * @param message The message to log.
-     * @param parameters Parameters to substitute into the message.
-     */
-    public void fatal(String message, Object[] parameters)
-    {
-        log(LogEvent.FATAL, message, parameters, null);
-    }
-
-    /**
-     * Logs out a fatal message supporting positional parameter substitutions and an
-     * associated <code>Throwable</code>.
-     *
-     * @param message The message to log.
-     * @param parameters Parameters to substitute into the message.
-     * @param t The associated <code>Throwable</code>.
-     */
-    public void fatal(String message, Object[] parameters, Throwable t)
-    {
-        log(LogEvent.FATAL, message, parameters, t);
-    }
-
-    /**
-     * @exclude
-     * The methods named according to log level delegate to this method to log.
-     *
-     * @param level The log level.
-     * @param message The message to log.
-     * @param parameters Substitution parameters (may be null).
-     * @param t The associated <code>Throwable</code> (may be null).
-     */
-    public void log(short level, String message, Object[] parameters, Throwable t)
-    {
-        log(level, message, parameters, t, true);
-    }
-
-    /**
-     * @exclude
-     * Logs a passed message if its level verifies as high enough.
-     *
-     * @param level The log level.
-     * @param message The message to log.
-     * @param parameters Substitution parameters (may be null).
-     * @param t The associated <code>Throwable</code>.
-     * @param verifyLevel <code>true</code> to verify the log level; otherwise log without verifying the level.
-     */
-    public void log(short level, String message, Object[] parameters, Throwable t, boolean verifyLevel)
-    {
-        if (targets.size() > 0 && (!verifyLevel || (level >= Log.getTargetLevel())))
-        {
-            if (parameters != null)
-            {
-                PrettyPrinter prettyPrinter = Log.getPrettyPrinter();
-
-                // replace all of the parameters in the msg string
-                for(int i = 0; i < parameters.length; i++)
-                {
-                    String replacement = parameters[i] != null ? prettyPrinter.prettify(parameters[i]) : "null";
-
-                    //this guy runs into problems if the replacement has a \ or $ in it
-                    //message = message.replaceAll("\\{" + i + "\\}", replacement);
-                    message = StringUtils.substitute(message, "{" + i + "}", replacement);
-                }
-            }
-            LogEvent event = new LogEvent(this, message, level, t);
-            Target tgt;
-            synchronized (targets)
-            {
-                for (Iterator iter = targets.iterator(); iter.hasNext();)
-                {
-                    tgt = (Target) iter.next();
-                    if (!verifyLevel || (level >= tgt.getLevel()))
-                        tgt.logEvent(event);
-                }
-            }
-        }
-    }
-
-}
+/*
+ * 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 flex.messaging.log;
+
+import flex.messaging.util.PrettyPrinter;
+import flex.messaging.util.StringUtils;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * The <code>Logger</code> class is used to log out information. It provides named
+ * methods to log information out at the desired level. Each <code>Logger</code>
+ * will log information out for a log category that is settable.
+ *
+ * @exclude
+ */
+public class Logger
+{
+    /**
+     * The category this logger send messages for.
+     */
+    private volatile String category;
+
+    /**
+     * The list of targets that this logger will dispatch log events to.
+     */
+    private final ArrayList targets;
+
+    /**
+     * Constructs a <code>Logger</code> instance that will log
+     * information out to the specified category.
+     *
+     * @param category The category to log information for.
+     */
+    public Logger(String category)
+    {
+        this.category = category;
+        targets = new ArrayList();
+    }
+
+    /**
+     * Returns the category this <code>Logger</code> logs information for.
+     *
+     * @return The category this <code>Logger</code> logs information for.
+     */
+    public String getCategory()
+    {
+        return category;
+    }
+
+    /**
+     * Determines whether the <code>Logger</code> has at least one target.
+     * 
+     * @return True if the <code>Logger</code> has one or more targets.
+     */
+    public boolean hasTarget()
+    {
+        synchronized (targets)
+        {
+            return !targets.isEmpty();
+        }
+    }
+    /**
+     * Adds a <code>Target</code> that will format and output log events
+     * generated by this <code>Logger</code>.
+     *
+     * @param target The <code>Target</code> to add.
+     */
+    void addTarget(Target target)
+    {
+        synchronized (targets)
+        {
+            if (!targets.contains(target))
+                targets.add(target);
+        }
+    }
+
+    /**
+     * Removes a <code>Target</code> from this <code>Logger</code>.
+     *
+     * @param target The <code>Target</code> to remove.
+     */
+    void removeTarget(Target target)
+    {
+        synchronized (targets)
+        {
+            targets.remove(target);
+        }
+    }
+
+    /*
+     *  DEBUG
+     */
+    /**
+     * Logs out a debug message.
+     *
+     * @param message The message to log.
+     */
+    public void debug(String message)
+    {
+        log(LogEvent.DEBUG, message, null, null);
+    }
+
+    /**
+     * Logs out a debug message associated with a <code>Throwable</code>.
+     *
+     * @param message The message to log.
+     * @param t The associated <code>Throwable</code>.
+     */
+    public void debug(String message, Throwable t)
+    {
+        log(LogEvent.DEBUG, message, null, t);
+    }
+
+    /**
+     * Logs out a debug message supporting positional parameter substitutions.
+     *
+     * @param message The message to log.
+     * @param parameters Parameters to substitute into the message.
+     */
+    public void debug(String message, Object[] parameters)
+    {
+        log(LogEvent.DEBUG, message, parameters, null);
+    }
+
+    /**
+     * Logs out a debug message supporting positional parameter substitutions and an
+     * associated <code>Throwable</code>.
+     *
+     * @param message The message to log.
+     * @param parameters Parameters to substitute into the message.
+     * @param t The associated <code>Throwable</code>.
+     */
+    public void debug(String message, Object[] parameters, Throwable t)
+    {
+        log(LogEvent.DEBUG, message, parameters, t);
+    }
+
+    /*
+     *  INFO
+     */
+    /**
+     * Logs out an info message.
+     *
+     * @param message The message to log.
+     */
+    public void info(String message)
+    {
+        log(LogEvent.INFO, message, null, null);
+    }
+
+    /**
+     * Logs out an info message associated with a <code>Throwable</code>.
+     *
+     * @param message The message to log.
+     * @param t The associated <code>Throwable</code>.
+     */
+    public void info(String message, Throwable t)
+    {
+        log(LogEvent.INFO, message, null, t);
+    }
+
+    /**
+     * Logs out an info message supporting positional parameter substitutions.
+     *
+     * @param message The message to log.
+     * @param parameters Parameters to substitute into the message.
+     */
+    public void info(String message, Object[] parameters)
+    {
+        log(LogEvent.INFO, message, parameters, null);
+    }
+
+    /**
+     * Logs out an info message supporting positional parameter substitutions and an
+     * associated <code>Throwable</code>.
+     *
+     * @param message The message to log.
+     * @param parameters Parameters to substitute into the message.
+     * @param t The associated <code>Throwable</code>.
+     */
+    public void info(String message, Object[] parameters, Throwable t)
+    {
+        log(LogEvent.INFO, message, parameters, t);
+    }
+
+    /*
+     *  WARN
+     */
+    /**
+     * Logs out a warn message.
+     *
+     * @param message The message to log.
+     */
+    public void warn(String message)
+    {
+        log(LogEvent.WARN, message, null, null);
+    }
+
+    /**
+     * Logs out a warn message associated with a <code>Throwable</code>.
+     *
+     * @param message The message to log.
+     * @param t The associated <code>Throwable</code>.
+     */
+    public void warn(String message, Throwable t)
+    {
+        log(LogEvent.WARN, message, null, t);
+    }
+
+    /**
+     * Logs out a warn message supporting positional parameter substitutions.
+     *
+     * @param message The message to log.
+     * @param parameters Parameters to substitute into the message.
+     */
+    public void warn(String message, Object[] parameters)
+    {
+        log(LogEvent.WARN, message, parameters, null);
+    }
+
+    /**
+     * Logs out a warn message supporting positional parameter substitutions and an
+     * associated <code>Throwable</code>.
+     *
+     * @param message The message to log.
+     * @param parameters Parameters to substitute into the message.
+     * @param t The associated <code>Throwable</code>.
+     */
+    public void warn(String message, Object[] parameters, Throwable t)
+    {
+        log(LogEvent.WARN, message, parameters, t);
+    }
+
+    /*
+     *  ERROR
+     */
+    /**
+     * Logs out an error message.
+     *
+     * @param message The message to log.
+     */
+    public void error(String message)
+    {
+        log(LogEvent.ERROR, message, null, null);
+    }
+
+    /**
+     * Logs out an error message associated with a <code>Throwable</code>.
+     *
+     * @param message The message to log.
+     * @param t The associated <code>Throwable</code>.
+     */
+    public void error(String message, Throwable t)
+    {
+        log(LogEvent.ERROR, message, null, t);
+    }
+
+    /**
+     * Logs out an error message supporting positional parameter substitutions.
+     *
+     * @param message The message to log.
+     * @param parameters Parameters to substitute into the message.
+     */
+    public void error(String message, Object[] parameters)
+    {
+        log(LogEvent.ERROR, message, parameters, null);
+    }
+
+    /**
+     * Logs out an error message supporting positional parameter substitutions and an
+     * associated <code>Throwable</code>.
+     *
+     * @param message The message to log.
+     * @param parameters Parameters to substitute into the message.
+     * @param t The associated <code>Throwable</code>.
+     */
+    public void error(String message, Object[] parameters, Throwable t)
+    {
+        log(LogEvent.ERROR, message, parameters, t);
+    }
+
+    /*
+    *  FATAL
+    */
+    /**
+     * Logs out a fatal message.
+     *
+     * @param message The message to log.
+     */
+    public void fatal(String message)
+    {
+        log(LogEvent.FATAL, message, null, null);
+    }
+
+    /**
+     * Logs out a fatal message associated with a <code>Throwable</code>.
+     *
+     * @param message The message to log.
+     * @param t The associated <code>Throwable</code>.
+     */
+    public void fatal(String message, Throwable t)
+    {
+        log(LogEvent.FATAL, message, null, t);
+    }
+
+    /**
+     * Logs out a fatal message supporting positional parameter substitutions.
+     *
+     * @param message The message to log.
+     * @param parameters Parameters to substitute into the message.
+     */
+    public void fatal(String message, Object[] parameters)
+    {
+        log(LogEvent.FATAL, message, parameters, null);
+    }
+
+    /**
+     * Logs out a fatal message supporting positional parameter substitutions and an
+     * associated <code>Throwable</code>.
+     *
+     * @param message The message to log.
+     * @param parameters Parameters to substitute into the message.
+     * @param t The associated <code>Throwable</code>.
+     */
+    public void fatal(String message, Object[] parameters, Throwable t)
+    {
+        log(LogEvent.FATAL, message, parameters, t);
+    }
+
+    /**
+     * @exclude
+     * The methods named according to log level delegate to this method to log.
+     *
+     * @param level The log level.
+     * @param message The message to log.
+     * @param parameters Substitution parameters (may be null).
+     * @param t The associated <code>Throwable</code> (may be null).
+     */
+    public void log(short level, String message, Object[] parameters, Throwable t)
+    {
+        log(level, message, parameters, t, true);
+    }
+
+    /**
+     * @exclude
+     * Logs a passed message if its level verifies as high enough.
+     *
+     * @param level The log level.
+     * @param message The message to log.
+     * @param parameters Substitution parameters (may be null).
+     * @param t The associated <code>Throwable</code>.
+     * @param verifyLevel <code>true</code> to verify the log level; otherwise log without verifying the level.
+     */
+    public void log(short level, String message, Object[] parameters, Throwable t, boolean verifyLevel)
+    {
+        if (targets.size() > 0 && (!verifyLevel || (level >= Log.getTargetLevel())))
+        {
+            if (parameters != null)
+            {
+                PrettyPrinter prettyPrinter = Log.getPrettyPrinter();
+
+                // replace all of the parameters in the msg string
+                for(int i = 0; i < parameters.length; i++)
+                {
+                    String replacement = parameters[i] != null ? prettyPrinter.prettify(parameters[i]) : "null";
+
+                    //this guy runs into problems if the replacement has a \ or $ in it
+                    //message = message.replaceAll("\\{" + i + "\\}", replacement);
+                    message = StringUtils.substitute(message, "{" + i + "}", replacement);
+                }
+            }
+            LogEvent event = new LogEvent(this, message, level, t);
+            Target tgt;
+            synchronized (targets)
+            {
+                for (Iterator iter = targets.iterator(); iter.hasNext();)
+                {
+                    tgt = (Target) iter.next();
+                    if (!verifyLevel || (level >= tgt.getLevel()))
+                        tgt.logEvent(event);
+                }
+            }
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/common/src/flex/messaging/log/Target.java
----------------------------------------------------------------------
diff --git a/modules/common/src/flex/messaging/log/Target.java b/modules/common/src/flex/messaging/log/Target.java
old mode 100755
new mode 100644
index c5c8224..7a39fb5
--- a/modules/common/src/flex/messaging/log/Target.java
+++ b/modules/common/src/flex/messaging/log/Target.java
@@ -1,112 +1,112 @@
-/*
- * 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 flex.messaging.log;
-
-import java.util.List;
-
-import flex.messaging.config.ConfigMap;
-
-/**
- * All logger target implementations within the logging framework must
- * implement this interface. <code>Target</code> implementations receive log events
- * and output information from these events to the appropriate output
- * destination which may be a console, log file or some other custom
- * destination.
- */
-public interface Target
-{
-    /**
-     * Initializes the target with id and properties.
-     *
-     * @param id id for the target.
-     * @param properties ConfigMap of properties for the target.
-     */
-    void initialize(String id, ConfigMap properties);
-
-    /**
-     * Returns the category filters defined for the <code>Target</code>.
-     *
-     * @return The category filters defined for the <code>Target</code>.
-     */
-    List getFilters();
-
-    /**
-     * Sets the category filters that the <code>Target</code> will process
-     * log events for.
-     *
-     * @param value The category filters that the <code>Target</code> will process
-     */
-    void setFilters(List value);
-
-    /**
-     * Adds the category filteer that the <code>Target</code> will process
-     * log events for.
-     *
-     * @param value The new category filter to add to the <code>Target</code>'s list of filters.
-     */
-    void addFilter(String value);
-
-    /**
-     * Removes a category filter from the list of filters the <code>Target</code> will
-     * process log events for.
-     *
-     * @param value The category filter to remove from the <code>Target</code>'s list of filters.
-     */
-    void removeFilter(String value);
-
-    /**
-     * Returns the log level that the <code>Target</code> will process log
-     * events for. Log events at this level, or at a higher priority level
-     * will be processed.
-     *
-     * @return The log level that the <code>Target</code> will process log events for.
-     */
-    short getLevel();
-
-    /**
-     * Sets the log level that the <code>Target</code> will process log events
-     * for. Log events at this level, or at a higher priority level will be
-     * processed.
-     *
-     * @param value The log level that the <code>Target</code> will process log events for.
-     */
-    void setLevel(short value);
-
-    /**
-     * Adds a <code>Logger</code> whose category matches the filters list for
-     * the <code>Target</code>. The <code>Logger</code> will dispatch log events
-     * to this <code>Target</code> to be output.
-     *
-     * @param logger The <code>Logger</code> to add.
-     */
-    void addLogger(Logger logger);
-
-    /**
-     * Removes a <code>Logger</code> from the <code>Target</code>.
-     *
-     * @param logger The <code>Logger</code> to remove.
-     */
-    void removeLogger(Logger logger);
-
-    /**
-     * Logs a log event out to the <code>Target</code>s output destination,
-     * which may be the console or a log file.
-     *
-     * @param event The <code>LogEvent</code> containing the information to output.
-     */
-    void logEvent(LogEvent event);
-}
+/*
+ * 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 flex.messaging.log;
+
+import java.util.List;
+
+import flex.messaging.config.ConfigMap;
+
+/**
+ * All logger target implementations within the logging framework must
+ * implement this interface. <code>Target</code> implementations receive log events
+ * and output information from these events to the appropriate output
+ * destination which may be a console, log file or some other custom
+ * destination.
+ */
+public interface Target
+{
+    /**
+     * Initializes the target with id and properties.
+     *
+     * @param id id for the target.
+     * @param properties ConfigMap of properties for the target.
+     */
+    void initialize(String id, ConfigMap properties);
+
+    /**
+     * Returns the category filters defined for the <code>Target</code>.
+     *
+     * @return The category filters defined for the <code>Target</code>.
+     */
+    List getFilters();
+
+    /**
+     * Sets the category filters that the <code>Target</code> will process
+     * log events for.
+     *
+     * @param value The category filters that the <code>Target</code> will process
+     */
+    void setFilters(List value);
+
+    /**
+     * Adds the category filteer that the <code>Target</code> will process
+     * log events for.
+     *
+     * @param value The new category filter to add to the <code>Target</code>'s list of filters.
+     */
+    void addFilter(String value);
+
+    /**
+     * Removes a category filter from the list of filters the <code>Target</code> will
+     * process log events for.
+     *
+     * @param value The category filter to remove from the <code>Target</code>'s list of filters.
+     */
+    void removeFilter(String value);
+
+    /**
+     * Returns the log level that the <code>Target</code> will process log
+     * events for. Log events at this level, or at a higher priority level
+     * will be processed.
+     *
+     * @return The log level that the <code>Target</code> will process log events for.
+     */
+    short getLevel();
+
+    /**
+     * Sets the log level that the <code>Target</code> will process log events
+     * for. Log events at this level, or at a higher priority level will be
+     * processed.
+     *
+     * @param value The log level that the <code>Target</code> will process log events for.
+     */
+    void setLevel(short value);
+
+    /**
+     * Adds a <code>Logger</code> whose category matches the filters list for
+     * the <code>Target</code>. The <code>Logger</code> will dispatch log events
+     * to this <code>Target</code> to be output.
+     *
+     * @param logger The <code>Logger</code> to add.
+     */
+    void addLogger(Logger logger);
+
+    /**
+     * Removes a <code>Logger</code> from the <code>Target</code>.
+     *
+     * @param logger The <code>Logger</code> to remove.
+     */
+    void removeLogger(Logger logger);
+
+    /**
+     * Logs a log event out to the <code>Target</code>s output destination,
+     * which may be the console or a log file.
+     *
+     * @param event The <code>LogEvent</code> containing the information to output.
+     */
+    void logEvent(LogEvent event);
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/common/src/flex/messaging/util/BasicPrettyPrinter.java
----------------------------------------------------------------------
diff --git a/modules/common/src/flex/messaging/util/BasicPrettyPrinter.java b/modules/common/src/flex/messaging/util/BasicPrettyPrinter.java
old mode 100755
new mode 100644
index 6abc550..9ac7c6d
--- a/modules/common/src/flex/messaging/util/BasicPrettyPrinter.java
+++ b/modules/common/src/flex/messaging/util/BasicPrettyPrinter.java
@@ -1,164 +1,164 @@
-/*
- * 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 flex.messaging.util;
-
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Map;
-
-/**
- * Prettifies the representation of an Object as a String. Complex
- * types are not traversed.
- *
- * @exclude
- */
-public class BasicPrettyPrinter implements PrettyPrinter
-{
-    protected ObjectTrace trace;
-
-    public BasicPrettyPrinter()
-    {
-    }
-
-    /**
-     * Prettifies the representation of an Object as a String.
-     * <ul>
-     *   <li>Simple types are simply toString'ed.</li>
-     *   <li>XML strings are formatted with line feeds and indentations.</li>
-     *   <li>Complex types report their class names.</li>
-     *   <li>Collections, Maps and native Arrays also report their size/length.</li>
-     * </ul>
-     * @return A prettified version of an Object as a String.
-     */
-    public String prettify(Object o)
-    {
-        try
-        {
-            trace = new ObjectTrace();
-            internalPrettify(o);
-            return trace.toString();
-        }
-        catch (Throwable t)
-        {
-            return trace.toString();
-        }
-        finally
-        {
-            trace = null;
-        }
-    }
-
-    protected void internalPrettify(Object o)
-    {
-        if (o == null)
-        {
-            trace.writeNull();
-        }
-        else if (o instanceof String)
-        {
-            String string = (String)o;
-            if (string.startsWith("<?xml"))
-            {
-                trace.write(StringUtils.prettifyXML(string));
-            }
-            else
-            {
-                trace.write(string);
-            }
-        }
-        else if (o instanceof Number || o instanceof Boolean || o instanceof Date
-                || o instanceof Calendar || o instanceof Character)
-        {
-            trace.write(o);
-        }
-        else
-        {
-            prettifyComplexType(o);
-        }
-    }
-
-    protected void prettifyComplexType(Object o)
-    {
-        StringBuffer header = new StringBuffer();
-
-        if (o instanceof PrettyPrintable)
-        {
-            PrettyPrintable pp = (PrettyPrintable)o;
-            header.append(pp.toStringHeader());
-        }
-
-        Class c = o.getClass();
-        String className = c.getName();
-
-        if (o instanceof Collection)
-        {
-            header.append(className).append(" (Collection size:").append(((Collection)o).size()).append(")");
-        }
-        else if (o instanceof Map)
-        {
-            header.append(className).append(" (Map size:").append(((Map)o).size()).append(")");
-        }
-        else if (c.isArray() && c.getComponentType() != null)
-        {
-            Class componentType = c.getComponentType();
-            className = componentType.getName();
-            header.append(className).append("[] (Array length:").append(Array.getLength(o)).append(")");
-        }
-        else
-        {
-            header.append(className);
-        }
-
-        trace.startObject(header.toString());
-        trace.endObject();
-    }
-
-    /**
-     * If the definition of toString is not from java.lang.Object or any class in the
-     * java.util.* package then we consider it a custom implementation in which case
-     * we'll use it instead of introspecting the class.
-     *
-     * @param c The class to check for a custom toString definition.
-     * @return Whether this class declares a custom toString() method.
-     */
-    protected boolean hasCustomToStringMethod(Class c)
-    {
-        try
-        {
-            Method toStringMethod = c.getMethod("toString", (Class[])null);
-            Class declaringClass = toStringMethod.getDeclaringClass();
-            if (declaringClass != Object.class
-                    && !declaringClass.getName().startsWith("java.util"))
-            {
-                return true;
-            }
-        }
-        catch (Throwable t)
-        {
-        }
-
-        return false;
-    }
-
-    public Object copy()
-    {
-        return new BasicPrettyPrinter();
-    }
-}
+/*
+ * 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 flex.messaging.util;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Method;
+import java.util.Calendar;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * Prettifies the representation of an Object as a String. Complex
+ * types are not traversed.
+ *
+ * @exclude
+ */
+public class BasicPrettyPrinter implements PrettyPrinter
+{
+    protected ObjectTrace trace;
+
+    public BasicPrettyPrinter()
+    {
+    }
+
+    /**
+     * Prettifies the representation of an Object as a String.
+     * <ul>
+     *   <li>Simple types are simply toString'ed.</li>
+     *   <li>XML strings are formatted with line feeds and indentations.</li>
+     *   <li>Complex types report their class names.</li>
+     *   <li>Collections, Maps and native Arrays also report their size/length.</li>
+     * </ul>
+     * @return A prettified version of an Object as a String.
+     */
+    public String prettify(Object o)
+    {
+        try
+        {
+            trace = new ObjectTrace();
+            internalPrettify(o);
+            return trace.toString();
+        }
+        catch (Throwable t)
+        {
+            return trace.toString();
+        }
+        finally
+        {
+            trace = null;
+        }
+    }
+
+    protected void internalPrettify(Object o)
+    {
+        if (o == null)
+        {
+            trace.writeNull();
+        }
+        else if (o instanceof String)
+        {
+            String string = (String)o;
+            if (string.startsWith("<?xml"))
+            {
+                trace.write(StringUtils.prettifyXML(string));
+            }
+            else
+            {
+                trace.write(string);
+            }
+        }
+        else if (o instanceof Number || o instanceof Boolean || o instanceof Date
+                || o instanceof Calendar || o instanceof Character)
+        {
+            trace.write(o);
+        }
+        else
+        {
+            prettifyComplexType(o);
+        }
+    }
+
+    protected void prettifyComplexType(Object o)
+    {
+        StringBuffer header = new StringBuffer();
+
+        if (o instanceof PrettyPrintable)
+        {
+            PrettyPrintable pp = (PrettyPrintable)o;
+            header.append(pp.toStringHeader());
+        }
+
+        Class c = o.getClass();
+        String className = c.getName();
+
+        if (o instanceof Collection)
+        {
+            header.append(className).append(" (Collection size:").append(((Collection)o).size()).append(")");
+        }
+        else if (o instanceof Map)
+        {
+            header.append(className).append(" (Map size:").append(((Map)o).size()).append(")");
+        }
+        else if (c.isArray() && c.getComponentType() != null)
+        {
+            Class componentType = c.getComponentType();
+            className = componentType.getName();
+            header.append(className).append("[] (Array length:").append(Array.getLength(o)).append(")");
+        }
+        else
+        {
+            header.append(className);
+        }
+
+        trace.startObject(header.toString());
+        trace.endObject();
+    }
+
+    /**
+     * If the definition of toString is not from java.lang.Object or any class in the
+     * java.util.* package then we consider it a custom implementation in which case
+     * we'll use it instead of introspecting the class.
+     *
+     * @param c The class to check for a custom toString definition.
+     * @return Whether this class declares a custom toString() method.
+     */
+    protected boolean hasCustomToStringMethod(Class c)
+    {
+        try
+        {
+            Method toStringMethod = c.getMethod("toString", (Class[])null);
+            Class declaringClass = toStringMethod.getDeclaringClass();
+            if (declaringClass != Object.class
+                    && !declaringClass.getName().startsWith("java.util"))
+            {
+                return true;
+            }
+        }
+        catch (Throwable t)
+        {
+        }
+
+        return false;
+    }
+
+    public Object copy()
+    {
+        return new BasicPrettyPrinter();
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/common/src/flex/messaging/util/ExceptionUtil.java
----------------------------------------------------------------------
diff --git a/modules/common/src/flex/messaging/util/ExceptionUtil.java b/modules/common/src/flex/messaging/util/ExceptionUtil.java
old mode 100755
new mode 100644
index f787859..966628d
--- a/modules/common/src/flex/messaging/util/ExceptionUtil.java
+++ b/modules/common/src/flex/messaging/util/ExceptionUtil.java
@@ -1,246 +1,246 @@
-/*
- * 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 flex.messaging.util;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.NoSuchElementException;
-import java.util.StringTokenizer;
-
-/**
- * @exclude
- */
-public class ExceptionUtil
-{
-    /**
-     * List of no-arg methods that are known to return a wrapped throwable.
-     **/
-    public static String[] unwrapMethods = { "getRootCause", "getTargetException",
-                                             "getTargetError", "getException",
-                                             "getCausedByException", "getLinkedException" };
-
-    /**
-     * Get the wrapped Exception object from the Throwable object.
-     * @param t the Throwable object
-     * @return Throwable the wrapped exception object if any
-     */
-    public static Throwable wrappedException(Throwable t)
-    {
-        // Handle these statically since they are core to Java
-        return (t instanceof InvocationTargetException)? 
-                ((InvocationTargetException)t).getTargetException() : getRootCauseWithReflection(t);
-    }
-
-    /**
-     * Get to the base exception (if any).
-     * @param t the Throwable object
-     * @return the base Exception object
-     */
-    public static Throwable baseException(Throwable t) 
-    {
-        Throwable wrapped = wrappedException(t);
-        return wrapped != null? baseException(wrapped) : t;
-    }
-
-    /**
-     * Return the stack trace in a String.
-     * @param t the Throwable object
-     * @return String the String presentation of the Throwable object
-     */
-    public static String toString(Throwable t) 
-    {
-        StringWriter strWrt = new StringWriter();
-        t.printStackTrace(new PrintWriter(strWrt));
-
-        return strWrt.toString();
-    }
-
-    /**
-     * Return the stack trace up to the first line that starts with prefix.
-     *
-     * <p>Example: ExceptionUtil.getStackTraceUpTo(exception, "jrunx.");</p>
-     * @param t the Throwable object
-     * @param prefix the prefix message that we are looking for
-     * @return String the String of stack trace lines till the prefix message is located
-     */
-    public static String getStackTraceUpTo(Throwable t, String prefix) 
-    {
-        StringTokenizer tokens = new StringTokenizer(toString(t), "\n\r");
-        StringBuffer trace = new StringBuffer();
-        boolean done = false;
-
-        String lookingFor = "at " + prefix;
-        while (!done && tokens.hasMoreElements())
-        {
-            String token = tokens.nextToken();
-            if (token.indexOf(lookingFor) == -1)
-                trace.append(token);
-            else
-                done = true;
-            trace.append(StringUtils.NEWLINE);
-        }
-
-        return trace.toString();
-    }
-
-    /**
-     * return the top n lines of this stack trace.
-     *
-     * <p>Example: ExceptionUtil.getStackTraceLines(exception, 10);</p>
-     * @param t the Throwable object
-     * @param numLines number of lines we should trace down
-     * @return String the String of stack trace lines
-     */
-    public static String getStackTraceLines(Throwable t, int numLines) 
-    {
-        StringTokenizer tokens = new StringTokenizer(toString(t), "\n\r");
-
-        StringBuffer trace = new StringBuffer();
-
-        for (int i=0; i<numLines; i++)
-        {
-            String token = tokens.nextToken();
-            trace.append(token);
-            trace.append(StringUtils.NEWLINE);
-        }
-
-        return trace.toString();
-    }
-
-    /**
-     * Return the "nth" method call from the stack trace of "t", where 0 is
-     * the top.
-     * @param t the Throwable object
-     * @param nth the line number of the message should we skip
-     * @return String the callAt String
-     */
-    public static String getCallAt(Throwable t, int nth) 
-    {
-        StringTokenizer tokens = new StringTokenizer(toString(t), "\n\r");
-        try 
-        {
-            // Skip the first line - the exception message
-            for(int i = 0; i <= nth; ++i)
-                tokens.nextToken();
-
-            // get the method name from the next token
-            String token = tokens.nextToken();
-            int index1 = token.indexOf(' ');
-            int index2 = token.indexOf('(');
-            StringBuffer call = new StringBuffer();
-            call.append(token.substring(index1 < 0 ? 0 : index1 + 1, index2 < 0 ? call.length() : index2));
-
-            int index3 = token.indexOf(':', index2 < 0 ? 0 : index2);
-            if(index3 >= 0) 
-            {
-                int index4 = token.indexOf(')', index3);
-                call.append(token.substring(index3, index4 < 0 ? token.length() : index4));
-            }
-            return call.toString();
-        }
-        catch(NoSuchElementException e) {}
-
-        return "unknown";
-    }
-
-
-    /**
-     * Utility method for converting an exception into a string. This
-     * method unwinds all wrapped exceptions
-     * @param t The throwable exception
-     * @return The printable exception
-     */
-    public static String exceptionToString(Throwable t)
-    {
-        StringWriter sw = new StringWriter();
-        PrintWriter out = new PrintWriter(sw);
-
-        //print out the exception stack.
-        printExceptionStack(t, out, 0);
-        return sw.toString();
-    }
-    
-    /**
-     * Utility method for converting an exception and all chained root causes into a
-     * string. Unlike <code>exceptionToString(Throwable)</code> which prints the chain
-     * from most nested root cause down to the top-level exception, this method prints 
-     * from the top-level exception down to the most nested root cause.
-     * 
-     * @param t The throwable exception.
-     * @return The printable exception.
-     */
-    public static String exceptionFollowedByRootCausesToString(Throwable t)
-    {
-        StringBuffer output = new StringBuffer();
-        Throwable root = t;
-        while (root != null)
-        {
-            output.append((root == t) ? ((root instanceof Exception) ? "  Exception: " : "  Error: ") : "  Root cause: ");
-            output.append(ExceptionUtil.toString(root));
-            // Do not recurse if the root cause has already been printed; this will have happened if the root cause has
-            // been assigned to the current Throwable via initCause() or as a constructor argument.
-            Throwable cause = root.getCause();
-            root = ExceptionUtil.wrappedException(root);
-            if (cause == root)
-                break;
-        }
-        return output.toString();
-    }
-
-    /**
-     * Recursively prints out a stack of wrapped exceptions.
-     */
-    protected static void printExceptionStack(Throwable th, PrintWriter out, int depth){
-        //only print the stack depth if the depth is greater than 0
-        boolean printStackDepth = depth>0;
-
-        Throwable wrappedException = ExceptionUtil.wrappedException(th);
-        if (wrappedException != null)
-        {
-            printStackDepth = true;
-            printExceptionStack(wrappedException, out, depth + 1);
-        }
-
-        if(printStackDepth){
-            out.write("[" + depth + "]");
-        }
-
-        th.printStackTrace(out);
-    }
-
-    private static Throwable getRootCauseWithReflection(Throwable t)
-    {
-        for(int i = 0; i < unwrapMethods.length; i++)
-        {
-            Method m = null;
-
-            try
-            {
-                m = t.getClass().getMethod(unwrapMethods[i], (Class[])null);
-                return (Throwable) m.invoke(t, (Object[])null);
-            }
-            catch(Exception nsme)
-            {
-                // ignore
-            }
-        }
-
-        return null;
-    }
-}
+/*
+ * 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 flex.messaging.util;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.NoSuchElementException;
+import java.util.StringTokenizer;
+
+/**
+ * @exclude
+ */
+public class ExceptionUtil
+{
+    /**
+     * List of no-arg methods that are known to return a wrapped throwable.
+     **/
+    public static String[] unwrapMethods = { "getRootCause", "getTargetException",
+                                             "getTargetError", "getException",
+                                             "getCausedByException", "getLinkedException" };
+
+    /**
+     * Get the wrapped Exception object from the Throwable object.
+     * @param t the Throwable object
+     * @return Throwable the wrapped exception object if any
+     */
+    public static Throwable wrappedException(Throwable t)
+    {
+        // Handle these statically since they are core to Java
+        return (t instanceof InvocationTargetException)? 
+                ((InvocationTargetException)t).getTargetException() : getRootCauseWithReflection(t);
+    }
+
+    /**
+     * Get to the base exception (if any).
+     * @param t the Throwable object
+     * @return the base Exception object
+     */
+    public static Throwable baseException(Throwable t) 
+    {
+        Throwable wrapped = wrappedException(t);
+        return wrapped != null? baseException(wrapped) : t;
+    }
+
+    /**
+     * Return the stack trace in a String.
+     * @param t the Throwable object
+     * @return String the String presentation of the Throwable object
+     */
+    public static String toString(Throwable t) 
+    {
+        StringWriter strWrt = new StringWriter();
+        t.printStackTrace(new PrintWriter(strWrt));
+
+        return strWrt.toString();
+    }
+
+    /**
+     * Return the stack trace up to the first line that starts with prefix.
+     *
+     * <p>Example: ExceptionUtil.getStackTraceUpTo(exception, "jrunx.");</p>
+     * @param t the Throwable object
+     * @param prefix the prefix message that we are looking for
+     * @return String the String of stack trace lines till the prefix message is located
+     */
+    public static String getStackTraceUpTo(Throwable t, String prefix) 
+    {
+        StringTokenizer tokens = new StringTokenizer(toString(t), "\n\r");
+        StringBuffer trace = new StringBuffer();
+        boolean done = false;
+
+        String lookingFor = "at " + prefix;
+        while (!done && tokens.hasMoreElements())
+        {
+            String token = tokens.nextToken();
+            if (token.indexOf(lookingFor) == -1)
+                trace.append(token);
+            else
+                done = true;
+            trace.append(StringUtils.NEWLINE);
+        }
+
+        return trace.toString();
+    }
+
+    /**
+     * return the top n lines of this stack trace.
+     *
+     * <p>Example: ExceptionUtil.getStackTraceLines(exception, 10);</p>
+     * @param t the Throwable object
+     * @param numLines number of lines we should trace down
+     * @return String the String of stack trace lines
+     */
+    public static String getStackTraceLines(Throwable t, int numLines) 
+    {
+        StringTokenizer tokens = new StringTokenizer(toString(t), "\n\r");
+
+        StringBuffer trace = new StringBuffer();
+
+        for (int i=0; i<numLines; i++)
+        {
+            String token = tokens.nextToken();
+            trace.append(token);
+            trace.append(StringUtils.NEWLINE);
+        }
+
+        return trace.toString();
+    }
+
+    /**
+     * Return the "nth" method call from the stack trace of "t", where 0 is
+     * the top.
+     * @param t the Throwable object
+     * @param nth the line number of the message should we skip
+     * @return String the callAt String
+     */
+    public static String getCallAt(Throwable t, int nth) 
+    {
+        StringTokenizer tokens = new StringTokenizer(toString(t), "\n\r");
+        try 
+        {
+            // Skip the first line - the exception message
+            for(int i = 0; i <= nth; ++i)
+                tokens.nextToken();
+
+            // get the method name from the next token
+            String token = tokens.nextToken();
+            int index1 = token.indexOf(' ');
+            int index2 = token.indexOf('(');
+            StringBuffer call = new StringBuffer();
+            call.append(token.substring(index1 < 0 ? 0 : index1 + 1, index2 < 0 ? call.length() : index2));
+
+            int index3 = token.indexOf(':', index2 < 0 ? 0 : index2);
+            if(index3 >= 0) 
+            {
+                int index4 = token.indexOf(')', index3);
+                call.append(token.substring(index3, index4 < 0 ? token.length() : index4));
+            }
+            return call.toString();
+        }
+        catch(NoSuchElementException e) {}
+
+        return "unknown";
+    }
+
+
+    /**
+     * Utility method for converting an exception into a string. This
+     * method unwinds all wrapped exceptions
+     * @param t The throwable exception
+     * @return The printable exception
+     */
+    public static String exceptionToString(Throwable t)
+    {
+        StringWriter sw = new StringWriter();
+        PrintWriter out = new PrintWriter(sw);
+
+        //print out the exception stack.
+        printExceptionStack(t, out, 0);
+        return sw.toString();
+    }
+    
+    /**
+     * Utility method for converting an exception and all chained root causes into a
+     * string. Unlike <code>exceptionToString(Throwable)</code> which prints the chain
+     * from most nested root cause down to the top-level exception, this method prints 
+     * from the top-level exception down to the most nested root cause.
+     * 
+     * @param t The throwable exception.
+     * @return The printable exception.
+     */
+    public static String exceptionFollowedByRootCausesToString(Throwable t)
+    {
+        StringBuffer output = new StringBuffer();
+        Throwable root = t;
+        while (root != null)
+        {
+            output.append((root == t) ? ((root instanceof Exception) ? "  Exception: " : "  Error: ") : "  Root cause: ");
+            output.append(ExceptionUtil.toString(root));
+            // Do not recurse if the root cause has already been printed; this will have happened if the root cause has
+            // been assigned to the current Throwable via initCause() or as a constructor argument.
+            Throwable cause = root.getCause();
+            root = ExceptionUtil.wrappedException(root);
+            if (cause == root)
+                break;
+        }
+        return output.toString();
+    }
+
+    /**
+     * Recursively prints out a stack of wrapped exceptions.
+     */
+    protected static void printExceptionStack(Throwable th, PrintWriter out, int depth){
+        //only print the stack depth if the depth is greater than 0
+        boolean printStackDepth = depth>0;
+
+        Throwable wrappedException = ExceptionUtil.wrappedException(th);
+        if (wrappedException != null)
+        {
+            printStackDepth = true;
+            printExceptionStack(wrappedException, out, depth + 1);
+        }
+
+        if(printStackDepth){
+            out.write("[" + depth + "]");
+        }
+
+        th.printStackTrace(out);
+    }
+
+    private static Throwable getRootCauseWithReflection(Throwable t)
+    {
+        for(int i = 0; i < unwrapMethods.length; i++)
+        {
+            Method m = null;
+
+            try
+            {
+                m = t.getClass().getMethod(unwrapMethods[i], (Class[])null);
+                return (Throwable) m.invoke(t, (Object[])null);
+            }
+            catch(Exception nsme)
+            {
+                // ignore
+            }
+        }
+
+        return null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/4f6a3052/modules/common/src/flex/messaging/util/FileUtils.java
----------------------------------------------------------------------
diff --git a/modules/common/src/flex/messaging/util/FileUtils.java b/modules/common/src/flex/messaging/util/FileUtils.java
old mode 100755
new mode 100644
index 8f7146a..3292491
--- a/modules/common/src/flex/messaging/util/FileUtils.java
+++ b/modules/common/src/flex/messaging/util/FileUtils.java
@@ -1,96 +1,96 @@
-/*
- * 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 flex.messaging.util;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * @exclude
- */
-public class FileUtils
-{
-    public static final String UTF_8 = "UTF-8";
-    public static final String UTF_16 = "UTF-16";
-
-    /**
-     * Sets a mark in the InputStream for 3 bytes to check for a BOM. If the BOM
-     * stands for UTF-8 encoded content then the stream will not be reset, otherwise
-     * for UTF-16 with a BOM or any other encoding situation the stream is reset to the
-     * mark (as for UTF-16 the parser will handle the BOM).
-     *
-     * @param in InputStream containing BOM and must support mark().
-     * @param default_encoding The default character set encoding. null or "" => system default
-     * @return The file character set encoding.
-     * @throws IOException
-     */
-    public static final String consumeBOM(InputStream in, String default_encoding) throws IOException
-    {
-        in.mark(3);
-
-        // Determine file encoding...
-        // ASCII - no header (use the supplied encoding)
-        // UTF8  - EF BB BF
-        // UTF16 - FF FE or FE FF (decoder chooses endian-ness)
-        if (in.read() == 0xef && in.read() == 0xbb && in.read() == 0xbf)
-        {
-            // UTF-8 reader does not consume BOM, so do not reset
-            if (System.getProperty("flex.platform.CLR") != null)
-            {
-                return "UTF8";
-            }
-            else
-            {
-                return UTF_8;
-            }
-        }
-        else
-        {
-            in.reset();
-            int b0 = in.read();
-            int b1 = in.read();
-            if (b0 == 0xff && b1 == 0xfe || b0 == 0xfe && b1 == 0xff)
-            {
-                in.reset();
-                // UTF-16 reader will consume BOM
-                if (System.getProperty("flex.platform.CLR") != null)
-                {
-                    return "UTF16";
-                }
-                else
-                {
-                    return UTF_16;
-                }
-            }
-            else
-            {
-                // no BOM found
-                in.reset();
-                if (default_encoding != null && default_encoding.length() != 0)
-                {
-                    return default_encoding;
-                }
-                else
-                {
-                    return System.getProperty("file.encoding");
-                }
-            }
-        }
-    }
-
-}
+/*
+ * 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 flex.messaging.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * @exclude
+ */
+public class FileUtils
+{
+    public static final String UTF_8 = "UTF-8";
+    public static final String UTF_16 = "UTF-16";
+
+    /**
+     * Sets a mark in the InputStream for 3 bytes to check for a BOM. If the BOM
+     * stands for UTF-8 encoded content then the stream will not be reset, otherwise
+     * for UTF-16 with a BOM or any other encoding situation the stream is reset to the
+     * mark (as for UTF-16 the parser will handle the BOM).
+     *
+     * @param in InputStream containing BOM and must support mark().
+     * @param default_encoding The default character set encoding. null or "" => system default
+     * @return The file character set encoding.
+     * @throws IOException
+     */
+    public static final String consumeBOM(InputStream in, String default_encoding) throws IOException
+    {
+        in.mark(3);
+
+        // Determine file encoding...
+        // ASCII - no header (use the supplied encoding)
+        // UTF8  - EF BB BF
+        // UTF16 - FF FE or FE FF (decoder chooses endian-ness)
+        if (in.read() == 0xef && in.read() == 0xbb && in.read() == 0xbf)
+        {
+            // UTF-8 reader does not consume BOM, so do not reset
+            if (System.getProperty("flex.platform.CLR") != null)
+            {
+                return "UTF8";
+            }
+            else
+            {
+                return UTF_8;
+            }
+        }
+        else
+        {
+            in.reset();
+            int b0 = in.read();
+            int b1 = in.read();
+            if (b0 == 0xff && b1 == 0xfe || b0 == 0xfe && b1 == 0xff)
+            {
+                in.reset();
+                // UTF-16 reader will consume BOM
+                if (System.getProperty("flex.platform.CLR") != null)
+                {
+                    return "UTF16";
+                }
+                else
+                {
+                    return UTF_16;
+                }
+            }
+            else
+            {
+                // no BOM found
+                in.reset();
+                if (default_encoding != null && default_encoding.length() != 0)
+                {
+                    return default_encoding;
+                }
+                else
+                {
+                    return System.getProperty("file.encoding");
+                }
+            }
+        }
+    }
+
+}


Mime
View raw message