- Updated most external dependencies and plugins
- Updated to the most recent apache parent pom
- Added the rat plugin to check for missing header (and added the missing headers)
- Added the OWASP plugin to check for vulnerable dependencies (And managed the false positives)
- Commented out the spring-boot-starter and all tomcat modules as they are extremely CVE affected and no invulnerable versions were available
diff --git a/ApproveBlazeDS.xml b/ApproveBlazeDS.xml
index 2c7bd23..b11276f 100644
--- a/ApproveBlazeDS.xml
+++ b/ApproveBlazeDS.xml
@@ -34,360 +34,365 @@
     </condition>
 
     <condition property="isMac" value="mac">
-        <os family="mac" />
+        <os family="mac"/>
     </condition>
     <condition property="isWindows" value="windows">
-        <os family="windows" />
+        <os family="windows"/>
     </condition>
     <condition property="isLinux" value="linux">
-		<and>
-			<os family="unix" />
-			<not>
-				<isset property="isMac" />
-			</not>
-		</and>
+        <and>
+            <os family="unix"/>
+            <not>
+                <isset property="isMac"/>
+            </not>
+        </and>
     </condition>
     <condition property="package.suffix" value="zip">
-        <os family="windows" />
+        <os family="windows"/>
     </condition>
-	<property name="package.suffix" value="tar.gz" />
-	
-	<property name="rat.report" value="${basedir}/rat-report.txt"/>
-	<property name="apache.rat.jar" value="apache-rat-0.8.jar" />
-	<property name="apache.rat.tasks.jar" value="apache-rat-tasks-0.8.jar" />
-	<property name="apache.rat.url" value="http://people.apache.org/~aharui/rat" />
-	
-	<property name="mac.text.display" value="cat" />
-	<property name="win.text.display" value="type" />
-	<property name="linux.text.display" value="cat" />
-    
+    <property name="package.suffix" value="tar.gz"/>
+
+    <property name="rat.report" value="${basedir}/rat-report.txt"/>
+    <property name="apache.rat.jar" value="apache-rat-0.8.jar"/>
+    <property name="apache.rat.tasks.jar" value="apache-rat-tasks-0.8.jar"/>
+    <property name="apache.rat.url" value="http://people.apache.org/~aharui/rat"/>
+
+    <property name="mac.text.display" value="cat"/>
+    <property name="win.text.display" value="type"/>
+    <property name="linux.text.display" value="cat"/>
+
     <property file="${basedir}/approveblazeds.properties"/>
     <property environment="env"/>
 
-    <property name="build.target" value="main" />
-    
-	<condition property="do.copy.downloads" >
-		<isset property="download.cache.dir" /> 
-	</condition>
-	
+    <property name="build.target" value="main"/>
+
+    <condition property="do.copy.downloads">
+        <isset property="download.cache.dir"/>
+    </condition>
+
     <fail message="The ANT_HOME environment variable is not set."
-        unless="env.ANT_HOME"/>
-		
-	<available file="${env.FLEX_HOME}" 
-		type="dir" 
-		property="FLEX_HOME" value="${env.FLEX_HOME}" />
+          unless="env.ANT_HOME"/>
+
+    <available file="${env.FLEX_HOME}"
+               type="dir"
+               property="FLEX_HOME" value="${env.FLEX_HOME}"/>
 
     <fail message="The FLEX_HOME property is not set in environment or command-line."
-        unless="FLEX_HOME"/>
-				
-	<available file="${env.AIR_HOME}" 
-		type="dir" 
-		property="AIR_HOME" value="${env.AIR_HOME}" />
+          unless="FLEX_HOME"/>
+
+    <available file="${env.AIR_HOME}"
+               type="dir"
+               property="AIR_HOME" value="${env.AIR_HOME}"/>
 
     <fail message="The AIR_HOME property is not set in environment or command-line."
-        unless="AIR_HOME"/>
-		
+          unless="AIR_HOME"/>
+
     <available file="${env.ANT_HOME}/lib/${apache.rat.jar}"
-        type="file"
-        property="apache.rat.found"/>
+               type="file"
+               property="apache.rat.found"/>
     <available file="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}"
-        type="file"
-        property="apache.rat.tasks.found"/>
-		
+               type="file"
+               property="apache.rat.tasks.found"/>
+
     <fail message="The release version is not set.  Specify -Drelease.version=&lt;release version (e.g. 3.1, 3.2, etc)&gt;"
-    unless="release.version"/>
-       
+          unless="release.version"/>
+
     <fail message="The folder number is not set.  Specify -Dfolder.number=&lt;folder number (e.g. 1001, 1002, etc)&gt;"
-       unless="folder.number"/>
-       
-    <property name="package.url.base" value="://repository.apache.org/content/repositories/orgapacheflex-${folder.number}/org/apache/flex/blazeds" />
-	<property name="package.url.path" value="https${package.url.base}/blazeds/${release.version}" />
-	<property name="package.url.name" value="blazeds-${release.version}-source-release" />
-	
+          unless="folder.number"/>
+
+    <property name="package.url.base"
+              value="://repository.apache.org/content/repositories/orgapacheflex-${folder.number}/org/apache/flex/blazeds"/>
+    <property name="package.url.path" value="https${package.url.base}/blazeds/${release.version}"/>
+    <property name="package.url.name" value="blazeds-${release.version}-source-release"/>
+
     <condition property="zip.compressed">
-        <equals arg1="zip" arg2="${package.suffix}" />
+        <equals arg1="zip" arg2="${package.suffix}"/>
     </condition>
-    
-	<target name="display-text-mac" if="isMac">
-		<echo>========================= Begin ${file} ==============================</echo>
-		<exec executable="${mac.text.display}" >
-			<arg value="${file}" /> 
-		</exec>
-		<echo>========================= End ${file} ==============================</echo>
-	</target>
-	<target name="display-text-win" if="isWindows">
-		<pathconvert targetos="windows" property="winfile">
-			<path path="${file}" />
-		</pathconvert>
-		<echo>========================= Begin ${winfile} ==============================</echo>
-		<exec executable="cmd.exe" >
-			<arg value="/c" />
-			<arg value="${win.text.display}" />
-			<arg value="${winfile}" /> 
-		</exec>		
-		<echo>========================= End ${winfile} ==============================</echo>
-	</target>
-	<target name="display-text-linux" if="isLinux">
-		<echo>========================= Begin ${file} ==============================</echo>
-		<exec executable="${linux.text.display}" >
-			<arg value="${file}" /> 
-		</exec>
-		<echo>========================= End ${file} ==============================</echo>
-	</target>
-	
-	<target name="install-rat" depends="install-rat.jar,install-rat.tasks.jar" />
-	<target name="install-rat.jar" unless="apache.rat.found">
-		<get src="${apache.rat.url}/${apache.rat.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.jar}" />
-	</target>
-	<target name="install-rat.tasks.jar" unless="apache.rat.tasks.found">
-		<get src="${apache.rat.url}/${apache.rat.tasks.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}" />
-	</target>
-	
+
+    <target name="display-text-mac" if="isMac">
+        <echo>========================= Begin ${file} ==============================</echo>
+        <exec executable="${mac.text.display}">
+            <arg value="${file}"/>
+        </exec>
+        <echo>========================= End ${file} ==============================</echo>
+    </target>
+    <target name="display-text-win" if="isWindows">
+        <pathconvert targetos="windows" property="winfile">
+            <path path="${file}"/>
+        </pathconvert>
+        <echo>========================= Begin ${winfile} ==============================</echo>
+        <exec executable="cmd.exe">
+            <arg value="/c"/>
+            <arg value="${win.text.display}"/>
+            <arg value="${winfile}"/>
+        </exec>
+        <echo>========================= End ${winfile} ==============================</echo>
+    </target>
+    <target name="display-text-linux" if="isLinux">
+        <echo>========================= Begin ${file} ==============================</echo>
+        <exec executable="${linux.text.display}">
+            <arg value="${file}"/>
+        </exec>
+        <echo>========================= End ${file} ==============================</echo>
+    </target>
+
+    <target name="install-rat" depends="install-rat.jar,install-rat.tasks.jar"/>
+    <target name="install-rat.jar" unless="apache.rat.found">
+        <get src="${apache.rat.url}/${apache.rat.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.jar}"/>
+    </target>
+    <target name="install-rat.tasks.jar" unless="apache.rat.tasks.found">
+        <get src="${apache.rat.url}/${apache.rat.tasks.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}"/>
+    </target>
+
     <target name="rat-taskdef" description="Rat taskdef">
         <typedef resource="org/apache/rat/anttasks/antlib.xml"
-        uri="antlib:org.apache.rat.anttasks"
-        classpathref="anttask.classpath"/>
+                 uri="antlib:org.apache.rat.anttasks"
+                 classpathref="anttask.classpath"/>
     </target>
 
-    <target name="main" depends="install-rat,download,check-sigs,uncompress,rat-check,check-notices,binaries,build,approve" description="Perform required release approval steps">
+    <target name="main"
+            depends="install-rat,download,check-sigs,uncompress,rat-check,check-notices,binaries,build,approve"
+            description="Perform required release approval steps">
     </target>
-    
-    <target name="main-no-download" depends="install-rat,check-sigs,uncompress,rat-check,check-notices,binaries,build,approve" description="Perform required release approval steps">
-    </target>
-	
-    <target name="test" >
-		<echo>${rat.report}.bin.txt</echo>
-		<replaceregexp file="${rat.report}.bin.txt" match="..AL.*" replace="" byline="true"/>
-    </target>
-	
-	<target name="display-text" >
-		<antcall target="display-text-mac" />
-		<antcall target="display-text-win" />
-		<antcall target="display-text-linux" />
-	</target>
 
-	<target name="display-text-test" >
-		<antcall target="display-text" >
-			<param name="file" value="${basedir}/rat-report.txt" />
-		</antcall>
-	</target>
-	
+    <target name="main-no-download"
+            depends="install-rat,check-sigs,uncompress,rat-check,check-notices,binaries,build,approve"
+            description="Perform required release approval steps">
+    </target>
+
+    <target name="test">
+        <echo>${rat.report}.bin.txt</echo>
+        <replaceregexp file="${rat.report}.bin.txt" match="..AL.*" replace="" byline="true"/>
+    </target>
+
+    <target name="display-text">
+        <antcall target="display-text-mac"/>
+        <antcall target="display-text-win"/>
+        <antcall target="display-text-linux"/>
+    </target>
+
+    <target name="display-text-test">
+        <antcall target="display-text">
+            <param name="file" value="${basedir}/rat-report.txt"/>
+        </antcall>
+    </target>
+
     <target name="download" depends="download-asc" description="download the release package">
         <get src="${package.url.path}/${package.url.name}.${package.suffix}"
-            dest="${basedir}/${package.url.name}.${package.suffix}" />
+             dest="${basedir}/${package.url.name}.${package.suffix}"/>
         <get src="${package.url.path}/${package.url.name}.${package.suffix}.md5"
-            dest="${basedir}/${package.url.name}.${package.suffix}.md5" />
+             dest="${basedir}/${package.url.name}.${package.suffix}.md5"/>
     </target>
-    
+
     <target name="download-asc" unless="no.asc" description="download the release package">
         <get src="${package.url.path}/${package.url.name}.${package.suffix}.asc"
-        dest="${basedir}/${package.url.name}.${package.suffix}.asc" />
+             dest="${basedir}/${package.url.name}.${package.suffix}.asc"/>
     </target>
 
     <target name="check-md5" description="check md5">
         <echo message="Checking MD5..."/>
-		<replace file="${basedir}/${package.url.name}.${package.suffix}.md5"
-			token=" " />
-		<checksum file="${basedir}/${package.url.name}.${package.suffix}" algorithm="md5" verifyproperty="md5.ok" />
+        <replace file="${basedir}/${package.url.name}.${package.suffix}.md5"
+                 token=" "/>
+        <checksum file="${basedir}/${package.url.name}.${package.suffix}" algorithm="md5" verifyproperty="md5.ok"/>
         <condition property="MD5Invalid">
-			<not>
-				<equals arg1="${md5.ok}" arg2="true" />
-			</not>
+            <not>
+                <equals arg1="${md5.ok}" arg2="true"/>
+            </not>
         </condition>
-        <fail message="MD5 checksum did not match" if="MD5Invalid" />
+        <fail message="MD5 checksum did not match" if="MD5Invalid"/>
     </target>
 
     <target name="check-sigs" depends="check-md5" unless="no.asc" description="check md5 and gpg sigs">
-		<exec executable="gpg" failonerror="true">
-			<arg value="--verify" />
-			<arg value="${basedir}/${package.url.name}.${package.suffix}.asc" />
-			<arg value="${basedir}/${package.url.name}.${package.suffix}" />
-		</exec>
+        <exec executable="gpg" failonerror="true">
+            <arg value="--verify"/>
+            <arg value="${basedir}/${package.url.name}.${package.suffix}.asc"/>
+            <arg value="${basedir}/${package.url.name}.${package.suffix}"/>
+        </exec>
     </target>
 
 
-    <target name="uncompress" depends="pre-clean, untar-file, unzip-file" />
+    <target name="uncompress" depends="pre-clean, untar-file, unzip-file"/>
 
-    <target name="pre-clean" description="remove old uncompressed package" >
-		<delete dir="${basedir}/${package.url.name}" failonerror="false" />
-	</target>
-	
+    <target name="pre-clean" description="remove old uncompressed package">
+        <delete dir="${basedir}/${package.url.name}" failonerror="false"/>
+    </target>
+
     <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
         <untar src="${basedir}/${package.url.name}.${package.suffix}"
-                dest="${basedir}/${package.url.name}" compression="gzip"/>
+               dest="${basedir}/${package.url.name}" compression="gzip"/>
     </target>
 
     <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
         <unzip src="${basedir}/${package.url.name}.${package.suffix}"
-                dest="${basedir}/${package.url.name}"/>
+               dest="${basedir}/${package.url.name}"/>
     </target>
-    
+
     <target name="binaries" if="isMac">
         <get src="http${package.url.base}/"
-        dest="${basedir}/folderlist.txt" />
+             dest="${basedir}/folderlist.txt"/>
         <!-- remove everything up to 'Parent Directory' -->
         <replaceregexp file="${basedir}/folderlist.txt" match=".*Parent Directory" replace=""
-            flags="s" byline="false"/>
+                       flags="s" byline="false"/>
         <!-- remove everything except the text after an href -->
         <replaceregexp file="${basedir}/folderlist.txt" match="(.*)href=(.*)&gt;(.*)&lt;/a" replace="\3"
-                flags="g" byline="false"/>
+                       flags="g" byline="false"/>
         <!-- remove everything inside single line td's -->
         <replaceregexp file="${basedir}/folderlist.txt" match="&lt;td.*&lt;/td&gt;" replace=""
-                flags="g" byline="false"/>
+                       flags="g" byline="false"/>
         <!-- remove everything all other html tags -->
         <replaceregexp file="${basedir}/folderlist.txt" match="&lt;.*&gt;" replace=""
-                flags="g" byline="false"/>
+                       flags="g" byline="false"/>
         <!-- remove everything up to &nbsp; -->
         <replaceregexp file="${basedir}/folderlist.txt" match="&amp;nbsp;" replace=""
-                flags="g" byline="false"/>
+                       flags="g" byline="false"/>
         <!-- remove all whitespace -->
         <replaceregexp file="${basedir}/folderlist.txt" match="\s" replace=""
-                flags="g" byline="false"/>
+                       flags="g" byline="false"/>
         <!-- remove blazeds folder -->
         <replaceregexp file="${basedir}/folderlist.txt" match="blazeds/&gt;" replace=""
-                flags="g" byline="false"/>
+                       flags="g" byline="false"/>
         <!-- remove opt folder -->
         <replaceregexp file="${basedir}/folderlist.txt" match="flex-messaging-opt/&gt;" replace=""
-                flags="g" byline="false"/>
+                       flags="g" byline="false"/>
         <!-- replace trailing /> with commas -->
         <replaceregexp file="${basedir}/folderlist.txt" match="/&gt;" replace=","
-                flags="g" byline="false"/>
+                       flags="g" byline="false"/>
         <!-- remove trailing comma -->
         <replaceregexp file="${basedir}/folderlist.txt" match=",$" replace=""
-                flags="m" byline="false"/>
-        
-        <antcall target="examine-jars" />
+                       flags="m" byline="false"/>
+
+        <antcall target="examine-jars"/>
     </target>
 
     <!-- how to do tar and sort on Windows? -->
     <target name="examine-jars" if="isMac">
         <!-- comma delimited list, no spaces, not one file per line -->
-        <copy file="folderlist.txt" tofile="loop.txt" />
-        <ant antfile="ApproveBlazeDS.xml" target="loopOnce" inheritAll="false" />
+        <copy file="folderlist.txt" tofile="loop.txt"/>
+        <ant antfile="ApproveBlazeDS.xml" target="loopOnce" inheritAll="false"/>
     </target>
-    <target name="loopOnce" >
+    <target name="loopOnce">
         <!-- make a copy of the list so we can munge it to
          get the first item in the list -->
-        <delete file="loop1.txt" />
-        <copy file="loop.txt" tofile="loop1.txt" />
-        <loadfile srcFile="loop.txt" property="checkiflast" />
+        <delete file="loop1.txt"/>
+        <copy file="loop.txt" tofile="loop1.txt"/>
+        <loadfile srcFile="loop.txt" property="checkiflast"/>
         <condition property="islast" value="true">
             <not>
-                <contains string="${checkiflast}" substring="," />
+                <contains string="${checkiflast}" substring=","/>
             </not>
         </condition>
-        <antcall target="notlast" />
-        <antcall target="lastone" />
+        <antcall target="notlast"/>
+        <antcall target="lastone"/>
     </target>
     <target name="notlast" unless="islast">
-        <loadfile srcFile="loop1.txt" property="echoFile" />
-        <replaceregexp file="loop1.txt" match="^(.*),(.*)" replace="\2" />
-        <loadfile srcFile="loop1.txt" property="thisFile" />
-        <antcall target="jar-check" />
-        <replaceregexp file="loop.txt" match="^(.*),(.*)" replace="\1" />
+        <loadfile srcFile="loop1.txt" property="echoFile"/>
+        <replaceregexp file="loop1.txt" match="^(.*),(.*)" replace="\2"/>
+        <loadfile srcFile="loop1.txt" property="thisFile"/>
+        <antcall target="jar-check"/>
+        <replaceregexp file="loop.txt" match="^(.*),(.*)" replace="\1"/>
         <ant antfile="ApproveBlazeDS.xml" target="loopOnce" inheritAll="false"/>
     </target>
     <target name="lastone" if="islast">
-        <loadfile srcFile="loop1.txt" property="thisFile" />
-        <antcall target="jar-check" />
-        <delete file="loop.txt" />
-        <delete file="loop1.txt" />
+        <loadfile srcFile="loop1.txt" property="thisFile"/>
+        <antcall target="jar-check"/>
+        <delete file="loop.txt"/>
+        <delete file="loop1.txt"/>
     </target>
 
-    <target name="jar-check" >
-        <delete dir="${basedir}/jar" failonerror="false" />
-        <delete dir="${basedir}/${thisFile}.jar" failonerror="false" />
-        <mkdir dir="${basedir}/jar" />
+    <target name="jar-check">
+        <delete dir="${basedir}/jar" failonerror="false"/>
+        <delete dir="${basedir}/${thisFile}.jar" failonerror="false"/>
+        <mkdir dir="${basedir}/jar"/>
         <get src="https${package.url.base}/${thisFile}/${release.version}/${thisFile}-${release.version}.jar"
-            dest="${basedir}/${thisFile}.jar" />
+             dest="${basedir}/${thisFile}.jar"/>
         <get src="https${package.url.base}/${thisFile}/${release.version}/${thisFile}-${release.version}.jar.asc"
-            dest="${basedir}/${thisFile}.jar.asc" />
+             dest="${basedir}/${thisFile}.jar.asc"/>
         <get src="https${package.url.base}/${thisFile}/${release.version}/${thisFile}-${release.version}.jar.md5"
-            dest="${basedir}/${thisFile}.jar.md5" />
+             dest="${basedir}/${thisFile}.jar.md5"/>
         <echo message="Checking MD5..."/>
         <replace file="${basedir}/${thisFile}.jar.md5"
-            token=" " />
-        <checksum file="${basedir}/${thisFile}.jar" algorithm="md5" verifyproperty="jar.md5.ok" />
+                 token=" "/>
+        <checksum file="${basedir}/${thisFile}.jar" algorithm="md5" verifyproperty="jar.md5.ok"/>
         <condition property="JARMD5Invalid">
             <not>
-                <equals arg1="${jar.md5.ok}" arg2="true" />
+                <equals arg1="${jar.md5.ok}" arg2="true"/>
             </not>
         </condition>
-        <fail message="MD5 checksum did not match" if="JARMD5Invalid" />
+        <fail message="MD5 checksum did not match" if="JARMD5Invalid"/>
         <exec executable="gpg" failonerror="true">
-            <arg value="--verify" />
-            <arg value="${basedir}/${thisFile}.jar.asc" />
-            <arg value="${basedir}/${thisFile}.jar" />
+            <arg value="--verify"/>
+            <arg value="${basedir}/${thisFile}.jar.asc"/>
+            <arg value="${basedir}/${thisFile}.jar"/>
         </exec>
-        <unjar src="${basedir}/${thisFile}.jar" dest="${basedir}/jar" />
+        <unjar src="${basedir}/${thisFile}.jar" dest="${basedir}/jar"/>
         <exec executable="tar" output="${basedir}/jarclasses.txt">
-            <arg value="tf" />
-            <arg value="${basedir}/${thisFile}.jar" />
+            <arg value="tf"/>
+            <arg value="${basedir}/${thisFile}.jar"/>
         </exec>
         <replaceregexp file="${basedir}/jarclasses.txt" match="(.*)/(.*)" replace="\1" flags="m" byline="true"/>
         <exec executable="sort" output="${basedir}/jarpaths.txt">
-            <arg value="-u" />
-            <arg value="${basedir}/jarclasses.txt" />
+            <arg value="-u"/>
+            <arg value="${basedir}/jarclasses.txt"/>
         </exec>
-        <antcall target="display-text" >
-            <param name="file" value="${basedir}/jarpaths.txt" />
+        <antcall target="display-text">
+            <param name="file" value="${basedir}/jarpaths.txt"/>
         </antcall>
         <input
-        message="Above is the list of folders in this ${thisFile}.&#xA;Folder names can sometimes indicate presence of third-party content that needs to be in LICENSE and/or NOTICE files.&#xA;Press the Enter key to see the LICENSE for this jar."/>
-        
+                message="Above is the list of folders in this ${thisFile}.&#xA;Folder names can sometimes indicate presence of third-party content that needs to be in LICENSE and/or NOTICE files.&#xA;Press the Enter key to see the LICENSE for this jar."/>
+
         <fail message="LICENSE not in ${basedir}/${thisFile}.jar">
             <condition>
                 <not>
-                    <available file="${basedir}/jar/META-INF/LICENSE" />
+                    <available file="${basedir}/jar/META-INF/LICENSE"/>
                 </not>
             </condition>
         </fail>
         <fail message="NOTICE not in ${basedir}/${thisFile}.jar">
             <condition>
                 <not>
-                    <available file="${basedir}/jar/META-INF/NOTICE" />
+                    <available file="${basedir}/jar/META-INF/NOTICE"/>
                 </not>
             </condition>
         </fail>
-        <antcall target="display-text" >
-            <param name="file" value="${basedir}/jar/META-INF/LICENSE" />
+        <antcall target="display-text">
+            <param name="file" value="${basedir}/jar/META-INF/LICENSE"/>
         </antcall>
         <input
-        message="Check the LICENSE for the Apache License and third-party licenses. Is it ok?"
-        validargs="y,n"
-        defaultvalue="y"
-        addproperty="jar.license.ok"/>
+                message="Check the LICENSE for the Apache License and third-party licenses. Is it ok?"
+                validargs="y,n"
+                defaultvalue="y"
+                addproperty="jar.license.ok"/>
         <fail message="LICENSE for ${basedir}/${thisFile}.jar not correct">
             <condition>
                 <not>
-                    <equals arg1="${jar.license.ok}" arg2="y" />
+                    <equals arg1="${jar.license.ok}" arg2="y"/>
                 </not>
             </condition>
         </fail>
-        <antcall target="display-text" >
-            <param name="file" value="${basedir}/jar/META-INF/NOTICE" />
+        <antcall target="display-text">
+            <param name="file" value="${basedir}/jar/META-INF/NOTICE"/>
         </antcall>
         <input
-        message="Check the NOTICE for required notices from third-parties. Is it ok?"
-        validargs="y,n"
-        defaultvalue="y"
-        addproperty="jar.notice.ok"/>
+                message="Check the NOTICE for required notices from third-parties. Is it ok?"
+                validargs="y,n"
+                defaultvalue="y"
+                addproperty="jar.notice.ok"/>
         <fail message="NOTICE for ${basedir}/${thisFile}.jar not correct">
             <condition>
                 <not>
-                    <equals arg1="${jar.notice.ok}" arg2="y" />
+                    <equals arg1="${jar.notice.ok}" arg2="y"/>
                 </not>
             </condition>
         </fail>
-        
+
     </target>
 
-    <target name="rat-check" >
+    <target name="rat-check">
 
         <echo message="Checking files at ${basedir}/${package.url.name}, report is ${rat.report}"/>
 
         <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
-            reportFile="${rat.report}">
+                    reportFile="${rat.report}">
             <fileset dir="${basedir}/${package.url.name}">
                 <!-- exclude media (png, gif, jpg, mp3, flv) -->
                 <exclude name="**/*.png"/>
@@ -397,152 +402,153 @@
                 <exclude name="**/*.flv"/>
                 <exclude name="installer/build.number"/>
                 <exclude name="**/swfobject.js"/>
-                <exclude name="**/DoNotDeleteUntilFile.txt" />
+                <exclude name="**/DoNotDeleteUntilFile.txt"/>
                 <exclude name="CONTRIBUTORS"/>
                 <exclude name="CONTRIBUTING"/>
             </fileset>
         </rat:report>
-		<antcall target="display-text" >
-            <param name="file" value="${rat.report}" />
+        <antcall target="display-text">
+            <param name="file" value="${rat.report}"/>
         </antcall>
         <input
-			message="Check that there are no unknown or unapproved licenses or archives. Is it ok?"
-            validargs="y,n"
-        defaultvalue="y"
-        addproperty="rat.license.ok"/>
-		<echo>filtering out AL files to make it easier to see binary files</echo>
-		<copy file="${rat.report}" tofile="${rat.report}.bin.txt" />
+                message="Check that there are no unknown or unapproved licenses or archives. Is it ok?"
+                validargs="y,n"
+                defaultvalue="y"
+                addproperty="rat.license.ok"/>
+        <echo>filtering out AL files to make it easier to see binary files</echo>
+        <copy file="${rat.report}" tofile="${rat.report}.bin.txt"/>
         <replaceregexp file="${rat.report}.bin.txt" match="..AL.*" replace="__AL" byline="true"/>
         <replaceregexp file="${rat.report}.bin.txt" flags="gs" match="__AL." replace="" byline="false"/>
-		<antcall target="display-text" >
-            <param name="file" value="${rat.report}.bin.txt" />
+        <antcall target="display-text">
+            <param name="file" value="${rat.report}.bin.txt"/>
         </antcall>
         <input
-			message="Check that there are no unexpected binaries.  Is it ok?"
-            validargs="y,n"
-        defaultvalue="n"
-        addproperty="rat.binaries.ok"/>
+                message="Check that there are no unexpected binaries.  Is it ok?"
+                validargs="y,n"
+                defaultvalue="n"
+                addproperty="rat.binaries.ok"/>
     </target>
 
-    <target name="check-notices" description="open each notice file for review, grep for a few things" >
+    <target name="check-notices" description="open each notice file for review, grep for a few things">
         <fail message="README not in package">
-			<condition>
-	            <not>
-    	            <available file="${basedir}/${package.url.name}/blazeds-${release.version}/README" />
-        	    </not>
-			</condition>
+            <condition>
+                <not>
+                    <available file="${basedir}/${package.url.name}/blazeds-${release.version}/README"/>
+                </not>
+            </condition>
         </fail>
         <fail message="RELEASE_NOTES not in package">
-			<condition>
-				<not>
-					<available file="${basedir}/${package.url.name}/blazeds-${release.version}/RELEASE_NOTES" />
-				</not>
-			</condition>
+            <condition>
+                <not>
+                    <available file="${basedir}/${package.url.name}/blazeds-${release.version}/RELEASE_NOTES"/>
+                </not>
+            </condition>
         </fail>
         <fail message="NOTICE not in package">
-			<condition>
-				<not>
-					<available file="${basedir}/${package.url.name}/blazeds-${release.version}/NOTICE" />
-				</not>
-			</condition>
+            <condition>
+                <not>
+                    <available file="${basedir}/${package.url.name}/blazeds-${release.version}/NOTICE"/>
+                </not>
+            </condition>
         </fail>
         <fail message="LICENSE not in package">
-			<condition>
-				<not>
-					<available file="${basedir}/${package.url.name}/blazeds-${release.version}/LICENSE" />
-				</not>
-			</condition>
+            <condition>
+                <not>
+                    <available file="${basedir}/${package.url.name}/blazeds-${release.version}/LICENSE"/>
+                </not>
+            </condition>
         </fail>
-		<antcall target="display-text" >
-            <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/README" />
+        <antcall target="display-text">
+            <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/README"/>
         </antcall>
-		<input
-			message="Check the README for version numbers, spelling, grammar, accuracy.  Is it ok?"
-            validargs="y,n"
-        defaultvalue="y"
-        addproperty="readme.ok"/>
-		
-		<antcall target="display-text" >
-            <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/RELEASE_NOTES" />
-        </antcall>
-		<input
-			message="Check the RELEASE_NOTES for copyright years, spelling, grammar, accuracy. Is it ok?"
-            validargs="y,n"
-        defaultvalue="y"
-        addproperty="releasenotes.ok"/>
-		
-		<antcall target="display-text" >
-            <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/NOTICE" />
-        </antcall>
-		<input
-			message="Check the NOTICE for required notices from third-parties. Is it ok?"
-            validargs="y,n"
-        defaultvalue="y"
-        addproperty="notice.ok"/>
+        <input
+                message="Check the README for version numbers, spelling, grammar, accuracy.  Is it ok?"
+                validargs="y,n"
+                defaultvalue="y"
+                addproperty="readme.ok"/>
 
-		<antcall target="display-text" >
-            <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/LICENSE" />
+        <antcall target="display-text">
+            <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/RELEASE_NOTES"/>
         </antcall>
-		<input
-			message="Check the LICENSE for the Apache License and third-party licenses. Is it ok?"
-            validargs="y,n"
-        defaultvalue="y"
-        addproperty="license.ok"/>
+        <input
+                message="Check the RELEASE_NOTES for copyright years, spelling, grammar, accuracy. Is it ok?"
+                validargs="y,n"
+                defaultvalue="y"
+                addproperty="releasenotes.ok"/>
+
+        <antcall target="display-text">
+            <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/NOTICE"/>
+        </antcall>
+        <input
+                message="Check the NOTICE for required notices from third-parties. Is it ok?"
+                validargs="y,n"
+                defaultvalue="y"
+                addproperty="notice.ok"/>
+
+        <antcall target="display-text">
+            <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/LICENSE"/>
+        </antcall>
+        <input
+                message="Check the LICENSE for the Apache License and third-party licenses. Is it ok?"
+                validargs="y,n"
+                defaultvalue="y"
+                addproperty="license.ok"/>
     </target>
 
     <target name="build" depends="copy.downloads">
-		<input
-			message="The final step is to run the build and any tests the build script runs.  This can take several minutes.  Press y to start the build."
-            validargs="y"
-        defaultvalue="y" />
-        <exec dir="${basedir}/${package.url.name}/blazeds-${release.version}" executable="mvn" >
-            <arg value="install" />
+        <input
+                message="The final step is to run the build and any tests the build script runs.  This can take several minutes.  Press y to start the build."
+                validargs="y"
+                defaultvalue="y"/>
+        <exec dir="${basedir}/${package.url.name}/blazeds-${release.version}" executable="mvn">
+            <arg value="install"/>
         </exec>
     </target>
 
-    <target name="copy.downloads" if="${do.copy.downloads}" description="instead of actually downloading all of the dependencies, you can save lots of time by just copying from some other folder in some other SDK.">
-		<echo>Copying downloads</echo>
-        <copy todir="${basedir}/${package.url.name}/in" >
-			<fileset dir="${download.cache.dir}" />
-		</copy>
+    <target name="copy.downloads" if="${do.copy.downloads}"
+            description="instead of actually downloading all of the dependencies, you can save lots of time by just copying from some other folder in some other SDK.">
+        <echo>Copying downloads</echo>
+        <copy todir="${basedir}/${package.url.name}/in">
+            <fileset dir="${download.cache.dir}"/>
+        </copy>
     </target>
-    	
-	<target name="approve" >
-		<condition property="vote" value="+1">
-			<and>
-				<equals arg1="${rat.license.ok}" arg2="y" />
-				<equals arg1="${rat.binaries.ok}" arg2="y" />
-				<equals arg1="${readme.ok}" arg2="y" />
-				<equals arg1="${releasenotes.ok}" arg2="y" />
-				<equals arg1="${notice.ok}" arg2="y" />
-				<equals arg1="${license.ok}" arg2="y" />
-			</and>
-		</condition>
-		<property name="vote" value="-1" />
-		<echo>
-${vote}
-Package ${package.url.path}/${package.url.name}.${package.suffix}
-Java ${ant.java.version}
-OS: ${os.name} ${os.arch} ${os.version}
-Source kit signatures match: y
-Source kit builds: y
-README is ok: ${readme.ok}
-RELEASE_NOTES is ok: ${releasenotes.ok}
-NOTICE is ok: ${notice.ok}
-LICENSE is ok: ${license.ok}
-No unapproved licenses or files in jars: y
-No unapproved licenses or archives: ${rat.license.ok}
-No unapproved binaries: ${rat.binaries.ok}
-		</echo>
-		<fail>
-			<condition>
-	            <equals arg1="-1" arg2="${vote}"/>
-			</condition>
-		</fail>
-		<antcall target="no-asc" />
-	</target>
 
-	<target name="no-asc" if="no.asc" >
-		<echo>PGP signature not checked</echo>
-	</target>
+    <target name="approve">
+        <condition property="vote" value="+1">
+            <and>
+                <equals arg1="${rat.license.ok}" arg2="y"/>
+                <equals arg1="${rat.binaries.ok}" arg2="y"/>
+                <equals arg1="${readme.ok}" arg2="y"/>
+                <equals arg1="${releasenotes.ok}" arg2="y"/>
+                <equals arg1="${notice.ok}" arg2="y"/>
+                <equals arg1="${license.ok}" arg2="y"/>
+            </and>
+        </condition>
+        <property name="vote" value="-1"/>
+        <echo>
+            ${vote}
+            Package ${package.url.path}/${package.url.name}.${package.suffix}
+            Java ${ant.java.version}
+            OS: ${os.name} ${os.arch} ${os.version}
+            Source kit signatures match: y
+            Source kit builds: y
+            README is ok: ${readme.ok}
+            RELEASE_NOTES is ok: ${releasenotes.ok}
+            NOTICE is ok: ${notice.ok}
+            LICENSE is ok: ${license.ok}
+            No unapproved licenses or files in jars: y
+            No unapproved licenses or archives: ${rat.license.ok}
+            No unapproved binaries: ${rat.binaries.ok}
+        </echo>
+        <fail>
+            <condition>
+                <equals arg1="-1" arg2="${vote}"/>
+            </condition>
+        </fail>
+        <antcall target="no-asc"/>
+    </target>
+
+    <target name="no-asc" if="no.asc">
+        <echo>PGP signature not checked</echo>
+    </target>
 </project>
diff --git a/README b/README
index 1809f55..2086c9f 100644
--- a/README
+++ b/README
@@ -98,27 +98,27 @@
 	version of Apache BlazeDS will automatically be downloaded.
 
     <dependency>
-        <groupId>org.apache.flex.blazeds</groupId>
+            <groupId>org.apache.flex.blazeds</groupId>
         <artifactId>flex-messaging-common</artifactId>
         <version>4.7.3</version>
     </dependency>
     <dependency>
-        <groupId>org.apache.flex.blazeds</groupId>
+            <groupId>org.apache.flex.blazeds</groupId>
         <artifactId>flex-messaging-core</artifactId>
         <version>4.7.3</version>
     </dependency>
     <dependency>
-        <groupId>org.apache.flex.blazeds</groupId>
+            <groupId>org.apache.flex.blazeds</groupId>
         <artifactId>flex-messaging-opt</artifactId>
         <version>4.7.3</version>
     </dependency>
     <dependency>
-        <groupId>org.apache.flex.blazeds</groupId>
+            <groupId>org.apache.flex.blazeds</groupId>
         <artifactId>flex-messaging-proxy</artifactId>
         <version>4.7.3</version>
     </dependency>
     <dependency>
-        <groupId>org.apache.flex.blazeds</groupId>
+            <groupId>org.apache.flex.blazeds</groupId>
         <artifactId>flex-messaging-remoting</artifactId>
         <version>4.7.3</version>
     </dependency>
diff --git a/archetypes/blazeds-spring-boot-archetype/README.md b/archetypes/blazeds-spring-boot-archetype/README.md
index 453caf8..9d42772 100644
--- a/archetypes/blazeds-spring-boot-archetype/README.md
+++ b/archetypes/blazeds-spring-boot-archetype/README.md
@@ -1,24 +1,49 @@
+<!--
+  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
+
+      https://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.
+  -->
 # Usage
 
 ## Create a new project using the blazeds-spring-boot-archetype
 
-Using the maven-archetype-plugin it is easy to generate a new project utilizing Spring-Boot to setup a BlazeDS server in order to get started with BlazeDS almost instantly.
+Using the maven-archetype-plugin it is easy to generate a new project utilizing Spring-Boot to setup a BlazeDS server in
+order to get started with BlazeDS almost instantly.
 
 In order to creat such a project, you nee to execute the following command:
+
 ```
 mvn archetype:generate -DarchetypeGroupId=org.apache.flex.blazeds -DarchetypeArtifactId=blazeds-spring-boot-example-archetype -DarchetypeVersion=4.7.3-SNAPSHOT
 ```
+
 The archetype-plugin will ask you for a groupId, artifactId, version and package name.
 
-The first are used to fill the maven coordinates in the generated pom and the package will be used to set the package the generated classes are located in.
+The first are used to fill the maven coordinates in the generated pom and the package will be used to set the package
+the generated classes are located in.
 
 ## Run the generated application
 
 After having generated your application, just start it by executing the following command:
+
 ```
 mvn spring-boot:run
 ```
+
 The output should be something like this:
+
 ```
 [INFO] Scanning for projects...
 [WARNING] 
@@ -102,7 +127,9 @@
 
 ## Communicating with the BlazeDS server from a Flex client
 
-In order to communicate with the BlazeDS server, you need to define your Remote object by providing the `endpoint` and `destination` attributes.
+In order to communicate with the BlazeDS server, you need to define your Remote object by providing the `endpoint`
+and `destination` attributes.
+
 ```
 <fx:Declarations>
     <s:RemoteObject id="exampleService"
@@ -113,6 +140,10 @@
     </s:RemoteObject>
 </fx:Declarations>
 ```
-Take care that the `destination` attribute matches exaclty the name you gave the service using the `@Service` annotation and that the service is also annotated with `@RemotingDestination`
 
-The `@Service` annotation gives the service a name in the Spring context and would be available under that name inside the Spring context. The `@RemotingDestination` annotation explicitly registers the service with BlazeDS. This is a security measure as this way only explicitly exported services are available remotely.
\ No newline at end of file
+Take care that the `destination` attribute matches exaclty the name you gave the service using the `@Service` annotation
+and that the service is also annotated with `@RemotingDestination`
+
+The `@Service` annotation gives the service a name in the Spring context and would be available under that name inside
+the Spring context. The `@RemotingDestination` annotation explicitly registers the service with BlazeDS. This is a
+security measure as this way only explicitly exported services are available remotely.
\ No newline at end of file
diff --git a/archetypes/blazeds-spring-boot-archetype/pom.xml b/archetypes/blazeds-spring-boot-archetype/pom.xml
index 34502c4..55fba5c 100644
--- a/archetypes/blazeds-spring-boot-archetype/pom.xml
+++ b/archetypes/blazeds-spring-boot-archetype/pom.xml
@@ -1,35 +1,68 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<!--
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>flex-messaging-archetypes</artifactId>
-    <version>4.7.3</version>
-  </parent>
+  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
 
-  <artifactId>blazeds-spring-boot-example-archetype</artifactId>
-  <packaging>maven-archetype</packaging>
+      http://www.apache.org/licenses/LICENSE-2.0
 
-  <name>blazeds-spring-boot-example-archetype</name>
+  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.
 
-  <build>
-    <extensions>
-      <extension>
-        <groupId>org.apache.maven.archetype</groupId>
-        <artifactId>archetype-packaging</artifactId>
-        <version>3.0.0</version>
-      </extension>
-    </extensions>
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <artifactId>maven-archetype-plugin</artifactId>
-          <version>3.0.0</version>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>flex-messaging-archetypes</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>blazeds-spring-boot-example-archetype</artifactId>
+    <packaging>maven-archetype</packaging>
+
+    <name>blazeds-spring-boot-example-archetype</name>
+
+    <build>
+        <extensions>
+            <extension>
+                <groupId>org.apache.maven.archetype</groupId>
+                <artifactId>archetype-packaging</artifactId>
+                <version>3.0.0</version>
+            </extension>
+        </extensions>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <version>0.14</version>
+                <configuration>
+                    <excludes combine.self="append">
+                        <!-- This file is empty and something is added it breaks the tests -->
+                        <exclude>src/test/resources/projects/basic/goal.txt</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <artifactId>maven-archetype-plugin</artifactId>
+                    <version>3.0.0</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 
 </project>
diff --git a/archetypes/blazeds-spring-boot-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/blazeds-spring-boot-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
index d8583f8..36e8fb9 100644
--- a/archetypes/blazeds-spring-boot-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/archetypes/blazeds-spring-boot-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -1,19 +1,39 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="blazeds-spring-boot-example"
-    xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <fileSets>
-    <fileSet filtered="true" packaged="true" encoding="UTF-8">
-      <directory>src/main/java</directory>
-      <includes>
-        <include>**/*.java</include>
-      </includes>
-    </fileSet>
-    <fileSet filtered="true" encoding="UTF-8">
-      <directory>src/main/resources</directory>
-      <includes>
-        <include>**/*.xml</include>
-      </includes>
-    </fileSet>
-  </fileSets>
+<!--
+
+  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.
+
+-->
+<archetype-descriptor
+        xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
+        name="blazeds-spring-boot-example"
+        xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <fileSets>
+        <fileSet filtered="true" packaged="true" encoding="UTF-8">
+            <directory>src/main/java</directory>
+            <includes>
+                <include>**/*.java</include>
+            </includes>
+        </fileSet>
+        <fileSet filtered="true" encoding="UTF-8">
+            <directory>src/main/resources</directory>
+            <includes>
+                <include>**/*.xml</include>
+            </includes>
+        </fileSet>
+    </fileSets>
 </archetype-descriptor>
diff --git a/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/pom.xml b/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/pom.xml
index 84a854c..5ce2dd4 100644
--- a/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/pom.xml
@@ -16,62 +16,64 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <groupId>${groupId}</groupId>
-  <artifactId>${artifactId}</artifactId>
-  <version>${version}</version>
-  <packaging>war</packaging>
+    <groupId>${groupId}</groupId>
+    <artifactId>${artifactId}</artifactId>
+    <version>${version}</version>
+    <packaging>war</packaging>
 
-  <build>
-    <plugins>
-      <!-- Make Spring-Boot build an executable war -->
-      <plugin>
-        <groupId>org.springframework.boot</groupId>
-        <artifactId>spring-boot-maven-plugin</artifactId>
-        <version>1.3.3.RELEASE</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>repackage</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <classifier>exec</classifier>
-        </configuration>
-      </plugin>
-      <!--
-          We are building a servlet 3.0 application we don't
-          need a web.xml, so we have to disable a check on the
-          plugin.
-      -->
-      <plugin>
-        <artifactId>maven-war-plugin</artifactId>
-        <configuration>
-          <failOnMissingWebXml>false</failOnMissingWebXml>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+    <build>
+        <plugins>
+            <!-- Make Spring-Boot build an executable war -->
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>1.3.3.RELEASE</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <classifier>exec</classifier>
+                </configuration>
+            </plugin>
+            <!--
+                We are building a servlet 3.0 application we don't
+                need a web.xml, so we have to disable a check on the
+                plugin.
+            -->
+            <plugin>
+                <artifactId>maven-war-plugin</artifactId>
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context</artifactId>
-      <version>4.3.2.RELEASE</version>
-    </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <version>4.3.2.RELEASE</version>
+        </dependency>
 
-    <!--
-        This will pull in and configure the servlet engine as
-        well as the BlazeDS server.
-    -->
-    <dependency>
-      <groupId>org.apache.flex.blazeds</groupId>
-      <artifactId>blazeds-spring-boot-starter</artifactId>
-      <version>4.7.3-SNAPSHOT</version>
-    </dependency>
-  </dependencies>
+        <!--
+            This will pull in and configure the servlet engine as
+            well as the BlazeDS server.
+        -->
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>blazeds-spring-boot-starter</artifactId>
+            <version>4.7.3-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
 
 </project>
diff --git a/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/java/BlazeDSSpringBootApplication.java b/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/java/BlazeDSSpringBootApplication.java
index e103a47..cf23b8a 100644
--- a/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/java/BlazeDSSpringBootApplication.java
+++ b/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/java/BlazeDSSpringBootApplication.java
@@ -1,26 +1,26 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- *
- *  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.
- *
- */
+#set($symbol_pound='#')
+        #set($symbol_dollar='$')
+        #set($symbol_escape='\' )
+        /*
+         *
+         *  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 ${package};
+        package ${package};
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/java/services/ExampleService.java b/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/java/services/ExampleService.java
index 11592b5..fdbb9e8 100644
--- a/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/java/services/ExampleService.java
+++ b/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/java/services/ExampleService.java
@@ -1,26 +1,26 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-/*
- *
- *  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.
- *
- */
+#set($symbol_pound='#')
+        #set($symbol_dollar='$')
+        #set($symbol_escape='\' )
+        /*
+         *
+         *  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 ${package}.services;
+        package ${package}.services;
 
 import org.springframework.flex.remoting.RemotingDestination;
 import org.springframework.stereotype.Service;
diff --git a/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/flex/services-config.xml b/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/flex/services-config.xml
index 85b022c..bc32d36 100644
--- a/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/flex/services-config.xml
+++ b/archetypes/blazeds-spring-boot-archetype/src/main/resources/archetype-resources/src/main/resources/META-INF/flex/services-config.xml
@@ -1,86 +1,86 @@
 #set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+        #set( $symbol_dollar = '$' )
+        #set( $symbol_escape = '\' )
+        <?xml version="1.0" encoding="UTF-8"?>
+        <!--
 
-  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
+          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
+              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.
+          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.
 
--->
+        -->
 <services-config>
-  <services>
-    <service id="remoting-service" class="flex.messaging.services.RemotingService">
-      <adapters>
-        <adapter-definition
-                id="java-object"
-                class="flex.messaging.services.remoting.adapters.JavaAdapter"
-                default="true"/>
-      </adapters>
-      <default-channels>
-        <channel ref="websocketAmf"/>
-        <channel ref="longPollingAmf"/>
-        <channel ref="shortPollingAmf"/>
-      </default-channels>
-    </service>
-  </services>
+    <services>
+        <service id="remoting-service" class="flex.messaging.services.RemotingService">
+            <adapters>
+                <adapter-definition
+                        id="java-object"
+                        class="flex.messaging.services.remoting.adapters.JavaAdapter"
+                        default="true"/>
+            </adapters>
+            <default-channels>
+                <channel ref="websocketAmf"/>
+                <channel ref="longPollingAmf"/>
+                <channel ref="shortPollingAmf"/>
+            </default-channels>
+        </service>
+    </services>
 
-  <channels>
-    <channel-definition id="websocketAmf" class="mx.messaging.channels.StreamingAMFChannel">
-      <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/websocket-amf"
-                class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
-      <properties>
-        <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
-        <add-no-cache-headers>true</add-no-cache-headers>
-      </properties>
-    </channel-definition>
-    <channel-definition id="longPollingAmf" class="mx.messaging.channels.AMFChannel">
-      <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/long-polling-amf"
-                class="flex.messaging.endpoints.AMFEndpoint"/>
-      <properties>
-        <polling-enabled>true</polling-enabled>
-        <wait-interval-millis>0</wait-interval-millis>
-        <polling-interval-millis>1000</polling-interval-millis>
-        <max-waiting-poll-requests>100</max-waiting-poll-requests>
-        <piggybacking-enabled>true</piggybacking-enabled>
-        <add-no-cache-headers>true</add-no-cache-headers>
-      </properties>
-    </channel-definition>
-    <channel-definition id="shortPollingAmf" class="mx.messaging.channels.AMFChannel">
-      <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/short-polling-amf"
-                class="flex.messaging.endpoints.AMFEndpoint"/>
-      <properties>
-        <polling-enabled>true</polling-enabled>
-        <polling-interval-millis>3000</polling-interval-millis>
-        <piggybacking-enabled>true</piggybacking-enabled>
-        <add-no-cache-headers>true</add-no-cache-headers>
-      </properties>
-    </channel-definition>
-  </channels>
+    <channels>
+        <channel-definition id="websocketAmf" class="mx.messaging.channels.StreamingAMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/websocket-amf"
+                      class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
+            <properties>
+                <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
+                <add-no-cache-headers>true</add-no-cache-headers>
+            </properties>
+        </channel-definition>
+        <channel-definition id="longPollingAmf" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/long-polling-amf"
+                      class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <polling-enabled>true</polling-enabled>
+                <wait-interval-millis>0</wait-interval-millis>
+                <polling-interval-millis>1000</polling-interval-millis>
+                <max-waiting-poll-requests>100</max-waiting-poll-requests>
+                <piggybacking-enabled>true</piggybacking-enabled>
+                <add-no-cache-headers>true</add-no-cache-headers>
+            </properties>
+        </channel-definition>
+        <channel-definition id="shortPollingAmf" class="mx.messaging.channels.AMFChannel">
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/short-polling-amf"
+                      class="flex.messaging.endpoints.AMFEndpoint"/>
+            <properties>
+                <polling-enabled>true</polling-enabled>
+                <polling-interval-millis>3000</polling-interval-millis>
+                <piggybacking-enabled>true</piggybacking-enabled>
+                <add-no-cache-headers>true</add-no-cache-headers>
+            </properties>
+        </channel-definition>
+    </channels>
 
-  <flex-client>
-    <!-- Make sure clients are automatically expired -->
-    <timeout-minutes>720</timeout-minutes>
-  </flex-client>
+    <flex-client>
+        <!-- Make sure clients are automatically expired -->
+        <timeout-minutes>720</timeout-minutes>
+    </flex-client>
 
-  <logging>
-    <!--
-            Logging inside BlazeDS is completely turned off.
-            The UniversalExceptionTranslator will handle logging
-            of exceptions inside Spring.
-    -->
-    <target class="flex.messaging.log.ConsoleTarget" level="None"/>
-  </logging>
+    <logging>
+        <!--
+                Logging inside BlazeDS is completely turned off.
+                The UniversalExceptionTranslator will handle logging
+                of exceptions inside Spring.
+        -->
+        <target class="flex.messaging.log.ConsoleTarget" level="None"/>
+    </logging>
 </services-config>
\ No newline at end of file
diff --git a/archetypes/blazeds-spring-boot-archetype/src/test/resources/projects/basic/archetype.properties b/archetypes/blazeds-spring-boot-archetype/src/test/resources/projects/basic/archetype.properties
index f6cebd8..f359ece 100644
--- a/archetypes/blazeds-spring-boot-archetype/src/test/resources/projects/basic/archetype.properties
+++ b/archetypes/blazeds-spring-boot-archetype/src/test/resources/projects/basic/archetype.properties
@@ -1,4 +1,21 @@
-#Fri Feb 17 09:33:41 CET 2017
+#
+# 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
+#
+#   https://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=it.pkg
 version=0.1-SNAPSHOT
 groupId=archetype.it
diff --git a/archetypes/pom.xml b/archetypes/pom.xml
index fc37b41..e5dcd7d 100755
--- a/archetypes/pom.xml
+++ b/archetypes/pom.xml
@@ -16,20 +16,21 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>blazeds</artifactId>
-    <version>4.7.3</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>blazeds</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-archetypes</artifactId>
-  <packaging>pom</packaging>
+    <artifactId>flex-messaging-archetypes</artifactId>
+    <packaging>pom</packaging>
 
-  <modules>
-    <module>blazeds-spring-boot-archetype</module>
-  </modules>
+    <modules>
+        <module>blazeds-spring-boot-archetype</module>
+    </modules>
 
 </project>
diff --git a/build.properties b/build.properties
index 336829e..a1b2183 100755
--- a/build.properties
+++ b/build.properties
@@ -12,47 +12,34 @@
 # 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.

-

-

-

-

-

 src.depend=true

 src.debug=on

-

-blazeds.dir=${basedir}
-

+blazeds.dir=${basedir}

 servlet.version=2.5

 activemq.version=5.7.0

 codec.version=1.6

 collections.version=3.2.1

 httpclient.version=3.0.1

 logging.version=1.1.1

-log4j.version=1.2.14
-spring.version=3.0.7
-xalan.version=2.6.0
-catalina.version=6.0.26
-catalina7.version=7.0.8
-catalina4.version=4.0.6
-

+log4j.version=1.2.14

+spring.version=3.0.7

+xalan.version=2.6.0

+catalina.version=6.0.26

+catalina7.version=7.0.8

+catalina4.version=4.0.6

 local.sdk.lib.dir=./modules/sdk/lib

 local.sdk.frameworks.dir=./frameworks

 local.sdk.bundles.dir=./frameworks/locale

-

 sdk.bin.dir=${blazeds1.dir}/bin

 sdk.lib.dir=${blazeds1.dir}/lib

 compc.dir=${blazeds1.dir}/bin

-

 sdk.version=4

 sdk.frameworks=${local.sdk.frameworks.dir}

 sdk.zip.dir=${blazeds.dir}/resources/flex_sdk

 sdk.zip.file=flex_sdk_${sdk.version}.zip

 sdk.zip=${sdk.zip.dir}/${sdk.zip.file}

-

 min.sdk.version=3.5

-

 branch=blazeds/trunk

-

 webapp.ce.lib=flex-messaging-common.jar,flex-messaging-core.jar,flex-messaging-proxy.jar,flex-messaging-remoting.jar,flex-messaging-opt.jar,commons-logging-1.1.1.jar,commons-codec-1.5.jar,commons-httpclient-3.1.jar,backport-util-concurrent.jar,concurrent.jar,cfgatewayadapter.jar,xalan.jar,flex-rds-server.jar

 webapp.lib=flex-messaging-common.jar,flex-messaging-core.jar,flex-messaging-proxy.jar,flex-messaging-remoting.jar,flex-messaging-opt.jar,,commons-logging-1.1.1.jar,commons-codec-1.5.jar,commons-httpclient-3.1.jar,backport-util-concurrent.jar,concurrent.jar,jsafeJCE.jar,fxgutils.jar,flex-rds-server.jar

 webapp.classes=commons-logging.properties

@@ -62,36 +49,28 @@
 axis.jars=activation.jar, axis.jar, commons-discovery-0.2.jar, jaxrpc.jar, saaj.jar, wsdl4j-1.5.1.jar

 qa-services.jars=qa-services.jar, qa-services-wm.jar, javax_mail.jar

 jgroups.jars=jgroups-core-2.9.0GA.jar,log4j.jar

-

 # Set this to true if you have an updated version of a non-fds swc in the frameworks/local-swcs directory

 # that needs to be used by the build until the regular approval process picks up the external 

 # change.

 # This should always be false unless you are explicitly overriding a swc (or swcs).

 # See the readme.txt file in the local-swcs directory for more information.

 use.local.swcs=false

-

 #player uninstaller file names

 uninstaller.exe=uninstall_flash_player.exe

-

 #player 11 file names

 fp11.installer.exe=11.1/win/InstallAX.exe

 fp11.installer.plugin.exe=11.1/win/InstallPlugin.exe

-

 #player 10 file names

 fp10.installer.exe=10.2/win/InstallAX.exe

 fp10.installer.plugin.exe=10.2/win/InstallPlugin.exe

-

 #player 9 file name

 fp9.installer.exe=win/Install Flash Player 9 ActiveX.exe

 fp9.installer.plugin.exe=win/Install Flash Player 9 Plugin.exe

-

-

 # set the fb3 pro license in your environment if don't want watermarks

 # using environment variable so that we're not checking in a 

 # plain text license into source control

 env.fb3_license=fake

 env.fb4_license=fake

-

 ######################

 # Manifest Entries

 ######################

diff --git a/build.xml b/build.xml
index 7a5043c..1cb128d 100755
--- a/build.xml
+++ b/build.xml
@@ -19,7 +19,6 @@
 -->

 

 

-

 <!--

 

 Notes: If you're running the main target, then there is no need to call clean first.

@@ -32,8 +31,8 @@
     <property environment="env"/>

 

     <!-- properties -->

-    <property file="${basedir}/build.properties" />

-    

+    <property file="${basedir}/build.properties"/>

+

     <property name="modules.core.dir" value="${basedir}/core"/>

     <property name="download.dir" value="${basedir}/in"/>

     <property name="lib.dir" value="${basedir}/lib"/>

@@ -55,7 +54,7 @@
      <property name="hsqldb.zip.file" value="${basedir}/in/hsqldb_1_8_0_10.zip"/>

      <property name="jms.zip.file" value="${basedir}/in/openjms-0.7.6.1.zip"/>

      -->

-    <property name="jms.jar" value="geronimo-jms_1.1_spec-1.1.1.jar" />

+    <property name="jms.jar" value="geronimo-jms_1.1_spec-1.1.1.jar"/>

     <property name="jms.dir" value="${lib.dir}/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1"/>

     <property name="log4j.dir" value="${lib.dir}/log4j/log4j/${log4j.version}"/>

     <property name="log4j.zip.file" value="${basedir}/in/logging-log4j-${log4j.version}.zip"/>

@@ -77,7 +76,7 @@
     <property name="catalina4.zip.file" value="${basedir}/in/jakarta-tomcat-${catalina4.version}.zip"/>

     <property name="catalina.dir" value="${lib.dir}/org/apache/tomcat/catalina/${catalina.version}"/>

     <property name="catalina7.dir" value="${lib.dir}/org/apache/tomcat/tomcat-catalina/${catalina7.version}"/>

-    

+

     <property name="dist.dir" value="${basedir}/dist"/>

     <property name="qa.dir" value="${basedir}/qa"/>

 

@@ -85,25 +84,25 @@
     <property name="label" value="dev"/>

     <property name="build.number" value="${label}"/>

 

-    <property name="subproject.target" value="main" />

+    <property name="subproject.target" value="main"/>

 

     <property name="server.baseurl" value="http://localhost:8400"/>

 

-    <property name="tmp.dir" value="${basedir}/packagetemp/temp" />

-    <property name="local.sdk.dir" value="resources/flex_sdk" />

-    

+    <property name="tmp.dir" value="${basedir}/packagetemp/temp"/>

+    <property name="local.sdk.dir" value="resources/flex_sdk"/>

+

     <property name="env.FLEX_HOME" value="${basedir}/../flex-sdk"/>

     <!-- set FLEX_HOME from environment if not already set -->

     <property name="FLEX_HOME" value="${env.FLEX_HOME}"/>

     <property name="ANT_HOME" value="${env.ANT_HOME}"/>

 

-    <condition property="ocx.dir" value="${env.WINDIR}/system32/Macromed/Flash/" >

+    <condition property="ocx.dir" value="${env.WINDIR}/system32/Macromed/Flash/">

         <isset property="env.WINDIR"/>

     </condition>

-    <condition property="ocx.dir" value="${env.WinDir}/system32/Macromed/Flash/" >

+    <condition property="ocx.dir" value="${env.WinDir}/system32/Macromed/Flash/">

         <isset property="env.WinDir"/>

     </condition>

-    <property name="ocx.dir" value="${env.windir}/system32/Macromed/Flash/" />

+    <property name="ocx.dir" value="${env.windir}/system32/Macromed/Flash/"/>

 

     <condition property="isFlex3" value="true">

         <equals arg1="${sdk.version}" arg2="3"/>

@@ -121,70 +120,72 @@
     <property name="installer.plugin.exe" value="${fp11.installer.plugin.exe}"/>

 

     <target name="check-env"

-        depends="check-flex-home, load-more-properties, check-playerglobal-home" />

-    

+            depends="check-flex-home, load-more-properties, check-playerglobal-home"/>

+

     <target name="check-flex-home" unless="flexhome.exists"

-        description="Check FLEX_HOME for both a directory and a file">

+            description="Check FLEX_HOME for both a directory and a file">

 

         <echo message="FLEX_HOME is ${env.FLEX_HOME}"/>

 

-        <available file="${env.FLEX_HOME}" 

-            type="dir" 

-            property="FLEX_HOME.set"/>

+        <available file="${env.FLEX_HOME}"

+                   type="dir"

+                   property="FLEX_HOME.set"/>

 

-        <fail message="The environment variable FLEX_HOME is not set to a directory" 

-            unless="FLEX_HOME.set"/>

+        <fail message="The environment variable FLEX_HOME is not set to a directory"

+              unless="FLEX_HOME.set"/>

 

-        <property name="flex-sdk-description.xml" 

-            value="${env.FLEX_HOME}/flex-sdk-description.xml"/>

+        <property name="flex-sdk-description.xml"

+                  value="${env.FLEX_HOME}/flex-sdk-description.xml"/>

 

-        <available file="${flex-sdk-description.xml}" 

-            type="file" 

-            property="flex-sdk-description.xml.exists"/>

-        

-        <fail message="The file ${flex-sdk-description.xml} does not exist" 

-            unless="flex-sdk-description.xml"/>

-            

+        <available file="${flex-sdk-description.xml}"

+                   type="file"

+                   property="flex-sdk-description.xml.exists"/>

+

+        <fail message="The file ${flex-sdk-description.xml} does not exist"

+              unless="flex-sdk-description.xml"/>

+

     </target>

 

-    <target name="load-more-properties" 

+    <target name="load-more-properties"

             description="load the FLEX_HOME/build.properties to pick up playerglobal.version">

-        <property file="${FLEX_HOME}/build.properties" />

+        <property file="${FLEX_HOME}/build.properties"/>

     </target>

-    

+

     <target name="check-playerglobal-home" unless="playerglobal.swc.exists"

-        description="Check PLAYERGLOBAL_HOME for both a directory and a swc file">

+            description="Check PLAYERGLOBAL_HOME for both a directory and a swc file">

 

         <echo message="PLAYERGLOBAL_HOME is ${env.PLAYERGLOBAL_HOME}"/>

         <echo message="playerglobal.version is ${playerglobal.version}"/>

 

-        <available file="${env.PLAYERGLOBAL_HOME}" 

-            type="dir" 

-            property="PLAYERGLOBAL_HOME.set"/>

+        <available file="${env.PLAYERGLOBAL_HOME}"

+                   type="dir"

+                   property="PLAYERGLOBAL_HOME.set"/>

 

-        <fail message="The environment variable PLAYERGLOBAL_HOME is not set to a directory" 

-            unless="PLAYERGLOBAL_HOME.set"/>

+        <fail message="The environment variable PLAYERGLOBAL_HOME is not set to a directory"

+              unless="PLAYERGLOBAL_HOME.set"/>

 

-        <property name="playerglobal.swc" 

-            value="${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>

+        <property name="playerglobal.swc"

+                  value="${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc"/>

 

-        <available file="${playerglobal.swc}" 

-            type="file" 

-            property="playerglobal.swc.exists"/>

-        

-        <fail message="The file ${playerglobal.swc} does not exist" 

-            unless="playerglobal.swc.exists"/>

-            

+        <available file="${playerglobal.swc}"

+                   type="file"

+                   property="playerglobal.swc.exists"/>

+

+        <fail message="The file ${playerglobal.swc} does not exist"

+              unless="playerglobal.swc.exists"/>

+

         <echo message="playerglobal.swc is ${playerglobal.swc}"/>

     </target>

-    

-    <target name="thirdparty-downloads" unless="no.thirdparty-downloads" description="Downloads all the required thirdparty code.">

+

+    <target name="thirdparty-downloads" unless="no.thirdparty-downloads"

+            description="Downloads all the required thirdparty code.">

         <ant antfile="${basedir}/downloads.xml" dir="${basedir}"/>

     </target>

-    

-    <target name="main" depends="check-env,clean,thirdparty-downloads,sdk,common,core,proxy,remoting,opt,createMMSFile" description="full build">

+

+    <target name="main" depends="check-env,clean,thirdparty-downloads,sdk,common,core,proxy,remoting,opt,createMMSFile"

+            description="full build">

         <tstamp>

-            <format property="build.datetime" pattern="MM/dd/yyyy hh:mm:ss aa" />

+            <format property="build.datetime" pattern="MM/dd/yyyy hh:mm:ss aa"/>

         </tstamp>

         <echo>ant main target completed on ${build.datetime}</echo>

     </target>

@@ -197,7 +198,7 @@
     <target name="sdk" description="get the sdk and add to the server">

         <!--<ant antfile="${basedir}/sdk/build.xml"/> AJH: needed? -->

     </target>

-    

+

     <target name="common" description="full build of the common module">

         <ant antfile="${basedir}/common/build.xml" target="${subproject.target}"/>

     </target>

@@ -223,8 +224,8 @@
     </target>

 

     <target name="createMMSFile"

-        description="create mms.cfg in order to enable local shared object access"

-        if="isWindows">

+            description="create mms.cfg in order to enable local shared object access"

+            if="isWindows">

         <!-- Sets the default maximum local shared object storage size to unlimited -->

         <echo file="${ocx.dir}/mms.cfg" append="false">LocalStorageLimit=6</echo>

     </target>

@@ -235,7 +236,7 @@
         <!-- package qa apps -->

         <!-- <ant antfile="${qa.dir}/apps/qa-manual/build.xml" target="package"/> -->

         <ant antfile="${qa.dir}/apps/qa-regress/build.xml" target="package"/>

-        

+

         <ant antfile="${basedir}/apps/samples/build.xml" target="package"/>

         <ant antfile="${basedir}/apps/samples-spring/build.xml" target="package"/>

         <ant antfile="${basedir}/apps/blazeds/build.xml" target="package"/>

@@ -244,32 +245,33 @@
 

         <ant antfile="${appserver.dir}/build.xml" target="package"/>

 

-        <antcall target="package-oem" />

+        <antcall target="package-oem"/>

 

         <copy todir="${dist.dir}/lib">

             <fileset dir="${basedir}/lib">

                 <include name="flex-messaging-common.jar"/>

-                <include name="flex-messaging-core.jar"/>               

+                <include name="flex-messaging-core.jar"/>

             </fileset>

         </copy>

 

-        <antcall target="javadoc" />

+        <antcall target="javadoc"/>

 

         <!-- add apps to Tomcat -->

-        <unzip src="${dist.dir}/blazeds.war" dest="${dist.dir}/tomcat/webapps/blazeds" />

-        <unzip src="${dist.dir}/blazeds-spring.war" dest="${dist.dir}/tomcat/webapps/blazeds-spring" />

-        <unzip src="${dist.dir}/samples.war" dest="${dist.dir}/tomcat/webapps/samples" />

-        <unzip src="${dist.dir}/samples-spring.war" dest="${dist.dir}/tomcat/webapps/samples-spring" />

-        <unzip src="${dist.dir}/ds-console.war" dest="${dist.dir}/tomcat/webapps/ds-console" />

+        <unzip src="${dist.dir}/blazeds.war" dest="${dist.dir}/tomcat/webapps/blazeds"/>

+        <unzip src="${dist.dir}/blazeds-spring.war" dest="${dist.dir}/tomcat/webapps/blazeds-spring"/>

+        <unzip src="${dist.dir}/samples.war" dest="${dist.dir}/tomcat/webapps/samples"/>

+        <unzip src="${dist.dir}/samples-spring.war" dest="${dist.dir}/tomcat/webapps/samples-spring"/>

+        <unzip src="${dist.dir}/ds-console.war" dest="${dist.dir}/tomcat/webapps/ds-console"/>

 

         <!-- generate turnkey zip -->

         <antcall target="package-turnkey"/>

 

         <!-- generate binary zip -->

         <zip destfile="${dist.dir}/blazeds-bin-${manifest.Implementation-Version}.${label}.zip"

-            comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">

+             comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">

             <fileset dir="${dist.dir}" includes="blazeds.war"/>

-            <zipfileset dir="${basedir}/collateral" includes="blazeds-bin-readme.htm" fullpath="blazeds-bin-readme.htm"/>

+            <zipfileset dir="${basedir}/collateral" includes="blazeds-bin-readme.htm"

+                        fullpath="blazeds-bin-readme.htm"/>

         </zip>

 

         <!-- generate src zip -->

@@ -277,65 +279,67 @@
 

         <!-- generate java amf client zip -->

         <zip destfile="${dist.dir}/blazeds-java-amf.${label}.zip"

-            comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">

-            <fileset dir="${dist.dir}/lib" includes="*"/>           

+             comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">

+            <fileset dir="${dist.dir}/lib" includes="*"/>

         </zip>

-        

+

         <!-- geneate md5 checksums for the four zips -->

         <checksum forceOverwrite="yes" format="MD5SUM">

             <fileset dir="${dist.dir}">

-                <include name="blazeds-*.zip" />

+                <include name="blazeds-*.zip"/>

             </fileset>

         </checksum>

 

-        <antcall target="package-automation" />

+        <antcall target="package-automation"/>

 

     </target>

 

 

     <target name="package-turnkey">

-        

-         <zip destfile="${dist.dir}/blazeds-turnkey-${manifest.Implementation-Version}.${label}.zip"

-              comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">

-              <fileset dir="${dist.dir}" includes="blazeds.war,blazeds-spring.war,samples.war,samples-spring.war,ds-console.war"/>

-              <zipfileset dir="${dist.dir}/tomcat" prefix="tomcat" excludes="bin,bin/*,work/"/>

-              <zipfileset dir="${dist.dir}/tomcat/bin" prefix="tomcat/bin"  filemode="744"/>

-              <zipfileset dir="${dist.dir}/docs" prefix="docs"/>

-            

-              <zipfileset dir="${basedir}/resources" prefix="resources">

-                  <exclude name="fds-ajax-bridge/build.xml"/>

-                  <exclude name="clustering/JGroups-2.9.0.GA.src.zip"/>

-                  <exclude name="flex_sdk/*.zip"/>

-                  <exclude name="flex_sdk/*.htm"/>

-                  <exclude name="flex_sdk/readme.txt"/>

-              </zipfileset>

-            

-              <zipfileset dir="${basedir}/lib" prefix="resources/clustering" includes="jgroups*"/>

-              <zipfileset dir="${basedir}/lib" prefix="resources/lib" includes="flex-messaging*"/>

-              <zipfileset dir="${basedir}/collateral" includes="blazeds-turnkey-readme.htm" fullpath="blazeds-turnkey-readme.htm"/>

-              <zipfileset dir="${dist.dir}/sampledb" prefix="sampledb" filemode="744"/>

-         </zip>

+

+        <zip destfile="${dist.dir}/blazeds-turnkey-${manifest.Implementation-Version}.${label}.zip"

+             comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">

+            <fileset dir="${dist.dir}"

+                     includes="blazeds.war,blazeds-spring.war,samples.war,samples-spring.war,ds-console.war"/>

+            <zipfileset dir="${dist.dir}/tomcat" prefix="tomcat" excludes="bin,bin/*,work/"/>

+            <zipfileset dir="${dist.dir}/tomcat/bin" prefix="tomcat/bin" filemode="744"/>

+            <zipfileset dir="${dist.dir}/docs" prefix="docs"/>

+

+            <zipfileset dir="${basedir}/resources" prefix="resources">

+                <exclude name="fds-ajax-bridge/build.xml"/>

+                <exclude name="clustering/JGroups-2.9.0.GA.src.zip"/>

+                <exclude name="flex_sdk/*.zip"/>

+                <exclude name="flex_sdk/*.htm"/>

+                <exclude name="flex_sdk/readme.txt"/>

+            </zipfileset>

+

+            <zipfileset dir="${basedir}/lib" prefix="resources/clustering" includes="jgroups*"/>

+            <zipfileset dir="${basedir}/lib" prefix="resources/lib" includes="flex-messaging*"/>

+            <zipfileset dir="${basedir}/collateral" includes="blazeds-turnkey-readme.htm"

+                        fullpath="blazeds-turnkey-readme.htm"/>

+            <zipfileset dir="${dist.dir}/sampledb" prefix="sampledb" filemode="744"/>

+        </zip>

     </target>

-    

-    

-    

+

+

     <target name="package-src">

-        

-       <zip destfile="${dist.dir}/blazeds-src-${manifest.Implementation-Version}.${label}.zip"

-            comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">

-            <zipfileset dir="${basedir}/collateral" includes="blazeds-src-readme.htm" fullpath="blazeds-src-readme.htm"/>

-               <fileset dir="${basedir}">

+

+        <zip destfile="${dist.dir}/blazeds-src-${manifest.Implementation-Version}.${label}.zip"

+             comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label}">

+            <zipfileset dir="${basedir}/collateral" includes="blazeds-src-readme.htm"

+                        fullpath="blazeds-src-readme.htm"/>

+            <fileset dir="${basedir}">

                 <include name="adobe.header"/>

                 <include name="build.properties"/>

                 <include name="build.xml"/>

                 <include name="readme.txt"/>

-                   <include name="collateral/**/*"/>

-                   <include name="development/**/*"/>

-                   <include name="sampledb/**/*"/>

-               </fileset>

+                <include name="collateral/**/*"/>

+                <include name="development/**/*"/>

+                <include name="sampledb/**/*"/>

+            </fileset>

 

             <!-- apps folder -->

-               <zipfileset dir="${basedir}/apps" prefix="apps">

+            <zipfileset dir="${basedir}/apps" prefix="apps">

 

                 <!-- blazeds app -->

                 <include name="blazeds/**/*"/>

@@ -400,121 +404,134 @@
 

             </zipfileset>

 

-               <!-- qa folder -->

-               <zipfileset dir="${basedir}/qa" prefix="qa">

-                   <!-- qa-manual app -->

-                   <include name="apps/qa-manual/**/*"/>

-                   <exclude name="apps/qa-manual/bugs/"/>

+            <!-- qa folder -->

+            <zipfileset dir="${basedir}/qa" prefix="qa">

+                <!-- qa-manual app -->

+                <include name="apps/qa-manual/**/*"/>

+                <exclude name="apps/qa-manual/bugs/"/>

 

-                   <!-- common excludes for both qa-manual and qa-regress apps -->

-                   <exclude name="apps/**/WEB-INF/classes/"/>

-                   <exclude name="apps/**/WEB-INF/lib/"/>

-                   <exclude name="apps/**/WEB-INF/flex/jars/"/>

-                   <exclude name="apps/**/WEB-INF/flex/libs/"/>

-                   <exclude name="apps/**/WEB-INF/flex/locale/"/>

-                   <exclude name="apps/**/WEB-INF/flex/*.ser"/>

-                   <exclude name="apps/**/WEB-INF/flex/flash-unicode-table.xml"/>

-                   <exclude name="apps/**/WEB-INF/flex/flex-sdk-description.xml"/>

-                   <exclude name="apps/**/WEB-INF/flex/mxml-manifest.xml"/>

-                   <exclude name="apps/**/WEB-INF/flex/flex-config.xml"/>

-                   <exclude name="apps/**/WEB-INF/flex/flex-webtier-config.xml"/>

-                   <exclude name="apps/**/WEB-INF/flex/messaging-config.xml"/>

-                   <exclude name="apps/**/WEB-INF/flex/proxy-config.xml"/>

-                   <exclude name="apps/**/WEB-INF/flex/remoting-config.xml"/>

-                   <exclude name="apps/**/WEB-INF/flex/services-config.xml"/>

+                <!-- common excludes for both qa-manual and qa-regress apps -->

+                <exclude name="apps/**/WEB-INF/classes/"/>

+                <exclude name="apps/**/WEB-INF/lib/"/>

+                <exclude name="apps/**/WEB-INF/flex/jars/"/>

+                <exclude name="apps/**/WEB-INF/flex/libs/"/>

+                <exclude name="apps/**/WEB-INF/flex/locale/"/>

+                <exclude name="apps/**/WEB-INF/flex/*.ser"/>

+                <exclude name="apps/**/WEB-INF/flex/flash-unicode-table.xml"/>

+                <exclude name="apps/**/WEB-INF/flex/flex-sdk-description.xml"/>

+                <exclude name="apps/**/WEB-INF/flex/mxml-manifest.xml"/>

+                <exclude name="apps/**/WEB-INF/flex/flex-config.xml"/>

+                <exclude name="apps/**/WEB-INF/flex/flex-webtier-config.xml"/>

+                <exclude name="apps/**/WEB-INF/flex/messaging-config.xml"/>

+                <exclude name="apps/**/WEB-INF/flex/proxy-config.xml"/>

+                <exclude name="apps/**/WEB-INF/flex/remoting-config.xml"/>

+                <exclude name="apps/**/WEB-INF/flex/services-config.xml"/>

 

-                   <!-- qa-regress app -->

-                   <include name="apps/qa-regress/**/*"/>

-                   <exclude name="apps/qa-regress/features/"/>

-                   <exclude name="apps/qa-regress/lib/"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/bugs/"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/noproxy/"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/array*"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/attributesScript.mxml"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/deserializeDocLitArray.mxml"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/twoDimensionalArrayScript.mxml"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/DotNetDocLiteralTests/"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceAmpersandInWSDL.mxml"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceDotDotInWSDL.mxml"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceMethod*.mxml"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceSetEndpointURI.mxml"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceUseProxyFalseFault.mxml"/>

-                   <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceUseProxyTrue.mxml"/>

+                <!-- qa-regress app -->

+                <include name="apps/qa-regress/**/*"/>

+                <exclude name="apps/qa-regress/features/"/>

+                <exclude name="apps/qa-regress/lib/"/>

+                <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/bugs/"/>

+                <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/noproxy/"/>

+                <exclude name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/array*"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/attributesScript.mxml"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/deserializeDocLitArray.mxml"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/general/twoDimensionalArrayScript.mxml"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/DotNetDocLiteralTests/"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceAmpersandInWSDL.mxml"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceDotDotInWSDL.mxml"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceMethod*.mxml"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceSetEndpointURI.mxml"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceUseProxyFalseFault.mxml"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/mxunit/tests/proxyService/webService/mxWebService/mxWebServiceUseProxyTrue.mxml"/>

 

-                   <exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/Query*.*"/>

-                   <exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/*DotNet*"/>

-                   <exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/SOAPBuilderRound2CFCTest.as"/>

-                   <exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/SOAPBuilderRound3Compound1.as"/>

-                   <exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/SOAPBuilderRound3Compound1_WhiteMesaTest.as"/>

+                <exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/Query*.*"/>

+                <exclude name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/*DotNet*"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/SOAPBuilderRound2CFCTest.as"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/SOAPBuilderRound3Compound1.as"/>

+                <exclude

+                        name="apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/interop/SOAPBuilderRound3Compound1_WhiteMesaTest.as"/>

 

-                   <include name="features/**/*"/>

+                <include name="features/**/*"/>

 

-                   <include name="lib/**/*"/>

-                   <exclude name="lib/tools/"/>

-                   <exclude name="lib/ms*.jar"/>

-                   <exclude name="lib/commons-codec-1.3.jar"/>

-                   <exclude name="lib/commons-httpclient-3.1.jar"/>

-                   <exclude name="lib/commons-logging.jar"/>

-                   <exclude name="lib/qa-config.jar"/>

-                   <exclude name="lib/qa-flexunit.jar"/>

-                   <exclude name="lib/qa-mxunit.jar"/>

-                   <exclude name="lib/qa-utils.jar"/>

-                   <exclude name="lib/browserServer.jar"/>

-                   <exclude name="lib/xalan.jar"/>

+                <include name="lib/**/*"/>

+                <exclude name="lib/tools/"/>

+                <exclude name="lib/ms*.jar"/>

+                <exclude name="lib/commons-codec-1.3.jar"/>

+                <exclude name="lib/commons-httpclient-3.1.jar"/>

+                <exclude name="lib/commons-logging.jar"/>

+                <exclude name="lib/qa-config.jar"/>

+                <exclude name="lib/qa-flexunit.jar"/>

+                <exclude name="lib/qa-mxunit.jar"/>

+                <exclude name="lib/qa-utils.jar"/>

+                <exclude name="lib/browserServer.jar"/>

+                <exclude name="lib/xalan.jar"/>

 

-                   <include name="resources/config/*"/>

-                   <include name="resources/frameworks/*"/>

-                   <include name="resources/webtier/"/>

-                   <include name="src/**/*"/>

-                   <include name="build.*"/>

-               </zipfileset>

+                <include name="resources/config/*"/>

+                <include name="resources/frameworks/*"/>

+                <include name="resources/webtier/"/>

+                <include name="src/**/*"/>

+                <include name="build.*"/>

+            </zipfileset>

 

 

-               <!-- frameworks folder -->

-               <zipfileset dir="${basedir}/frameworks" prefix="frameworks">

-                   <include name="**/datavisualization*.swc"/>

-                   <include name="local-swcs/*"/>

-               </zipfileset>

+            <!-- frameworks folder -->

+            <zipfileset dir="${basedir}/frameworks" prefix="frameworks">

+                <include name="**/datavisualization*.swc"/>

+                <include name="local-swcs/*"/>

+            </zipfileset>

 

-               <!-- lib folder -->

-               <zipfileset dir="${basedir}/lib" prefix="lib">

-                   <include name="hsqldb/*"/>

-                   <include name="spring/*"/>

+            <!-- lib folder -->

+            <zipfileset dir="${basedir}/lib" prefix="lib">

+                <include name="hsqldb/*"/>

+                <include name="spring/*"/>

 

-                   <include name="commons*.*"/>

-                   <exclude name="commons-logging.jar"/>

-                   <exclude name="commons-collections.jar"/>

+                <include name="commons*.*"/>

+                <exclude name="commons-logging.jar"/>

+                <exclude name="commons-collections.jar"/>

 

-                   <include name="j*.*"/>

-                   <include name="flex-w*.*"/>

-                   <include name="flex-b*.*"/>

-                   <include name="xalan*.*"/>

-                   <include name="backport*.*"/>

-                   <include name="cfgatewayadapter.jar"/>

-                   <include name="concurrent.jar"/>

-                   <include name="oscache.jar"/>

-                   <include name="servlet.jar"/>

-               </zipfileset>

+                <include name="j*.*"/>

+                <include name="flex-w*.*"/>

+                <include name="flex-b*.*"/>

+                <include name="xalan*.*"/>

+                <include name="backport*.*"/>

+                <include name="cfgatewayadapter.jar"/>

+                <include name="concurrent.jar"/>

+                <include name="oscache.jar"/>

+                <include name="servlet.jar"/>

+            </zipfileset>

 

-               <!-- modules folder -->

-               <zipfileset dir="${basedir}/modules" prefix="modules">                      

-                   <include name="**/src/**/*"/>

-                   <include name="**/lib/*"/>

-                   <include name="core/test/src/**/*"/>

-                   <include name="**/AdobeInfo.xml"/>

-                   <include name="**/build.xml"/>

-                   <exclude name="rds/"/> 

-               </zipfileset>

+            <!-- modules folder -->

+            <zipfileset dir="${basedir}/modules" prefix="modules">

+                <include name="**/src/**/*"/>

+                <include name="**/lib/*"/>

+                <include name="core/test/src/**/*"/>

+                <include name="**/AdobeInfo.xml"/>

+                <include name="**/build.xml"/>

+                <exclude name="rds/"/>

+            </zipfileset>

 

-               <!-- servers folder -->

-               <zipfileset dir="${basedir}/servers" prefix="servers">

-                   <exclude name="apache-tomcat-6.0.29/lib/blazeds/"/>

-                   <exclude name="apache-tomcat-6.0.29/conf/Catalina/localhost/qa-perf.xml"/>

-                   <exclude name="apache-tomcat-6.0.29/logs/"/>

-                   <exclude name="apache-tomcat-6.0.29/work/"/>

-               </zipfileset>

+            <!-- servers folder -->

+            <zipfileset dir="${basedir}/servers" prefix="servers">

+                <exclude name="apache-tomcat-6.0.29/lib/blazeds/"/>

+                <exclude name="apache-tomcat-6.0.29/conf/Catalina/localhost/qa-perf.xml"/>

+                <exclude name="apache-tomcat-6.0.29/logs/"/>

+                <exclude name="apache-tomcat-6.0.29/work/"/>

+            </zipfileset>

 

-               <!-- resources folder -->

+            <!-- resources folder -->

             <zipfileset dir="${basedir}/resources" prefix="resources">

                 <exclude name="security/tomcat/*.jar"/>

                 <exclude name="flex_sdk/*.zip"/>

@@ -523,10 +540,10 @@
         </zip>

     </target>

 

-<!--

-***************************************************************************

-    Target - package-automation

-*************************************************************************** -->

+    <!--

+    ***************************************************************************

+        Target - package-automation

+    *************************************************************************** -->

     <target name="package-automation" description="Create QA Automation package">

         <zip destfile="${basedir}/dist/qa-automation.zip">

             <zipfileset dir="${qa.dir}/automation"/>

@@ -535,54 +552,55 @@
 

     <target name="package-oem" description="Create OEM package">

 

-            <delete dir="${basedir}/packagetemp" failonerror="false" includeEmptyDirs="true"/>

-            <mkdir dir="${basedir}/dist"/>

+        <delete dir="${basedir}/packagetemp" failonerror="false" includeEmptyDirs="true"/>

+        <mkdir dir="${basedir}/dist"/>

 

-            <!-- Copy sdk zip and other community resources -->

-            <copy todir="${basedir}/packagetemp">

-                <fileset dir="${basedir}">

-                    <include name="resources/**/*"/>

-                    <exclude name="resources/flex_sdk/**/*"/>                    

-                </fileset>

-            </copy>

+        <!-- Copy sdk zip and other community resources -->

+        <copy todir="${basedir}/packagetemp">

+            <fileset dir="${basedir}">

+                <include name="resources/**/*"/>

+                <exclude name="resources/flex_sdk/**/*"/>

+            </fileset>

+        </copy>

 

-            <!-- Copy community jars -->

-            <copy todir="${basedir}/packagetemp/lib">

-                <fileset dir="${basedir}/lib">

-                    <include name="flex-messaging-common.jar"/>

-                    <include name="flex-messaging-core.jar"/>

-                    <include name="flex-messaging-proxy.jar"/>

-                    <include name="flex-messaging-remoting.jar"/>

-                    <include name="flex-messaging-opt.jar"/>

-                    <include name="flex-bootstrap.jar"/>

-                    <include name="flex-bootstrap-jsp.jar"/>

-                    <include name="flex-webtier.jar"/>

-                    <include name="flex-webtier-jsp.jar"/>

-                    <include name="oscache.jar"/>

-                    <include name="cfgatewayadapter.jar"/>

-                    <include name="flex-rds-server.jar"/>

-                </fileset>

-            </copy>

+        <!-- Copy community jars -->

+        <copy todir="${basedir}/packagetemp/lib">

+            <fileset dir="${basedir}/lib">

+                <include name="flex-messaging-common.jar"/>

+                <include name="flex-messaging-core.jar"/>

+                <include name="flex-messaging-proxy.jar"/>

+                <include name="flex-messaging-remoting.jar"/>

+                <include name="flex-messaging-opt.jar"/>

+                <include name="flex-bootstrap.jar"/>

+                <include name="flex-bootstrap-jsp.jar"/>

+                <include name="flex-webtier.jar"/>

+                <include name="flex-webtier-jsp.jar"/>

+                <include name="oscache.jar"/>

+                <include name="cfgatewayadapter.jar"/>

+                <include name="flex-rds-server.jar"/>

+            </fileset>

+        </copy>

 

-            <copy todir="${basedir}/packagetemp/console_src">

-                <fileset dir="${basedir}/apps/ds-console">

-                    <include name="console/**/*"/>

-                    <include name="*.mxml"/>

-                </fileset>

-            </copy>

+        <copy todir="${basedir}/packagetemp/console_src">

+            <fileset dir="${basedir}/apps/ds-console">

+                <include name="console/**/*"/>

+                <include name="*.mxml"/>

+            </fileset>

+        </copy>

 

-            <zip destfile="${basedir}/dist/blazeds-oem.zip">

-                <fileset dir="${dist.dir}" includes="ds-console.war"/>

-                <zipfileset dir="${basedir}/packagetemp"/>

-            </zip>

-     </target>

+        <zip destfile="${basedir}/dist/blazeds-oem.zip">

+            <fileset dir="${dist.dir}" includes="ds-console.war"/>

+            <zipfileset dir="${basedir}/packagetemp"/>

+        </zip>

+    </target>

 

     <target name="package-oem-small" depends="package-oem" description="Create Small OEM package">

         <echo message="Creating smaller Flex_SDK. . ."/>

         <mkdir dir="${tmp.dir}"/>

-        <unzip src="${basedir}/dist/blazeds-oem.zip" dest="${tmp.dir}"/> 

+        <unzip src="${basedir}/dist/blazeds-oem.zip" dest="${tmp.dir}"/>

         <mkdir dir="${tmp.dir}/${local.sdk.dir}/expanded"/>

-        <unzip src="${basedir}/packagetemp/${local.sdk.dir}/${sdk.zip.file}" dest="${tmp.dir}/${local.sdk.dir}/expanded">

+        <unzip src="${basedir}/packagetemp/${local.sdk.dir}/${sdk.zip.file}"

+               dest="${tmp.dir}/${local.sdk.dir}/expanded">

             <!--<patternset>

                 <include name="ant/lib/flexTasks.jar" />

                 <include name="asdoc/**/*"/>

@@ -593,21 +611,21 @@
                 <include name="frameworks/locale/**"/>

                 <include name="runtimes/player/**/*"/>

                 <include name="templates/**/*"/>

-            </patternset>-->           

+            </patternset>-->

         </unzip>

         <delete includeEmptyDirs="true" quiet="true">

-            <fileset dir="${tmp.dir}/${local.sdk.dir}" includes="${sdk.zip.file}" />

+            <fileset dir="${tmp.dir}/${local.sdk.dir}" includes="${sdk.zip.file}"/>

         </delete>

         <zip destfile="${tmp.dir}/${local.sdk.dir}/${sdk.zip.file}">

             <fileset dir="${tmp.dir}/${local.sdk.dir}/expanded" includes="**/**"/>

         </zip>

-        <delete dir="${tmp.dir}/${local.sdk.dir}/expanded" failonerror="false" />

+        <delete dir="${tmp.dir}/${local.sdk.dir}/expanded" failonerror="false"/>

         <zip destfile="${basedir}/dist/blazeds-oem-small.zip">

             <fileset dir="${tmp.dir}" includes="**/**"/>

         </zip>

-        <delete dir="${tmp.dir}" failonerror="false" />

+        <delete dir="${tmp.dir}" failonerror="false"/>

     </target>

-    

+

     <target name="package-clean">

         <delete failonerror="false" includeEmptyDirs="true">

             <fileset dir="${dist.dir}" includes="**/*"/>

@@ -626,33 +644,34 @@
         </delete>

     </target>

 

-    <target name="super-clean" depends="thirdparty-clean,clean" description="Cleans everything including thirdparty downloads."/>

-	

+    <target name="super-clean" depends="thirdparty-clean,clean"

+            description="Cleans everything including thirdparty downloads."/>

+

     <target name="thirdparty-clean" unless="no.thirdparty-clean" description="Removes all thirdparty downloads.">

         <ant antfile="${basedir}/downloads.xml" target="clean" dir="${basedir}"/>

     </target>

-        

+

     <target name="generated-clean">

         <delete includeEmptyDirs="true" quiet="true">

-            <fileset dir="${basedir}/apps" includes="**/generated/*" />

+            <fileset dir="${basedir}/apps" includes="**/generated/*"/>

         </delete>

         <delete includeEmptyDirs="true" quiet="true">

-            <fileset dir="${basedir}/apps" includes="**/generated" />

+            <fileset dir="${basedir}/apps" includes="**/generated"/>

         </delete>

     </target>

 

     <target name="unit" description="Runs JUnit tests">

-        <ant antfile="${basedir}/modules/core/build.xml" target="unit"> 

-            <property name="feature" value="${feature}" /> <!-- runs subset of unit tests -->

+        <ant antfile="${basedir}/modules/core/build.xml" target="unit">

+            <property name="feature" value="${feature}"/> <!-- runs subset of unit tests -->

         </ant>

     </target>

 

     <!-- Don't try to start server if it is already running -->

-     <target name="check.server">

+    <target name="check.server">

         <condition property="server.running">

             <http url="${server.baseurl}"/>

         </condition>

-     </target>

+    </target>

 

     <target name="set.extension" description="set vars per os">

         <osfamily property="os.family"/>

@@ -672,20 +691,20 @@
     <target name="startserver" description="Start Tomcat Server" depends="set.extension, check.server"

             unless="server.running">

         <exec spawn="true" executable="${appserver.dir}/bin/catalina.${shellext}"

-            dir="${appserver.dir}/bin">

-            <arg line="start" />

-           </exec>

+              dir="${appserver.dir}/bin">

+            <arg line="start"/>

+        </exec>

     </target>

 

     <target name="stopserver" description="Stop Tomcat Server"

-    depends="set.extension">

+            depends="set.extension">

         <exec spawn="true" executable="${appserver.dir}/bin/catalina.${shellext}"

-            dir="${appserver.dir}/bin">

-            <arg line="stop" />

+              dir="${appserver.dir}/bin">

+            <arg line="stop"/>

         </exec>

     </target>

-    

-     <target name="waitforAppserverToStart" >

+

+    <target name="waitforAppserverToStart">

         <echo message="Waiting for appserver to start: requesting ${server.baseurl}/qa-regress"/>

         <waitfor maxwait="120" maxwaitunit="second" checkevery="15" timeoutproperty="bTimeout">

             <http url="${server.baseurl}/qa-regress"/>

@@ -702,81 +721,82 @@
     </target>

 

     <target name="checkintests" description="checkintests">

- 

+

         <!-- run flexunit-->

-        <ant antfile="${qa.dir}/apps/qa-regress/testsuites/flexunit/build.xml" target="main" >

-            <property name="basedir" value="${qa.dir}" />

-            <property name="feature" value="checkintests" /> <!-- runs rpc and messaging -->

-            <property name="alwaysshowreport" value="false" /> <!-- will only show report if there are failures -->

+        <ant antfile="${qa.dir}/apps/qa-regress/testsuites/flexunit/build.xml" target="main">

+            <property name="basedir" value="${qa.dir}"/>

+            <property name="feature" value="checkintests"/> <!-- runs rpc and messaging -->

+            <property name="alwaysshowreport" value="false"/> <!-- will only show report if there are failures -->

         </ant>

-    

+

         <!-- JUnit tests already start the server, if necessary 

         <antcall target="startserver"/>

         -->

         <!-- run java unit tests -->

         <property name="feature" value="checkintests-all"/>

-        <antcall target="unit" >

-            <param name="feature" value="${feature}" /> <!-- runs subset of unit tests -->

+        <antcall target="unit">

+            <param name="feature" value="${feature}"/> <!-- runs subset of unit tests -->

         </antcall>

 

         <antcall target="stopserver"/>

     </target>

 

     <target name="parseresults">

-            <java classname="utils.TestResultsParser">

+        <java classname="utils.TestResultsParser">

             <classpath>

                 <pathelement location="${qa.dir}/classes"/>

                 <fileset dir="${qa.dir}/lib">

-                  <include name="*.jar" />

+                    <include name="*.jar"/>

                 </fileset>

             </classpath>

             <arg line="${qa.dir}/sdk/testsuites/mxunit/reports"/>

         </java>

     </target>

 

-    <target name="ocx" description="Update the ActiveX player to the latest.  You must CLOSE YOUR BROWSERS for this to work.">

+    <target name="ocx"

+            description="Update the ActiveX player to the latest.  You must CLOSE YOUR BROWSERS for this to work.">

         <property name="ant-contrib.jar" location="${env.ANT_HOME}/lib/ant-contrib-1.0b2.jar"/>

-        

-        <available file="${basedir}/qa/automation/bin/${uninstaller.exe}" property="uninstaller.exists" />

+

+        <available file="${basedir}/qa/automation/bin/${uninstaller.exe}" property="uninstaller.exists"/>

 

         <condition property="uninstall.fp" value="true">

             <and>

-                <equals arg1="${uninstaller.exists}" arg2="true" />

+                <equals arg1="${uninstaller.exists}" arg2="true"/>

                 <not>

-                    <equals arg1="${skip.uninstall}" arg2="true" />

+                    <equals arg1="${skip.uninstall}" arg2="true"/>

                 </not>

             </and>

         </condition>

-        <antcall target="actual.uninstall.fp" />

+        <antcall target="actual.uninstall.fp"/>

 

         <echo>Installing the new player.</echo>

         <exec dir="${basedir}/bin" executable="${basedir}/bin/${installer.exe}">

-           <arg line="-install"/>

+            <arg line="-install"/>

         </exec>

         <echo>Installing the plugin player.</echo>

         <exec dir="${basedir}/bin" executable="${basedir}/bin/${installer.plugin.exe}">

-           <arg line="-install"/>

+            <arg line="-install"/>

         </exec>

     </target>

     <target name="actual.uninstall.fp" depends="check.uninstall.fp" if="uninstall.fp">

         <echo>Uninstalling the old ActiveX and Plugin players.</echo>

-        <exec dir="${basedir}" executable="${basedir}/qa/automation/bin/${uninstaller.exe}" >

-            <arg line="-uninstall" />

+        <exec dir="${basedir}" executable="${basedir}/qa/automation/bin/${uninstaller.exe}">

+            <arg line="-uninstall"/>

         </exec>

     </target>

-    <target name="check.uninstall.fp" unless="uninstall.fp" >

+    <target name="check.uninstall.fp" unless="uninstall.fp">

         <echo>Uninstall was skipped.</echo>

-        <echo> - skip.uninstall? ${skip.uninstall}</echo>

+        <echo>- skip.uninstall? ${skip.uninstall}</echo>

     </target>

 

     <target name="javadoc">

-        <delete dir="${basedir}/docs" failonerror="false" includeEmptyDirs="true" />

-        <ant antfile="${basedir}/modules/core/build.xml" target="javadoc" >

+        <delete dir="${basedir}/docs" failonerror="false" includeEmptyDirs="true"/>

+        <ant antfile="${basedir}/modules/core/build.xml" target="javadoc">

             <property name="build.number" value="${build.number}"/>

         </ant>

-        <copy todir="${dist.dir}/docs" >

+        <copy todir="${dist.dir}/docs">

             <fileset dir="${basedir}/docs" includes="javadoc.zip"/>

         </copy>

     </target>

-   

+

 </project>

diff --git a/common/build.xml b/common/build.xml
index 64ba662..e132383 100755
--- a/common/build.xml
+++ b/common/build.xml
@@ -28,11 +28,11 @@
     <property name="module.src" value="${module.dir}/src"/>
     <property name="module.classes" value="${module.dir}/classes"/>
     <property name="module.jar" value="${lib.dir}/flex-messaging-common.jar"/>
-    <property name="license.file" value="${basedir}/LICENSE" />
-    <property name="notice.file" value="${basedir}/NOTICE" />
-    
+    <property name="license.file" value="${basedir}/LICENSE"/>
+    <property name="notice.file" value="${basedir}/NOTICE"/>
+
     <property name="build.number" value=""/>
-    
+
     <!-- j2ee apis required to compile -->
     <path id="classpath">
         <fileset dir="${xalan.dir}" includes="xalan-${xalan.version}.jar"/>
@@ -53,32 +53,32 @@
 
     <target name="compile" depends="prepare" description="compile">
         <javac target="1.4" source="1.4" debug="${src.debug}" destdir="${module.classes}" srcdir="${module.src}"
-            includes="**/*.java" classpathref="classpath"/>
+               includes="**/*.java" classpathref="classpath"/>
         <echo file="${module.classes}/flex/messaging/version.properties" append="false">build=${build.number}</echo>
     </target>
-                
+
     <!-- jar containing messaging common infrastructure -->
     <target name="jar" depends="compile">
         <copy todir="${module.classes}/flex/messaging" overwrite="true">
             <fileset dir="${module.src}/flex/messaging" includes="*.properties"/>
         </copy>
         <delete dir="${module.classes}/meta-inf" quiet="true"/>
-        
+
         <mkdir dir="${module.classes}/META-INF"/>
         <copy file="${license.file}" tofile="${module.classes}/META-INF/LICENSE"/>
         <copy file="${notice.file}" tofile="${module.classes}/META-INF/NOTICE"/>
-        
+
         <jar destfile="${module.jar}" basedir="${module.classes}">
             <include name="META-INF/LICENSE"/>
             <include name="META-INF/NOTICE"/>
             <include name="flex/**"/>
             <exclude name=".dependency-info/**"/>
-        	<manifest>
-        		<attribute name="Sealed" value="${manifest.sealed}"/>
-        		<attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Common Library"/>
-			    <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/> 
-			    <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
-        	</manifest>
+            <manifest>
+                <attribute name="Sealed" value="${manifest.sealed}"/>
+                <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Common Library"/>
+                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+                <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+            </manifest>
         </jar>
         <delete failonerror="false">
             <fileset dir="${module.classes}/flex/messaging" includes="*.properties"/>
diff --git a/common/pom.xml b/common/pom.xml
index 08b1df1..f9bf841 100755
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -16,28 +16,29 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>blazeds</artifactId>
-    <version>4.7.3</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>blazeds</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-common</artifactId>
+    <artifactId>flex-messaging-common</artifactId>
 
-  <dependencies>
-    <dependency>
-      <groupId>xalan</groupId>
-      <artifactId>xalan</artifactId>
-    </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>xalan</groupId>
+            <artifactId>xalan</artifactId>
+        </dependency>
 
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
 </project>
diff --git a/common/src/main/java/flex/graphics/ImageSnapshot.java b/common/src/main/java/flex/graphics/ImageSnapshot.java
index 1dc97f0..12b956a 100644
--- a/common/src/main/java/flex/graphics/ImageSnapshot.java
+++ b/common/src/main/java/flex/graphics/ImageSnapshot.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 package flex.graphics;
 
 import java.util.HashMap;
@@ -22,19 +22,16 @@
 
 /**
  * This class corresponds to mx.graphics.ImageSnapshot on the client.  Clients may choose
- * to capture images and send them to the server via a RemoteObject call.  The PDF generation 
- * feature of LCDS may then be used to generate PDF's from these images.  
- *
+ * to capture images and send them to the server via a RemoteObject call.  The PDF generation
+ * feature of LCDS may then be used to generate PDF's from these images.
  */
-public class ImageSnapshot extends HashMap
-{
+public class ImageSnapshot extends HashMap {
     private static final long serialVersionUID = 7914317354403674061L;
 
     /**
      * Default constructor.
      */
-    public ImageSnapshot()
-    {
+    public ImageSnapshot() {
     }
 
     private Map properties;
@@ -46,101 +43,91 @@
     /**
      * The content type for the image encoding format that was used to capture
      * this snapshot.
-     * 
+     *
      * @return content type of this image
      */
-    public String getContentType()
-    {
+    public String getContentType() {
         return contentType;
     }
 
     /**
      * Sets content type of this snapshot.
-     * 
+     *
      * @param value content type
      */
-    public void setContentType(String value)
-    {
+    public void setContentType(String value) {
         contentType = value;
     }
 
     /**
      * The encoded data representing the image snapshot.
-     * 
+     *
      * @return encoded image data
      */
-    public byte[] getData()
-    {
+    public byte[] getData() {
         return data;
     }
 
     /**
      * Set the encoded data representing the image snapshot.
-     * 
+     *
      * @param value byte array of image data
      */
-    public void setData(byte[] value)
-    {
+    public void setData(byte[] value) {
         data = value;
     }
 
     /**
      * The image height in pixels.
-     * 
+     *
      * @return image height in pixels
      */
-    public int getHeight()
-    {
+    public int getHeight() {
         return height;
     }
 
     /**
      * Set image height in pixels.
-     * 
+     *
      * @param value image height in pixels.
      */
-    public void setHeight(int value)
-    {
+    public void setHeight(int value) {
         height = value;
     }
 
     /**
      * Additional properties of the image.
-     * 
+     *
      * @return a map containing the dynamically set properties on this snapshot
      */
-    public Map getProperties()
-    {
+    public Map getProperties() {
         return properties;
     }
 
     /**
      * Sets the map of dynamic properties for this snapshot.
-     * 
+     *
      * @param value map containing dynamic properties for this snapshot
      */
-    public void setProperties(Map value)
-    {
+    public void setProperties(Map value) {
         properties = value;
     }
 
     /**
      * The image width in pixels.
-     * 
+     *
      * @return width in pixels
      */
-    public int getWidth()
-    {
+    public int getWidth() {
         return width;
     }
 
     /**
      * Set width in pixels.
-     * 
+     *
      * @param value width in pixels.
      */
-    public void setWidth(int value)
-    {
+    public void setWidth(int value) {
         width = value;
     }
 
diff --git a/common/src/main/java/flex/messaging/LocalizedException.java b/common/src/main/java/flex/messaging/LocalizedException.java
index 641f7be..2ecc3c9 100644
--- a/common/src/main/java/flex/messaging/LocalizedException.java
+++ b/common/src/main/java/flex/messaging/LocalizedException.java
@@ -28,10 +28,10 @@
  * number and an optional message variant that is used to look up a localized error
  * message or details string using a <code>ResourceLoader</code>. These methods also
  * set the number property of the exception instance.
- *
+ * <p>
  * The various overloads optionally support specifying a target locale as well as
  * arguments to substitute into the localized string if it is parameterized.
- *
+ * <p>
  * Localized error message and details strings are stored in the flex.messaging.errors
  * resource bundle. Entries must have the following format.
  * <ul>
@@ -41,9 +41,10 @@
  *
  * @see ResourceLoader
  */
-public class LocalizedException extends RuntimeException
-{
-    /** - transient, the resourceLoader for localized strings doesn't need to serialize.  */
+public class LocalizedException extends RuntimeException {
+    /**
+     * - transient, the resourceLoader for localized strings doesn't need to serialize.
+     */
     protected transient ResourceLoader resourceLoader;
 
     protected int number;
@@ -64,8 +65,7 @@
     /**
      * Create a LocalizedException with the default ResourceLoader.
      */
-    public LocalizedException()
-    {
+    public LocalizedException() {
         super();
     }
 
@@ -75,8 +75,7 @@
      *
      * @param resourceLoader The resource loader to use.
      */
-    public LocalizedException(ResourceLoader resourceLoader)
-    {
+    public LocalizedException(ResourceLoader resourceLoader) {
         this.resourceLoader = resourceLoader;
     }
 
@@ -85,8 +84,7 @@
      *
      * @return The exception details.
      */
-    public String getDetails()
-    {
+    public String getDetails() {
         return details;
     }
 
@@ -95,8 +93,7 @@
      *
      * @param details The exception details.
      */
-    public void setDetails(String details)
-    {
+    public void setDetails(String details) {
         this.details = details;
     }
 
@@ -105,8 +102,7 @@
      *
      * @param number The error number for this exception instance.
      */
-    public void setMessage(int number)
-    {
+    public void setMessage(int number) {
         setMessage(number, null, null, null);
     }
 
@@ -116,8 +112,7 @@
      * @param number The error number for this exception instance.
      * @param locale The target locale for error message lookup.
      */
-    public void setMessage(int number, Locale locale)
-    {
+    public void setMessage(int number, Locale locale) {
         setMessage(number, null, locale, null);
     }
 
@@ -125,22 +120,20 @@
      * Sets the message property to a localized string based on error number.
      * The passed arguments are substituted into the parameterized error message string.
      *
-     * @param number The error number for this exception instance.
+     * @param number    The error number for this exception instance.
      * @param arguments The arguments to substitute into the error message.
      */
-    public void setMessage(int number, Object[] arguments)
-    {
+    public void setMessage(int number, Object[] arguments) {
         setMessage(number, null, null, arguments);
     }
 
     /**
      * Sets the message property to a localized string based on error number and variant.
      *
-     * @param number The error number for this exception instance.
+     * @param number  The error number for this exception instance.
      * @param variant The variant of the error message for this instance.
      */
-    public void setMessage(int number, String variant)
-    {
+    public void setMessage(int number, String variant) {
         setMessage(number, variant, null, null);
     }
 
@@ -148,12 +141,11 @@
      * Sets the message property to a localized string based on error number, variant
      * and target locale.
      *
-     * @param number The error number for this exception instance.
+     * @param number  The error number for this exception instance.
      * @param variant The variant of the error message for this instance.
-     * @param locale The target locale for error message lookup.
+     * @param locale  The target locale for error message lookup.
      */
-    public void setMessage(int number, String variant, Locale locale)
-    {
+    public void setMessage(int number, String variant, Locale locale) {
         setMessage(number, variant, locale, null);
     }
 
@@ -161,12 +153,11 @@
      * Sets the message property to a localized string based on error number and variant.
      * The passed arguments are substituted into the parameterized error message string.
      *
-     * @param number The error number for this exception instance.
-     * @param variant The varient of the error message for this instance.
+     * @param number    The error number for this exception instance.
+     * @param variant   The varient of the error message for this instance.
      * @param arguments The arguments to substitute into the error message.
      */
-    public void setMessage(int number, String variant, Object[] arguments)
-    {
+    public void setMessage(int number, String variant, Object[] arguments) {
         setMessage(number, variant, null, arguments);
     }
 
@@ -175,13 +166,12 @@
      * target locale. The passed arguments are substituted into the parameterized error
      * message string.
      *
-     * @param number The error number for this exception instance.
-     * @param variant The variant of the error message for this instance.
-     * @param locale The target locale for error message lookup.
+     * @param number    The error number for this exception instance.
+     * @param variant   The variant of the error message for this instance.
+     * @param locale    The target locale for error message lookup.
      * @param arguments The arguments to substitute into the error message.
      */
-    public void setMessage(int number, String variant, Locale locale, Object[] arguments)
-    {
+    public void setMessage(int number, String variant, Locale locale, Object[] arguments) {
         setNumber(number);
         ResourceLoader resources = getResourceLoader();
         setMessage(resources.getString(generateFullKey(number, variant), locale, arguments));
@@ -192,8 +182,7 @@
      *
      * @return The exception message.
      */
-    public String getMessage()
-    {
+    public String getMessage() {
         return message;
     }
 
@@ -202,8 +191,7 @@
      *
      * @param message The exception message.
      */
-    public void setMessage(String message)
-    {
+    public void setMessage(String message) {
         this.message = message;
     }
 
@@ -212,8 +200,7 @@
      *
      * @param number The localized exception number.
      */
-    public void setNumber(int number)
-    {
+    public void setNumber(int number) {
         this.number = number;
     }
 
@@ -222,8 +209,7 @@
      *
      * @return The localized exception number.
      */
-    public int getNumber()
-    {
+    public int getNumber() {
         return number;
     }
 
@@ -232,19 +218,17 @@
      *
      * @param number The error number to lookup details for.
      */
-    public void setDetails(int number)
-    {
+    public void setDetails(int number) {
         setDetails(number, null, null, null);
     }
 
     /**
      * Sets the details property to a localized string based on error number and variant.
      *
-     * @param number The error number to lookup details for.
+     * @param number  The error number to lookup details for.
      * @param variant The variant of the details string to lookup.
      */
-    public void setDetails(int number, String variant)
-    {
+    public void setDetails(int number, String variant) {
         setDetails(number, variant, null, null);
     }
 
@@ -252,12 +236,11 @@
      * Sets the details property to a localized string based on error number, variant
      * and target locale.
      *
-     * @param number The error number to lookup details for.
+     * @param number  The error number to lookup details for.
      * @param variant The variant of the details string to lookup.
-     * @param locale The target locale for the lookup.
+     * @param locale  The target locale for the lookup.
      */
-    public void setDetails(int number, String variant, Locale locale)
-    {
+    public void setDetails(int number, String variant, Locale locale) {
         setDetails(number, variant, locale, null);
     }
 
@@ -265,12 +248,11 @@
      * Sets the details property to a localized string based on error number and variant.
      * The passed arguments are substituted into the parameterized error details string.
      *
-     * @param number The error number to lookup details for.
-     * @param variant The variant of the details string to lookup.
+     * @param number    The error number to lookup details for.
+     * @param variant   The variant of the details string to lookup.
      * @param arguments The arguments to substitute into the details string.
      */
-    public void setDetails(int number, String variant, Object[] arguments)
-    {
+    public void setDetails(int number, String variant, Object[] arguments) {
         setDetails(number, variant, null, arguments);
     }
 
@@ -280,13 +262,12 @@
      * and target locale. The passed arguments are substituted into the parameterized error
      * details string.
      *
-     * @param number The error number to lookup a localized details string for.
-     * @param variant The variant of the details string to lookup.
-     * @param locale The target locale for the lookup.
+     * @param number    The error number to lookup a localized details string for.
+     * @param variant   The variant of the details string to lookup.
+     * @param locale    The target locale for the lookup.
      * @param arguments The arguments to substitute into the details string.
      */
-    public void setDetails(int number, String variant, Locale locale, Object[] arguments)
-    {
+    public void setDetails(int number, String variant, Locale locale, Object[] arguments) {
         setNumber(number);
         ResourceLoader resources = getResourceLoader();
         setDetails(resources.getString(generateDetailsKey(number, variant), locale, arguments));
@@ -297,8 +278,7 @@
      *
      * @return The root cause for this exception.
      */
-    public Throwable getRootCause()
-    {
+    public Throwable getRootCause() {
         return rootCause;
     }
 
@@ -307,8 +287,7 @@
      *
      * @param cause The root cause for this exception.
      */
-    public void setRootCause(Throwable cause)
-    {        
+    public void setRootCause(Throwable cause) {
         rootCause = cause;
         // Assign through to the base cause property to include it in general stack traces.
         initCause(cause);
@@ -319,8 +298,7 @@
      *
      * @return The <code>ResourceLoader</code> used to load localized strings.
      */
-    protected ResourceLoader getResourceLoader()
-    {
+    protected ResourceLoader getResourceLoader() {
         if (resourceLoader == null)
             resourceLoader = new PropertyStringResourceLoader();
 
@@ -332,12 +310,11 @@
      * and an optional variant followed by a "-details" suffix. If the variant is null, the
      * lookup key is the error number.
      *
-     * @param number The error number.
+     * @param number  The error number.
      * @param variant The variant of the error message.
      * @return The full lookup key for a localized error message.
      */
-    private String generateFullKey(int number, String variant)
-    {
+    private String generateFullKey(int number, String variant) {
         return (variant != null) ? (number + "-" + variant) : String.valueOf(number);
     }
 
@@ -346,12 +323,11 @@
      * and an optional variant followed by a "-details" suffix. If the variant is null, the
      * lookup key is the error number followed by a "-details" suffix.
      *
-     * @param number The error number.
+     * @param number  The error number.
      * @param variant The variant of the details message.
      * @return The full lookup key for a localized details message.
      */
-    private String generateDetailsKey(int number, String variant)
-    {
+    private String generateDetailsKey(int number, String variant) {
         return (generateFullKey(number, variant) + "-details");
     }
 
@@ -360,14 +336,11 @@
      *
      * @return A string representation of the exception.
      */
-    public String toString()
-    {
+    public String toString() {
         String result = super.toString();
-        if (details != null)
-        {
+        if (details != null) {
             StringBuffer buffer = new StringBuffer(result);
-            if (!result.endsWith("."))
-            {
+            if (!result.endsWith(".")) {
                 buffer.append(".");
             }
             buffer.append(' ').append(details);
diff --git a/common/src/main/java/flex/messaging/config/AbstractConfigurationParser.java b/common/src/main/java/flex/messaging/config/AbstractConfigurationParser.java
index 297f6fc..656f634 100644
--- a/common/src/main/java/flex/messaging/config/AbstractConfigurationParser.java
+++ b/common/src/main/java/flex/messaging/config/AbstractConfigurationParser.java
@@ -41,8 +41,7 @@
 /**
  * Provides a common base for DOM / XPath based ConfigurationParsers.
  */
-public abstract class AbstractConfigurationParser implements ConfigurationParser, ConfigurationConstants, EntityResolver
-{
+public abstract class AbstractConfigurationParser implements ConfigurationParser, ConfigurationConstants, EntityResolver {
     protected ServicesConfiguration config;
     protected DocumentBuilder docBuilder;
     protected ConfigurationFileResolver fileResolver;
@@ -50,8 +49,7 @@
 
     private Map fileByDocument = new HashMap();
 
-    protected AbstractConfigurationParser()
-    {
+    protected AbstractConfigurationParser() {
         initializeDocumentBuilder();
         tokenReplacer = new TokenReplacer();
     }
@@ -59,12 +57,11 @@
     /**
      * Parse the configurations in the configuration file.
      *
-     * @param path the configuration file path
+     * @param path         the configuration file path
      * @param fileResolver the ConfigurationFileResolver object
-     * @param config the ServicesConfiguration object
+     * @param config       the ServicesConfiguration object
      **/
-    public void parse(String path, ConfigurationFileResolver fileResolver, ServicesConfiguration config)
-    {
+    public void parse(String path, ConfigurationFileResolver fileResolver, ServicesConfiguration config) {
         this.config = config;
         this.fileResolver = fileResolver;
         Document doc = loadDocument(path, fileResolver.getConfigurationFile(path));
@@ -75,24 +72,19 @@
     /**
      * Report Tokens.
      **/
-    public void reportTokens()
-    {
+    public void reportTokens() {
         tokenReplacer.reportTokens();
     }
 
-    protected void initializeDocumentBuilder()
-    {
+    protected void initializeDocumentBuilder() {
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setIgnoringComments(true);
         factory.setIgnoringElementContentWhitespace(true);
 
-        try
-        {
+        try {
             docBuilder = factory.newDocumentBuilder();
             docBuilder.setEntityResolver(this);
-        }
-        catch (ParserConfigurationException ex)
-        {
+        } catch (ParserConfigurationException ex) {
             // Error initializing configuration parser.
             ConfigurationException e = new ConfigurationException();
             e.setMessage(PARSER_INIT_ERROR);
@@ -101,10 +93,8 @@
         }
     }
 
-    protected Document loadDocument(String path, InputStream in)
-    {
-        try
-        {
+    protected Document loadDocument(String path, InputStream in) {
+        try {
             Document doc;
 
             if (!in.markSupported())
@@ -113,23 +103,18 @@
             // Consume UTF-8 Byte Order Mark (BOM). The InputStream must support mark()
             // as FileUtils.consumeBOM sets a mark for 3 bytes in order to check for a BOM.
             String encoding = FileUtils.consumeBOM(in, null);
-            if (FileUtils.UTF_8.equals(encoding) || FileUtils.UTF_16.equals(encoding))
-            {
+            if (FileUtils.UTF_8.equals(encoding) || FileUtils.UTF_16.equals(encoding)) {
                 InputSource inputSource = new InputSource(in);
                 inputSource.setEncoding(encoding);
                 doc = docBuilder.parse(inputSource);
-            }
-            else
-            {
+            } else {
                 doc = docBuilder.parse(in);
             }
 
             addFileByDocument(path, doc);
             doc.getDocumentElement().normalize();
             return doc;
-        }
-        catch (SAXParseException ex)
-        {
+        } catch (SAXParseException ex) {
             Integer line = new Integer(ex.getLineNumber());
             Integer col = new Integer(ex.getColumnNumber());
             String message = ex.getMessage();
@@ -139,16 +124,12 @@
             e.setMessage(XML_PARSER_ERROR, new Object[]{line, col, message});
             e.setRootCause(ex);
             throw e;
-        }
-        catch (SAXException ex)
-        {
+        } catch (SAXException ex) {
             ConfigurationException e = new ConfigurationException();
             e.setMessage(ex.getMessage());
             e.setRootCause(ex);
             throw e;
-        }
-        catch (IOException ex)
-        {
+        } catch (IOException ex) {
             ConfigurationException e = new ConfigurationException();
             e.setMessage(ex.getMessage());
             e.setRootCause(ex);
@@ -156,15 +137,12 @@
         }
     }
 
-    protected void addFileByDocument(String path, Node node)
-    {
+    protected void addFileByDocument(String path, Node node) {
         String shortPath = path;
-        if (shortPath != null && ((shortPath.indexOf('/') != -1) || (shortPath.indexOf("\\") != -1)) )
-        {
+        if (shortPath != null && ((shortPath.indexOf('/') != -1) || (shortPath.indexOf("\\") != -1))) {
             int start = 0;
             start = shortPath.lastIndexOf('/');
-            if (start == -1)
-            {
+            if (start == -1) {
                 start = shortPath.lastIndexOf("\\");
             }
             shortPath = path.substring(start + 1);
@@ -172,16 +150,18 @@
         fileByDocument.put(node, shortPath);
     }
 
-    protected String getSourceFileOf(Node node)
-    {
-        return (String)fileByDocument.get(node.getOwnerDocument());
+    protected String getSourceFileOf(Node node) {
+        return (String) fileByDocument.get(node.getOwnerDocument());
     }
 
     protected abstract void parseTopLevelConfig(Document doc);
 
     protected abstract void initializeExpressionQuery();
+
     protected abstract Node selectSingleNode(Node source, String expression);
+
     protected abstract NodeList selectNodeList(Node source, String expression);
+
     protected abstract Object evaluateExpression(Node source, String expression);
 
     /**
@@ -201,11 +181,11 @@
      * The sourceFileName argument is used as a parameter for token replacement in order
      * to generate a meaningful error message when a token is failed to be replaced.
      * </p>
+     *
      * @param properties the NodeList object
      * @return ConfigMap the ConfigMap object
      */
-    public ConfigMap properties(NodeList properties)
-    {
+    public ConfigMap properties(NodeList properties) {
         return properties(properties, ConfigurationConstants.UNKNOWN_SOURCE_FILE);
     }
 
@@ -213,29 +193,24 @@
      * Recursively processes all child elements for each of the properties in the provided
      * node list.
      *
-     * @param properties the NodeList object
+     * @param properties     the NodeList object
      * @param sourceFileName the source file name
      * @return ConfigMap the ConfigMap object
      */
-    public ConfigMap properties(NodeList properties, String sourceFileName)
-    {
+    public ConfigMap properties(NodeList properties, String sourceFileName) {
         int length = properties.getLength();
         ConfigMap map = new ConfigMap(length);
 
-        for (int p = 0; p < length; p++)
-        {
+        for (int p = 0; p < length; p++) {
             Node prop = properties.item(p);
             String propName = prop.getNodeName();
 
-            if (propName != null)
-            {
+            if (propName != null) {
                 propName = propName.trim();
-                if (prop.getNodeType() == Node.ELEMENT_NODE)
-                {
+                if (prop.getNodeType() == Node.ELEMENT_NODE) {
                     NodeList attributes = selectNodeList(prop, "@*");
                     NodeList children = selectNodeList(prop, "*");
-                    if (children.getLength() > 0 || attributes.getLength() > 0)
-                    {
+                    if (children.getLength() > 0 || attributes.getLength() > 0) {
                         ConfigMap childMap = new ConfigMap();
 
                         if (children.getLength() > 0)
@@ -245,17 +220,13 @@
                             childMap.addProperties(properties(attributes, sourceFileName));
 
                         map.addProperty(propName, childMap);
-                    }
-                    else
-                    {
+                    } else {
                         // replace tokens before setting property
                         tokenReplacer.replaceToken(prop, sourceFileName);
                         String propValue = evaluateExpression(prop, ".").toString();
                         map.addProperty(propName, propValue);
                     }
-                }
-                else
-                {
+                } else {
                     // replace tokens before setting property
                     tokenReplacer.replaceToken(prop, sourceFileName);
                     map.addProperty(propName, prop.getNodeValue());
@@ -265,37 +236,33 @@
 
         return map;
     }
-    
+
     /**
-     * Get the item value by name if the item is present in the current node as attribute or child element. 
+     * Get the item value by name if the item is present in the current node as attribute or child element.
      *
      * @param node the current Node object
      * @param name item name
      * @return String the value of item
      **/
-    public String getAttributeOrChildElement(Node node, String name)
-    {
+    public String getAttributeOrChildElement(Node node, String name) {
         String attr = evaluateExpression(node, "@" + name).toString().trim();
-        if (attr.length() == 0)
-        {
+        if (attr.length() == 0) {
             attr = evaluateExpression(node, name).toString().trim();
         }
         return attr;
     }
-    
+
     /**
-     * Check whether the required items are present in the current node as child elements. 
+     * Check whether the required items are present in the current node as child elements.
      *
-     * @param node the current Node object
+     * @param node    the current Node object
      * @param allowed the String array of the allowed items
      **/
-    public void allowedChildElements(Node node, String[] allowed)
-    {
+    public void allowedChildElements(Node node, String[] allowed) {
         NodeList children = selectNodeList(node, "*");
 
         String unexpected = unexpected(children, allowed);
-        if (unexpected != null)
-        {
+        if (unexpected != null) {
             // Unexpected child element '{0}' found in '{1}'.
             ConfigurationException ex = new ConfigurationException();
             Object[] args = {unexpected, node.getNodeName(), getSourceFilename(node)};
@@ -304,11 +271,9 @@
         }
 
         NodeList textNodes = selectNodeList(node, "text()");
-        for (int i = 0; i < textNodes.getLength(); i++)
-        {
+        for (int i = 0; i < textNodes.getLength(); i++) {
             String text = evaluateExpression(textNodes.item(i), ".").toString().trim();
-            if (text.length() > 0)
-            {
+            if (text.length() > 0) {
                 //Unexpected text '{0}' found in '{1}'.
                 ConfigurationException ex = new ConfigurationException();
                 Object[] args = {text, node.getNodeName(), getSourceFilename(node)};
@@ -317,78 +282,67 @@
             }
         }
     }
-    
+
     /**
-     * Check whether the required items are present in the current node as attributes. 
+     * Check whether the required items are present in the current node as attributes.
      *
-     * @param node the current Node object
+     * @param node    the current Node object
      * @param allowed the String array of the allowed items
      **/
 
-    public void allowedAttributes(Node node, String[] allowed)
-    {
+    public void allowedAttributes(Node node, String[] allowed) {
         NodeList attributes = selectNodeList(node, "@*");
         String unexpectedAttribute = unexpected(attributes, allowed);
-        if (unexpectedAttribute != null)
-        {
+        if (unexpectedAttribute != null) {
             //Unexpected attribute '{0}' found in '{1}'.
             ConfigurationException ex = new ConfigurationException();
             Object[] args =
-                {unexpectedAttribute, node.getNodeName(), getSourceFilename(node)};
+                    {unexpectedAttribute, node.getNodeName(), getSourceFilename(node)};
             ex.setMessage(UNEXPECTED_ATTRIBUTE, args);
             throw ex;
         }
     }
 
-    private String getSourceFilename(Node node)
-    {
+    private String getSourceFilename(Node node) {
         return getSourceFileOf(node);
     }
-    
+
     /**
-     * Check whether the allowed items are present in the current node as elements or attributes. 
+     * Check whether the allowed items are present in the current node as elements or attributes.
      *
-     * @param node the current Node object
+     * @param node    the current Node object
      * @param allowed the String array of the allowed items
      **/
 
-    public void allowedAttributesOrElements(Node node, String[] allowed)
-    {
+    public void allowedAttributesOrElements(Node node, String[] allowed) {
         allowedAttributes(node, allowed);
         allowedChildElements(node, allowed);
     }
 
     /**
-     * Check whether the required items are present in the current node as elements or attributes. 
+     * Check whether the required items are present in the current node as elements or attributes.
      *
-     * @param node the current Node object
+     * @param node     the current Node object
      * @param required the String array of the required items
      **/
-    public void requiredAttributesOrElements(Node node, String[] required)
-    {
+    public void requiredAttributesOrElements(Node node, String[] required) {
         String nodeName = node.getNodeName();
         NodeList attributes = selectNodeList(node, "@*");
 
         List list = new ArrayList();
-        for (int i = 0; i < required.length; i++)
-        {
+        for (int i = 0; i < required.length; i++) {
             list.add(required[i]);
         }
 
         String missingAttribute = null;
 
-        do
-        {
+        do {
             missingAttribute = required(attributes, list);
-            if (missingAttribute != null)
-            {
+            if (missingAttribute != null) {
                 Node child = selectSingleNode(node, missingAttribute);
-                if (child != null)
-                {
+                if (child != null) {
                     list.remove(missingAttribute);
-                }
-                else
-                {
+                } else {
                     // Attribute '{0}' must be specified for element '{1}'
                     ConfigurationException ex = new ConfigurationException();
                     ex.setMessage(MISSING_ATTRIBUTE, new Object[]{missingAttribute, nodeName});
@@ -400,25 +354,22 @@
     }
 
     /**
-     * Check whether the required items are present in the current node (Child elements). 
+     * Check whether the required items are present in the current node (Child elements).
      *
-     * @param node the current Node object
+     * @param node     the current Node object
      * @param required the String array of the required items
      **/
-    public void requiredChildElements(Node node, String[] required)
-    {
+    public void requiredChildElements(Node node, String[] required) {
         String nodeName = node.getNodeName();
         NodeList children = selectNodeList(node, "*");
 
         List list = new ArrayList();
-        for (int i = 0; i < required.length; i++)
-        {
+        for (int i = 0; i < required.length; i++) {
             list.add(required[i]);
         }
 
         String missing = required(children, list);
-        if (missing != null)
-        {
+        if (missing != null) {
             // Child element '{0}' must be specified for element '{1}'
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(MISSING_ELEMENT, new Object[]{missing, nodeName});
@@ -430,30 +381,25 @@
      * Check whether there is any unexpected item in the node list object.
      *
      * @param attributes the current NodeList object
-     * @param allowed, the String array of allowed items
+     * @param allowed,   the String array of allowed items
      * @return Name of the first unexpected item from the list of allowed attributes, or null if all
-     *         items present were allowed.
+     * items present were allowed.
      **/
-    public String unexpected(NodeList attributes, String[] allowed)
-    {
-        for (int i = 0; i < attributes.getLength(); i++)
-        {
+    public String unexpected(NodeList attributes, String[] allowed) {
+        for (int i = 0; i < attributes.getLength(); i++) {
             Node attrib = attributes.item(i);
             String attribName = attrib.getNodeName();
             boolean match = false;
 
-            for (int j = 0; j < allowed.length; j++)
-            {
+            for (int j = 0; j < allowed.length; j++) {
                 String a = allowed[j];
-                if (a.equals(attribName))
-                {
+                if (a.equals(attribName)) {
                     match = true;
                     break;
                 }
             }
 
-            if (!match)
-            {
+            if (!match) {
                 return attribName;
             }
 
@@ -466,33 +412,29 @@
 
     /**
      * Check whether all the required items are present in the node list.
+     *
      * @param attributes the NodeList object
-     * @param required a list of required items
+     * @param required   a list of required items
      * @return Name of the first missing item from the list of required attributes, or null if all required
-     *         items were present.
+     * items were present.
      **/
-    public String required(NodeList attributes, List required)
-    {
-        for (int i = 0; i < required.size(); i++)
-        {
+    public String required(NodeList attributes, List required) {
+        for (int i = 0; i < required.size(); i++) {
             boolean found = false;
-            String req = (String)required.get(i);
+            String req = (String) required.get(i);
 
             Node attrib = null;
-            for (int j = 0; j < attributes.getLength(); j++)
-            {
+            for (int j = 0; j < attributes.getLength(); j++) {
                 attrib = attributes.item(j);
                 String attribName = attrib.getNodeName();
 
-                if (req.equals(attribName))
-                {
+                if (req.equals(attribName)) {
                     found = true;
                     break;
                 }
             }
 
-            if (!found)
-            {
+            if (!found) {
                 return req;
             }
 
@@ -511,20 +453,17 @@
      * greater than 0 characters in length and not contain
      * any of the list delimiter characters, i.e. commas,
      * semi-colons or colons.
+     *
      * @param id the Id String
      * @return boolean true if the id string is valid identification
      * @see ConfigurationConstants#LIST_DELIMITERS
      */
-    public static boolean isValidID(String id)
-    {
-        if (id != null && id.length() > 0 && id.length() < 256)
-        {
+    public static boolean isValidID(String id) {
+        if (id != null && id.length() > 0 && id.length() < 256) {
             char[] chars = id.toCharArray();
-            for (int i = 0; i < chars.length; i++)
-            {
+            for (int i = 0; i < chars.length; i++) {
                 char c = chars[i];
-                if (LIST_DELIMITERS.indexOf(c) != -1)
-                {
+                if (LIST_DELIMITERS.indexOf(c) != -1) {
                     return false;
                 }
             }
@@ -534,23 +473,23 @@
 
         return false;
     }
-    
+
     /**
      * Implement {@link org.xml.sax.EntityResolver#resolveEntity(String, String)}.
-     * 
+     * <p>
      * Flex Configuration does not need or use external entities, so disallow external entities
-     * to prevent external entity injection attacks. 
+     * to prevent external entity injection attacks.
+     *
      * @param publicId the public Id
      * @param systemId the system Id
      * @return InputSource the InputSource object
      * @throws SAXException when the parsing process failed with exceptions
-     * @throws IOException when the parsing process failed with exceptions
+     * @throws IOException  when the parsing process failed with exceptions
      */
-    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
-    {
+    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
         // Flex Configuration does not allow external entity defined by publicId {0} and SystemId {1}
         ConfigurationException ex = new ConfigurationException();
-        ex.setMessage(EXTERNAL_ENTITY_NOT_ALLOW, new Object[] { publicId, systemId });
+        ex.setMessage(EXTERNAL_ENTITY_NOT_ALLOW, new Object[]{publicId, systemId});
         throw ex;
     }
 }
diff --git a/common/src/main/java/flex/messaging/config/AdapterSettings.java b/common/src/main/java/flex/messaging/config/AdapterSettings.java
index 8dea7ca..b280fec 100644
--- a/common/src/main/java/flex/messaging/config/AdapterSettings.java
+++ b/common/src/main/java/flex/messaging/config/AdapterSettings.java
@@ -25,8 +25,7 @@
  * properties.
  * </p>
  */
-public class AdapterSettings extends PropertiesSettings
-{
+public class AdapterSettings extends PropertiesSettings {
     private final String id;
     private String sourceFile;
     private String className;
@@ -38,10 +37,9 @@
      * adapter.
      *
      * @param id the <code>String</code> representing the unique identity for
-     * this adapter.
+     *           this adapter.
      */
-    public AdapterSettings(String id)
-    {
+    public AdapterSettings(String id) {
         super();
         this.id = id;
     }
@@ -51,8 +49,7 @@
      *
      * @return the adapter identity as a <code>String</code>.
      */
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
@@ -61,8 +58,7 @@
      *
      * @return String The name of the adapter implementation.
      */
-    public String getClassName()
-    {
+    public String getClassName() {
         return className;
     }
 
@@ -73,8 +69,7 @@
      *
      * @param name the <code>String</code>
      */
-    public void setClassName(String name)
-    {
+    public void setClassName(String name) {
         className = name;
     }
 
@@ -85,8 +80,7 @@
      *
      * @return boolean true if this adapter is the default.
      */
-    public boolean isDefault()
-    {
+    public boolean isDefault() {
         return defaultAdapter;
     }
 
@@ -94,32 +88,27 @@
      * Sets a flag to determine whether an adapter will be used as the default
      * (for example, in the event that a destination did not specify an adapter
      * explicitly).
-     *
+     * <p>
      * Only one default can be set for a given service.
      *
      * @param b a <code>boolean</code> flag, true if this adapter should be
-     * used as the default for the service.
+     *          used as the default for the service.
      */
-    public void setDefault(boolean b)
-    {
+    public void setDefault(boolean b) {
         defaultAdapter = b;
     }
 
     /**
      * Internal use only.
-     *
      */
-    String getSourceFile()
-    {
+    String getSourceFile() {
         return sourceFile;
     }
 
     /**
      * Internal use only.
-     *
      */
-    void setSourceFile(String file)
-    {
+    void setSourceFile(String file) {
         this.sourceFile = file;
     }
 }
diff --git a/common/src/main/java/flex/messaging/config/ApacheXPathClientConfigurationParser.java b/common/src/main/java/flex/messaging/config/ApacheXPathClientConfigurationParser.java
index 2ad8764..64a7ecf 100644
--- a/common/src/main/java/flex/messaging/config/ApacheXPathClientConfigurationParser.java
+++ b/common/src/main/java/flex/messaging/config/ApacheXPathClientConfigurationParser.java
@@ -19,6 +19,7 @@
 import org.apache.xpath.CachedXPathAPI;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+
 import javax.xml.transform.TransformerException;
 
 /**
@@ -28,59 +29,42 @@
  * NOTE: Since reference ids are used between elements, certain
  * sections of the document need to be parsed first.
  * </p>
- *
- *
  */
-public class ApacheXPathClientConfigurationParser extends ClientConfigurationParser
-{
+public class ApacheXPathClientConfigurationParser extends ClientConfigurationParser {
     private CachedXPathAPI xpath;
 
-    protected void initializeExpressionQuery()
-    {
+    protected void initializeExpressionQuery() {
         this.xpath = new CachedXPathAPI();
     }
 
-    protected Node selectSingleNode(Node source, String expression)
-    {
-        try
-        {
+    protected Node selectSingleNode(Node source, String expression) {
+        try {
             return xpath.selectSingleNode(source, expression);
-        }
-        catch (TransformerException transformerException)
-        {
+        } catch (TransformerException transformerException) {
             throw wrapException(transformerException);
         }
     }
 
-    protected NodeList selectNodeList(Node source, String expression)
-    {
-        try
-        {
+    protected NodeList selectNodeList(Node source, String expression) {
+        try {
             return xpath.selectNodeList(source, expression);
-        }
-        catch (TransformerException transformerException)
-        {
+        } catch (TransformerException transformerException) {
             throw wrapException(transformerException);
         }
     }
 
-    protected Object evaluateExpression(Node source, String expression)
-    {
-        try
-        {
+    protected Object evaluateExpression(Node source, String expression) {
+        try {
             return xpath.eval(source, expression);
-        }
-        catch (TransformerException transformerException)
-        {
+        } catch (TransformerException transformerException) {
             throw wrapException(transformerException);
         }
     }
 
-    private ConfigurationException wrapException(TransformerException exception)
-    {
-       ConfigurationException result = new ConfigurationException();
-       result.setDetails(PARSER_INTERNAL_ERROR);
-       result.setRootCause(exception);
-       return result;
+    private ConfigurationException wrapException(TransformerException exception) {
+        ConfigurationException result = new ConfigurationException();
+        result.setDetails(PARSER_INTERNAL_ERROR);
+        result.setRootCause(exception);
+        return result;
     }
 }
diff --git a/common/src/main/java/flex/messaging/config/ChannelSettings.java b/common/src/main/java/flex/messaging/config/ChannelSettings.java
index badc6e2..eb49c40 100644
--- a/common/src/main/java/flex/messaging/config/ChannelSettings.java
+++ b/common/src/main/java/flex/messaging/config/ChannelSettings.java
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 package flex.messaging.config;
+
 import flex.messaging.util.StringUtils;
 
 /**
@@ -23,11 +24,8 @@
  * server-endpoint specific and client code-generation specific settings
  * to be modified without affecting needing to update the configuration
  * parser.
- *
- *
  */
-public class ChannelSettings extends PropertiesSettings
-{
+public class ChannelSettings extends PropertiesSettings {
     protected String id;
     protected boolean remote;
     protected String serverId;
@@ -47,63 +45,51 @@
     protected String parsedClientUri;
     protected boolean clientContextParsed;
 
-    public ChannelSettings(String id)
-    {
+    public ChannelSettings(String id) {
         this.id = id;
     }
 
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
-    public boolean isRemote()
-    {
+    public boolean isRemote() {
         return remote;
     }
 
-    public void setRemote(boolean value)
-    {
+    public void setRemote(boolean value) {
         remote = value;
     }
 
-    public String getServerId()
-    {
+    public String getServerId() {
         return serverId;
     }
 
-    public void setServerId(String value)
-    {
+    public void setServerId(String value) {
         serverId = value;
     }
 
-    public String getClientType()
-    {
+    public String getClientType() {
         return clientType;
     }
 
-    public void setClientType(String type)
-    {
+    public void setClientType(String type) {
         this.clientType = type;
     }
 
-    public boolean getServerOnly()
-    {
+    public boolean getServerOnly() {
         return serverOnly;
     }
 
-    public void setServerOnly(boolean serverOnly)
-    {
+    public void setServerOnly(boolean serverOnly) {
         this.serverOnly = serverOnly;
     }
 
-    String getSourceFile()
-    {
+    String getSourceFile() {
         return sourceFile;
     }
 
-    void setSourceFile(String sourceFile)
-    {
+    void setSourceFile(String sourceFile) {
         this.sourceFile = sourceFile;
     }
 
@@ -113,50 +99,42 @@
      * @return the port number for this channel
      * or 0 if channel url does not contain a port number
      */
-    public int getPort()
-    {
+    public int getPort() {
         return port;
     }
 
-    public String getUri()
-    {
+    public String getUri() {
         return uri;
     }
 
-    public void setUri(String uri)
-    {
+    public void setUri(String uri) {
         this.uri = uri;
         port = parsePort(uri);
-        port = (port == -1)? 0 : port; // Replace -1 with 0.
+        port = (port == -1) ? 0 : port; // Replace -1 with 0.
         contextParsed = false;
         clientContextParsed = false;
     }
 
-    public String getClientParsedUri(String contextPath)
-    {
+    public String getClientParsedUri(String contextPath) {
         if (!clientContextParsed)
             parseClientUri(this, contextPath);
 
         return parsedClientUri;
     }
 
-    public String getEndpointType()
-    {
+    public String getEndpointType() {
         return endpointType;
     }
 
-    public void setEndpointType(String type)
-    {
+    public void setEndpointType(String type) {
         this.endpointType = type;
     }
 
-    public SecurityConstraint getConstraint()
-    {
+    public SecurityConstraint getConstraint() {
         return constraint;
     }
 
-    public void setConstraint(SecurityConstraint constraint)
-    {
+    public void setConstraint(SecurityConstraint constraint) {
         this.constraint = constraint;
     }
 
@@ -164,17 +142,14 @@
      * In this client version of the URI parser we're just looking to
      * replace the context root tokens.
      */
-    private static void parseClientUri(ChannelSettings cs, String contextPath)
-    {
-        if (!cs.clientContextParsed)
-        {
+    private static void parseClientUri(ChannelSettings cs, String contextPath) {
+        if (!cs.clientContextParsed) {
             String channelEndpoint = cs.getUri().trim();
 
             // either {context-root} or {context.root} is legal
             channelEndpoint = StringUtils.substitute(channelEndpoint, "{context-root}", ConfigurationConstants.CONTEXT_PATH_TOKEN);
 
-            if ((contextPath == null) && (channelEndpoint.indexOf(ConfigurationConstants.CONTEXT_PATH_TOKEN) != -1))
-            {
+            if ((contextPath == null) && (channelEndpoint.indexOf(ConfigurationConstants.CONTEXT_PATH_TOKEN) != -1)) {
                 // context root must be specified before it is used
                 ConfigurationException e = new ConfigurationException();
                 e.setMessage(ConfigurationConstants.UNDEFINED_CONTEXT_ROOT, new Object[]{cs.getId()});
@@ -183,15 +158,13 @@
 
             // simplify the number of combinations to test by ensuring our
             // context path always starts with a slash
-            if (contextPath != null && !contextPath.startsWith("/"))
-            {
+            if (contextPath != null && !contextPath.startsWith("/")) {
                 contextPath = "/" + contextPath;
             }
 
             // avoid double-slashes from context root by replacing /{context.root}
             // in a single replacement step
-            if (channelEndpoint.indexOf(ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN) != -1)
-            {
+            if (channelEndpoint.indexOf(ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN) != -1) {
                 // but avoid double-slash for /{context.root}/etc when we have
                 // the default context root
                 if ("/".equals(contextPath) && !ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN.equals(channelEndpoint))
@@ -200,8 +173,7 @@
                 channelEndpoint = StringUtils.substitute(channelEndpoint, ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN, contextPath);
             }
             // otherwise we have something like {server.name}:{server.port}{context.root}...
-            else
-            {
+            else {
                 // but avoid double-slash for {context.root}/etc when we have
                 // the default context root
                 if ("/".equals(contextPath) && !ConfigurationConstants.CONTEXT_PATH_TOKEN.equals(channelEndpoint))
@@ -214,25 +186,24 @@
             cs.clientContextParsed = true;
         }
     }
-    
+
     /**
      * Returns the host name in the URL, or an empty <tt>String</tt> if the URL does not contain a host name.
-     * 
+     *
      * @param url The URL to parse for a host name.
      * @return The host name or an empty <tt>String</tt> if the URL does not contain a host name.
      */
     // The reason for this method, rather than just using java.net.URL, is that the Java class
     // doesn't recognize many of our protocol types/schemes (e.g. rtmp, amfsocket, etc.)
-    public static String parseHost(String url)
-    {
+    public static String parseHost(String url) {
         int start = url.indexOf(":/");
         if (start == -1)
             return "";
-        
+
         start = start + 3; // Advance past all of '://' to beginning of host name.
         int end = url.indexOf('/', start);
         String hostnameWithPort = end == -1 ? url.substring(start) : url.substring(start, end);
-        
+
         // IPv6 hostnames may contain ':' but the full value is wrapped in [] - skip past if necessary.
         int delim = hostnameWithPort.indexOf(']');
         delim = (delim != -1) ? hostnameWithPort.indexOf(':', delim) : hostnameWithPort.indexOf(':');
@@ -241,20 +212,19 @@
         else
             return hostnameWithPort.substring(0, delim);
     }
-    
+
     /**
      * Returns the port number specified in the URL, or 0 if the URL
      * does not contain a port number, or -1 if the URL contains a server.port
      * token.
      *
      * @param url The URL to parse for a contained port number.
-     * @return the port number in the URL, or 0 if the URL does not 
+     * @return the port number in the URL, or 0 if the URL does not
      * contain a port number, or -1 if the URL contains a server.port token.
      */
     // The reason for this method, rather than just using java.net.URL, is that the Java class
     // doesn't recognize many of our protocol types/schemes (e.g. rtmp, amfsocket, etc.)
-    public static int parsePort(String url)
-    {
+    public static int parsePort(String url) {
         // rtmp://localhost:2035/foo/bar
         // Find first slash with colon
         int start = url.indexOf(":/");
@@ -270,18 +240,15 @@
 
         // If IPv6 is in use, start looking after the square bracket.
         int delim = snp.indexOf(']');
-        delim = (delim > -1)? snp.indexOf(':', delim) : snp.indexOf(':');
+        delim = (delim > -1) ? snp.indexOf(':', delim) : snp.indexOf(':');
         if (delim == -1)
             return 0;
 
         int port = 0;
-        try
-        {
+        try {
             int p = Integer.parseInt(snp.substring(delim + 1));
-            port = (p > 0)? p : 0; 
-        }
-        catch (Throwable t)
-        {
+            port = (p > 0) ? p : 0;
+        } catch (Throwable t) {
             port = -1; // To denote that the url contained server.port token.
         }
         return port;
@@ -295,8 +262,7 @@
      * @param url Original url.
      * @return Url with protocol, host, port and context-root removed.
      */
-    public static String removeTokens(String url)
-    {
+    public static String removeTokens(String url) {
         String channelEndpoint = url.toLowerCase().trim();
 
         // remove protocol and host info
@@ -307,7 +273,7 @@
             int nextSlash = channelEndpoint.indexOf('/', 8);
             // Check to see if there is a 'next slash', and also that the next
             // slash isn't the last character
-            if ((nextSlash > 0) && (nextSlash != channelEndpoint.length()-1))
+            if ((nextSlash > 0) && (nextSlash != channelEndpoint.length() - 1))
                 channelEndpoint = channelEndpoint.substring(nextSlash);
         }
 
@@ -315,18 +281,14 @@
         channelEndpoint = StringUtils.substitute(channelEndpoint, "{context-root}", ConfigurationConstants.CONTEXT_PATH_TOKEN);
 
         // Remove context path info
-        if (channelEndpoint.startsWith(ConfigurationConstants.CONTEXT_PATH_TOKEN))
-        {
+        if (channelEndpoint.startsWith(ConfigurationConstants.CONTEXT_PATH_TOKEN)) {
             channelEndpoint = channelEndpoint.substring(ConfigurationConstants.CONTEXT_PATH_TOKEN.length());
-        }
-        else if (channelEndpoint.startsWith(ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN))
-        {
+        } else if (channelEndpoint.startsWith(ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN)) {
             channelEndpoint = channelEndpoint.substring(ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN.length());
         }
 
         // We also don't match on trailing slashes
-        if (channelEndpoint.endsWith("/"))
-        {
+        if (channelEndpoint.endsWith("/")) {
             channelEndpoint = channelEndpoint.substring(0, channelEndpoint.length() - 1);
         }
         return channelEndpoint;
diff --git a/common/src/main/java/flex/messaging/config/ClientConfiguration.java b/common/src/main/java/flex/messaging/config/ClientConfiguration.java
index df6f03f..f1a22a3 100644
--- a/common/src/main/java/flex/messaging/config/ClientConfiguration.java
+++ b/common/src/main/java/flex/messaging/config/ClientConfiguration.java
@@ -26,8 +26,7 @@
 /**
  *
  */
-public class ClientConfiguration implements ServicesConfiguration
-{
+public class ClientConfiguration implements ServicesConfiguration {
     protected final Map channelSettings;
     protected final List defaultChannels;
     protected final List serviceSettings;
@@ -36,8 +35,7 @@
     protected final Map clusterSettings;
     protected FlexClientSettings flexClientSettings;
 
-    public ClientConfiguration()
-    {
+    public ClientConfiguration() {
         channelSettings = new HashMap();
         defaultChannels = new ArrayList(4);
         clusterSettings = new HashMap();
@@ -49,31 +47,26 @@
      * CHANNEL CONFIGURATION
      */
 
-    public void addChannelSettings(String id, ChannelSettings settings)
-    {
+    public void addChannelSettings(String id, ChannelSettings settings) {
         channelSettings.put(id, settings);
     }
 
-    public ChannelSettings getChannelSettings(String ref)
-    {
-        return (ChannelSettings)channelSettings.get(ref);
+    public ChannelSettings getChannelSettings(String ref) {
+        return (ChannelSettings) channelSettings.get(ref);
     }
 
-    public Map getAllChannelSettings()
-    {
+    public Map getAllChannelSettings() {
         return channelSettings;
     }
 
     /*
      * DEFAULT CHANNELS CONFIGURATION
      */
-    public void addDefaultChannel(String id)
-    {
+    public void addDefaultChannel(String id) {
         defaultChannels.add(id);
     }
 
-    public List getDefaultChannels()
-    {
+    public List getDefaultChannels() {
         return defaultChannels;
     }
 
@@ -81,15 +74,12 @@
      * SERVICE CONFIGURATION
      */
 
-    public void addServiceSettings(ServiceSettings settings)
-    {
+    public void addServiceSettings(ServiceSettings settings) {
         serviceSettings.add(settings);
     }
 
-    public ServiceSettings getServiceSettings(String serviceType)
-    {
-        for (Iterator iter = serviceSettings.iterator(); iter.hasNext();)
-        {
+    public ServiceSettings getServiceSettings(String serviceType) {
+        for (Iterator iter = serviceSettings.iterator(); iter.hasNext(); ) {
             ServiceSettings serviceSettings = (ServiceSettings) iter.next();
             if (serviceSettings.getId().equals(serviceType))
                 return serviceSettings;
@@ -97,8 +87,7 @@
         return null;
     }
 
-    public List getAllServiceSettings()
-    {
+    public List getAllServiceSettings() {
         return serviceSettings;
     }
 
@@ -106,35 +95,28 @@
      * CLUSTER CONFIGURATION
      */
 
-    public void addClusterSettings(ClusterSettings settings)
-    {
-        if (settings.isDefault())
-        {
-            for (Iterator it = clusterSettings.values().iterator(); it.hasNext(); )
-            {
+    public void addClusterSettings(ClusterSettings settings) {
+        if (settings.isDefault()) {
+            for (Iterator it = clusterSettings.values().iterator(); it.hasNext(); ) {
                 ClusterSettings cs = (ClusterSettings) it.next();
 
-                if (cs.isDefault())
-                {
+                if (cs.isDefault()) {
                     ConfigurationException cx = new ConfigurationException();
-                    cx.setMessage(10214, new Object[] { settings.getClusterName(), cs.getClusterName() });
+                    cx.setMessage(10214, new Object[]{settings.getClusterName(), cs.getClusterName()});
                     throw cx;
                 }
             }
         }
-        if (clusterSettings.containsKey(settings.getClusterName()))
-        {
+        if (clusterSettings.containsKey(settings.getClusterName())) {
             ConfigurationException cx = new ConfigurationException();
-            cx.setMessage(10206, new Object[] { settings.getClusterName() });
+            cx.setMessage(10206, new Object[]{settings.getClusterName()});
             throw cx;
         }
         clusterSettings.put(settings.getClusterName(), settings);
     }
 
-    public ClusterSettings getClusterSettings(String clusterId)
-    {
-        for (Iterator it = clusterSettings.values().iterator(); it.hasNext(); )
-        {
+    public ClusterSettings getClusterSettings(String clusterId) {
+        for (Iterator it = clusterSettings.values().iterator(); it.hasNext(); ) {
             ClusterSettings cs = (ClusterSettings) it.next();
             if (cs.getClusterName() == null && clusterId == null)
                 return cs; // handle null case
@@ -144,10 +126,8 @@
         return null;
     }
 
-    public ClusterSettings getDefaultCluster()
-    {
-        for (Iterator it = clusterSettings.values().iterator(); it.hasNext(); )
-        {
+    public ClusterSettings getDefaultCluster() {
+        for (Iterator it = clusterSettings.values().iterator(); it.hasNext(); ) {
             ClusterSettings cs = (ClusterSettings) it.next();
             if (cs.isDefault())
                 return cs;
@@ -158,34 +138,28 @@
     /*
      * LOGGING CONFIGURATION
      */
-    public void setLoggingSettings(LoggingSettings settings)
-    {
+    public void setLoggingSettings(LoggingSettings settings) {
         loggingSettings = settings;
     }
 
-    public LoggingSettings getLoggingSettings()
-    {
+    public LoggingSettings getLoggingSettings() {
         return loggingSettings;
     }
 
 
-    public void addConfigPath(String path, long modified)
-    {
+    public void addConfigPath(String path, long modified) {
         configPaths.put(path, new Long(modified));
     }
 
-    public Map getConfigPaths()
-    {
+    public Map getConfigPaths() {
         return configPaths;
     }
-    
-    public void setFlexClientSettings(FlexClientSettings value)
-    {
+
+    public void setFlexClientSettings(FlexClientSettings value) {
         flexClientSettings = value;
     }
-    
-    public FlexClientSettings getFlexClientSettings()
-    {
+
+    public FlexClientSettings getFlexClientSettings() {
         return flexClientSettings;
     }
 
diff --git a/common/src/main/java/flex/messaging/config/ClientConfigurationParser.java b/common/src/main/java/flex/messaging/config/ClientConfigurationParser.java
index cff5d47..1272dba 100644
--- a/common/src/main/java/flex/messaging/config/ClientConfigurationParser.java
+++ b/common/src/main/java/flex/messaging/config/ClientConfigurationParser.java
@@ -31,17 +31,12 @@
  * parser for JDK 1.4. Only a small subset of the configuration is
  * processed to generate the information that the client needs at runtime,
  * such as channel definitions and service destination properties.
- *
- *
  */
-public abstract class ClientConfigurationParser extends AbstractConfigurationParser
-{
-    protected void parseTopLevelConfig(Document doc)
-    {
+public abstract class ClientConfigurationParser extends AbstractConfigurationParser {
+    protected void parseTopLevelConfig(Document doc) {
         Node root = selectSingleNode(doc, "/" + SERVICES_CONFIG_ELEMENT);
 
-        if (root != null)
-        {
+        if (root != null) {
             // Validation
             allowedChildElements(root, SERVICES_CONFIG_CHILDREN);
 
@@ -59,41 +54,34 @@
         }
     }
 
-    private void channelsSection(Node root)
-    {
+    private void channelsSection(Node root) {
         Node channelsNode = selectSingleNode(root, CHANNELS_ELEMENT);
-        if (channelsNode != null)
-        {
+        if (channelsNode != null) {
             // Validation
             allowedAttributesOrElements(channelsNode, CHANNELS_CHILDREN);
 
             NodeList channels = selectNodeList(channelsNode, CHANNEL_DEFINITION_ELEMENT);
-            for (int i = 0; i < channels.getLength(); i++)
-            {
+            for (int i = 0; i < channels.getLength(); i++) {
                 Node channel = channels.item(i);
                 channelDefinition(channel);
             }
             NodeList includes = selectNodeList(channelsNode, CHANNEL_INCLUDE_ELEMENT);
-            for (int i = 0; i < includes.getLength(); i++)
-            {
+            for (int i = 0; i < includes.getLength(); i++) {
                 Node include = includes.item(i);
                 channelInclude(include);
             }
         }
     }
 
-    private void channelDefinition(Node channel)
-    {
+    private void channelDefinition(Node channel) {
         // Validation
         requiredAttributesOrElements(channel, CHANNEL_DEFINITION_REQ_CHILDREN);
         allowedAttributesOrElements(channel, CHANNEL_DEFINITION_CHILDREN);
 
         String id = getAttributeOrChildElement(channel, ID_ATTR).trim();
-        if (isValidID(id))
-        {
+        if (isValidID(id)) {
             // Don't allow multiple channels with the same id
-            if (config.getChannelSettings(id) != null)
-            {
+            if (config.getChannelSettings(id) != null) {
                 // Cannot have multiple channels with the same id ''{0}''.
                 ConfigurationException e = new ConfigurationException();
                 e.setMessage(DUPLICATE_CHANNEL_ERROR, new Object[]{id});
@@ -104,8 +92,7 @@
 
             // Endpoint
             Node endpoint = selectSingleNode(channel, ENDPOINT_ELEMENT);
-            if (endpoint != null)
-            {
+            if (endpoint != null) {
                 // Endpoint Validation
                 allowedAttributesOrElements(endpoint, ENDPOINT_CHILDREN);
 
@@ -137,25 +124,20 @@
 
             // enable-small-messages.
             NodeList properties = selectNodeList(channel, PROPERTIES_ELEMENT + "/" + SERIALIZATION_ELEMENT);
-            if (properties.getLength() > 0)
-            {
+            if (properties.getLength() > 0) {
                 ConfigMap map = properties(properties, getSourceFileOf(channel));
                 ConfigMap serialization = map.getPropertyAsMap(SERIALIZATION_ELEMENT, null);
-                if (serialization != null)
-                {
+                if (serialization != null) {
                     // enable-small-messages.
                     String enableSmallMessages = serialization.getProperty(ENABLE_SMALL_MESSAGES_ELEMENT);
-                    if (enableSmallMessages != null)
-                    {
+                    if (enableSmallMessages != null) {
                         ConfigMap clientMap = new ConfigMap();
                         clientMap.addProperty(ENABLE_SMALL_MESSAGES_ELEMENT, enableSmallMessages);
                         channelSettings.addProperty(SERIALIZATION_ELEMENT, clientMap);
                     }
                 }
             }
-        }
-        else
-        {
+        } else {
             // Invalid {CHANNEL_DEFINITION_ELEMENT} id '{id}'.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(INVALID_ID, new Object[]{CHANNEL_DEFINITION_ELEMENT, id});
@@ -165,10 +147,9 @@
         }
     }
 
-    private void channelServerOnlyAttribute(Node channel, ChannelSettings channelSettings)
-    {
+    private void channelServerOnlyAttribute(Node channel, ChannelSettings channelSettings) {
         String clientType = getAttributeOrChildElement(channel, CLASS_ATTR);
-        clientType = clientType.length() > 0? clientType : null;
+        clientType = clientType.length() > 0 ? clientType : null;
 
         String serverOnlyString = getAttributeOrChildElement(channel, SERVER_ONLY_ATTR);
         boolean serverOnly = serverOnlyString.length() > 0 && Boolean.valueOf(serverOnlyString).booleanValue();
@@ -177,23 +158,20 @@
         {
             String url = channelSettings.getUri();
             boolean serverOnlyProtocol = (url.startsWith("samfsocket") || url.startsWith("amfsocket") || url.startsWith("ws"));
-            if (!serverOnlyProtocol)
-            {
+            if (!serverOnlyProtocol) {
                 // Endpoint ''{0}'' needs to have either class or server-only attribute defined.
                 ConfigurationException ce = new ConfigurationException();
                 ce.setMessage(CLASS_OR_SERVER_ONLY_ERROR, new Object[]{channelSettings.getId()});
                 throw ce;
             }
             channelSettings.setServerOnly(true);
-        }
-        else if (clientType != null && serverOnly) // Both set.
+        } else if (clientType != null && serverOnly) // Both set.
         {
             // Endpoint ''{0}'' cannot have both class and server-only attribute defined.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(CLASS_AND_SERVER_ONLY_ERROR, new Object[]{channelSettings.getId()});
             throw ce;
-        }
-        else // One of them set.
+        } else // One of them set.
         {
             if (serverOnly)
                 channelSettings.setServerOnly(true);
@@ -202,17 +180,13 @@
         }
     }
 
-    private void addProperty(Node channel, ChannelSettings channelSettings, String property)
-    {
+    private void addProperty(Node channel, ChannelSettings channelSettings, String property) {
         NodeList properties = selectNodeList(channel, PROPERTIES_ELEMENT + "/" + property);
-        if (properties.getLength() > 0)
-        {
+        if (properties.getLength() > 0) {
             ConfigMap map = properties(properties, getSourceFileOf(channel));
-            if (CLIENT_LOAD_BALANCING_ELEMENT.equals(property))
-            {
+            if (CLIENT_LOAD_BALANCING_ELEMENT.equals(property)) {
                 ConfigMap clientLoadBalancingMap = map.getPropertyAsMap(CLIENT_LOAD_BALANCING_ELEMENT, null);
-                if (clientLoadBalancingMap == null)
-                {
+                if (clientLoadBalancingMap == null) {
                     // Invalid {0} configuration for endpoint ''{1}''; no urls defined.
                     ConfigurationException ce = new ConfigurationException();
                     ce.setMessage(ERR_MSG_EMPTY_CLIENT_LOAD_BALANCING_ELEMENT, new Object[]{CLIENT_LOAD_BALANCING_ELEMENT, channelSettings.getId()});
@@ -226,10 +200,8 @@
     }
 
     // Add client load balancing urls after necessary validation checks.
-    private void addClientLoadBalancingUrls(List urls, String endpointId)
-    {
-        if (urls == null || urls.isEmpty())
-        {
+    private void addClientLoadBalancingUrls(List urls, String endpointId) {
+        if (urls == null || urls.isEmpty()) {
             // Invalid {0} configuration for endpoint ''{1}''; no urls defined.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(ERR_MSG_EMPTY_CLIENT_LOAD_BALANCING_ELEMENT, new Object[]{CLIENT_LOAD_BALANCING_ELEMENT, endpointId});
@@ -237,21 +209,18 @@
         }
 
         Set clientLoadBalancingUrls = new HashSet();
-        for (Iterator iterator = urls.iterator(); iterator.hasNext();)
-        {
+        for (Iterator iterator = urls.iterator(); iterator.hasNext(); ) {
             String url = (String) iterator.next();
-            if (url == null || url.length() == 0)
-            {
+            if (url == null || url.length() == 0) {
                 // Invalid {0} configuration for endpoint ''{1}''; cannot add empty url.
-                ConfigurationException  ce = new ConfigurationException();
+                ConfigurationException ce = new ConfigurationException();
                 ce.setMessage(ERR_MSG_EMTPY_CLIENT_LOAD_BALACNING_URL, new Object[]{CLIENT_LOAD_BALANCING_ELEMENT, endpointId});
                 throw ce;
             }
 
-            if (TokenReplacer.containsTokens(url))
-            {
+            if (TokenReplacer.containsTokens(url)) {
                 // Invalid {0} configuration for endpoint ''{1}''; cannot add url with tokens.
-                ConfigurationException  ce = new ConfigurationException();
+                ConfigurationException ce = new ConfigurationException();
                 ce.setMessage(ERR_MSG_CLIENT_LOAD_BALANCING_URL_WITH_TOKEN, new Object[]{CLIENT_LOAD_BALANCING_ELEMENT, endpointId});
                 throw ce;
             }
@@ -264,23 +233,17 @@
 
     }
 
-    private void channelInclude(Node channelInclude)
-    {
+    private void channelInclude(Node channelInclude) {
         // Validation
         allowedAttributesOrElements(channelInclude, CHANNEL_INCLUDE_CHILDREN);
 
         String src = getAttributeOrChildElement(channelInclude, SRC_ATTR);
         String dir = getAttributeOrChildElement(channelInclude, DIRECTORY_ATTR);
-        if (src.length() > 0)
-        {
+        if (src.length() > 0) {
             channelIncludeFile(src);
-        }
-        else if (dir.length() > 0)
-        {
+        } else if (dir.length() > 0) {
             channelIncludeDirectory(dir);
-        }
-        else
-        {
+        } else {
             // The include element ''{0}'' must specify either the ''{1}'' or ''{2}'' attribute.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(MISSING_INCLUDE_ATTRIBUTES, new Object[]{channelInclude.getNodeName(), SRC_ATTR, DIRECTORY_ATTR});
@@ -288,40 +251,32 @@
         }
     }
 
-    private void channelIncludeFile(String src)
-    {
+    private void channelIncludeFile(String src) {
         Document doc = loadDocument(src, fileResolver.getIncludedFile(src));
-        if (fileResolver instanceof LocalFileResolver)
-        {
-            LocalFileResolver local = (LocalFileResolver)fileResolver;
-            ((ClientConfiguration)config).addConfigPath(local.getIncludedPath(src), local.getIncludedLastModified(src));
+        if (fileResolver instanceof LocalFileResolver) {
+            LocalFileResolver local = (LocalFileResolver) fileResolver;
+            ((ClientConfiguration) config).addConfigPath(local.getIncludedPath(src), local.getIncludedLastModified(src));
         }
 
         doc.getDocumentElement().normalize();
 
         // Check for multiple channels in a single file.
         Node channelsNode = selectSingleNode(doc, CHANNELS_ELEMENT);
-        if (channelsNode != null)
-        {
+        if (channelsNode != null) {
             allowedChildElements(channelsNode, CHANNELS_CHILDREN);
             NodeList channels = selectNodeList(channelsNode, CHANNEL_DEFINITION_ELEMENT);
-            for (int a = 0; a < channels.getLength(); a++)
-            {
+            for (int a = 0; a < channels.getLength(); a++) {
                 Node service = channels.item(a);
                 channelDefinition(service);
             }
             fileResolver.popIncludedFile();
-        }
-        else // Check for single channel in the file.
+        } else // Check for single channel in the file.
         {
             Node channel = selectSingleNode(doc, "/" + CHANNEL_DEFINITION_ELEMENT);
-            if (channel != null)
-            {
+            if (channel != null) {
                 channelDefinition(channel);
                 fileResolver.popIncludedFile();
-            }
-            else
-            {
+            } else {
                 // The {0} root element in file {1} must be '{CHANNELS_ELEMENT}' or '{CHANNEL_ELEMENT}'.
                 ConfigurationException ex = new ConfigurationException();
                 ex.setMessage(INVALID_INCLUDE_ROOT, new Object[]{CHANNEL_INCLUDE_ELEMENT, src, CHANNELS_ELEMENT, CHANNEL_DEFINITION_ELEMENT});
@@ -330,122 +285,100 @@
         }
     }
 
-    private void channelIncludeDirectory(String dir)
-    {
+    private void channelIncludeDirectory(String dir) {
         List files = fileResolver.getFiles(dir);
-        for (int i = 0; i < files.size(); i++)
-        {
+        for (int i = 0; i < files.size(); i++) {
             String src = (String) files.get(i);
             channelIncludeFile(src);
         }
     }
 
-    private void services(Node root)
-    {
+    private void services(Node root) {
         Node servicesNode = selectSingleNode(root, SERVICES_ELEMENT);
-        if (servicesNode != null)
-        {
+        if (servicesNode != null) {
             // Validation
             allowedChildElements(servicesNode, SERVICES_CHILDREN);
 
             // Default Channels for the application
             Node defaultChannels = selectSingleNode(servicesNode, DEFAULT_CHANNELS_ELEMENT);
-            if (defaultChannels != null)
-            {
+            if (defaultChannels != null) {
                 allowedChildElements(defaultChannels, DEFAULT_CHANNELS_CHILDREN);
                 NodeList channels = selectNodeList(defaultChannels, CHANNEL_ELEMENT);
-                for (int c = 0; c < channels.getLength(); c++)
-                {
+                for (int c = 0; c < channels.getLength(); c++) {
                     Node chan = channels.item(c);
-                    allowedAttributes(chan, new String[] {REF_ATTR});
+                    allowedAttributes(chan, new String[]{REF_ATTR});
                     defaultChannel(chan);
                 }
             }
 
             // Service Includes
             NodeList services = selectNodeList(servicesNode, SERVICE_INCLUDE_ELEMENT);
-            for (int i = 0; i < services.getLength(); i++)
-            {
+            for (int i = 0; i < services.getLength(); i++) {
                 Node service = services.item(i);
                 serviceInclude(service);
             }
 
             // Service
             services = selectNodeList(servicesNode, SERVICE_ELEMENT);
-            for (int i = 0; i < services.getLength(); i++)
-            {
+            for (int i = 0; i < services.getLength(); i++) {
                 Node service = services.item(i);
                 service(service);
             }
         }
     }
 
-    private void clusters(Node root)
-    {
+    private void clusters(Node root) {
         Node clusteringNode = selectSingleNode(root, CLUSTERS_ELEMENT);
-        if (clusteringNode != null)
-        {
+        if (clusteringNode != null) {
             allowedAttributesOrElements(clusteringNode, CLUSTERING_CHILDREN);
 
             NodeList clusters = selectNodeList(clusteringNode, CLUSTER_DEFINITION_ELEMENT);
-            for (int i = 0; i < clusters.getLength(); i++)
-            {
+            for (int i = 0; i < clusters.getLength(); i++) {
                 Node cluster = clusters.item(i);
                 requiredAttributesOrElements(cluster, CLUSTER_DEFINITION_CHILDREN);
                 String clusterName = getAttributeOrChildElement(cluster, ID_ATTR);
-                if (isValidID(clusterName))
-                {
+                if (isValidID(clusterName)) {
                     String propsFileName = getAttributeOrChildElement(cluster, CLUSTER_PROPERTIES_ATTR);
                     ClusterSettings clusterSettings = new ClusterSettings();
                     clusterSettings.setClusterName(clusterName);
                     clusterSettings.setPropsFileName(propsFileName);
                     String defaultValue = getAttributeOrChildElement(cluster, ClusterSettings.DEFAULT_ELEMENT);
-                    if (defaultValue != null && defaultValue.length() > 0)
-                    {
+                    if (defaultValue != null && defaultValue.length() > 0) {
                         if (defaultValue.equalsIgnoreCase("true"))
                             clusterSettings.setDefault(true);
-                        else if (!defaultValue.equalsIgnoreCase("false"))
-                        {
+                        else if (!defaultValue.equalsIgnoreCase("false")) {
                             ConfigurationException e = new ConfigurationException();
-                            e.setMessage(10215, new Object[] {clusterName, defaultValue});
+                            e.setMessage(10215, new Object[]{clusterName, defaultValue});
                             throw e;
                         }
                     }
                     String ulb = getAttributeOrChildElement(cluster, ClusterSettings.URL_LOAD_BALANCING);
-                    if (ulb != null && ulb.length() > 0)
-                    {
+                    if (ulb != null && ulb.length() > 0) {
                         if (ulb.equalsIgnoreCase("false"))
                             clusterSettings.setURLLoadBalancing(false);
-                        else if (!ulb.equalsIgnoreCase("true"))
-                        {
+                        else if (!ulb.equalsIgnoreCase("true")) {
                             ConfigurationException e = new ConfigurationException();
-                            e.setMessage(10216, new Object[] {clusterName, ulb});
+                            e.setMessage(10216, new Object[]{clusterName, ulb});
                             throw e;
                         }
                     }
-                    ((ClientConfiguration)config).addClusterSettings(clusterSettings);
+                    ((ClientConfiguration) config).addClusterSettings(clusterSettings);
                 }
             }
         }
     }
 
-    private void serviceInclude(Node serviceInclude)
-    {
+    private void serviceInclude(Node serviceInclude) {
         // Validation
         allowedAttributesOrElements(serviceInclude, SERVICE_INCLUDE_CHILDREN);
 
         String src = getAttributeOrChildElement(serviceInclude, SRC_ATTR);
         String dir = getAttributeOrChildElement(serviceInclude, DIRECTORY_ATTR);
-        if (src.length() > 0)
-        {
+        if (src.length() > 0) {
             serviceIncludeFile(src);
-        }
-        else if (dir.length() > 0)
-        {
+        } else if (dir.length() > 0) {
             serviceIncludeDirectory(dir);
-        }
-        else
-        {
+        } else {
             // The include element ''{0}'' must specify either the ''{1}'' or ''{2}'' attribute.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(MISSING_INCLUDE_ATTRIBUTES, new Object[]{serviceInclude.getNodeName(), SRC_ATTR, DIRECTORY_ATTR});
@@ -453,40 +386,32 @@
         }
     }
 
-    private void serviceIncludeFile(String src)
-    {
+    private void serviceIncludeFile(String src) {
         Document doc = loadDocument(src, fileResolver.getIncludedFile(src));
-        if (fileResolver instanceof LocalFileResolver)
-        {
-            LocalFileResolver local = (LocalFileResolver)fileResolver;
-            ((ClientConfiguration)config).addConfigPath(local.getIncludedPath(src), local.getIncludedLastModified(src));
+        if (fileResolver instanceof LocalFileResolver) {
+            LocalFileResolver local = (LocalFileResolver) fileResolver;
+            ((ClientConfiguration) config).addConfigPath(local.getIncludedPath(src), local.getIncludedLastModified(src));
         }
 
         doc.getDocumentElement().normalize();
 
         // Check for multiple services defined in file.
         Node servicesNode = selectSingleNode(doc, SERVICES_ELEMENT);
-        if (servicesNode != null)
-        {
+        if (servicesNode != null) {
             allowedChildElements(servicesNode, SERVICES_CHILDREN);
             NodeList services = selectNodeList(servicesNode, SERVICES_ELEMENT);
-            for (int a = 0; a < services.getLength(); a++)
-            {
+            for (int a = 0; a < services.getLength(); a++) {
                 Node service = services.item(a);
                 service(service);
             }
             fileResolver.popIncludedFile();
-        }
-        else // Check for single service in file.
+        } else // Check for single service in file.
         {
             Node service = selectSingleNode(doc, "/" + SERVICE_ELEMENT);
-            if (service != null)
-            {
+            if (service != null) {
                 service(service);
                 fileResolver.popIncludedFile();
-            }
-            else
-            {
+            } else {
                 // The {0} root element in file {1} must be ''{2}'' or ''{3}''.
                 ConfigurationException ex = new ConfigurationException();
                 ex.setMessage(INVALID_INCLUDE_ROOT, new Object[]{SERVICE_INCLUDE_ELEMENT, src, SERVICES_ELEMENT, SERVICE_ELEMENT});
@@ -495,40 +420,32 @@
         }
     }
 
-    private void serviceIncludeDirectory(String dir)
-    {
+    private void serviceIncludeDirectory(String dir) {
         List files = fileResolver.getFiles(dir);
-        for (int i = 0; i < files.size(); i++)
-        {
+        for (int i = 0; i < files.size(); i++) {
             String src = (String) files.get(i);
             serviceIncludeFile(src);
         }
     }
 
-    private void service(Node service)
-    {
+    private void service(Node service) {
         // Validation
         requiredAttributesOrElements(service, SERVICE_REQ_CHILDREN);
         allowedAttributesOrElements(service, SERVICE_CHILDREN);
 
         String id = getAttributeOrChildElement(service, ID_ATTR);
-        if (isValidID(id))
-        {
+        if (isValidID(id)) {
             ServiceSettings serviceSettings = config.getServiceSettings(id);
-            if (serviceSettings == null)
-            {
+            if (serviceSettings == null) {
                 serviceSettings = new ServiceSettings(id);
                 // Service Properties
                 NodeList properties = selectNodeList(service, PROPERTIES_ELEMENT + "/*");
-                if (properties.getLength() > 0)
-                {
+                if (properties.getLength() > 0) {
                     ConfigMap map = properties(properties, getSourceFileOf(service));
                     serviceSettings.addProperties(map);
                 }
                 config.addServiceSettings(serviceSettings);
-            }
-            else
-            {
+            } else {
                 // Duplicate service definition '{0}'.
                 ConfigurationException e = new ConfigurationException();
                 e.setMessage(DUPLICATE_SERVICE_ERROR, new Object[]{id});
@@ -537,12 +454,9 @@
 
             // Service Class Name
             String className = getAttributeOrChildElement(service, CLASS_ATTR);
-            if (className.length() > 0)
-            {
+            if (className.length() > 0) {
                 serviceSettings.setClassName(className);
-            }
-            else
-            {
+            } else {
                 // Class not specified for {SERVICE_ELEMENT} '{id}'.
                 ConfigurationException ex = new ConfigurationException();
                 ex.setMessage(CLASS_NOT_SPECIFIED, new Object[]{SERVICE_ELEMENT, id});
@@ -553,23 +467,19 @@
 
             // Default Channels
             Node defaultChannels = selectSingleNode(service, DEFAULT_CHANNELS_ELEMENT);
-            if (defaultChannels != null)
-            {
+            if (defaultChannels != null) {
                 allowedChildElements(defaultChannels, DEFAULT_CHANNELS_CHILDREN);
                 NodeList channels = selectNodeList(defaultChannels, CHANNEL_ELEMENT);
-                for (int c = 0; c < channels.getLength(); c++)
-                {
+                for (int c = 0; c < channels.getLength(); c++) {
                     Node chan = channels.item(c);
-                    allowedAttributes(chan, new String[] {REF_ATTR});
+                    allowedAttributes(chan, new String[]{REF_ATTR});
                     defaultChannel(chan, serviceSettings);
                 }
             }
             // Fall back on application's default channels
-            else if (config.getDefaultChannels().size() > 0)
-            {
-                for (Iterator iter = config.getDefaultChannels().iterator(); iter.hasNext();)
-                {
-                    String channelId = (String)iter.next();
+            else if (config.getDefaultChannels().size() > 0) {
+                for (Iterator iter = config.getDefaultChannels().iterator(); iter.hasNext(); ) {
+                    String channelId = (String) iter.next();
                     ChannelSettings channel = config.getChannelSettings(channelId);
                     serviceSettings.addDefaultChannel(channel);
                 }
@@ -577,22 +487,18 @@
 
             // Destinations
             NodeList list = selectNodeList(service, DESTINATION_ELEMENT);
-            for (int i = 0; i < list.getLength(); i++)
-            {
+            for (int i = 0; i < list.getLength(); i++) {
                 Node dest = list.item(i);
                 destination(dest, serviceSettings);
             }
 
             // Destination Includes
             list = selectNodeList(service, DESTINATION_INCLUDE_ELEMENT);
-            for (int i = 0; i < list.getLength(); i++)
-            {
+            for (int i = 0; i < list.getLength(); i++) {
                 Node dest = list.item(i);
                 destinationInclude(dest, serviceSettings);
             }
-        }
-        else
-        {
+        } else {
             //Invalid {SERVICE_ELEMENT} id '{id}'.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(INVALID_ID, new Object[]{SERVICE_ELEMENT, id});
@@ -608,29 +514,23 @@
      * ;&lt;channel ref="channel-id" /&gt;<br />
      * &lt;default-channels&gt;
      * </p>
+     *
      * @param chan the channel node
      */
-    private void defaultChannel(Node chan)
-    {
+    private void defaultChannel(Node chan) {
         String ref = getAttributeOrChildElement(chan, REF_ATTR);
 
-        if (ref.length() > 0)
-        {
+        if (ref.length() > 0) {
             ChannelSettings channel = config.getChannelSettings(ref);
-            if (channel != null)
-            {
+            if (channel != null) {
                 config.addDefaultChannel(channel.getId());
-            }
-            else
-            {
+            } else {
                 // {0} not found for reference '{1}'
                 ConfigurationException e = new ConfigurationException();
                 e.setMessage(REF_NOT_FOUND, new Object[]{CHANNEL_ELEMENT, ref});
                 throw e;
             }
-        }
-        else
-        {
+        } else {
             //A default channel was specified without a reference for service '{0}'.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(INVALID_DEFAULT_CHANNEL, new Object[]{"MessageBroker"});
@@ -646,30 +546,24 @@
      * &lt;channel ref="channel-id" /&gt;<br />
      * &lt;default-channels&gt;
      * </p>
-     * @param chan the channel node
+     *
+     * @param chan            the channel node
      * @param serviceSettings service settings
      */
-    private void defaultChannel(Node chan, ServiceSettings serviceSettings)
-    {
+    private void defaultChannel(Node chan, ServiceSettings serviceSettings) {
         String ref = getAttributeOrChildElement(chan, REF_ATTR).trim();
 
-        if (ref.length() > 0)
-        {
+        if (ref.length() > 0) {
             ChannelSettings channel = config.getChannelSettings(ref);
-            if (channel != null)
-            {
+            if (channel != null) {
                 serviceSettings.addDefaultChannel(channel);
-            }
-            else
-            {
+            } else {
                 // {0} not found for reference '{1}'
                 ConfigurationException e = new ConfigurationException();
                 e.setMessage(REF_NOT_FOUND, new Object[]{CHANNEL_ELEMENT, ref});
                 throw e;
             }
-        }
-        else
-        {
+        } else {
             //A default channel was specified without a reference for service '{0}'.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(INVALID_DEFAULT_CHANNEL, new Object[]{serviceSettings.getId()});
@@ -677,23 +571,17 @@
         }
     }
 
-    private void destinationInclude(Node destInclude, ServiceSettings serviceSettings)
-    {
+    private void destinationInclude(Node destInclude, ServiceSettings serviceSettings) {
         // Validation
         allowedAttributesOrElements(destInclude, DESTINATION_INCLUDE_CHILDREN);
 
         String src = getAttributeOrChildElement(destInclude, SRC_ATTR);
         String dir = getAttributeOrChildElement(destInclude, DIRECTORY_ATTR);
-        if (src.length() > 0)
-        {
+        if (src.length() > 0) {
             destinationIncludeFile(serviceSettings, src);
-        }
-        else if (dir.length() > 0)
-        {
+        } else if (dir.length() > 0) {
             destinationIncludeDirectory(serviceSettings, dir);
-        }
-        else
-        {
+        } else {
             // The include element ''{0}'' must specify either the ''{1}'' or ''{2}'' attribute.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(MISSING_INCLUDE_ATTRIBUTES, new Object[]{destInclude.getNodeName(), SRC_ATTR, DIRECTORY_ATTR});
@@ -701,50 +589,40 @@
         }
     }
 
-    private void destinationIncludeDirectory(ServiceSettings serviceSettings, String dir)
-    {
+    private void destinationIncludeDirectory(ServiceSettings serviceSettings, String dir) {
         List files = fileResolver.getFiles(dir);
-        for (int i = 0; i < files.size(); i++)
-        {
+        for (int i = 0; i < files.size(); i++) {
             String src = (String) files.get(i);
             destinationIncludeFile(serviceSettings, src);
         }
     }
 
-    private void destinationIncludeFile(ServiceSettings serviceSettings, String src)
-    {
+    private void destinationIncludeFile(ServiceSettings serviceSettings, String src) {
         Document doc = loadDocument(src, fileResolver.getIncludedFile(src));
-        if (fileResolver instanceof LocalFileResolver)
-        {
-            LocalFileResolver local = (LocalFileResolver)fileResolver;
-            ((ClientConfiguration)config).addConfigPath(local.getIncludedPath(src), local.getIncludedLastModified(src));
+        if (fileResolver instanceof LocalFileResolver) {
+            LocalFileResolver local = (LocalFileResolver) fileResolver;
+            ((ClientConfiguration) config).addConfigPath(local.getIncludedPath(src), local.getIncludedLastModified(src));
         }
 
         doc.getDocumentElement().normalize();
 
         // Check for multiple destination defined in file.
         Node destinationsNode = selectSingleNode(doc, DESTINATIONS_ELEMENT);
-        if (destinationsNode != null)
-        {
+        if (destinationsNode != null) {
             allowedChildElements(destinationsNode, DESTINATIONS_CHILDREN);
             NodeList destinations = selectNodeList(destinationsNode, DESTINATION_ELEMENT);
-            for (int a = 0; a < destinations.getLength(); a++)
-            {
+            for (int a = 0; a < destinations.getLength(); a++) {
                 Node dest = destinations.item(a);
                 destination(dest, serviceSettings);
             }
             fileResolver.popIncludedFile();
-        }
-        else // Check for single destination definition.
+        } else // Check for single destination definition.
         {
             Node dest = selectSingleNode(doc, "/" + DESTINATION_ELEMENT);
-            if (dest != null)
-            {
+            if (dest != null) {
                 destination(dest, serviceSettings);
                 fileResolver.popIncludedFile();
-            }
-            else
-            {
+            } else {
                 // The {0} root element in file {1} must be ''{2}'' or ''{3}''.
                 ConfigurationException ex = new ConfigurationException();
                 ex.setMessage(INVALID_INCLUDE_ROOT, new Object[]{DESTINATION_INCLUDE_ELEMENT, src, DESTINATIONS_ELEMENT, DESTINATION_ELEMENT});
@@ -753,8 +631,7 @@
         }
     }
 
-    private void destination(Node dest, ServiceSettings serviceSettings)
-    {
+    private void destination(Node dest, ServiceSettings serviceSettings) {
         // Validation
         requiredAttributesOrElements(dest, DESTINATION_REQ_CHILDREN);
         allowedAttributes(dest, DESTINATION_ATTR);
@@ -764,11 +641,9 @@
 
         DestinationSettings destinationSettings;
         String id = getAttributeOrChildElement(dest, ID_ATTR);
-        if (isValidID(id))
-        {
-            destinationSettings = (DestinationSettings)serviceSettings.getDestinationSettings().get(id);
-            if (destinationSettings != null)
-            {
+        if (isValidID(id)) {
+            destinationSettings = (DestinationSettings) serviceSettings.getDestinationSettings().get(id);
+            if (destinationSettings != null) {
                 // Duplicate destination definition '{id}' in service '{serviceId}'.
                 ConfigurationException e = new ConfigurationException();
                 e.setMessage(DUPLICATE_DESTINATION_ERROR, new Object[]{id, serviceId});
@@ -777,9 +652,7 @@
 
             destinationSettings = new DestinationSettings(id);
             serviceSettings.addDestinationSettings(destinationSettings);
-        }
-        else
-        {
+        } else {
             //Invalid {DESTINATION_ELEMENT} id '{id}' for service '{serviceId}'.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(INVALID_ID_IN_SERVICE, new Object[]{DESTINATION_ELEMENT, id, serviceId});
@@ -788,8 +661,7 @@
 
         // Destination Properties
         NodeList properties = selectNodeList(dest, PROPERTIES_ELEMENT + "/*");
-        if (properties.getLength() > 0)
-        {
+        if (properties.getLength() > 0) {
             ConfigMap map = properties(properties, getSourceFileOf(dest));
             destinationSettings.addProperties(map);
         }
@@ -799,68 +671,51 @@
 
     }
 
-    private void destinationChannels(Node dest, DestinationSettings destinationSettings, ServiceSettings serviceSettings)
-    {
+    private void destinationChannels(Node dest, DestinationSettings destinationSettings, ServiceSettings serviceSettings) {
         String destId = destinationSettings.getId();
 
         // Channels attribute
         String channelsList = evaluateExpression(dest, "@" + CHANNELS_ATTR).toString().trim();
-        if (channelsList.length() > 0)
-        {
+        if (channelsList.length() > 0) {
             StringTokenizer st = new StringTokenizer(channelsList, LIST_DELIMITERS);
-            while (st.hasMoreTokens())
-            {
+            while (st.hasMoreTokens()) {
                 String ref = st.nextToken().trim();
                 ChannelSettings channel = config.getChannelSettings(ref);
-                if (channel != null)
-                {
+                if (channel != null) {
                     destinationSettings.addChannelSettings(channel);
-                }
-                else
-                {
+                } else {
                     // {CHANNEL_ELEMENT} not found for reference '{ref}' in destination '{destId}'.
                     ConfigurationException ex = new ConfigurationException();
                     ex.setMessage(REF_NOT_FOUND_IN_DEST, new Object[]{CHANNEL_ELEMENT, ref, destId});
                     throw ex;
                 }
             }
-        }
-        else
-        {
+        } else {
             // Channels element
             Node channelsNode = selectSingleNode(dest, CHANNELS_ELEMENT);
-            if (channelsNode != null)
-            {
+            if (channelsNode != null) {
                 allowedChildElements
-                    (channelsNode, DESTINATION_CHANNELS_CHILDREN);
+                        (channelsNode, DESTINATION_CHANNELS_CHILDREN);
                 NodeList channels = selectNodeList(channelsNode, CHANNEL_ELEMENT);
-                if (channels.getLength() > 0)
-                {
-                    for (int c = 0; c < channels.getLength(); c++)
-                    {
+                if (channels.getLength() > 0) {
+                    for (int c = 0; c < channels.getLength(); c++) {
                         Node chan = channels.item(c);
 
                         // Validation
                         requiredAttributesOrElements(chan, DESTINATION_CHANNEL_REQ_CHILDREN);
 
                         String ref = getAttributeOrChildElement(chan, REF_ATTR).trim();
-                        if (ref.length() > 0)
-                        {
+                        if (ref.length() > 0) {
                             ChannelSettings channel = config.getChannelSettings(ref);
-                            if (channel != null)
-                            {
+                            if (channel != null) {
                                 destinationSettings.addChannelSettings(channel);
-                            }
-                            else
-                            {
+                            } else {
                                 // {CHANNEL_ELEMENT} not found for reference '{ref}' in destination '{destId}'.
                                 ConfigurationException ex = new ConfigurationException();
                                 ex.setMessage(REF_NOT_FOUND_IN_DEST, new Object[]{CHANNEL_ELEMENT, ref, destId});
                                 throw ex;
                             }
-                        }
-                        else
-                        {
+                        } else {
                             //Invalid {0} ref '{1}' in destination '{2}'.
                             ConfigurationException ex = new ConfigurationException();
                             ex.setMessage(INVALID_REF_IN_DEST, new Object[]{CHANNEL_ELEMENT, ref, destId});
@@ -868,22 +723,18 @@
                         }
                     }
                 }
-            }
-            else
-            {
+            } else {
                 // Finally, we fall back to the service's default channels
                 List defaultChannels = serviceSettings.getDefaultChannels();
                 Iterator it = defaultChannels.iterator();
-                while (it.hasNext())
-                {
-                    ChannelSettings channel = (ChannelSettings)it.next();
+                while (it.hasNext()) {
+                    ChannelSettings channel = (ChannelSettings) it.next();
                     destinationSettings.addChannelSettings(channel);
                 }
             }
         }
 
-        if (destinationSettings.getChannelSettings().size() <= 0)
-        {
+        if (destinationSettings.getChannelSettings().size() <= 0) {
             // Destination '{id}' must specify at least one channel.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(DEST_NEEDS_CHANNEL, new Object[]{destId});
@@ -891,61 +742,47 @@
         }
     }
 
-    private void flexClient(Node root)
-    {
+    private void flexClient(Node root) {
         Node flexClient = selectSingleNode(root, FLEX_CLIENT_ELEMENT);
-        if (flexClient != null)
-        {
+        if (flexClient != null) {
             FlexClientSettings flexClientSettings = new FlexClientSettings();
             // Reliable reconnect duration millis
             String reliableReconnectDurationMillis = getAttributeOrChildElement(flexClient, FLEX_CLIENT_RELIABLE_RECONNECT_DURATION_MILLIS);
-            if (reliableReconnectDurationMillis.length() > 0)
-            {
-                try
-                {
+            if (reliableReconnectDurationMillis.length() > 0) {
+                try {
                     int millis = Integer.parseInt(reliableReconnectDurationMillis);
-                    if (millis < 0)
-                    {
+                    if (millis < 0) {
                         ConfigurationException e = new ConfigurationException();
                         e.setMessage(INVALID_FLEX_CLIENT_RELIABLE_RECONNECT_DURATION_MILLIS, new Object[]{reliableReconnectDurationMillis});
                         throw e;
                     }
                     flexClientSettings.setReliableReconnectDurationMillis(millis);
-                }
-                catch (NumberFormatException nfe)
-                {
+                } catch (NumberFormatException nfe) {
                     ConfigurationException e = new ConfigurationException();
                     e.setMessage(INVALID_FLEX_CLIENT_RELIABLE_RECONNECT_DURATION_MILLIS, new Object[]{reliableReconnectDurationMillis});
                     throw e;
                 }
-            }
-            else
-            {
+            } else {
                 flexClientSettings.setReliableReconnectDurationMillis(0); // Default is 0.
             }
             // heartbeat interval millis
             String heartbeatIntervalMillis = getAttributeOrChildElement(flexClient, FLEX_CLIENT_HEARTBEAT_INTERVAL_MILLIS);
-            if (heartbeatIntervalMillis.length() > 0)
-            {
-                try
-                {
+            if (heartbeatIntervalMillis.length() > 0) {
+                try {
                     int millis = Integer.parseInt(heartbeatIntervalMillis);
-                    if (millis < 0)
-                    {
+                    if (millis < 0) {
                         ConfigurationException e = new ConfigurationException();
-                        e.setMessage(INVALID_FLEX_CLIENT_HEARTBEAT_INTERVAL_MILLIS, new Object[] {heartbeatIntervalMillis});
+                        e.setMessage(INVALID_FLEX_CLIENT_HEARTBEAT_INTERVAL_MILLIS, new Object[]{heartbeatIntervalMillis});
                         throw e;
                     }
                     flexClientSettings.setHeartbeatIntervalMillis(millis);
-                }
-                catch (NumberFormatException nfe)
-                {
+                } catch (NumberFormatException nfe) {
                     ConfigurationException e = new ConfigurationException();
-                    e.setMessage(INVALID_FLEX_CLIENT_HEARTBEAT_INTERVAL_MILLIS, new Object[] {heartbeatIntervalMillis});
+                    e.setMessage(INVALID_FLEX_CLIENT_HEARTBEAT_INTERVAL_MILLIS, new Object[]{heartbeatIntervalMillis});
                     throw e;
                 }
             }
-            ((ClientConfiguration)config).setFlexClientSettings(flexClientSettings);
+            ((ClientConfiguration) config).setFlexClientSettings(flexClientSettings);
         }
     }
 }
diff --git a/common/src/main/java/flex/messaging/config/ClusterSettings.java b/common/src/main/java/flex/messaging/config/ClusterSettings.java
index beb64fd..9f317c2 100644
--- a/common/src/main/java/flex/messaging/config/ClusterSettings.java
+++ b/common/src/main/java/flex/messaging/config/ClusterSettings.java
@@ -19,8 +19,7 @@
 /**
  *
  */
-public class ClusterSettings extends PropertiesSettings
-{
+public class ClusterSettings extends PropertiesSettings {
     public static final String CLUSTER_ELEMENT = "cluster";
     public static final String REF_ATTR = "ref";
     public static final String SHARED_BACKEND_ATTR = "shared-backend";
@@ -39,8 +38,7 @@
     /**
      * Creates a new <code>ClusterSettings</code> with default settings.
      */
-    public ClusterSettings()
-    {
+    public ClusterSettings() {
         def = false;
         urlLoadBalancing = true;
         implementationClass = JGROUPS_CLUSTER;
@@ -51,8 +49,7 @@
      *
      * @return The name of the cluster.
      */
-    public String getClusterName()
-    {
+    public String getClusterName() {
         return clusterName;
     }
 
@@ -61,8 +58,7 @@
      *
      * @param clusterName The name of the cluster.
      */
-    public void setClusterName(String clusterName)
-    {
+    public void setClusterName(String clusterName) {
         this.clusterName = clusterName;
     }
 
@@ -71,8 +67,7 @@
      *
      * @return <code>true</code> is the cluster is default; otherwise <code>false</code>.
      */
-    public boolean isDefault()
-    {
+    public boolean isDefault() {
         return def;
     }
 
@@ -81,8 +76,7 @@
      *
      * @param def <code>true</code> is the cluster is default; otherwise <code>false</code>.
      */
-    public void setDefault(boolean def)
-    {
+    public void setDefault(boolean def) {
         this.def = def;
     }
 
@@ -91,8 +85,7 @@
      *
      * @return The properties file of the cluster.
      */
-    public String getPropsFileName()
-    {
+    public String getPropsFileName() {
         return propsFileName;
     }
 
@@ -101,8 +94,7 @@
      *
      * @param propsFileName The properties file of the cluster.
      */
-    public void setPropsFileName(String propsFileName)
-    {
+    public void setPropsFileName(String propsFileName) {
         this.propsFileName = propsFileName;
     }
 
@@ -111,8 +103,7 @@
      *
      * @return <code>true</code> if the url load balancing is enabled; otherwise <code>false</code>.
      */
-    public boolean getURLLoadBalancing()
-    {
+    public boolean getURLLoadBalancing() {
         return urlLoadBalancing;
     }
 
@@ -121,8 +112,7 @@
      *
      * @param ulb <code>true</code> if the url load balancing is enabled; otherwise <code>false</code>.
      */
-    public void setURLLoadBalancing(boolean ulb)
-    {
+    public void setURLLoadBalancing(boolean ulb) {
         urlLoadBalancing = ulb;
     }
 
@@ -131,10 +121,8 @@
      * The default is 'flex.messaging.cluster.JGroupsCluster'.
      *
      * @param className name of the cluster implementation class
-     *
      */
-    public void setImplementationClass(String className)
-    {
+    public void setImplementationClass(String className) {
         this.implementationClass = className;
     }
 
@@ -143,10 +131,8 @@
      * The class must support the flex.messaging.cluster.Cluster interface.
      *
      * @return The implementation class name.
-     *
      */
-    public String getImplementationClass()
-    {
+    public String getImplementationClass() {
         return implementationClass;
     }
 }
diff --git a/common/src/main/java/flex/messaging/config/ConfigMap.java b/common/src/main/java/flex/messaging/config/ConfigMap.java
index c2bd780..c0d7b6c 100644
--- a/common/src/main/java/flex/messaging/config/ConfigMap.java
+++ b/common/src/main/java/flex/messaging/config/ConfigMap.java
@@ -34,8 +34,7 @@
  * for getting properties from the Map, cast to a certain type and allows a
  * default to be specified in the event that the property is missing.
  */
-public class ConfigMap extends LinkedHashMap
-{
+public class ConfigMap extends LinkedHashMap {
     /**
      * This number was generated using the 'serialver' command line tool.
      * This number should remain consistent with the version used by
@@ -50,13 +49,13 @@
 
     /**
      * An *undocumented* system property can be used to revert to legacy config property handling:
-     *   Legacy behavior - config property values were not trimmed, retaining leading/trailing whitespace which
-     *                     proved problematic for customers.
-     *   New default behavior - config property values are trimmed.
+     * Legacy behavior - config property values were not trimmed, retaining leading/trailing whitespace which
+     * proved problematic for customers.
+     * New default behavior - config property values are trimmed.
      */
-    private static final String SYSPROPNAME_TRIM_CONFIG_PROPERTY_VALUES = "flex.trim-config-property-values";    
+    private static final String SYSPROPNAME_TRIM_CONFIG_PROPERTY_VALUES = "flex.trim-config-property-values";
     private static final boolean TRIM_CONFIG_PROPERTY_VALUES = Boolean.valueOf(System.getProperty(SYSPROPNAME_TRIM_CONFIG_PROPERTY_VALUES, "true")).booleanValue();
-    
+
     /**
      * Map to keep track of accessed properties.
      */
@@ -66,8 +65,7 @@
      * Constructs an empty <code>ConfigMap</code> with the default initial
      * capacity of 10.
      */
-    public ConfigMap()
-    {
+    public ConfigMap() {
         super();
     }
 
@@ -75,10 +73,9 @@
      * Constructs a new <code>ConfigMap</code> with the initial
      * capacity specified.
      *
-     * @param  initialCapacity the initial capacity.
+     * @param initialCapacity the initial capacity.
      */
-    public ConfigMap(int initialCapacity)
-    {
+    public ConfigMap(int initialCapacity) {
         super(initialCapacity);
     }
 
@@ -87,10 +84,9 @@
      * from the supplied map to this map.
      *
      * @param m a <code>ConfigMap</code> whose properties are to be added to
-     * this <code>ConfigMap</code>.
+     *          this <code>ConfigMap</code>.
      */
-    public ConfigMap(ConfigMap m)
-    {
+    public ConfigMap(ConfigMap m) {
         this();
         addProperties(m);
     }
@@ -99,22 +95,17 @@
      * Adds all properties from a map to this map.
      *
      * @param p a <code>ConfigMap</code> whose properties are to be added to
-     * this <code>ConfigMap</code>.
+     *          this <code>ConfigMap</code>.
      */
-    public void addProperties(ConfigMap p)
-    {
+    public void addProperties(ConfigMap p) {
         Iterator it = p.entrySet().iterator();
-        while (it.hasNext())
-        {
+        while (it.hasNext()) {
             Map.Entry entry = (Map.Entry) it.next();
             Object key = entry.getKey();
             Object value = entry.getValue();
-            if (value instanceof ValueList)
-            {
+            if (value instanceof ValueList) {
                 addProperties(key, (ValueList) value);
-            }
-            else
-            {
+            } else {
                 addPropertyLogic(key, value);
             }
         }
@@ -123,18 +114,14 @@
     /**
      * Helper method to add a list of values under a key.
      *
-     * @param key The key to add the values under.
+     * @param key    The key to add the values under.
      * @param values The list of values to add.
      */
-    private void addProperties(Object key, ValueList values)
-    {
+    private void addProperties(Object key, ValueList values) {
         ValueList list = getValueList(key);
-        if (list == null)
-        {
+        if (list == null) {
             put(key, values.clone());
-        }
-        else
-        {
+        } else {
             list.addAll(values);
         }
     }
@@ -142,24 +129,19 @@
     /**
      * Helper method to add a value under a key.
      *
-     * @param key The key to add the value under.
+     * @param key   The key to add the value under.
      * @param value The value to add.
      */
-    private void addPropertyLogic(Object key, Object value)
-    {
+    private void addPropertyLogic(Object key, Object value) {
         ValueList list = getValueList(key);
-        if (list == null)
-        {
+        if (list == null) {
             put(key, value);
-        }
-        else
-        {
+        } else {
             list.add(value);
         }
     }
 
-    private static class ValueList extends ArrayList
-    {
+    private static class ValueList extends ArrayList {
         /**
          * Serial version id.
          */
@@ -172,22 +154,16 @@
      * @param key The key.
      * @return A list of values associated with the key.
      */
-    private ValueList getValueList(Object key)
-    {
+    private ValueList getValueList(Object key) {
         ValueList list;
         Object old = super.get(key);
-        if (old instanceof ValueList)
-        {
+        if (old instanceof ValueList) {
             list = (ValueList) old;
-        }
-        else if (old != null)
-        {
+        } else if (old != null) {
             list = new ValueList();
             list.add(old);
             put(key, list);
-        }
-        else
-        {
+        } else {
             list = null;
         }
         return list;
@@ -200,8 +176,7 @@
      * @param name  the property name
      * @param value the property value
      */
-    public void addProperty(String name, String value)
-    {
+    public void addProperty(String name, String value) {
         addPropertyLogic(name, TRIM_CONFIG_PROPERTY_VALUES && value != null ? value.trim() : value);
     }
 
@@ -212,8 +187,7 @@
      * @param name  the property name
      * @param value the property value
      */
-    public void addProperty(String name, ConfigMap value)
-    {
+    public void addProperty(String name, ConfigMap value) {
         addPropertyLogic(name, value);
     }
 
@@ -222,8 +196,7 @@
      *
      * @return a <code>Set</code> of property name <code>String</code>s.
      */
-    public Set propertyNames()
-    {
+    public Set propertyNames() {
         return keySet();
     }
 
@@ -231,10 +204,9 @@
      * Sets a property name as allowed without needing to access the property
      * value. This marks a property as allowed for validation purposes.
      *
-     * @param name  the property name to allow
+     * @param name the property name to allow
      */
-    public void allowProperty(String name)
-    {
+    public void allowProperty(String name) {
         accessedKeys.add(name);
     }
 
@@ -242,12 +214,11 @@
      * Gets the value for the given property name. Also records that this
      * property was accessed.
      *
-     * @param name  the property name
+     * @param name the property name
      * @return the value for the property, or null if property does not exist
      * in this map.
      */
-    public Object get(Object name)
-    {
+    public Object get(Object name) {
         accessedKeys.add(name);
         return super.get(name);
     }
@@ -258,14 +229,12 @@
      * @param name The property name.
      * @return The property object.
      */
-    private Object getSinglePropertyOrFail(Object name)
-    {
+    private Object getSinglePropertyOrFail(Object name) {
         Object result = get(name);
-        if (result instanceof ValueList)
-        {
+        if (result instanceof ValueList) {
             ConfigurationException exception = new ConfigurationException();
             exception.setMessage
-                (UNEXPECTED_MULTIPLE_VALUES, new Object[] {name});
+                    (UNEXPECTED_MULTIPLE_VALUES, new Object[]{name});
             throw exception;
         }
         return result;
@@ -277,8 +246,7 @@
      * @param name The property name.
      * @return The property name.
      */
-    public String getProperty(String name)
-    {
+    public String getProperty(String name) {
         return getPropertyAsString(name, null);
     }
 
@@ -286,16 +254,14 @@
      * Gets the property with the specified name as a ConfigMap if possible,
      * or returns the default value if the property is undefined.
      *
-     * @param name the property name
+     * @param name         the property name
      * @param defaultValue the default value
      * @return ConfigMap the ConfigMap object of the property
      */
-    public ConfigMap getPropertyAsMap(String name, ConfigMap defaultValue)
-    {
+    public ConfigMap getPropertyAsMap(String name, ConfigMap defaultValue) {
         Object prop = getSinglePropertyOrFail(name);
-        if (prop instanceof ConfigMap)
-        {
-            return (ConfigMap)prop;
+        if (prop instanceof ConfigMap) {
+            return (ConfigMap) prop;
         }
         return defaultValue;
     }
@@ -304,16 +270,14 @@
      * Gets the property with the specified name as a String if possible,
      * or returns the default value if the property is undefined.
      *
-     * @param name the property name
+     * @param name         the property name
      * @param defaultValue the default value
      * @return String the String value of the property
      */
-    public String getPropertyAsString(String name, String defaultValue)
-    {
+    public String getPropertyAsString(String name, String defaultValue) {
         Object prop = getSinglePropertyOrFail(name);
-        if (prop instanceof String)
-        {
-            return (String)prop;
+        if (prop instanceof String) {
+            return (String) prop;
         }
         return defaultValue;
     }
@@ -322,22 +286,17 @@
      * Gets a property (or set of properties) as a List. If only one
      * property exists it is added as the only entry to a new List.
      *
-     * @param name  the property name
-     * @param defaultValue  the value to return if the property is not found
+     * @param name         the property name
+     * @param defaultValue the value to return if the property is not found
      * @return the value for the property as a List if it exists in this map,
      * otherwise the defaultValue is returned.
      */
-    public List getPropertyAsList(String name, List defaultValue)
-    {
+    public List getPropertyAsList(String name, List defaultValue) {
         Object prop = get(name);
-        if (prop != null)
-        {
-            if (prop instanceof List)
-            {
+        if (prop != null) {
+            if (prop instanceof List) {
                 return (List) prop;
-            }
-            else
-            {
+            } else {
                 List list = new ArrayList();
                 list.add(prop);
                 return list;
@@ -350,16 +309,14 @@
      * Gets the property with the specified name as a boolean if possible,
      * or returns the default value if the property is undefined.
      *
-     * @param name the property name
+     * @param name         the property name
      * @param defaultValue the default value
      * @return boolean the boolean value of the property
      */
-    public boolean getPropertyAsBoolean(String name, boolean defaultValue)
-    {
+    public boolean getPropertyAsBoolean(String name, boolean defaultValue) {
         Object prop = getSinglePropertyOrFail(name);
-        if (prop instanceof String)
-        {
-            return Boolean.valueOf((String)prop).booleanValue();
+        if (prop instanceof String) {
+            return Boolean.valueOf((String) prop).booleanValue();
         }
         return defaultValue;
     }
@@ -368,21 +325,16 @@
      * Gets the property with the specified name as an int if possible,
      * or returns the default value if the property is undefined.
      *
-     * @param name the property name
+     * @param name         the property name
      * @param defaultValue the default value
      * @return int the int value of the property
      */
-    public int getPropertyAsInt(String name, int defaultValue)
-    {
+    public int getPropertyAsInt(String name, int defaultValue) {
         Object prop = getSinglePropertyOrFail(name);
-        if (prop instanceof String)
-        {
-            try
-            {
-                return Integer.parseInt((String)prop);
-            }
-            catch (NumberFormatException ex)
-            {
+        if (prop instanceof String) {
+            try {
+                return Integer.parseInt((String) prop);
+            } catch (NumberFormatException ex) {
             }
         }
         return defaultValue;
@@ -392,21 +344,16 @@
      * Gets the property with the specified name as a long if possible,
      * or returns the default value if the property is undefined.
      *
-     * @param name the property name
+     * @param name         the property name
      * @param defaultValue the default value
      * @return long the long value of the property
      */
-    public long getPropertyAsLong(String name, long defaultValue)
-    {
+    public long getPropertyAsLong(String name, long defaultValue) {
         Object prop = getSinglePropertyOrFail(name);
-        if (prop instanceof String)
-        {
-            try
-            {
-                return Long.parseLong((String)prop);
-            }
-            catch (NumberFormatException ex)
-            {
+        if (prop instanceof String) {
+            try {
+                return Long.parseLong((String) prop);
+            } catch (NumberFormatException ex) {
             }
         }
         return defaultValue;
@@ -418,8 +365,7 @@
      *
      * @return List a list of unused properties
      */
-    public List findAllUnusedProperties()
-    {
+    public List findAllUnusedProperties() {
         List result = new ArrayList();
         findUnusedProperties("", true, result);
         return result;
@@ -432,35 +378,28 @@
      * unknown or unexpected.
      *
      * @param parentPath Used to track the depth of property in a potential
-     * hierarchy of <code>ConfigMap</code>s.
-     * @param recurse Whether sub maps should be recursively searched.
-     * @param result the collection of unused properties in this map.
+     *                   hierarchy of <code>ConfigMap</code>s.
+     * @param recurse    Whether sub maps should be recursively searched.
+     * @param result     the collection of unused properties in this map.
      */
     public void findUnusedProperties
-        (String parentPath, boolean recurse, Collection result)
-    {
+    (String parentPath, boolean recurse, Collection result) {
         Iterator itr = entrySet().iterator();
-        while (itr.hasNext())
-        {
+        while (itr.hasNext()) {
             Map.Entry entry = (Map.Entry) itr.next();
             Object key = entry.getKey();
             String currentPath = parentPath + '/' + String.valueOf(key);
-            if (!accessedKeys.contains(key))
-            {
+            if (!accessedKeys.contains(key)) {
                 result.add(currentPath);
-            }
-            else if (recurse)
-            {
+            } else if (recurse) {
                 Object value = entry.getValue();
                 List values = value instanceof List ?
-                              (List) value : Collections.singletonList(value);
-                for (int i = 0; i < values.size(); i++)
-                {
+                        (List) value : Collections.singletonList(value);
+                for (int i = 0; i < values.size(); i++) {
                     Object child = values.get(i);
-                    if (child instanceof ConfigMap)
-                    {
+                    if (child instanceof ConfigMap) {
                         ((ConfigMap) child).findUnusedProperties
-                            (currentPath, recurse, result);
+                                (currentPath, recurse, result);
                     }
                 }
             }
diff --git a/common/src/main/java/flex/messaging/config/ConfigurationConstants.java b/common/src/main/java/flex/messaging/config/ConfigurationConstants.java
index 35fcf34..14b8825 100644
--- a/common/src/main/java/flex/messaging/config/ConfigurationConstants.java
+++ b/common/src/main/java/flex/messaging/config/ConfigurationConstants.java
@@ -19,8 +19,7 @@
 /**
  *
  */
-public interface ConfigurationConstants
-{
+public interface ConfigurationConstants {
     String CONTEXT_PATH_TOKEN = "{context.root}";
     String CONTEXT_PATH_ALT_TOKEN = "{context-root}";
     String SLASH_CONTEXT_PATH_TOKEN = "/{context.root}";
@@ -44,7 +43,7 @@
     String DIRECTORY_ATTR = "directory-path";
     String ID_ATTR = "id";
     String CLASS_ATTR = "class";
-    String PER_CLIENT_AUTH="per-client-authentication";
+    String PER_CLIENT_AUTH = "per-client-authentication";
     String MESSAGE_TYPES_ATTR = "messageTypes";
 
     String PROPERTIES_ELEMENT = "properties";
@@ -126,7 +125,7 @@
 
     // System
     String SYSTEM_ELEMENT = "system";
-    String ENFORCE_ENDOINT_VALIDATION ="enforce-endpoint-validation";
+    String ENFORCE_ENDOINT_VALIDATION = "enforce-endpoint-validation";
     String LOCALE_ELEMENT = "locale";
     String MANAGEABLE_ELEMENT = "manageable";
     String DEFAULT_LOCALE_ELEMENT = "default-locale";
@@ -162,145 +161,145 @@
 
     // Top Level
     String[] SERVICES_CONFIG_CHILDREN = {
-        SERVICES_ELEMENT, SECURITY_ELEMENT, SERVERS_ELEMENT, CHANNELS_ELEMENT, LOGGING_ELEMENT,
-        SYSTEM_ELEMENT, CLUSTERS_ELEMENT, FACTORIES_ELEMENT, FLEX_CLIENT_ELEMENT,
-        ASYNC_MESSAGE_FILTERS_ELEMENT, SYNC_MESSAGE_FILTERS_ELEMENT, VALIDATORS_ELEMENT
+            SERVICES_ELEMENT, SECURITY_ELEMENT, SERVERS_ELEMENT, CHANNELS_ELEMENT, LOGGING_ELEMENT,
+            SYSTEM_ELEMENT, CLUSTERS_ELEMENT, FACTORIES_ELEMENT, FLEX_CLIENT_ELEMENT,
+            ASYNC_MESSAGE_FILTERS_ELEMENT, SYNC_MESSAGE_FILTERS_ELEMENT, VALIDATORS_ELEMENT
     };
 
     // Services
     String[] SERVICES_CHILDREN = {
-        SERVICE_ELEMENT, SERVICE_INCLUDE_ELEMENT, DEFAULT_CHANNELS_ELEMENT
+            SERVICE_ELEMENT, SERVICE_INCLUDE_ELEMENT, DEFAULT_CHANNELS_ELEMENT
     };
 
     String[] SERVICE_INCLUDE_CHILDREN = {
-        SRC_ATTR, DIRECTORY_ATTR
+            SRC_ATTR, DIRECTORY_ATTR
     };
 
     String[] SERVICE_CHILDREN = {
-        ID_ATTR, CLASS_ATTR, MESSAGE_TYPES_ATTR, PROPERTIES_ELEMENT,
-        ADAPTERS_ELEMENT, DEFAULT_CHANNELS_ELEMENT, DEFAULT_SECURITY_CONSTRAINT_ELEMENT,
-        DESTINATION_INCLUDE_ELEMENT, DESTINATION_ELEMENT
+            ID_ATTR, CLASS_ATTR, MESSAGE_TYPES_ATTR, PROPERTIES_ELEMENT,
+            ADAPTERS_ELEMENT, DEFAULT_CHANNELS_ELEMENT, DEFAULT_SECURITY_CONSTRAINT_ELEMENT,
+            DESTINATION_INCLUDE_ELEMENT, DESTINATION_ELEMENT
     };
 
     String[] SERVICE_REQ_CHILDREN = {
-        ID_ATTR, CLASS_ATTR
+            ID_ATTR, CLASS_ATTR
     };
 
     String[] ADAPTER_DEFINITION_CHILDREN = {
-        ID_ATTR, CLASS_ATTR, DEFAULT_ATTR, PROPERTIES_ELEMENT
+            ID_ATTR, CLASS_ATTR, DEFAULT_ATTR, PROPERTIES_ELEMENT
     };
 
     String[] ADAPTER_DEFINITION_REQ_CHILDREN = {
-        ID_ATTR, CLASS_ATTR
+            ID_ATTR, CLASS_ATTR
     };
 
     String[] DESTINATION_INCLUDE_CHILDREN = {
-        SRC_ATTR, DIRECTORY_ATTR
+            SRC_ATTR, DIRECTORY_ATTR
     };
 
     String[] ADAPTERS_CHILDREN = {
-        ADAPTER_DEFINITION_ELEMENT, ADAPTER_INCLUDE_ELEMENT
+            ADAPTER_DEFINITION_ELEMENT, ADAPTER_INCLUDE_ELEMENT
     };
 
     String[] ADAPTER_INCLUDE_CHILDREN = {
-        SRC_ATTR, DIRECTORY_ATTR
+            SRC_ATTR, DIRECTORY_ATTR
     };
 
     String[] DEFAULT_CHANNELS_CHILDREN = {
-        CHANNEL_ELEMENT
+            CHANNEL_ELEMENT
     };
 
     String[] FLEX_CLIENT_CHILDREN = {
-        FLEX_CLIENT_TIMEOUT_MINUTES_ELEMENT, FLEX_CLIENT_OUTBOUND_QUEUE_PROCESSOR_ELEMENT,
-        ADAPTIVE_FREQUENCY, FLEX_CLIENT_RELIABLE_RECONNECT_DURATION_MILLIS, FLEX_CLIENT_HEARTBEAT_INTERVAL_MILLIS
+            FLEX_CLIENT_TIMEOUT_MINUTES_ELEMENT, FLEX_CLIENT_OUTBOUND_QUEUE_PROCESSOR_ELEMENT,
+            ADAPTIVE_FREQUENCY, FLEX_CLIENT_RELIABLE_RECONNECT_DURATION_MILLIS, FLEX_CLIENT_HEARTBEAT_INTERVAL_MILLIS
     };
 
     String[] FLEX_CLIENT_OUTBOUND_QUEUE_PROCESSOR_REQ_CHILDREN = {
-        CLASS_ATTR
+            CLASS_ATTR
     };
 
     // Security
     String[] SECURITY_CHILDREN = {
-        SECURITY_CONSTRAINT_DEFINITION_ELEMENT, LOGIN_COMMAND_ELEMENT, RECREATE_HTTPSESSION_AFTER_LOGIN_ELEMENT,
-        CONSTRAINT_INCLUDE_ELEMENT
+            SECURITY_CONSTRAINT_DEFINITION_ELEMENT, LOGIN_COMMAND_ELEMENT, RECREATE_HTTPSESSION_AFTER_LOGIN_ELEMENT,
+            CONSTRAINT_INCLUDE_ELEMENT
     };
 
     String[] EMBEDDED_SECURITY_CHILDREN = {
-        SECURITY_CONSTRAINT_DEFINITION_ELEMENT
+            SECURITY_CONSTRAINT_DEFINITION_ELEMENT
     };
 
     String[] SECURITY_CONSTRAINT_DEFINITION_CHILDREN = {
-        REF_ATTR, ID_ATTR, AUTH_METHOD_ELEMENT, ROLES_ELEMENT
+            REF_ATTR, ID_ATTR, AUTH_METHOD_ELEMENT, ROLES_ELEMENT
     };
 
     String[] ROLES_CHILDREN = {
-        ROLE_ELEMENT
+            ROLE_ELEMENT
     };
 
     String[] LOGIN_COMMAND_CHILDREN = {
-        SERVER_ATTR, CLASS_ATTR, PER_CLIENT_AUTH
+            SERVER_ATTR, CLASS_ATTR, PER_CLIENT_AUTH
     };
 
     String[] LOGIN_COMMAND_REQ_CHILDREN = {
-        SERVER_ATTR, CLASS_ATTR
+            SERVER_ATTR, CLASS_ATTR
     };
 
     String[] SECURITY_CONSTRAINTS_CHILDREN = {
-        SECURITY_CONSTRAINT_ELEMENT
+            SECURITY_CONSTRAINT_ELEMENT
     };
 
     String[] CONSTRAINT_INCLUDE_CHILDREN = {
-        SRC_ATTR, DIRECTORY_ATTR
+            SRC_ATTR, DIRECTORY_ATTR
     };
 
     // Servers
     String[] SERVERS_CHILDREN = {SERVER_ELEMENT};
 
     String[] SERVER_REQ_CHILDREN = {
-        ID_ATTR, CLASS_ATTR
+            ID_ATTR, CLASS_ATTR
     };
 
-    String [] SERVER_CHILDREN = {
-        ID_ATTR, CLASS_ATTR, PROPERTIES_ELEMENT
+    String[] SERVER_CHILDREN = {
+            ID_ATTR, CLASS_ATTR, PROPERTIES_ELEMENT
     };
 
     // Channels
     String[] CHANNELS_CHILDREN = {
-        CHANNEL_DEFINITION_ELEMENT, CHANNEL_INCLUDE_ELEMENT
+            CHANNEL_DEFINITION_ELEMENT, CHANNEL_INCLUDE_ELEMENT
     };
 
     String[] CHANNEL_DEFINITION_REQ_CHILDREN = {
-        ENDPOINT_ELEMENT, ID_ATTR
+            ENDPOINT_ELEMENT, ID_ATTR
     };
 
     String[] CHANNEL_DEFINITION_CHILDREN = {
-        ENDPOINT_ELEMENT, PROPERTIES_ELEMENT, SECURITY_ELEMENT, SERVER_ELEMENT,
-        SECURITY_CONSTRAINT_ATTR, CLASS_ATTR, ID_ATTR, REMOTE_ATTR, SERVER_ONLY_ATTR
+            ENDPOINT_ELEMENT, PROPERTIES_ELEMENT, SECURITY_ELEMENT, SERVER_ELEMENT,
+            SECURITY_CONSTRAINT_ATTR, CLASS_ATTR, ID_ATTR, REMOTE_ATTR, SERVER_ONLY_ATTR
     };
 
     String[] CHANNEL_DEFINITION_SERVER_REQ_CHILDREN = {
-        REF_ATTR
+            REF_ATTR
     };
 
     String[] CHANNEL_INCLUDE_CHILDREN = {
-        SRC_ATTR, DIRECTORY_ATTR
+            SRC_ATTR, DIRECTORY_ATTR
     };
 
     String[] ENDPOINT_CHILDREN = {
-        URI_ATTR, URL_ATTR, CLASS_ATTR
+            URI_ATTR, URL_ATTR, CLASS_ATTR
     };
 
     String[] DESTINATION_REQ_CHILDREN = {
-        ID_ATTR
+            ID_ATTR
     };
 
     String[] DESTINATION_CHILDREN = {
-        ID_ATTR, PROPERTIES_ELEMENT, CHANNELS_ELEMENT, SECURITY_ELEMENT, ADAPTER_ELEMENT,
-        CHANNELS_ATTR, ADAPTER_ATTR, SECURITY_CONSTRAINT_ATTR
+            ID_ATTR, PROPERTIES_ELEMENT, CHANNELS_ELEMENT, SECURITY_ELEMENT, ADAPTER_ELEMENT,
+            CHANNELS_ATTR, ADAPTER_ATTR, SECURITY_CONSTRAINT_ATTR
     };
 
     String[] DESTINATIONS_CHILDREN = {
-        DESTINATION_ELEMENT
+            DESTINATION_ELEMENT
     };
 
     String[] DESTINATION_ATTR = {
@@ -309,101 +308,101 @@
     };
 
     String[] DESTINATION_CHANNEL_REQ_CHILDREN = {
-        REF_ATTR
+            REF_ATTR
     };
 
     String[] DESTINATION_CHANNELS_CHILDREN = {
-        CHANNEL_ELEMENT
+            CHANNEL_ELEMENT
     };
 
     String[] DESTINATION_ADAPTER_CHILDREN = {
-        REF_ATTR
+            REF_ATTR
     };
 
     // Clustering
     String[] CLUSTERING_CHILDREN = {
-        CLUSTER_DEFINITION_ELEMENT
+            CLUSTER_DEFINITION_ELEMENT
     };
 
     String[] CLUSTER_DEFINITION_CHILDREN = {
-        ID_ATTR, CLUSTER_PROPERTIES_ATTR
+            ID_ATTR, CLUSTER_PROPERTIES_ATTR
     };
 
     // Logging
 
     String[] LOGGING_CHILDREN = {
-        PROPERTIES_ELEMENT, LEVEL_ATTR, TARGET_ELEMENT,
+            PROPERTIES_ELEMENT, LEVEL_ATTR, TARGET_ELEMENT,
     };
 
     String[] TARGET_CHILDREN = {
-        CLASS_ATTR, LEVEL_ATTR, PROPERTIES_ELEMENT, FILTERS_ELEMENT
+            CLASS_ATTR, LEVEL_ATTR, PROPERTIES_ELEMENT, FILTERS_ELEMENT
     };
 
     String[] TARGET_REQ_CHILDREN = {
-        CLASS_ATTR
+            CLASS_ATTR
     };
 
     String[] FILTERS_CHILDREN = {
-        PATTERN_ELEMENT
+            PATTERN_ELEMENT
     };
 
     // System
 
     String[] SYSTEM_CHILDREN = {
-        LOCALE_ELEMENT, ENFORCE_ENDOINT_VALIDATION, REDEPLOY_ELEMENT, MANAGEABLE_ELEMENT, UUID_GENERATOR_ELEMENT, DOTNET_FRAMEWORK_VERSION
+            LOCALE_ELEMENT, ENFORCE_ENDOINT_VALIDATION, REDEPLOY_ELEMENT, MANAGEABLE_ELEMENT, UUID_GENERATOR_ELEMENT, DOTNET_FRAMEWORK_VERSION
     };
 
     String[] REDEPLOY_CHILDREN = {
-        ENABLED_ELEMENT, WATCH_INTERVAL_ELEMENT, WATCH_FILE_ELEMENT, TOUCH_FILE_ELEMENT
+            ENABLED_ELEMENT, WATCH_INTERVAL_ELEMENT, WATCH_FILE_ELEMENT, TOUCH_FILE_ELEMENT
     };
 
     String[] LOCALE_CHILDREN = {
-        DEFAULT_LOCALE_ELEMENT
+            DEFAULT_LOCALE_ELEMENT
     };
 
     // Factories
     String[] FACTORIES_CHILDREN = {
-        FACTORY_ELEMENT
+            FACTORY_ELEMENT
     };
 
     String[] FACTORY_REQ_CHILDREN = {
-        ID_ATTR, CLASS_ATTR
+            ID_ATTR, CLASS_ATTR
     };
 
     // Message filters
     String[] ASYNC_MESSAGE_FILTERS_ELEMENT_CHILDREN = {
-        FILTER_ELEMENT
+            FILTER_ELEMENT
     };
 
     String[] SYNC_MESSAGE_FILTERS_ELEMENT_CHILDREN = {
-        FILTER_ELEMENT
+            FILTER_ELEMENT
     };
 
     String[] FILTER_CHILDREN = {
-        ID_ATTR, CLASS_ATTR, PROPERTIES_ELEMENT
+            ID_ATTR, CLASS_ATTR, PROPERTIES_ELEMENT
     };
 
     String[] FILTER_REQ_CHILDREN = {
-        ID_ATTR, CLASS_ATTR
+            ID_ATTR, CLASS_ATTR
     };
 
     // UUID Generator
     String[] UUID_GENERATOR_REQ_CHILDREN = {
             CLASS_ATTR
-         };
+    };
 
     // Validators
     String[] VALIDATORS_CHILDREN = {
-        VALIDATOR_ELEMENT
+            VALIDATOR_ELEMENT
     };
 
     String[] VALIDATOR_CHILDREN = {
-        CLASS_ATTR, TYPE_ATTR, PROPERTIES_ELEMENT
+            CLASS_ATTR, TYPE_ATTR, PROPERTIES_ELEMENT
     };
 
     String[] VALIDATOR_REQ_CHILDREN = {
-        CLASS_ATTR
-     };
+            CLASS_ATTR
+    };
 
     // UTILS
     String LIST_DELIMITERS = ",;:";
diff --git a/common/src/main/java/flex/messaging/config/ConfigurationException.java b/common/src/main/java/flex/messaging/config/ConfigurationException.java
index 49e5285..38f57a5 100644
--- a/common/src/main/java/flex/messaging/config/ConfigurationException.java
+++ b/common/src/main/java/flex/messaging/config/ConfigurationException.java
@@ -25,8 +25,7 @@
  * in the event that the configuration settings used to
  * initialize the component was invalid.
  */
-public class ConfigurationException extends LocalizedException
-{
+public class ConfigurationException extends LocalizedException {
     /**
      * This number was generated using the 'serialver' command line tool.
      * This number should remain consistent with the version used by
diff --git a/common/src/main/java/flex/messaging/config/ConfigurationFileResolver.java b/common/src/main/java/flex/messaging/config/ConfigurationFileResolver.java
index 8336d2b..bdb4e2f 100644
--- a/common/src/main/java/flex/messaging/config/ConfigurationFileResolver.java
+++ b/common/src/main/java/flex/messaging/config/ConfigurationFileResolver.java
@@ -22,10 +22,11 @@
 /**
  *
  */
-public interface ConfigurationFileResolver
-{
+public interface ConfigurationFileResolver {
     InputStream getConfigurationFile(String path);
+
     InputStream getIncludedFile(String path);
+
     void popIncludedFile();
 
     List getFiles(String dir);
diff --git a/common/src/main/java/flex/messaging/config/ConfigurationParser.java b/common/src/main/java/flex/messaging/config/ConfigurationParser.java
index ef8aaeb..230c211 100644
--- a/common/src/main/java/flex/messaging/config/ConfigurationParser.java
+++ b/common/src/main/java/flex/messaging/config/ConfigurationParser.java
@@ -19,11 +19,8 @@
 /**
  * Configuration parser for Flex Data Services. The parser reads in
  * a configuration file and populates a ServicesConfiguration instance.
- *
- *
  */
-public interface ConfigurationParser
-{
+public interface ConfigurationParser {
     void parse(String path, ConfigurationFileResolver fileResolver, ServicesConfiguration config);
 
     void reportTokens();
diff --git a/common/src/main/java/flex/messaging/config/DestinationSettings.java b/common/src/main/java/flex/messaging/config/DestinationSettings.java
index 3cd0e2f..a1e89f3 100644
--- a/common/src/main/java/flex/messaging/config/DestinationSettings.java
+++ b/common/src/main/java/flex/messaging/config/DestinationSettings.java
@@ -30,8 +30,7 @@
  * to be enforced.
  * </p>
  */
-public class DestinationSettings extends PropertiesSettings
-{
+public class DestinationSettings extends PropertiesSettings {
     /**
      *
      */
@@ -50,8 +49,7 @@
      *
      * @param id A string representing the unique identity of this destination.
      */
-    public DestinationSettings(String id)
-    {
+    public DestinationSettings(String id) {
         this.id = id;
         channelSettings = new ArrayList();
     }
@@ -61,26 +59,21 @@
      *
      * @return String the destination's id.
      */
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
     /**
      * Internal use only.
-     *
      */
-    String getSourceFile()
-    {
+    String getSourceFile() {
         return sourceFile;
     }
 
     /**
      * Internal use only.
-     *
      */
-    void setSourceFile(String sourceFile)
-    {
+    void setSourceFile(String sourceFile) {
         this.sourceFile = sourceFile;
     }
 
@@ -95,12 +88,10 @@
      * the next in the list on failure).
      *
      * @param c the <code>ChannelSettings</code> to add to the set of
-     * channel definitions for this destination.
+     *          channel definitions for this destination.
      */
-    public void addChannelSettings(ChannelSettings c)
-    {
-        if (c != null)
-        {
+    public void addChannelSettings(ChannelSettings c) {
+        if (c != null) {
             channelSettings.add(c);
         }
     }
@@ -111,8 +102,7 @@
      *
      * @param settings A List of <code>ChannelSettings</code>.
      */
-    public void setChannelSettings(List settings)
-    {
+    public void setChannelSettings(List settings) {
         channelSettings = settings;
     }
 
@@ -122,8 +112,7 @@
      * @return a <code>java.util.List</code> of <code>ChannelSetting</code>s
      * describing the channels that can be used to contact this destination.
      */
-    public List getChannelSettings()
-    {
+    public List getChannelSettings() {
         return channelSettings;
     }
 
@@ -138,8 +127,7 @@
      *
      * @return the <code>SecurityConstraint</code> for this destination.
      */
-    public SecurityConstraint getConstraint()
-    {
+    public SecurityConstraint getConstraint() {
         return constraint;
     }
 
@@ -149,10 +137,9 @@
      * <code>null</code> to remove an existing constraint.
      *
      * @param sc the <code>SecurityConstraint</code> to apply to this
-     * destination.
+     *           destination.
      */
-    public void setConstraint(SecurityConstraint sc)
-    {
+    public void setConstraint(SecurityConstraint sc) {
         constraint = sc;
     }
 
@@ -165,10 +152,9 @@
      * processing messages bound for this destination.
      *
      * @param a The <code>AdapterSettings</code> that describe the adapter
-     * to use for this destination.
+     *          to use for this destination.
      */
-    public void setAdapterSettings(AdapterSettings a)
-    {
+    public void setAdapterSettings(AdapterSettings a) {
         adapterSettings = a;
     }
 
@@ -179,8 +165,7 @@
      * A <code>null</code> value implies the the default service adapter should
      * be used.
      */
-    public AdapterSettings getAdapterSettings()
-    {
+    public AdapterSettings getAdapterSettings() {
         return adapterSettings;
     }
 
diff --git a/common/src/main/java/flex/messaging/config/FlexClientSettings.java b/common/src/main/java/flex/messaging/config/FlexClientSettings.java
index bba7e5a..44f52d6 100644
--- a/common/src/main/java/flex/messaging/config/FlexClientSettings.java
+++ b/common/src/main/java/flex/messaging/config/FlexClientSettings.java
@@ -19,8 +19,7 @@
 /**
  *
  */
-public class FlexClientSettings extends PropertiesSettings
-{
+public class FlexClientSettings extends PropertiesSettings {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -30,8 +29,7 @@
     /**
      * Constructs a FlexClientSettings instance.
      */
-    public FlexClientSettings()
-    {
+    public FlexClientSettings() {
         // Empty for now.
     }
 
@@ -48,8 +46,7 @@
      *
      * @return The number of minutes before an idle FlexClient is timed out.
      */
-    public long getTimeoutMinutes()
-    {
+    public long getTimeoutMinutes() {
         return timeoutMinutes;
     }
 
@@ -58,8 +55,7 @@
      *
      * @param value The number of minutes before an idle FlexClient is timed out.
      */
-    public void setTimeoutMinutes(long value)
-    {
+    public void setTimeoutMinutes(long value) {
         timeoutMinutes = value;
     }
 
@@ -70,8 +66,7 @@
      *
      * @return The the name of the  default <code>FlexClientOutboundQueueProcessorClass</code>.
      */
-    public String getFlexClientOutboundQueueProcessorClassName()
-    {
+    public String getFlexClientOutboundQueueProcessorClassName() {
         return flexClientOutboundQueueProcessorClassName;
     }
 
@@ -80,8 +75,7 @@
      *
      * @param flexClientOutboundQueueProcessorClassName The name of the default <code>FlexClientOutboundQueueProcessor</code>.
      */
-    public void setFlexClientOutboundQueueProcessorClassName(String flexClientOutboundQueueProcessorClassName)
-    {
+    public void setFlexClientOutboundQueueProcessorClassName(String flexClientOutboundQueueProcessorClassName) {
         this.flexClientOutboundQueueProcessorClassName = flexClientOutboundQueueProcessorClassName;
     }
 
@@ -92,8 +86,7 @@
      *
      * @return The properties for the default <code>FlexClientOutboundQueueProcessor</code>.
      */
-    public ConfigMap getFlexClientOutboundQueueProcessorProperties()
-    {
+    public ConfigMap getFlexClientOutboundQueueProcessorProperties() {
         return flexClientOutboundQueueProcessorProperties;
     }
 
@@ -103,32 +96,27 @@
      * @param flexClientOutboundQueueProcessorProperties properties for the default
      *                                                   <code>FlexClientOutboundQueueProcessor</code>
      */
-    public void setFlexClientOutboundQueueProcessorProperties(ConfigMap flexClientOutboundQueueProcessorProperties)
-    {
+    public void setFlexClientOutboundQueueProcessorProperties(ConfigMap flexClientOutboundQueueProcessorProperties) {
         this.flexClientOutboundQueueProcessorProperties = flexClientOutboundQueueProcessorProperties;
     }
-    
+
     private int reliableReconnectDurationMillis;
-    
-    public int getReliableReconnectDurationMillis()
-    {
-        return reliableReconnectDurationMillis;    
+
+    public int getReliableReconnectDurationMillis() {
+        return reliableReconnectDurationMillis;
     }
-    
-    public void setReliableReconnectDurationMillis(int value)
-    {
+
+    public void setReliableReconnectDurationMillis(int value) {
         reliableReconnectDurationMillis = value;
     }
-    
+
     private int heartbeatIntervalMillis;
-    
-    public int getHeartbeatIntervalMillis()
-    {
+
+    public int getHeartbeatIntervalMillis() {
         return heartbeatIntervalMillis;
     }
-    
-    public void setHeartbeatIntervalMillis(int value)
-    {
+
+    public void setHeartbeatIntervalMillis(int value) {
         heartbeatIntervalMillis = value;
     }
 }
diff --git a/common/src/main/java/flex/messaging/config/LocalFileResolver.java b/common/src/main/java/flex/messaging/config/LocalFileResolver.java
index 04b623b..8d315e7 100644
--- a/common/src/main/java/flex/messaging/config/LocalFileResolver.java
+++ b/common/src/main/java/flex/messaging/config/LocalFileResolver.java
@@ -28,8 +28,7 @@
 /**
  *
  */
-public class LocalFileResolver implements ConfigurationFileResolver
-{
+public class LocalFileResolver implements ConfigurationFileResolver {
     public static final int CLIENT = 0;
     public static final int SERVER = 1;
     public static final int LIVECYCLE = 2;
@@ -41,61 +40,44 @@
     private Stack configurationPathStack = new Stack();
     int version = CLIENT;
 
-    public LocalFileResolver()
-    {
+    public LocalFileResolver() {
     }
 
-    public LocalFileResolver(int version)
-    {
+    public LocalFileResolver(int version) {
         this.version = version;
     }
 
-    public void setErrorMessage(ConfigurationException e, String path)
-    {
-        if (version == LIVECYCLE)
-        {
+    public void setErrorMessage(ConfigurationException e, String path) {
+        if (version == LIVECYCLE) {
             // Invalid location: ''{0}''. Please specify a valid LiveCycle Data Services Configuration file via the LiveCycle Admin UI.
-            e.setMessage(ERR_MSG_INVALID_PATH_LIVECYCLE, new Object[] {path});
-        }
-        else if (version == SERVER)
-        {
+            e.setMessage(ERR_MSG_INVALID_PATH_LIVECYCLE, new Object[]{path});
+        } else if (version == SERVER) {
             // Please specify a valid ''services.configuration.file'' in web.xml. You specified ''{0}''. This is not a valid file system path reachable via the app server and is also not a path to a resource in your J2EE application archive.
             e.setMessage(ERR_MSG_INVALID_PATH_SERVER, new Object[]{path});
-        }
-        else
-        {
+        } else {
             // Please specify a valid <services/> file path in flex-config.xml.
             e.setMessage(ERR_MSG_INVALID_PATH_CLIENT);
         }
     }
 
-    public InputStream getConfigurationFile(String path)
-    {
+    public InputStream getConfigurationFile(String path) {
         File f = new File(path);
-        try
-        {
-            if (f != null && f.exists() && f.isAbsolute())
-            {
+        try {
+            if (f != null && f.exists() && f.isAbsolute()) {
                 FileInputStream fin = new FileInputStream(f);
                 pushConfigurationFile(f.getParent());
                 return fin;
-            }
-            else
-            {
+            } else {
                 ConfigurationException e = new ConfigurationException();
                 setErrorMessage(e, path);
                 throw e;
             }
-        }
-        catch (FileNotFoundException ex)
-        {
+        } catch (FileNotFoundException ex) {
             ConfigurationException e = new ConfigurationException();
             setErrorMessage(e, path);
             e.setRootCause(ex);
             throw e;
-        }
-        catch (SecurityException se)
-        {
+        } catch (SecurityException se) {
             ConfigurationException e = new ConfigurationException();
             setErrorMessage(e, path);
             e.setRootCause(se);
@@ -103,46 +85,36 @@
         }
     }
 
-    public InputStream getIncludedFile(String src)
-    {
+    public InputStream getIncludedFile(String src) {
         String path = configurationPathStack.peek() + File.separator + src;
         File f = new File(path);
-        try
-        {
-            if (f != null && f.exists() && f.isAbsolute())
-            {
+        try {
+            if (f != null && f.exists() && f.isAbsolute()) {
                 FileInputStream fin = new FileInputStream(f);
                 pushConfigurationFile(f.getParent());
                 return fin;
-            }
-            else
-            {
+            } else {
                 // Please specify a valid include file. ''{0}'' is invalid.
                 ConfigurationException e = new ConfigurationException();
-                e.setMessage(11107, new Object[] {path});
+                e.setMessage(11107, new Object[]{path});
                 throw e;
             }
-        }
-        catch (FileNotFoundException ex)
-        {
+        } catch (FileNotFoundException ex) {
             // Please specify a valid include file. ''{0}'' is invalid.
             ConfigurationException e = new ConfigurationException();
-            e.setMessage(11107, new Object[] {path});
+            e.setMessage(11107, new Object[]{path});
             e.setRootCause(ex);
             throw e;
-        }
-        catch (SecurityException se)
-        {
+        } catch (SecurityException se) {
             // Please specify a valid include file. ''{0}'' is invalid.
             ConfigurationException e = new ConfigurationException();
-            e.setMessage(11107, new Object[] {path});
+            e.setMessage(11107, new Object[]{path});
             e.setRootCause(se);
             throw e;
         }
     }
 
-    public void popIncludedFile()
-    {
+    public void popIncludedFile() {
         configurationPathStack.pop();
     }
 
@@ -153,30 +125,23 @@
      * @param dir a directory relative to the current configuration file
      * @return a (possibly empty) list of file names
      */
-    public List getFiles(String dir)
-    {
+    public List getFiles(String dir) {
         List result = new ArrayList();
         File f = new File(configurationPathStack.peek().toString(), dir);
-        if (f.exists() && f.isDirectory())
-        {
-            String[] xmlFiles = f.list(new FilenameFilter()
-            {
-                public boolean accept(File dir, String name)
-                {
+        if (f.exists() && f.isDirectory()) {
+            String[] xmlFiles = f.list(new FilenameFilter() {
+                public boolean accept(File dir, String name) {
                     return name.endsWith(".xml");
                 }
             });
 
             // prepend the directory to each filename
-            for (int i = 0; i < xmlFiles.length; i++)
-            {
+            for (int i = 0; i < xmlFiles.length; i++) {
                 String file = xmlFiles[i];
-                result.add(dir +  File.separator + file);
+                result.add(dir + File.separator + file);
             }
             return result;
-        }
-        else
-        {
+        } else {
             // Please specify a valid include directory. ''{0}'' is invalid.
             ConfigurationException e = new ConfigurationException();
             e.setMessage(11113, new Object[]{dir});
@@ -184,18 +149,15 @@
         }
     }
 
-    private void pushConfigurationFile(String topLevelPath)
-    {
+    private void pushConfigurationFile(String topLevelPath) {
         configurationPathStack.push(topLevelPath);
     }
 
-    public String getIncludedPath(String src)
-    {
+    public String getIncludedPath(String src) {
         return configurationPathStack.peek() + File.separator + src;
     }
 
-    public long getIncludedLastModified(String src)
-    {
+    public long getIncludedLastModified(String src) {
         String path = configurationPathStack.peek() + File.separator + src;
         File f = new File(path);
         return f.lastModified();
diff --git a/common/src/main/java/flex/messaging/config/LoggingSettings.java b/common/src/main/java/flex/messaging/config/LoggingSettings.java
index 5fe26e1..6f07f00 100644
--- a/common/src/main/java/flex/messaging/config/LoggingSettings.java
+++ b/common/src/main/java/flex/messaging/config/LoggingSettings.java
@@ -22,25 +22,19 @@
 /**
  * A log maintains a series of Loggers for each logging category and
  * Targets are established that listen for LogEvents on those Loggers.
- *
- *
  */
-public class LoggingSettings extends PropertiesSettings
-{
+public class LoggingSettings extends PropertiesSettings {
     private final List targets;
 
-    public LoggingSettings()
-    {
+    public LoggingSettings() {
         targets = new ArrayList();
     }
 
-    public void addTarget(TargetSettings t)
-    {
+    public void addTarget(TargetSettings t) {
         targets.add(t);
     }
 
-    public List getTargets()
-    {
+    public List getTargets() {
         return targets;
     }
 }
diff --git a/common/src/main/java/flex/messaging/config/LoginCommandSettings.java b/common/src/main/java/flex/messaging/config/LoginCommandSettings.java
index 2cc0ccd..89d0469 100644
--- a/common/src/main/java/flex/messaging/config/LoginCommandSettings.java
+++ b/common/src/main/java/flex/messaging/config/LoginCommandSettings.java
@@ -18,11 +18,8 @@
 
 /**
  * Settings for <code>LoginCommand</code> class.
- *
- *
  */
-public class LoginCommandSettings
-{
+public class LoginCommandSettings {
     public static final String SERVER_MATCH_OVERRIDE = "all";
 
     private String className;
@@ -32,8 +29,7 @@
     /**
      * Create a new <code>LoginCommandSettings</code> instance with default settings.
      */
-    public LoginCommandSettings()
-    {
+    public LoginCommandSettings() {
         perClientAuthentication = false;
     }
 
@@ -42,8 +38,7 @@
      *
      * @return The class name.
      */
-    public String getClassName()
-    {
+    public String getClassName() {
         return className;
     }
 
@@ -52,8 +47,7 @@
      *
      * @param className The class name.
      */
-    public void setClassName(String className)
-    {
+    public void setClassName(String className) {
         this.className = className;
     }
 
@@ -62,8 +56,7 @@
      *
      * @return The server name.
      */
-    public String getServer()
-    {
+    public String getServer() {
         return server;
     }
 
@@ -72,8 +65,7 @@
      *
      * @param server The server name.
      */
-    public void setServer(String server)
-    {
+    public void setServer(String server) {
         this.server = server;
     }
 
@@ -83,8 +75,7 @@
      * @return <code>true</code> if per client authentication is enabled;
      * otherwise <code>false</code>.
      */
-    public boolean isPerClientAuthentication()
-    {
+    public boolean isPerClientAuthentication() {
         return perClientAuthentication;
     }
 
@@ -92,10 +83,9 @@
      * Sets whether per client authentication is enabled or not.
      *
      * @param perClientAuthentication <code>true</code> if per client authentication
-     * is enabled; otherwise <code>false</code>.
+     *                                is enabled; otherwise <code>false</code>.
      */
-    public void setPerClientAuthentication(boolean perClientAuthentication)
-    {
+    public void setPerClientAuthentication(boolean perClientAuthentication) {
         this.perClientAuthentication = perClientAuthentication;
     }
 }
diff --git a/common/src/main/java/flex/messaging/config/PropertiesSettings.java b/common/src/main/java/flex/messaging/config/PropertiesSettings.java
index 4fa0a83..ede9013 100644
--- a/common/src/main/java/flex/messaging/config/PropertiesSettings.java
+++ b/common/src/main/java/flex/messaging/config/PropertiesSettings.java
@@ -30,70 +30,55 @@
  * If a property element has child elements the children are recursively processed
  * and added as a Map.
  * </p>
- *
- *
  */
-public abstract class PropertiesSettings
-{
+public abstract class PropertiesSettings {
     protected final ConfigMap properties;
 
-    public PropertiesSettings()
-    {
+    public PropertiesSettings() {
         properties = new ConfigMap();
     }
 
-    public final void addProperties(ConfigMap p)
-    {
+    public final void addProperties(ConfigMap p) {
         properties.addProperties(p);
     }
 
-    public ConfigMap getProperties()
-    {
+    public ConfigMap getProperties() {
         return properties;
     }
 
-    public final String getProperty(String name)
-    {
+    public final String getProperty(String name) {
         return getPropertyAsString(name, null);
     }
 
-    public final void addProperty(String name, String value)
-    {
+    public final void addProperty(String name, String value) {
         properties.addProperty(name, value);
     }
 
-    public final void addProperty(String name, ConfigMap value)
-    {
+    public final void addProperty(String name, ConfigMap value) {
         properties.addProperty(name, value);
     }
 
-    public final ConfigMap getPropertyAsMap(String name, ConfigMap defaultValue)
-    {
+    public final ConfigMap getPropertyAsMap(String name, ConfigMap defaultValue) {
         return properties.getPropertyAsMap(name, defaultValue);
     }
 
-    public final String getPropertyAsString(String name, String defaultValue)
-    {
+    public final String getPropertyAsString(String name, String defaultValue) {
         return properties.getPropertyAsString(name, defaultValue);
     }
 
-    public final List getPropertyAsList(String name, List defaultValue)
-    {
+    public final List getPropertyAsList(String name, List defaultValue) {
         return properties.getPropertyAsList(name, defaultValue);
     }
 
-    public final int getPropertyAsInt(String name, int defaultValue)
-    {
+    public final int getPropertyAsInt(String name, int defaultValue) {
         return properties.getPropertyAsInt(name, defaultValue);
     }
 
-    public final boolean getPropertyAsBoolean(String name, boolean defaultValue)
-    {
+    public final boolean getPropertyAsBoolean(String name, boolean defaultValue) {
         return properties.getPropertyAsBoolean(name, defaultValue);
     }
 
-    public final long getPropertyAsLong(String name, long defaultValue)
-    {
+    public final long getPropertyAsLong(String name, long defaultValue) {
         return properties.getPropertyAsLong(name, defaultValue);
     }
 }
diff --git a/common/src/main/java/flex/messaging/config/SecurityConstraint.java b/common/src/main/java/flex/messaging/config/SecurityConstraint.java
index 0b7638b..c18b3b5 100644
--- a/common/src/main/java/flex/messaging/config/SecurityConstraint.java
+++ b/common/src/main/java/flex/messaging/config/SecurityConstraint.java
@@ -23,8 +23,7 @@
  * Security constraints are used by the login manager to secure access to
  * destinations and endpoints.
  */
-public class SecurityConstraint
-{
+public class SecurityConstraint {
     /**
      * String constant for basic authentication.
      */
@@ -42,8 +41,7 @@
     /**
      * Creates an anonymous <code>SecurityConstraint</code> instance.
      */
-    public SecurityConstraint()
-    {
+    public SecurityConstraint() {
         this(null);
     }
 
@@ -52,8 +50,7 @@
      *
      * @param id The id of the <code>SecurityConstraint</code> instance.
      */
-    public SecurityConstraint(String id)
-    {
+    public SecurityConstraint(String id) {
         this.id = id;
         method = CUSTOM_AUTH_METHOD;
     }
@@ -63,8 +60,7 @@
      *
      * @return List of roles.
      */
-    public List getRoles()
-    {
+    public List getRoles() {
         return roles;
     }
 
@@ -73,15 +69,14 @@
      *
      * @param role New role to add to the list of roles.
      */
-    public void addRole(String role)
-    {
+    public void addRole(String role) {
         if (role == null)
             return;
 
         if (roles == null)
             roles = new ArrayList();
 
-            roles.add(role);
+        roles.add(role);
     }
 
     /**
@@ -89,8 +84,7 @@
      *
      * @return The id of the <code>SecurityConstraint</code>.
      */
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
@@ -99,8 +93,7 @@
      *
      * @return Authorization method.
      */
-    public String getMethod()
-    {
+    public String getMethod() {
         return method;
     }
 
@@ -110,8 +103,7 @@
      *
      * @param method The authentication method to set which can be custom or basic.
      */
-    public void setMethod(String method)
-    {
+    public void setMethod(String method) {
         if (method == null)
             return;
 
diff --git a/common/src/main/java/flex/messaging/config/ServiceSettings.java b/common/src/main/java/flex/messaging/config/ServiceSettings.java
index 44d95b5..cb425d3 100644
--- a/common/src/main/java/flex/messaging/config/ServiceSettings.java
+++ b/common/src/main/java/flex/messaging/config/ServiceSettings.java
@@ -33,11 +33,8 @@
  * effectively represents a &quot;whitelist&quot;
  * of actions allowed by that service.
  * </p>
- *
- *
  */
-public class ServiceSettings extends PropertiesSettings
-{
+public class ServiceSettings extends PropertiesSettings {
     private final String id;
     private String sourceFile;
     private String className;
@@ -48,62 +45,51 @@
     private final Map destinationSettings;
     private SecurityConstraint securityConstraint;
 
-    public ServiceSettings(String id)
-    {
+    public ServiceSettings(String id) {
         this.id = id;
         destinationSettings = new HashMap();
         adapterSettings = new HashMap(2);
         defaultChannels = new ArrayList(4);
     }
 
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
-    String getSourceFile()
-    {
+    String getSourceFile() {
         return sourceFile;
     }
 
-    void setSourceFile(String sourceFile)
-    {
+    void setSourceFile(String sourceFile) {
         this.sourceFile = sourceFile;
     }
 
-    public String getClassName()
-    {
+    public String getClassName() {
         return className;
     }
 
-    public void setClassName(String name)
-    {
+    public void setClassName(String name) {
         className = name;
     }
 
     /*
      *  SERVER ADAPTERS
      */
-    public AdapterSettings getDefaultAdapter()
-    {
+    public AdapterSettings getDefaultAdapter() {
         return defaultAdapterSettings;
     }
 
-    public AdapterSettings getAdapterSettings(String id)
-    {
-        return (AdapterSettings)adapterSettings.get(id);
+    public AdapterSettings getAdapterSettings(String id) {
+        return (AdapterSettings) adapterSettings.get(id);
     }
 
-    public Map getAllAdapterSettings()
-    {
+    public Map getAllAdapterSettings() {
         return adapterSettings;
     }
 
-    public void addAdapterSettings(AdapterSettings a)
-    {
+    public void addAdapterSettings(AdapterSettings a) {
         adapterSettings.put(a.getId(), a);
-        if (a.isDefault())
-        {
+        if (a.isDefault()) {
             defaultAdapterSettings = a;
         }
     }
@@ -111,13 +97,11 @@
     /*
      *  DEFAULT CHANNELS
      */
-    public void addDefaultChannel(ChannelSettings c)
-    {
+    public void addDefaultChannel(ChannelSettings c) {
         defaultChannels.add(c);
     }
 
-    public List getDefaultChannels()
-    {
+    public List getDefaultChannels() {
         return defaultChannels;
     }
 
@@ -132,8 +116,7 @@
      *
      * @return the <code>SecurityConstraint</code> for this service.
      */
-    public SecurityConstraint getConstraint()
-    {
+    public SecurityConstraint getConstraint() {
         return securityConstraint;
     }
 
@@ -143,23 +126,20 @@
      * <code>null</code> to remove an existing constraint.
      *
      * @param sc the <code>SecurityConstraint</code> to apply to this
-     * service.
+     *           service.
      */
-    public void setConstraint(SecurityConstraint sc)
-    {
+    public void setConstraint(SecurityConstraint sc) {
         securityConstraint = sc;
     }
 
     /*
      *  DESTINATIONS
      */
-    public Map getDestinationSettings()
-    {
+    public Map getDestinationSettings() {
         return destinationSettings;
     }
 
-    public void addDestinationSettings(DestinationSettings dest)
-    {
+    public void addDestinationSettings(DestinationSettings dest) {
         destinationSettings.put(dest.getId(), dest);
     }
 }
diff --git a/common/src/main/java/flex/messaging/config/ServicesConfiguration.java b/common/src/main/java/flex/messaging/config/ServicesConfiguration.java
index 561d75b..b2c98f8 100644
--- a/common/src/main/java/flex/messaging/config/ServicesConfiguration.java
+++ b/common/src/main/java/flex/messaging/config/ServicesConfiguration.java
@@ -21,14 +21,11 @@
 
 /**
  * Base interface for Flex Data Services configuration.
- *
+ * <p>
  * Implementations may have different levels of detail
  * based on how much of the configuration is supported.
- *
- *
  */
-public interface ServicesConfiguration
-{
+public interface ServicesConfiguration {
     /*
      * CHANNEL CONFIGURATION
      */
diff --git a/common/src/main/java/flex/messaging/config/ServicesDependencies.java b/common/src/main/java/flex/messaging/config/ServicesDependencies.java
index 92b7c34..33d9808 100644
--- a/common/src/main/java/flex/messaging/config/ServicesDependencies.java
+++ b/common/src/main/java/flex/messaging/config/ServicesDependencies.java
@@ -33,15 +33,12 @@
  * to generate mixin initialization source code to be added to the SWF by
  * PreLink. It also requires a list of channel classes to be added as
  * dependencies.
- *
- *
  */
-public class ServicesDependencies
-{
+public class ServicesDependencies {
     private static final String ADVANCED_CHANNELSET_CLASS = "mx.messaging.AdvancedChannelSet";
     private static final String ADVANCED_MESSAGING_SUPPORT_CLASS = "flex.messaging.services.AdvancedMessagingSupport";
     private static final String REDIRECT_URL = "redirect-url";
-    
+
     private boolean containsClientLoadBalancing;
     private String xmlInit = "";
     private StringBuffer imports = new StringBuffer();
@@ -49,21 +46,19 @@
     private List channelClasses;
     private Map configPaths;
     private Map lazyAssociations;
-    
+
     private static final List channel_excludes = new ArrayList();
-    static
-    {
+
+    static {
         channel_excludes.add(REDIRECT_URL);
     }
 
     public static final boolean traceConfig = (System.getProperty("trace.config") != null);
 
-    public ServicesDependencies(String path, String parserClass, String contextRoot)
-    {
+    public ServicesDependencies(String path, String parserClass, String contextRoot) {
         ClientConfiguration config = getClientConfiguration(path, parserClass);
 
-        if (config != null)
-        {
+        if (config != null) {
             Map importMap = new HashMap();
             lazyAssociations = new HashMap();
             configPaths = config.getConfigPaths();
@@ -73,72 +68,60 @@
         }
     }
 
-    public Set getLazyAssociations(String destination)
-    {
-        if (lazyAssociations == null)
-        {
+    public Set getLazyAssociations(String destination) {
+        if (lazyAssociations == null) {
             lazyAssociations = new HashMap();
         }
 
-        return (Set)lazyAssociations.get(destination);
+        return (Set) lazyAssociations.get(destination);
     }
 
-    public void addLazyAssociation(String destination, String associationProp)
-    {
+    public void addLazyAssociation(String destination, String associationProp) {
         Set la = getLazyAssociations(destination);
-        if (la == null)
-        {
+        if (la == null) {
             la = new HashSet();
             lazyAssociations.put(destination, la);
         }
         la.add(associationProp);
     }
 
-    public String getServerConfigXmlInit()
-    {
+    public String getServerConfigXmlInit() {
         return xmlInit;
     }
 
-    public String getImports()
-    {
+    public String getImports() {
         return imports.toString();
     }
 
-    public String getReferences()
-    {
+    public String getReferences() {
         return references.toString();
     }
 
-    public List getChannelClasses()
-    {
+    public List getChannelClasses() {
         return channelClasses;
     }
 
-    public void addChannelClass(String className)
-    {
+    public void addChannelClass(String className) {
         channelClasses.add(className);
     }
 
-    public void addConfigPath(String path, long modified)
-    {
+    public void addConfigPath(String path, long modified) {
         configPaths.put(path, new Long(modified));
     }
 
-    public Map getConfigPaths()
-    {
+    public Map getConfigPaths() {
         return configPaths;
     }
-    
+
     /**
-     * Gets ActionScript source file for a class. The class will be compiled as 
+     * Gets ActionScript source file for a class. The class will be compiled as
      * a mixin and initialize Flex at runtime.
-     * 
+     *
      * @param packageName - the package compiled into the generated source.
-     * @param className - the class name of the generated source.
+     * @param className   - the class name of the generated source.
      * @return A String that represents an ActionScript Source file.
      */
-        public String getServicesInitSource(String packageName, String className)
-    {
+    public String getServicesInitSource(String packageName, String className) {
         StringBuilder sb = new StringBuilder(2048);
 
         sb.append("package ").append(packageName).append("\n");
@@ -172,14 +155,12 @@
         return sb.toString();
     }
 
-    public static ClientConfiguration getClientConfiguration(String path, String parserClass)
-    {
+    public static ClientConfiguration getClientConfiguration(String path, String parserClass) {
         ClientConfiguration config = new ClientConfiguration();
 
         ConfigurationParser parser = getConfigurationParser(parserClass);
 
-        if (parser == null)
-        {
+        if (parser == null) {
             // "Unable to create a parser to load messaging configuration."
             LocalizedException lme = new LocalizedException();
             lme.setMessage(10138);
@@ -194,85 +175,65 @@
         return config;
     }
 
-    static ConfigurationParser getConfigurationParser(String className)
-    {
+    static ConfigurationParser getConfigurationParser(String className) {
         ConfigurationParser parser = null;
         Class parserClass = null;
 
         // Check for Custom Parser Specification
-        if (className != null)
-        {
-            try
-            {
+        if (className != null) {
+            try {
                 parserClass = Class.forName(className);
-                parser = (ConfigurationParser)parserClass.newInstance();
-            }
-            catch (Throwable t)
-            {
-                if (traceConfig)
-                {
+                parser = (ConfigurationParser) parserClass.newInstance();
+            } catch (Throwable t) {
+                if (traceConfig) {
                     System.out.println("Could not load services configuration parser as: " + className);
                 }
             }
         }
 
         // Try Sun JRE 1.4 / Apache Xalan Based Implementation
-        if (parser == null)
-        {
-            try
-            {
+        if (parser == null) {
+            try {
                 Class.forName("org.apache.xpath.CachedXPathAPI");
                 className = "flex.messaging.config.ApacheXPathClientConfigurationParser";
                 parserClass = Class.forName(className);
-                parser = (ConfigurationParser)parserClass.newInstance();
-            }
-            catch (Throwable t)
-            {
-                if (traceConfig)
-                {
+                parser = (ConfigurationParser) parserClass.newInstance();
+            } catch (Throwable t) {
+                if (traceConfig) {
                     System.out.println("Could not load configuration parser as: " + className);
                 }
             }
         }
 
         // Try Sun JRE 1.5 Based Implementation
-        if (parser == null)
-        {
-            try
-            {
+        if (parser == null) {
+            try {
                 className = "flex.messaging.config.XPathClientConfigurationParser";
                 parserClass = Class.forName(className);
                 // double-check, on some systems the above loads but the import classes don't
                 Class.forName("javax.xml.xpath.XPathExpressionException");
 
-                parser = (ConfigurationParser)parserClass.newInstance();
-            }
-            catch (Throwable t)
-            {
-                if (traceConfig)
-                {
+                parser = (ConfigurationParser) parserClass.newInstance();
+            } catch (Throwable t) {
+                if (traceConfig) {
                     System.out.println("Could not load configuration parser as: " + className);
                 }
             }
         }
 
-        if (traceConfig && parser != null)
-        {
+        if (traceConfig && parser != null) {
             System.out.println("Services Configuration Parser: " + parser.getClass().getName());
         }
 
         return parser;
     }
 
-    private static List listChannelClasses(ServicesConfiguration config)
-    {
+    private static List listChannelClasses(ServicesConfiguration config) {
         List channelList = new ArrayList();
         Iterator it = config.getAllChannelSettings().values().iterator();
-        while (it.hasNext())
-        {
-            ChannelSettings settings = (ChannelSettings)it.next();
-            if (!settings.serverOnly)
-            {
+        while (it.hasNext()) {
+            ChannelSettings settings = (ChannelSettings) it.next();
+            if (!settings.serverOnly) {
                 String clientType = settings.getClientType();
                 channelList.add(clientType);
             }
@@ -284,20 +245,17 @@
     /**
      * Emits source code declaration of public var xml:XML (unnamed package), containing ServicesConfiguration as e4x.
      */
-    private String codegenXmlInit(ServicesConfiguration config, String contextRoot, Map serviceImportMap)
-    {
+    private String codegenXmlInit(ServicesConfiguration config, String contextRoot, Map serviceImportMap) {
         StringBuffer e4x = new StringBuffer();
         String channelSetImplToImport = null;
 
         e4x.append("<services>\n");
 
         // Add default channels of the application
-        if (config.getDefaultChannels().size() > 0)
-        {
+        if (config.getDefaultChannels().size() > 0) {
             e4x.append("\t<default-channels>\n");
-            for (Iterator chanIter = config.getDefaultChannels().iterator(); chanIter.hasNext();)
-            {
-                String id = (String)chanIter.next();
+            for (Iterator chanIter = config.getDefaultChannels().iterator(); chanIter.hasNext(); ) {
+                String id = (String) chanIter.next();
                 e4x.append("\t\t<channel ref=\"" + id + "\"/>\n");
             }
             e4x.append("\t</default-channels>\n");
@@ -309,9 +267,8 @@
         if (defaultCluster != null && !defaultCluster.getURLLoadBalancing())
             defaultCluster = null;
 
-        for (Iterator servIter = config.getAllServiceSettings().iterator(); servIter.hasNext();)
-        {
-            ServiceSettings entry = (ServiceSettings)servIter.next();
+        for (Iterator servIter = config.getAllServiceSettings().iterator(); servIter.hasNext(); ) {
+            ServiceSettings entry = (ServiceSettings) servIter.next();
 
             // FIXME: Need to find another way to skip BootstrapServices
             // Skip services with no message types
@@ -332,14 +289,12 @@
                 channelSetImplToImport = ADVANCED_CHANNELSET_CLASS;
 
             String useTransactionsStr = entry.getProperties().getPropertyAsString("use-transactions", null);
-            if (useTransactionsStr != null)
-            {
+            if (useTransactionsStr != null) {
                 e4x.append("\t\t<properties>\n\t\t\t<use-transactions>" + useTransactionsStr + "</use-transactions>\n");
                 e4x.append("\t\t</properties>\n");
             }
 
-            for (Iterator destIter = entry.getDestinationSettings().values().iterator(); destIter.hasNext();)
-            {
+            for (Iterator destIter = entry.getDestinationSettings().values().iterator(); destIter.hasNext(); ) {
                 DestinationSettings dest = (DestinationSettings) destIter.next();
                 String destination = dest.getId();
                 e4x.append("\t\t<destination id=\"" + destination + "\">\n");
@@ -347,12 +302,10 @@
                 // add in the identity properties
                 ConfigMap metadata = dest.getProperties().getPropertyAsMap("metadata", null);
                 boolean closePropTag = false;
-                if (metadata != null)
-                {
+                if (metadata != null) {
                     e4x.append("\t\t\t<properties>\n\t\t\t\t<metadata\n");
                     String extendsStr = metadata.getPropertyAsString("extends", null);
-                    if (extendsStr != null)
-                    {
+                    if (extendsStr != null) {
                         e4x.append(" extends=\"");
                         e4x.append(extendsStr);
                         e4x.append("\"");
@@ -360,31 +313,24 @@
                     e4x.append(">");
                     closePropTag = true;
                     List identities = metadata.getPropertyAsList("identity", null);
-                    if (identities != null)
-                    {
+                    if (identities != null) {
                         Iterator it = identities.iterator();
-                        while (it.hasNext())
-                        {
+                        while (it.hasNext()) {
                             Object o = it.next();
                             String identityName = null;
                             String undefinedValue = null;
-                            if (o instanceof String)
-                            {
+                            if (o instanceof String) {
                                 identityName = (String) o;
-                            }
-                            else if (o instanceof ConfigMap)
-                            {
+                            } else if (o instanceof ConfigMap) {
                                 identityName = ((ConfigMap) o).getPropertyAsString("property", null);
                                 undefinedValue = ((ConfigMap) o).getPropertyAsString("undefined-value", null);
                             }
 
-                            if (identityName != null)
-                            {
+                            if (identityName != null) {
                                 e4x.append("\t\t\t\t\t<identity property=\"");
                                 e4x.append(identityName);
                                 e4x.append("\"");
-                                if (undefinedValue != null)
-                                {
+                                if (undefinedValue != null) {
                                     e4x.append(" undefined-value=\"");
                                     e4x.append(undefinedValue);
                                     e4x.append("\"");
@@ -403,10 +349,8 @@
                 }
 
                 String itemClass = dest.getProperties().getPropertyAsString("item-class", null);
-                if (itemClass != null)
-                {
-                    if (!closePropTag)
-                    {
+                if (itemClass != null) {
+                    if (!closePropTag) {
                         e4x.append("\t\t\t<properties>\n");
                         closePropTag = true;
                     }
@@ -421,10 +365,8 @@
                 ConfigMap clusterInfo = null;
                 ConfigMap pagingInfo = null;
                 ConfigMap reconnectInfo = null;
-                if (network != null || defaultCluster != null)
-                {
-                    if (!closePropTag)
-                    {
+                if (network != null || defaultCluster != null) {
+                    if (!closePropTag) {
                         e4x.append("\t\t\t<properties>\n");
                         closePropTag = true;
                     }
@@ -432,8 +374,7 @@
 
                     if (network != null)
                         pagingInfo = network.getPropertyAsMap("paging", null);
-                    if (pagingInfo != null)
-                    {
+                    if (pagingInfo != null) {
                         String enabled = pagingInfo.getPropertyAsString("enabled", "false");
                         e4x.append("\t\t\t\t\t<paging enabled=\"");
                         e4x.append(enabled);
@@ -442,8 +383,7 @@
                         // end up using this for nested properties with lazy="true".
                         // supporting pageSize for backwards compatibility but config options are not camelCase in general.
                         String size = pagingInfo.getPropertyAsString("page-size", pagingInfo.getPropertyAsString("pageSize", null));
-                        if (size != null)
-                        {
+                        if (size != null) {
                             e4x.append(" page-size=\"");
                             e4x.append(size);
                             e4x.append("\"");
@@ -458,16 +398,14 @@
 
                     if (network != null)
                         reconnectInfo = network.getPropertyAsMap("reconnect", null);
-                    if (reconnectInfo != null)
-                    {
+                    if (reconnectInfo != null) {
                         String fetchOption = reconnectInfo.getPropertyAsString("fetch", "IDENTITY");
                         e4x.append("\t\t\t\t\t<reconnect fetch=\"");
                         e4x.append(fetchOption.toUpperCase());
                         e4x.append("\" />\n");
                     }
 
-                    if (network != null)
-                    {
+                    if (network != null) {
                         String reliable = network.getPropertyAsString("reliable", "false");
                         if (Boolean.valueOf(reliable).booleanValue()) // No need the default value for the setting.
                         {
@@ -479,24 +417,19 @@
 
                     if (network != null)
                         clusterInfo = network.getPropertyAsMap("cluster", null);
-                    if (clusterInfo != null)
-                    {
+                    if (clusterInfo != null) {
                         String clusterId = clusterInfo.getPropertyAsString("ref", null);
 
                         ClusterSettings clusterSettings = config.getClusterSettings(clusterId);
                         if (clusterSettings != null &&
-                            clusterSettings.getURLLoadBalancing())
-                        {
+                                clusterSettings.getURLLoadBalancing()) {
                             e4x.append("\t\t\t\t\t<cluster ref=\"");
                             e4x.append(clusterId);
                             e4x.append("\"/>\n");
                         }
-                    }
-                    else if (defaultCluster != null)
-                    {
+                    } else if (defaultCluster != null) {
                         e4x.append("\t\t\t\t\t<cluster");
-                        if (defaultCluster.getClusterName() != null)
-                        {
+                        if (defaultCluster.getClusterName() != null) {
                             e4x.append(" ref=\"");
                             e4x.append(defaultCluster.getClusterName());
                             e4x.append("\"");
@@ -508,10 +441,8 @@
 
                 String useTransactions = dest.getProperties().getPropertyAsString("use-transactions", null);
 
-                if (useTransactions !=null)
-                {
-                    if (!closePropTag)
-                    {
+                if (useTransactions != null) {
+                    if (!closePropTag) {
                         e4x.append("\t\t\t<properties>\n");
                         closePropTag = true;
                     }
@@ -520,24 +451,20 @@
 
                 String autoSyncEnabled = dest.getProperties().getPropertyAsString("auto-sync-enabled", "true");
 
-                if (autoSyncEnabled.equalsIgnoreCase("false"))
-                {
-                    if (!closePropTag)
-                    {
+                if (autoSyncEnabled.equalsIgnoreCase("false")) {
+                    if (!closePropTag) {
                         e4x.append("\t\t\t<properties>\n");
                         closePropTag = true;
                     }
                     e4x.append("\t\t\t\t<auto-sync-enabled>false</auto-sync-enabled>\n");
                 }
 
-                if (closePropTag)
-                {
+                if (closePropTag) {
                     e4x.append("\t\t\t</properties>\n");
                 }
 
                 e4x.append("\t\t\t<channels>\n");
-                for (Iterator chanIter = dest.getChannelSettings().iterator(); chanIter.hasNext();)
-                {
+                for (Iterator chanIter = dest.getChannelSettings().iterator(); chanIter.hasNext(); ) {
                     e4x.append("\t\t\t\t<channel ref=\"" + ((ChannelSettings) chanIter.next()).getId() + "\"/>\n");
                 }
                 e4x.append("\t\t\t</channels>\n");
@@ -548,8 +475,7 @@
         // channels
         e4x.append("\t<channels>\n");
         String channelType;
-        for (Iterator chanIter = config.getAllChannelSettings().values().iterator(); chanIter.hasNext();)
-        {
+        for (Iterator chanIter = config.getAllChannelSettings().values().iterator(); chanIter.hasNext(); ) {
             ChannelSettings chan = (ChannelSettings) chanIter.next();
             if (chan.getServerOnly()) // Skip server-only channels.
                 continue;
@@ -568,9 +494,8 @@
             e4x.append("\t\t</channel>\n");
         }
         e4x.append("\t</channels>\n");
-        FlexClientSettings flexClientSettings = (config instanceof ClientConfiguration) ? ((ClientConfiguration)config).getFlexClientSettings() : null;
-        if (flexClientSettings != null && flexClientSettings.getHeartbeatIntervalMillis() > 0)
-        {
+        FlexClientSettings flexClientSettings = (config instanceof ClientConfiguration) ? ((ClientConfiguration) config).getFlexClientSettings() : null;
+        if (flexClientSettings != null && flexClientSettings.getHeartbeatIntervalMillis() > 0) {
             e4x.append("\t<flex-client>\n");
             e4x.append("\t\t<heartbeat-interval-millis>");
             e4x.append(flexClientSettings.getHeartbeatIntervalMillis());
@@ -580,8 +505,7 @@
         e4x.append("</services>");
 
         StringBuffer advancedMessagingSupport = new StringBuffer();
-        if (channelSetImplToImport != null)
-        {
+        if (channelSetImplToImport != null) {
             serviceImportMap.put("ChannelSetImpl", channelSetImplToImport);
 
             // Codegen same class alias registration as is done by flex2.tools.Prelink#codegenRemoteClassAliases(Map<String,String>).
@@ -594,8 +518,7 @@
             advancedMessagingSupport.append("         flash.net.registerClassAlias(\"" + alias + "\", " + className + ");}\n");
             advancedMessagingSupport.append("     } catch (e:Error) {\n");
             advancedMessagingSupport.append("         flash.net.registerClassAlias(\"" + alias + "\", " + className + "); }\n");
-            if (flexClientSettings != null && flexClientSettings.getReliableReconnectDurationMillis() > 0)
-            {
+            if (flexClientSettings != null && flexClientSettings.getReliableReconnectDurationMillis() > 0) {
                 advancedMessagingSupport.append("     AdvancedChannelSet.reliableReconnectDuration =");
                 advancedMessagingSupport.append(flexClientSettings.getReliableReconnectDurationMillis());
                 advancedMessagingSupport.append(";\n");
@@ -609,25 +532,18 @@
     /**
      * Process channel properties recursively.
      */
-    private void channelProperties(ConfigMap properties, StringBuffer buf, String indent)
-    {
-        for (Iterator nameIter = properties.propertyNames().iterator(); nameIter.hasNext();)
-        {
-            String name = (String)nameIter.next();
+    private void channelProperties(ConfigMap properties, StringBuffer buf, String indent) {
+        for (Iterator nameIter = properties.propertyNames().iterator(); nameIter.hasNext(); ) {
+            String name = (String) nameIter.next();
             Object value = properties.get(name);
-            if (value instanceof String)
-            {
-                addStringProperty(buf, indent, name, (String)value);
-            }
-            else if (value instanceof List)
-            {
-                List children = (List)value;
-                for (Iterator childrenIter = children.iterator(); childrenIter.hasNext();)
-                    addStringProperty(buf, indent, name, (String)childrenIter.next());
-            }
-            else if (value instanceof ConfigMap)
-            {
-                ConfigMap childProperties = (ConfigMap)value;
+            if (value instanceof String) {
+                addStringProperty(buf, indent, name, (String) value);
+            } else if (value instanceof List) {
+                List children = (List) value;
+                for (Iterator childrenIter = children.iterator(); childrenIter.hasNext(); )
+                    addStringProperty(buf, indent, name, (String) childrenIter.next());
+            } else if (value instanceof ConfigMap) {
+                ConfigMap childProperties = (ConfigMap) value;
                 buf.append(indent);
                 buf.append("<" + name + ">\n");
                 if (ConfigurationConstants.CLIENT_LOAD_BALANCING_ELEMENT.equals(name))
@@ -639,10 +555,8 @@
         }
     }
 
-    private void addStringProperty(StringBuffer buf, String indent, String name, String value)
-    {
-        if (!channel_excludes.contains(name))
-        {
+    private void addStringProperty(StringBuffer buf, String indent, String name, String value) {
+        if (!channel_excludes.contains(name)) {
             buf.append(indent);
             buf.append("<" + name + ">" + value + "</" + name + ">\n");
         }
@@ -650,22 +564,19 @@
 
     /**
      * Analyze code gen service associations.
-     * @param metadata the ConfigMap object
-     * @param e4x the buffer object
+     *
+     * @param metadata    the ConfigMap object
+     * @param e4x         the buffer object
      * @param destination the current destination
-     * @param relation the relationship 
+     * @param relation    the relationship
      */
-    public void codegenServiceAssociations(ConfigMap metadata, StringBuffer e4x, String destination, String relation)
-    {
+    public void codegenServiceAssociations(ConfigMap metadata, StringBuffer e4x, String destination, String relation) {
         List references = metadata.getPropertyAsList(relation, null);
-        if (references != null)
-        {
+        if (references != null) {
             Iterator it = references.iterator();
-            while (it.hasNext())
-            {
+            while (it.hasNext()) {
                 Object ref = it.next();
-                if (ref instanceof ConfigMap)
-                {
+                if (ref instanceof ConfigMap) {
                     ConfigMap refMap = (ConfigMap) ref;
                     String name = refMap.getPropertyAsString("property", null);
                     String associatedDestination = refMap.getPropertyAsString("destination", null);
@@ -678,14 +589,12 @@
                     String ordered = refMap.getPropertyAsString("ordered", null);
                     e4x.append("\t\t\t\t\t<");
                     e4x.append(relation);
-                    if (lazy != null)
-                    {
+                    if (lazy != null) {
                         e4x.append(" lazy=\"");
                         e4x.append(lazy);
                         e4x.append("\"");
 
-                        if (Boolean.valueOf(lazy.toLowerCase().trim()).booleanValue())
-                        {
+                        if (Boolean.valueOf(lazy.toLowerCase().trim()).booleanValue()) {
                             addLazyAssociation(destination, name);
                         }
                     }
@@ -695,8 +604,7 @@
                     e4x.append(associatedDestination);
                     e4x.append("\"");
                     String readOnly = refMap.getPropertyAsString("read-only", null);
-                    if (readOnly != null && readOnly.equalsIgnoreCase("true"))
-                    {
+                    if (readOnly != null && readOnly.equalsIgnoreCase("true")) {
                         e4x.append(" read-only=\"true\"");
                     }
                     if (loadOnDemand != null && loadOnDemand.equalsIgnoreCase("true"))
@@ -719,27 +627,26 @@
 
     /**
      * This method will return an import and variable reference for channels specified in the map.
-     * @param map HashMap containing the client side channel type to be used, typically of the form
-     * "mx.messaging.channels.XXXXChannel", where the key and value are equal.
-     * @param imports StringBuffer of the imports needed for the given channel definitions
+     *
+     * @param map        HashMap containing the client side channel type to be used, typically of the form
+     *                   "mx.messaging.channels.XXXXChannel", where the key and value are equal.
+     * @param imports    StringBuffer of the imports needed for the given channel definitions
      * @param references StringBuffer of the required references so that these classes will be linked in.
      */
-    public static void codegenServiceImportsAndReferences(Map map, StringBuffer imports, StringBuffer references)
-    {
-        String channelSetImplType = (String)map.remove("ChannelSetImpl");
+    public static void codegenServiceImportsAndReferences(Map map, StringBuffer imports, StringBuffer references) {
+        String channelSetImplType = (String) map.remove("ChannelSetImpl");
         String type;
         imports.append("import mx.messaging.config.ServerConfig;\n");
         references.append("   // static references for configured channels\n");
-        for (Iterator chanIter = map.values().iterator(); chanIter.hasNext();)
-        {
-            type = (String)chanIter.next();
+        for (Iterator chanIter = map.values().iterator(); chanIter.hasNext(); ) {
+            type = (String) chanIter.next();
             imports.append("import ");
             imports.append(type);
             imports.append(";\n");
             references.append("   private static var ");
             references.append(type.replace('.', '_'));
             references.append("_ref:");
-            references.append(type.substring(type.lastIndexOf(".") +1) +";\n");
+            references.append(type.substring(type.lastIndexOf(".") + 1) + ";\n");
         }
         if (channelSetImplType != null)
             imports.append("import mx.messaging.AdvancedChannelSet;\nimport mx.messaging.messages.ReliabilityMessage;\n");
diff --git a/common/src/main/java/flex/messaging/config/TargetSettings.java b/common/src/main/java/flex/messaging/config/TargetSettings.java
index 3bbbf4d..9d85262 100644
--- a/common/src/main/java/flex/messaging/config/TargetSettings.java
+++ b/common/src/main/java/flex/messaging/config/TargetSettings.java
@@ -27,42 +27,33 @@
  * it will accept, a list of filters for logging
  * categories it is interested in, and a collection of
  * properties required to initialize the target.
- *
- *
  */
-public class TargetSettings extends PropertiesSettings
-{
+public class TargetSettings extends PropertiesSettings {
     private String className;
     private String level;
     private List filters;
 
-    public TargetSettings(String className)
-    {
+    public TargetSettings(String className) {
         this.className = className;
     }
 
-    public String getClassName()
-    {
+    public String getClassName() {
         return className;
     }
 
-    public String getLevel()
-    {
+    public String getLevel() {
         return level;
     }
 
-    public void setLevel(String level)
-    {
+    public void setLevel(String level) {
         this.level = level;
     }
 
-    public List getFilters()
-    {
+    public List getFilters() {
         return filters;
     }
 
-    public void addFilter(String filter)
-    {
+    public void addFilter(String filter) {
         if (filters == null)
             filters = new ArrayList();
 
diff --git a/common/src/main/java/flex/messaging/config/TokenReplacer.java b/common/src/main/java/flex/messaging/config/TokenReplacer.java
index 90c4fd0..f1b06db 100644
--- a/common/src/main/java/flex/messaging/config/TokenReplacer.java
+++ b/common/src/main/java/flex/messaging/config/TokenReplacer.java
@@ -35,18 +35,15 @@
 
 /**
  * This class is used by configuration parser to replace tokens of the format
- * {...} with actual values. The value can either come from a JVM property 
- * (eg. -Dmy.channel.id=my-amf) or from a token properties file specified via 
+ * {...} with actual values. The value can either come from a JVM property
+ * (eg. -Dmy.channel.id=my-amf) or from a token properties file specified via
  * token.file JVM property (eg. -Dtoken.file=/usr/local/tokens.properties) where
  * the token key and value are specified in the property file.
- * 
+ * <p>
  * If a token value is both specified as a JVM property and inside the token.file,
  * JVM property takes precedence.
- *
- *
  */
-public class TokenReplacer
-{
+public class TokenReplacer {
     private static final String TOKEN_FILE = "token.file";
     private static final Pattern pattern = Pattern.compile("\\{(.*?)\\}");
 
@@ -57,8 +54,7 @@
     /**
      * Default constructor.
      */
-    public TokenReplacer()
-    {
+    public TokenReplacer() {
         replacedTokens = new LinkedHashMap();
         loadTokenProperties();
     }
@@ -66,11 +62,10 @@
     /**
      * Replace any tokens in the value of the node or the text child of the node.
      *
-     * @param node The node whose value will be searched for tokens.
+     * @param node           The node whose value will be searched for tokens.
      * @param sourceFileName The source file where the node came from.
      */
-    public void replaceToken(Node node, String sourceFileName)
-    {
+    public void replaceToken(Node node, String sourceFileName) {
         // Exit if we are attempting to replace one of the forbidden nodes - nodes
         // that may have curly brackets as part of their syntax
         if (ConfigurationConstants.IP_ADDRESS_PATTERN.equals(node.getNodeName()))
@@ -79,15 +74,12 @@
         // ReplacementNode is either the original node if it has a value or the text
         // child of the node if it does not have a value
         Node replacementNode;
-        if (node.getNodeValue() == null)
-        {
+        if (node.getNodeValue() == null) {
             if (node.getChildNodes().getLength() == 1 && node.getFirstChild() instanceof Text)
                 replacementNode = node.getFirstChild();
             else
                 return;
-        }
-        else
-        {
+        } else {
             replacementNode = node;
         }
 
@@ -98,8 +90,7 @@
             String tokenWithCurlyBraces = matcher.group();
             String tokenWithoutCurlyBraces = matcher.group(1);
             String propertyValue = getPropertyValue(tokenWithoutCurlyBraces);
-            if (propertyValue != null)
-            {
+            if (propertyValue != null) {
                 nodeValue = StringUtils.substitute(nodeValue, tokenWithCurlyBraces, propertyValue);
                 replacedTokens.put(tokenWithCurlyBraces, propertyValue);
             }
@@ -109,8 +100,7 @@
             else if (!ConfigurationConstants.CONTEXT_PATH_TOKEN.equals(tokenWithCurlyBraces)
                     && !ConfigurationConstants.CONTEXT_PATH_ALT_TOKEN.equals(tokenWithCurlyBraces)
                     && !ConfigurationConstants.SERVER_NAME_TOKEN.equals(tokenWithCurlyBraces)
-                    && !ConfigurationConstants.SERVER_PORT_TOKEN.equals(tokenWithCurlyBraces))
-            {
+                    && !ConfigurationConstants.SERVER_PORT_TOKEN.equals(tokenWithCurlyBraces)) {
                 // Token ''{0}'' in ''{1}'' was not replaced. Either supply a value to this token with a JVM option, or remove it from the configuration.
                 ConfigurationException ex = new ConfigurationException();
                 Object[] args = {tokenWithCurlyBraces, sourceFileName};
@@ -122,12 +112,11 @@
     }
 
     /**
-     * See if the token have a value either provided as a JVM property or as 
+     * See if the token have a value either provided as a JVM property or as
      * part of the token property file. JVM property takes precedence on the token
      * property file.
      */
-    private String getPropertyValue(String tokenWithoutCurlyBraces)
-    {
+    private String getPropertyValue(String tokenWithoutCurlyBraces) {
         String propertyValue = System.getProperty(tokenWithoutCurlyBraces);
         if (propertyValue != null)
             return propertyValue;
@@ -141,27 +130,21 @@
     /**
      * Used by the parser to report the replaced tokens once logging is setup.
      */
-    public void reportTokens()
-    {
-        if (Log.isWarn())
-        {
+    public void reportTokens() {
+        if (Log.isWarn()) {
             if (tokenProperties != null && Log.isDebug())
                 Log.getLogger(LogCategories.CONFIGURATION).debug("Token replacer is using the token file '" + tokenPropertiesFilename + "'");
 
-            for (Iterator iter = replacedTokens.entrySet().iterator(); iter.hasNext();)
-            {
-                Map.Entry entry = (Map.Entry)iter.next();
-                String tokenWithParanthesis = (String)entry.getKey();
-                String propertyValue = (String)entry.getValue();
+            for (Iterator iter = replacedTokens.entrySet().iterator(); iter.hasNext(); ) {
+                Map.Entry entry = (Map.Entry) iter.next();
+                String tokenWithParanthesis = (String) entry.getKey();
+                String propertyValue = (String) entry.getValue();
                 // Issue a special warning for context.root replacements,
                 if (ConfigurationConstants.CONTEXT_PATH_TOKEN.equals(tokenWithParanthesis)
-                        || ConfigurationConstants.CONTEXT_PATH_ALT_TOKEN.equals(tokenWithParanthesis))
-                {
+                        || ConfigurationConstants.CONTEXT_PATH_ALT_TOKEN.equals(tokenWithParanthesis)) {
                     Log.getLogger(LogCategories.CONFIGURATION).warn("Token '{0}' was replaced with '{1}'. Note that this will apply to all applications on the JVM",
                             new Object[]{tokenWithParanthesis, propertyValue});
-                }
-                else if (Log.isDebug())
-                {
+                } else if (Log.isDebug()) {
                     Log.getLogger(LogCategories.CONFIGURATION).debug("Token '{0}' was replaced with '{1}'", new Object[]{tokenWithParanthesis, propertyValue});
                 }
             }
@@ -169,33 +152,26 @@
     }
 
     /**
-     * Given a String, determines whether the string contains tokens. 
-     * 
+     * Given a String, determines whether the string contains tokens.
+     *
      * @param value The String to check.
      * @return True if the String contains tokens.
      */
-    public static boolean containsTokens(String value)
-    {
-        return (value != null && value.length() > 0)? pattern.matcher(value).find() : false;
+    public static boolean containsTokens(String value) {
+        return (value != null && value.length() > 0) ? pattern.matcher(value).find() : false;
     }
 
-    private void loadTokenProperties()
-    {
+    private void loadTokenProperties() {
         tokenPropertiesFilename = System.getProperty(TOKEN_FILE);
         if (tokenPropertiesFilename == null)
             return;
 
         tokenProperties = new Properties();
-        try
-        {
+        try {
             tokenProperties.load(new FileInputStream(tokenPropertiesFilename));
-        }
-        catch (FileNotFoundException e)
-        {
+        } catch (FileNotFoundException e) {
             tokenProperties = null;
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
             tokenProperties = null;
         }
     }
diff --git a/common/src/main/java/flex/messaging/config/XPathClientConfigurationParser.java b/common/src/main/java/flex/messaging/config/XPathClientConfigurationParser.java
index 2495754..1ecedbc 100644
--- a/common/src/main/java/flex/messaging/config/XPathClientConfigurationParser.java
+++ b/common/src/main/java/flex/messaging/config/XPathClientConfigurationParser.java
@@ -31,59 +31,42 @@
  * NOTE: Since reference ids are used between elements, certain
  * sections of the document need to be parsed first.
  * </p>
- *
- *
  */
-public class XPathClientConfigurationParser extends ClientConfigurationParser
-{
+public class XPathClientConfigurationParser extends ClientConfigurationParser {
     private XPath xpath;
 
-    protected void initializeExpressionQuery()
-    {
+    protected void initializeExpressionQuery() {
         this.xpath = XPathFactory.newInstance().newXPath();
     }
 
-    protected Node selectSingleNode(Node source, String expression)
-    {
-        try
-        {
+    protected Node selectSingleNode(Node source, String expression) {
+        try {
             return (Node) xpath.evaluate(expression, source, XPathConstants.NODE);
-        }
-        catch (XPathExpressionException expressionException)
-        {
+        } catch (XPathExpressionException expressionException) {
             throw wrapException(expressionException);
         }
     }
 
-    protected NodeList selectNodeList(Node source, String expression)
-    {
-        try
-        {
+    protected NodeList selectNodeList(Node source, String expression) {
+        try {
             return (NodeList) xpath.evaluate(expression, source, XPathConstants.NODESET);
-        }
-        catch (XPathExpressionException expressionException)
-        {
+        } catch (XPathExpressionException expressionException) {
             throw wrapException(expressionException);
         }
     }
 
-    protected Object evaluateExpression(Node source, String expression)
-    {
-        try
-        {
+    protected Object evaluateExpression(Node source, String expression) {
+        try {
             return xpath.evaluate(expression, source, XPathConstants.STRING);
-        }
-        catch (XPathExpressionException expressionException)
-        {
+        } catch (XPathExpressionException expressionException) {
             throw wrapException(expressionException);
         }
     }
 
-    private ConfigurationException wrapException(XPathExpressionException exception)
-    {
-       ConfigurationException result = new ConfigurationException();
-       result.setDetails(PARSER_INTERNAL_ERROR);
-       result.setRootCause(exception);
-       return result;
+    private ConfigurationException wrapException(XPathExpressionException exception) {
+        ConfigurationException result = new ConfigurationException();
+        result.setDetails(PARSER_INTERNAL_ERROR);
+        result.setRootCause(exception);
+        return result;
     }
 }
diff --git a/common/src/main/java/flex/messaging/log/AbstractTarget.java b/common/src/main/java/flex/messaging/log/AbstractTarget.java
index 25e7040..091696c 100644
--- a/common/src/main/java/flex/messaging/log/AbstractTarget.java
+++ b/common/src/main/java/flex/messaging/log/AbstractTarget.java
@@ -27,8 +27,7 @@
 /**
  *
  */
-public abstract class AbstractTarget implements Target
-{
+public abstract class AbstractTarget implements Target {
     private static final int INVALID_FILTER_CHARS = 10016;
     private static final int INVALID_FILTER_STAR = 10017;
 
@@ -48,8 +47,7 @@
     /**
      * Default constructor.
      */
-    public AbstractTarget()
-    {
+    public AbstractTarget() {
         id = UUIDUtils.createUUID();
         level = LogEvent.ERROR;
         filters = new ArrayList();
@@ -66,11 +64,10 @@
     /**
      * Initializes the target with id and properties. Subclasses can overwrite.
      *
-     * @param id id for the target which is ignored.
+     * @param id         id for the target which is ignored.
      * @param properties ConfigMap of properties for the target.
      */
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         // No-op
     }
 
@@ -85,8 +82,7 @@
      *
      * @return An unmodifiable list of filters.
      */
-    public List getFilters()
-    {
+    public List getFilters() {
         return Collections.unmodifiableList(new ArrayList(filters));
     }
 
@@ -95,21 +91,17 @@
      *
      * @param value Filter to be added.
      */
-    public void addFilter(String value)
-    {
+    public void addFilter(String value) {
         if (value != null)
             validateFilter(value);
         else // Default to "*"
             value = "*";
 
         boolean filterWasAdded = false;
-        synchronized (lock)
-        {
-            if (!filters.contains(value))
-            {
+        synchronized (lock) {
+            if (!filters.contains(value)) {
                 // If the default filter is being used, remove it.
-                if (usingDefaultFilter)
-                {
+                if (usingDefaultFilter) {
                     removeFilter("*");
                     usingDefaultFilter = false;
                 }
@@ -126,11 +118,9 @@
      *
      * @param value Filter to be removed.
      */
-    public void removeFilter(String value)
-    {
+    public void removeFilter(String value) {
         boolean filterWasRemoved;
-        synchronized (lock)
-        {
+        synchronized (lock) {
             filterWasRemoved = filters.remove(value);
         }
         if (filterWasRemoved)
@@ -142,28 +132,22 @@
      *
      * @param value List of filters.
      */
-    public void setFilters(List value)
-    {
-        if (value != null && value.size() > 0)
-        {
+    public void setFilters(List value) {
+        if (value != null && value.size() > 0) {
             // a valid filter value will be fully qualified or have a wildcard
             // in it.  the wild card can only be located at the end of the
             // expression.  valid examples  xx*, xx.*,  *
-            for (int i = 0; i < value.size(); i++)
-            {
+            for (int i = 0; i < value.size(); i++) {
                 validateFilter((String) value.get(i));
             }
-        }
-        else
-        {
+        } else {
             // if null was specified then default to all
             value = new ArrayList();
             value.add("*");
         }
 
         Log.removeTarget(this);
-        synchronized (lock)
-        {
+        synchronized (lock) {
             filters = value;
             usingDefaultFilter = false;
         }
@@ -175,8 +159,7 @@
      *
      * @return the log level set for this target.
      */
-    public short getLevel()
-    {
+    public short getLevel() {
         return level;
     }
 
@@ -185,16 +168,14 @@
      *
      * @return the target's unique ID.
      */
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
     /**
      * Sets the log level for this target. If not set, defaults to <code>LogEvent.ERROR</code>.
      */
-    public void setLevel(short value)
-    {
+    public void setLevel(short value) {
         level = value;
         Log.resetTargetLevel();
     }
@@ -205,12 +186,9 @@
      *
      * @param logger this target should listen to.
      */
-    public void addLogger(Logger logger)
-    {
-        if (logger != null)
-        {
-            synchronized (lock)
-            {
+    public void addLogger(Logger logger) {
+        if (logger != null) {
+            synchronized (lock) {
                 loggerCount++;
             }
             logger.addTarget(this);
@@ -222,12 +200,9 @@
      *
      * @param logger this target should ignore.
      */
-    public void removeLogger(Logger logger)
-    {
-        if (logger != null)
-        {
-            synchronized (lock)
-            {
+    public void removeLogger(Logger logger) {
+        if (logger != null) {
+            synchronized (lock) {
                 loggerCount--;
             }
             logger.removeTarget(this);
@@ -238,8 +213,7 @@
      * @param filter category to check against the filters defined for this target
      * @return whether filter is defined
      */
-    public boolean containsFilter(String filter)
-    {
+    public boolean containsFilter(String filter) {
         return filters.contains(filter);
     }
 
@@ -249,11 +223,9 @@
     //
     //--------------------------------------------------------------------------
 
-    private void validateFilter(String value)
-    {
+    private void validateFilter(String value) {
         // check for invalid characters
-        if (Log.hasIllegalCharacters(value))
-        {
+        if (Log.hasIllegalCharacters(value)) {
             //Error for filter '{filter}'. The following characters are not valid: {Log.INVALID_CHARS}
             LocalizedException ex = new LocalizedException();
             ex.setMessage(INVALID_FILTER_CHARS, new Object[]{value, Log.INVALID_CHARS});
@@ -261,8 +233,7 @@
         }
 
         int index = value.indexOf('*');
-        if ((index >= 0) && (index != (value.length() - 1)))
-        {
+        if ((index >= 0) && (index != (value.length() - 1))) {
             //Error for filter '{filter}'. '*' must be the right most character.
             LocalizedException ex = new LocalizedException();
             ex.setMessage(INVALID_FILTER_STAR, new Object[]{value});
diff --git a/common/src/main/java/flex/messaging/log/ConsoleTarget.java b/common/src/main/java/flex/messaging/log/ConsoleTarget.java
index b9faf76..54c627e 100644
--- a/common/src/main/java/flex/messaging/log/ConsoleTarget.java
+++ b/common/src/main/java/flex/messaging/log/ConsoleTarget.java
@@ -19,8 +19,7 @@
 /**
  *
  */
-public class ConsoleTarget extends LineFormattedTarget
-{
+public class ConsoleTarget extends LineFormattedTarget {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -30,13 +29,11 @@
     /**
      * Default constructor.
      */
-    public ConsoleTarget()
-    {
+    public ConsoleTarget() {
         super();
     }
 
-    protected void internalLog(String message)
-    {
+    protected void internalLog(String message) {
         System.out.println(message);
     }
 }
diff --git a/common/src/main/java/flex/messaging/log/LineFormattedTarget.java b/common/src/main/java/flex/messaging/log/LineFormattedTarget.java
index 1864bb0..9afe3e5 100644
--- a/common/src/main/java/flex/messaging/log/LineFormattedTarget.java
+++ b/common/src/main/java/flex/messaging/log/LineFormattedTarget.java
@@ -27,8 +27,7 @@
 /**
  *
  */
-public class LineFormattedTarget extends AbstractTarget
-{
+public class LineFormattedTarget extends AbstractTarget {
     /**
      * Indicates if the date should be added to the trace.
      */
@@ -75,8 +74,7 @@
     /**
      * Default constructor.
      */
-    public LineFormattedTarget()
-    {
+    public LineFormattedTarget() {
         super();
     }
 
@@ -89,11 +87,10 @@
     /**
      * Initializes the target with id and properties. Subclasses can overwrite.
      *
-     * @param id id for the target which is ignored.
+     * @param id         id for the target which is ignored.
      * @param properties ConfigMap of properties for the target.
      */
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
         includeTime = properties.getPropertyAsBoolean("includeTime", false);
@@ -114,8 +111,7 @@
      *
      * @return <code>true</code> if category is included; <code>false</code> otherwise.
      */
-    public boolean isIncludeCategory()
-    {
+    public boolean isIncludeCategory() {
         return includeCategory;
     }
 
@@ -124,8 +120,7 @@
      *
      * @param includeCategory the include category
      */
-    public void setIncludeCategory(boolean includeCategory)
-    {
+    public void setIncludeCategory(boolean includeCategory) {
         this.includeCategory = includeCategory;
     }
 
@@ -134,18 +129,16 @@
      *
      * @return <code>true</code> if date is included; <code>false</code> otherwise.
      */
-    public boolean isIncludeDate()
-    {
+    public boolean isIncludeDate() {
         return includeDate;
     }
 
     /**
      * Sets includeDate property.
      *
-     * @param includeDate the include date 
+     * @param includeDate the include date
      */
-    public void setIncludeDate(boolean includeDate)
-    {
+    public void setIncludeDate(boolean includeDate) {
         this.includeDate = includeDate;
     }
 
@@ -154,8 +147,7 @@
      *
      * @return <code>true</code> if level is included; <code>false</code> otherwise.
      */
-    public boolean isIncludeLevel()
-    {
+    public boolean isIncludeLevel() {
         return includeLevel;
     }
 
@@ -164,8 +156,7 @@
      *
      * @param includeLevel the include level
      */
-    public void setIncludeLevel(boolean includeLevel)
-    {
+    public void setIncludeLevel(boolean includeLevel) {
         this.includeLevel = includeLevel;
     }
 
@@ -174,8 +165,7 @@
      *
      * @return <code>true</code> if time is included; <code>false</code> otherwise.
      */
-    public boolean isIncludeTime()
-    {
+    public boolean isIncludeTime() {
         return includeTime;
     }
 
@@ -184,8 +174,7 @@
      *
      * @param includeTime the include time
      */
-    public void setIncludeTime(boolean includeTime)
-    {
+    public void setIncludeTime(boolean includeTime) {
         this.includeTime = includeTime;
     }
 
@@ -194,8 +183,7 @@
      *
      * @return The prefix for log messages.
      */
-    public String getPrefix()
-    {
+    public String getPrefix() {
         return prefix;
     }
 
@@ -204,8 +192,7 @@
      *
      * @param prefix the prefix string
      */
-    public void setPrefix(String prefix)
-    {
+    public void setPrefix(String prefix) {
         this.prefix = prefix;
     }
 
@@ -215,28 +202,24 @@
      * format for transmission, storage, or display.
      * This method will be called only if the event's level is in range of the
      * target's level.
+     *
      * @param event the log event
      */
-    public void logEvent(LogEvent event)
-    {
+    public void logEvent(LogEvent event) {
         String pre = "";
-        if (prefix != null)
-        {
+        if (prefix != null) {
             pre = prefix + " "; // any space is stripped from config
         }
 
         String date = "";
-        if (includeDate || includeTime)
-        {
+        if (includeDate || includeTime) {
             StringBuffer buffer = new StringBuffer();
             Date d = new Date();
-            if (includeDate)
-            {
+            if (includeDate) {
                 buffer.append(dateFormater.format(d));
                 buffer.append(" ");
             }
-            if (includeTime)
-            {
+            if (includeTime) {
                 buffer.append(timeFormatter.format(d));
                 buffer.append(" ");
             }
@@ -244,10 +227,9 @@
         }
 
         String cat = includeCategory ?
-                           ("[" + event.logger.getCategory() + "] ") : "";
+                ("[" + event.logger.getCategory() + "] ") : "";
         String level = "";
-        if (includeLevel)
-        {
+        if (includeLevel) {
             StringBuffer buffer = new StringBuffer();
             buffer.append("[");
             buffer.append(LogEvent.getLevelString(event.level));
@@ -274,13 +256,12 @@
      * Descendants of this class should override this method to direct the
      * specified message to the desired output.
      *
-     * @param  message String containing preprocessed log message which may
-     * include time, date, category, etc. based on property settings,
-     * such as <code>includeDate</code>, <code>includeCategory</code>,
-     * etc.
+     * @param message String containing preprocessed log message which may
+     *                include time, date, category, etc. based on property settings,
+     *                such as <code>includeDate</code>, <code>includeCategory</code>,
+     *                etc.
      */
-    protected void internalLog(String message)
-    {
+    protected void internalLog(String message) {
         // override this method to perform the redirection to the desired output
     }
 }
diff --git a/common/src/main/java/flex/messaging/log/Log.java b/common/src/main/java/flex/messaging/log/Log.java
index 570911a..6018772 100644
--- a/common/src/main/java/flex/messaging/log/Log.java
+++ b/common/src/main/java/flex/messaging/log/Log.java
@@ -32,8 +32,7 @@
 /**
  *
  */
-public class Log
-{
+public class Log {
 
     public static final String INVALID_CHARS = "[]~$^&\\/(){}<>+=`!#%?,:;\'\"@";
 
@@ -65,8 +64,7 @@
     /**
      * Private constructor.
      */
-    private Log()
-    {
+    private Log() {
         targetLevel = LogEvent.NONE;
         loggers = new HashMap();
         targets = new ArrayList();
@@ -80,10 +78,8 @@
      *
      * @return log.
      */
-    public static Log createLog()
-    {
-        synchronized (staticLock)
-        {
+    public static Log createLog() {
+        synchronized (staticLock) {
             if (log == null)
                 log = new Log();
 
@@ -100,11 +96,10 @@
     /**
      * Initializes Log with id and properties.
      *
-     * @param id Id for the Log which is ignored, though is used by the ManageableComponent superclass
+     * @param id         Id for the Log which is ignored, though is used by the ManageableComponent superclass
      * @param properties ConfigMap of properties for the Log.
      */
-    public static synchronized void initialize(String id, ConfigMap properties)
-    {
+    public static synchronized void initialize(String id, ConfigMap properties) {
         String value = properties.getPropertyAsString("pretty-printer", null);
         if (value != null)
             prettyPrinterClass = value;
@@ -112,8 +107,7 @@
         // Create a HashSet with the properties that we want to exclude from the
         // list of properties given by 'getPropertiesAsList'
         ConfigMap excludeMap = properties.getPropertyAsMap("exclude-properties", null);
-        if (excludeMap != null)
-        {
+        if (excludeMap != null) {
             if (excludeMap.getPropertyAsList("property", null) != null)
                 excludedProperties.addAll(excludeMap.getPropertyAsList("property", null));
         }
@@ -127,56 +121,56 @@
 
     /**
      * Indicates whether a fatal level log event will be processed by a log target.
+     *
      * @return boolean true if it is Fatal level
      */
-    public static boolean isFatal()
-    {
+    public static boolean isFatal() {
         return log == null ? false : log.targetLevel <= LogEvent.FATAL;
     }
 
     /**
      * Indicates whether an error level log event will be processed by a log target.
+     *
      * @return boolean true if it is Error level
      */
-    public static boolean isError()
-    {
+    public static boolean isError() {
         return log == null ? false : log.targetLevel <= LogEvent.ERROR;
     }
 
     /**
      * Indicates whether a warn level log event will be processed by a log target.
+     *
      * @return boolean true if it is Warn level
      */
-    public static boolean isWarn()
-    {
+    public static boolean isWarn() {
         return log == null ? false : log.targetLevel <= LogEvent.WARN;
     }
 
     /**
      * Indicates whether an info level log event will be processed by a log target.
+     *
      * @return boolean true if it is Info level
      */
-    public static boolean isInfo()
-    {
+    public static boolean isInfo() {
         return log == null ? false : log.targetLevel <= LogEvent.INFO;
     }
 
     /**
      * Indicates whether a debug level log event will be processed by a log target.
+     *
      * @return boolean true if it is debug level
      */
-    public static boolean isDebug()
-    {
+    public static boolean isDebug() {
         return log == null ? false : log.targetLevel <= LogEvent.DEBUG;
     }
 
     /**
      * Indicates whether a log property should be excluded.
+     *
      * @param property the property to check
      * @return boolean true if the property should be excluded
      */
-    public static boolean isExcludedProperty(String property)
-    {
+    public static boolean isExcludedProperty(String property) {
         return !excludedProperties.isEmpty() && excludedProperties.contains(property);
     }
 
@@ -187,8 +181,7 @@
      * @param category Categogry for the logger.
      * @return Logger associated with the category.
      */
-    public static Logger getLogger(String category)
-    {
+    public static Logger getLogger(String category) {
         if (log != null)
             return getLogger(log, category);
 
@@ -197,24 +190,20 @@
     }
 
     /**
-     * @param log base logger.
+     * @param log      base logger.
      * @param category category to log to.
      * @return Logger instance for the given category.
      */
-    public static Logger getLogger(Log log, String category)
-    {
+    public static Logger getLogger(Log log, String category) {
         checkCategory(category);
 
-        synchronized (staticLock)
-        {
+        synchronized (staticLock) {
             Logger result = (Logger) log.loggers.get(category);
-            if (result == null)
-            {
+            if (result == null) {
                 result = new Logger(category);
 
                 // Check to see if there are any targets for this logger.
-                for (Iterator iter = log.targets.iterator(); iter.hasNext();)
-                {
+                for (Iterator iter = log.targets.iterator(); iter.hasNext(); ) {
                     Target target = (Target) iter.next();
                     if (categoryMatchInFilterList(category, target.getFilters()))
                         target.addLogger(result);
@@ -229,16 +218,14 @@
     /**
      * Returns an unmodifiable snapshot of the targets registered with this Log when the
      * method is invoked.
-     * @return List the list of targets 
+     *
+     * @return List the list of targets
      */
-    public static List getTargets()
-    {
-        if (log != null)
-        {
+    public static List getTargets() {
+        if (log != null) {
             List currentTargets;
             // Snapshot the current target list (shallow copy) and return it.
-            synchronized (staticLock)
-            {
+            synchronized (staticLock) {
                 currentTargets = Collections.unmodifiableList(new ArrayList(log.targets));
             }
             return currentTargets;
@@ -248,15 +235,13 @@
 
     /**
      * Return the Log's map of targets keyed on their human-readable ids (e.g. ConsoleTarget0, ConsoleTarget1, etc.)
+     *
      * @return Map the target map
      */
-    public static Map getTargetMap()
-    {
-        if (log != null)
-        {
+    public static Map getTargetMap() {
+        if (log != null) {
             Map currentTargets;
-            synchronized (staticLock)
-            {
+            synchronized (staticLock) {
                 currentTargets = new LinkedHashMap(log.targetMap);
             }
             return currentTargets;
@@ -267,15 +252,13 @@
     /**
      * Returns the target associated with the unique ID searchId.  Returns null if no
      * such target exists.
+     *
      * @param searchId the search ID
      * @return Target the associated target
      */
-    public static Target getTarget(String searchId)
-    {
-        if (log != null)
-        {
-            synchronized (staticLock)
-            {
+    public static Target getTarget(String searchId) {
+        if (log != null) {
+            synchronized (staticLock) {
                 return (Target) log.targetMap.get(searchId);
             }
         }
@@ -285,25 +268,20 @@
 
     /**
      * Return the categories for all of the loggers
+     *
      * @return String[] the categories for all of the loggers
      */
-    public String[] getLoggers()
-    {
+    public String[] getLoggers() {
         String[] currentCategories;
-        if (log != null)
-        {
-            synchronized (staticLock)
-            {
+        if (log != null) {
+            synchronized (staticLock) {
                 Object[] currentCategoryObjects = loggers.keySet().toArray();
                 currentCategories = new String[currentCategoryObjects.length];
-                for (int i = 0; i < currentCategoryObjects.length; i++)
-                {
-                    currentCategories[i] = (String)(currentCategoryObjects[i]);
+                for (int i = 0; i < currentCategoryObjects.length; i++) {
+                    currentCategories[i] = (String) (currentCategoryObjects[i]);
                 }
             }
-        }
-        else
-        {
+        } else {
             currentCategories = new String[0];
         }
 
@@ -315,21 +293,16 @@
      *
      * @param target Target to be added.
      */
-    public static void addTarget(Target target)
-    {
-        if (log != null)
-        {
-            if (target != null)
-            {
-                synchronized (staticLock)
-                {
+    public static void addTarget(Target target) {
+        if (log != null) {
+            if (target != null) {
+                synchronized (staticLock) {
                     List filters = target.getFilters();
 
                     // need to find what filters this target matches and set the specified
                     // target as a listener for that logger.
                     Iterator it = log.loggers.keySet().iterator();
-                    while (it.hasNext())
-                    {
+                    while (it.hasNext()) {
                         String key = (String) it.next();
                         if (categoryMatchInFilterList(key, filters))
                             target.addLogger((Logger) log.loggers.get(key));
@@ -340,12 +313,10 @@
                     if (!log.targets.contains(target))
                         log.targets.add(target);
 
-                    if (!log.targetMap.containsValue(target))
-                    {
+                    if (!log.targetMap.containsValue(target)) {
                         String name = target.getClass().getName();
 
-                        if (name.indexOf(".") > -1)
-                        {
+                        if (name.indexOf(".") > -1) {
                             String[] classes = name.split("\\.");
                             name = classes[classes.length - 1];
                         }
@@ -357,14 +328,11 @@
                     short targetLevel = target.getLevel();
                     if (log.targetLevel == LogEvent.NONE)
                         log.targetLevel = targetLevel;
-                    else if (targetLevel < log.targetLevel)
-                    {
+                    else if (targetLevel < log.targetLevel) {
                         log.targetLevel = targetLevel;
                     }
                 }
-            }
-            else
-            {
+            } else {
                 // Invalid target specified. Target must not be null.
                 LocalizedException ex = new LocalizedException();
                 ex.setMessage(INVALID_TARGET);
@@ -378,19 +346,14 @@
      *
      * @param target The target to be removed.
      */
-    public static void removeTarget(Target target)
-    {
-        if (log != null)
-        {
-            if (target != null)
-            {
-                synchronized (staticLock)
-                {
+    public static void removeTarget(Target target) {
+        if (log != null) {
+            if (target != null) {
+                synchronized (staticLock) {
                     // Remove the target from any associated loggers.
                     List filters = target.getFilters();
                     Iterator it = log.loggers.keySet().iterator();
-                    while (it.hasNext())
-                    {
+                    while (it.hasNext()) {
                         String key = (String) it.next();
                         if (categoryMatchInFilterList(key, filters))
                             target.removeLogger((Logger) log.loggers.get(key));
@@ -399,9 +362,7 @@
                     log.targets.remove(target);
                     resetTargetLevel();
                 }
-            }
-            else
-            {
+            } else {
                 // Invalid target specified. Target must not be null.
                 LocalizedException ex = new LocalizedException();
                 ex.setMessage(INVALID_TARGET);
@@ -420,18 +381,15 @@
      * This method removes all of the current loggers and targets from the cache.
      * and resets target level.
      */
-    public static synchronized void reset()
-    {
+    public static synchronized void reset() {
         flush();
     }
 
     /**
      *
      */
-    public static void flush()
-    {
-        if (log != null)
-        {
+    public static void flush() {
+        if (log != null) {
             log.loggers.clear();
             log.targets.clear();
             log.targetLevel = LogEvent.NONE;
@@ -442,15 +400,12 @@
      * @param l string representation of the log level.
      * @return a short value representing the log level.
      */
-    public static short readLevel(String l)
-    {
+    public static short readLevel(String l) {
         short lvl = LogEvent.ERROR;
-        if ((l != null) && (l.length() > 0))
-        {
+        if ((l != null) && (l.length() > 0)) {
             l = l.trim().toLowerCase();
             char c = l.charAt(0);
-            switch (c)
-            {
+            switch (c) {
                 case 'n':
                     lvl = LogEvent.NONE;
                     break;
@@ -478,23 +433,19 @@
     }
 
     /**
-     *
      * This method checks the specified string value for illegal characters.
      *
      * @param value to check for illegal characters.
      *              The following characters are not valid:
      *              []~$^&amp;\/(){}&lt;&gt;+=`!#%?,:;'"&amp;#64;
      * @return <code>true</code> if there are any illegal characters found,
-     *         <code>false</code> otherwise
+     * <code>false</code> otherwise
      */
-    public static boolean hasIllegalCharacters(String value)
-    {
+    public static boolean hasIllegalCharacters(String value) {
         char[] chars = value.toCharArray();
-        for (int i = 0; i < chars.length; i++)
-        {
+        for (int i = 0; i < chars.length; i++) {
             char c = chars[i];
-            if (INVALID_CHARS.indexOf(c) != -1)
-            {
+            if (INVALID_CHARS.indexOf(c) != -1) {
                 return true;
             }
         }
@@ -507,22 +458,17 @@
      *
      * @return the PrettyPrinter used by the Log.
      */
-    public static PrettyPrinter getPrettyPrinter()
-    {
+    public static PrettyPrinter getPrettyPrinter() {
         if (prettyPrinter == null ||
-                !prettyPrinter.getClass().getName().equals(prettyPrinterClass))
-        {
-            try
-            {
+                !prettyPrinter.getClass().getName().equals(prettyPrinterClass)) {
+            try {
                 Class c = Class.forName(prettyPrinterClass);
-                prettyPrinter = (PrettyPrinter)c.newInstance();
-            }
-            catch (Throwable t)
-            {
+                prettyPrinter = (PrettyPrinter) c.newInstance();
+            } catch (Throwable t) {
                 throw new RuntimeException("Error creating instance of default pretty printer.", t);
             }
         }
-        return (PrettyPrinter)prettyPrinter.copy();
+        return (PrettyPrinter) prettyPrinter.copy();
     }
 
     /**
@@ -530,19 +476,16 @@
      *
      * @return the current target level for the Log.
      */
-    public static short getTargetLevel()
-    {
+    public static short getTargetLevel() {
         return log == null ? LogEvent.NONE : log.targetLevel;
     }
 
     /**
-     *
      * Sets the pretty printer class name used by the log.
      *
      * @param value Name of the pretty printer class.
      */
-    public static void setPrettyPrinterClass(String value)
-    {
+    public static void setPrettyPrinterClass(String value) {
         prettyPrinterClass = value;
     }
 
@@ -552,15 +495,12 @@
     //
     //--------------------------------------------------------------------------
 
-    /* package */ static void resetTargetLevel()
-    {
-        if (log != null)
-        {
-            synchronized (staticLock)
-            {
+    /* package */
+    static void resetTargetLevel() {
+        if (log != null) {
+            synchronized (staticLock) {
                 short maxTargetLevel = LogEvent.NONE;
-                for (Iterator iter = log.targets.iterator(); iter.hasNext();)
-                {
+                for (Iterator iter = log.targets.iterator(); iter.hasNext(); ) {
                     short targetLevel = ((Target) iter.next()).getLevel();
                     if (maxTargetLevel == LogEvent.NONE || targetLevel < maxTargetLevel)
                         maxTargetLevel = targetLevel;
@@ -570,20 +510,17 @@
         }
     }
 
-    /* package */ static void processTargetFilterAdd(Target target, String filter)
-    {
-        if (log != null)
-        {
-            synchronized (staticLock)
-            {
+    /* package */
+    static void processTargetFilterAdd(Target target, String filter) {
+        if (log != null) {
+            synchronized (staticLock) {
                 List filters = new ArrayList();
                 filters.add(filter);
 
                 // Find the loggers this target matches and add the
                 // target as a listener for log events from these loggers.
                 Iterator it = log.loggers.keySet().iterator();
-                while (it.hasNext())
-                {
+                while (it.hasNext()) {
                     String key = (String) it.next();
                     if (categoryMatchInFilterList(key, filters))
                         target.addLogger((Logger) log.loggers.get(key));
@@ -592,18 +529,15 @@
         }
     }
 
-    /* package */ static void processTargetFilterRemove(Target target, String filter)
-    {
-        if (log != null)
-        {
-            synchronized (staticLock)
-            {
+    /* package */
+    static void processTargetFilterRemove(Target target, String filter) {
+        if (log != null) {
+            synchronized (staticLock) {
                 // Remove the target from any matching loggers.
                 List filters = new ArrayList();
                 filters.add(filter);
                 Iterator it = log.loggers.keySet().iterator();
-                while (it.hasNext())
-                {
+                while (it.hasNext()) {
                     String key = (String) it.next();
                     if (categoryMatchInFilterList(key, filters))
                         target.removeLogger((Logger) log.loggers.get(key));
@@ -619,19 +553,17 @@
      * @param category to match against
      * @param filters  - list of strings to check category against.
      * @return <code>true</code> if the specified category matches any of the
-     *         filter expressions found in the filters list, <code>false</code>
-     *         otherwise.
+     * filter expressions found in the filters list, <code>false</code>
+     * otherwise.
      */
-    private static boolean categoryMatchInFilterList(String category, List filters)
-    {
+    private static boolean categoryMatchInFilterList(String category, List filters) {
         if (filters == null)
             return false;
 
-        for (int i = 0; i < filters.size(); i++)
-        {
+        for (int i = 0; i < filters.size(); i++) {
             String filter = (String) filters.get(i);
             // match category to filter based on the presence of a wildcard
-            if (checkFilterToCategory(filter,category))
+            if (checkFilterToCategory(filter, category))
                 return true;
         }
         return false;
@@ -639,30 +571,26 @@
 
     /**
      * Check whether the category match with the filter.
-     * @param filter The filter string to check against a specific category
+     *
+     * @param filter   The filter string to check against a specific category
      * @param category The category which the filter could match
      * @return whether the filter matches a specific category
      */
-    public static boolean checkFilterToCategory(String filter, String category)
-    {
+    public static boolean checkFilterToCategory(String filter, String category) {
         int index = -1;
         index = filter.indexOf("*");
 
         if (index == 0) // match all
         {
             return true;
-        }
-        else if (index < 0) // match full category to filter
+        } else if (index < 0) // match full category to filter
         {
-            if (category.equals(filter))
-            {
+            if (category.equals(filter)) {
                 return true;
             }
-        }
-        else // match partial category to filter
+        } else // match partial category to filter
         {
-            if ((category.length() >= index) && category.substring(0, index).equals(filter.substring(0, index)))
-            {
+            if ((category.length() >= index) && category.substring(0, index).equals(filter.substring(0, index))) {
                 return true;
             }
         }
@@ -673,22 +601,19 @@
     /**
      * This method will ensure that a valid category string has been specified.
      * If the category is not valid an exception will be thrown.
-     *
+     * <p>
      * Categories can not contain any blanks or any of the following characters:
      * []`*~,!#$%^&amp;()]{}+=\|'";?&gt;&lt;./&amp;#64; or be less than 1 character in length.
      */
-    private static void checkCategory(String category)
-    {
-        if (category == null || category.length() == 0)
-        {
+    private static void checkCategory(String category) {
+        if (category == null || category.length() == 0) {
             // Categories must be at least one character in length.
             LocalizedException ex = new LocalizedException();
             ex.setMessage(INVALID_CATEGORY);
             throw ex;
         }
 
-        if (hasIllegalCharacters(category) || (category.indexOf("*") != -1))
-        {
+        if (hasIllegalCharacters(category) || (category.indexOf("*") != -1)) {
             // Categories can not contain any of the following characters: 'INVALID_CHARS'
             LocalizedException ex = new LocalizedException();
             ex.setMessage(INVALID_CATEGORY_CHARS, new Object[]{INVALID_CHARS});
@@ -699,8 +624,7 @@
     /**
      * Clean up static member variables.
      */
-    public static void clear()
-    {
+    public static void clear() {
         log = null;
         prettyPrinter = null;
     }
diff --git a/common/src/main/java/flex/messaging/log/LogCategories.java b/common/src/main/java/flex/messaging/log/LogCategories.java
index 2cb6094..84c5611 100644
--- a/common/src/main/java/flex/messaging/log/LogCategories.java
+++ b/common/src/main/java/flex/messaging/log/LogCategories.java
@@ -17,15 +17,11 @@
 package flex.messaging.log;
 
 /**
- *
- *
  * 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
-{
+public interface LogCategories {
     String CLIENT_FLEXCLIENT = "Client.FlexClient";
     String CLIENT_FLEXCLIENT_ADAPTIVE = "Client.FlexClient.Adaptive";
     String CLIENT_MESSAGECLIENT = "Client.MessageClient";
diff --git a/common/src/main/java/flex/messaging/log/LogEvent.java b/common/src/main/java/flex/messaging/log/LogEvent.java
index 7492352..5f29c33 100644
--- a/common/src/main/java/flex/messaging/log/LogEvent.java
+++ b/common/src/main/java/flex/messaging/log/LogEvent.java
@@ -19,8 +19,7 @@
 /**
  *
  */
-public class LogEvent
-{
+public class LogEvent {
     public static final short NONE = 2000;
     public static final short FATAL = 1000;
     public static final short ERROR = 8;
@@ -75,10 +74,9 @@
      * @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.
+     * @param t   Related exception, if applicable.
      */
-    public LogEvent(Logger lgr, String msg, short lvl, Throwable t)
-    {
+    public LogEvent(Logger lgr, String msg, short lvl, Throwable t) {
         logger = lgr;
         message = msg;
         level = lvl;
@@ -91,10 +89,8 @@
      * @param value the level a string is desired for.
      * @return the level specified in english
      */
-    public static String getLevelString(short value)
-    {
-        switch (value)
-        {
+    public static String getLevelString(short value) {
+        switch (value) {
             case NONE:
                 return ("NONE");
             case FATAL:
diff --git a/common/src/main/java/flex/messaging/log/Logger.java b/common/src/main/java/flex/messaging/log/Logger.java
index 8684a3e..f42a7bd 100644
--- a/common/src/main/java/flex/messaging/log/Logger.java
+++ b/common/src/main/java/flex/messaging/log/Logger.java
@@ -26,11 +26,8 @@
  * 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.
- *
- *
  */
-public class Logger
-{
+public class Logger {
     /**
      * The category this logger send messages for.
      */
@@ -47,8 +44,7 @@
      *
      * @param category The category to log information for.
      */
-    public Logger(String category)
-    {
+    public Logger(String category) {
         this.category = category;
         targets = new ArrayList();
     }
@@ -58,33 +54,29 @@
      *
      * @return The category this <code>Logger</code> logs information for.
      */
-    public String getCategory()
-    {
+    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)
-        {
+    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)
-        {
+    void addTarget(Target target) {
+        synchronized (targets) {
             if (!targets.contains(target))
                 targets.add(target);
         }
@@ -95,10 +87,8 @@
      *
      * @param target The <code>Target</code> to remove.
      */
-    void removeTarget(Target target)
-    {
-        synchronized (targets)
-        {
+    void removeTarget(Target target) {
+        synchronized (targets) {
             targets.remove(target);
         }
     }
@@ -106,13 +96,13 @@
     /*
      *  DEBUG
      */
+
     /**
      * Logs out a debug message.
      *
      * @param message The message to log.
      */
-    public void debug(String message)
-    {
+    public void debug(String message) {
         log(LogEvent.DEBUG, message, null, null);
     }
 
@@ -120,21 +110,19 @@
      * Logs out a debug message associated with a <code>Throwable</code>.
      *
      * @param message The message to log.
-     * @param t The associated <code>Throwable</code>.
+     * @param t       The associated <code>Throwable</code>.
      */
-    public void debug(String message, Throwable t)
-    {
+    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 message    The message to log.
      * @param parameters Parameters to substitute into the message.
      */
-    public void debug(String message, Object[] parameters)
-    {
+    public void debug(String message, Object[] parameters) {
         log(LogEvent.DEBUG, message, parameters, null);
     }
 
@@ -142,25 +130,24 @@
      * Logs out a debug message supporting positional parameter substitutions and an
      * associated <code>Throwable</code>.
      *
-     * @param message The message to log.
+     * @param message    The message to log.
      * @param parameters Parameters to substitute into the message.
-     * @param t The associated <code>Throwable</code>.
+     * @param t          The associated <code>Throwable</code>.
      */
-    public void debug(String message, Object[] parameters, Throwable t)
-    {
+    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)
-    {
+    public void info(String message) {
         log(LogEvent.INFO, message, null, null);
     }
 
@@ -168,21 +155,19 @@
      * Logs out an info message associated with a <code>Throwable</code>.
      *
      * @param message The message to log.
-     * @param t The associated <code>Throwable</code>.
+     * @param t       The associated <code>Throwable</code>.
      */
-    public void info(String message, Throwable t)
-    {
+    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 message    The message to log.
      * @param parameters Parameters to substitute into the message.
      */
-    public void info(String message, Object[] parameters)
-    {
+    public void info(String message, Object[] parameters) {
         log(LogEvent.INFO, message, parameters, null);
     }
 
@@ -190,25 +175,24 @@
      * Logs out an info message supporting positional parameter substitutions and an
      * associated <code>Throwable</code>.
      *
-     * @param message The message to log.
+     * @param message    The message to log.
      * @param parameters Parameters to substitute into the message.
-     * @param t The associated <code>Throwable</code>.
+     * @param t          The associated <code>Throwable</code>.
      */
-    public void info(String message, Object[] parameters, Throwable t)
-    {
+    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)
-    {
+    public void warn(String message) {
         log(LogEvent.WARN, message, null, null);
     }
 
@@ -216,21 +200,19 @@
      * Logs out a warn message associated with a <code>Throwable</code>.
      *
      * @param message The message to log.
-     * @param t The associated <code>Throwable</code>.
+     * @param t       The associated <code>Throwable</code>.
      */
-    public void warn(String message, Throwable t)
-    {
+    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 message    The message to log.
      * @param parameters Parameters to substitute into the message.
      */
-    public void warn(String message, Object[] parameters)
-    {
+    public void warn(String message, Object[] parameters) {
         log(LogEvent.WARN, message, parameters, null);
     }
 
@@ -238,25 +220,24 @@
      * Logs out a warn message supporting positional parameter substitutions and an
      * associated <code>Throwable</code>.
      *
-     * @param message The message to log.
+     * @param message    The message to log.
      * @param parameters Parameters to substitute into the message.
-     * @param t The associated <code>Throwable</code>.
+     * @param t          The associated <code>Throwable</code>.
      */
-    public void warn(String message, Object[] parameters, Throwable t)
-    {
+    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)
-    {
+    public void error(String message) {
         log(LogEvent.ERROR, message, null, null);
     }
 
@@ -264,21 +245,19 @@
      * Logs out an error message associated with a <code>Throwable</code>.
      *
      * @param message The message to log.
-     * @param t The associated <code>Throwable</code>.
+     * @param t       The associated <code>Throwable</code>.
      */
-    public void error(String message, Throwable t)
-    {
+    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 message    The message to log.
      * @param parameters Parameters to substitute into the message.
      */
-    public void error(String message, Object[] parameters)
-    {
+    public void error(String message, Object[] parameters) {
         log(LogEvent.ERROR, message, parameters, null);
     }
 
@@ -286,25 +265,24 @@
      * Logs out an error message supporting positional parameter substitutions and an
      * associated <code>Throwable</code>.
      *
-     * @param message The message to log.
+     * @param message    The message to log.
      * @param parameters Parameters to substitute into the message.
-     * @param t The associated <code>Throwable</code>.
+     * @param t          The associated <code>Throwable</code>.
      */
-    public void error(String message, Object[] parameters, Throwable t)
-    {
+    public void error(String message, Object[] parameters, Throwable t) {
         log(LogEvent.ERROR, message, parameters, t);
     }
 
     /*
-    *  FATAL
-    */
+     *  FATAL
+     */
+
     /**
      * Logs out a fatal message.
      *
      * @param message The message to log.
      */
-    public void fatal(String message)
-    {
+    public void fatal(String message) {
         log(LogEvent.FATAL, message, null, null);
     }
 
@@ -312,21 +290,19 @@
      * Logs out a fatal message associated with a <code>Throwable</code>.
      *
      * @param message The message to log.
-     * @param t The associated <code>Throwable</code>.
+     * @param t       The associated <code>Throwable</code>.
      */
-    public void fatal(String message, Throwable t)
-    {
+    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 message    The message to log.
      * @param parameters Parameters to substitute into the message.
      */
-    public void fatal(String message, Object[] parameters)
-    {
+    public void fatal(String message, Object[] parameters) {
         log(LogEvent.FATAL, message, parameters, null);
     }
 
@@ -334,50 +310,42 @@
      * Logs out a fatal message supporting positional parameter substitutions and an
      * associated <code>Throwable</code>.
      *
-     * @param message The message to log.
+     * @param message    The message to log.
      * @param parameters Parameters to substitute into the message.
-     * @param t The associated <code>Throwable</code>.
+     * @param t          The associated <code>Throwable</code>.
      */
-    public void fatal(String message, Object[] parameters, Throwable t)
-    {
+    public void fatal(String message, Object[] parameters, Throwable t) {
         log(LogEvent.FATAL, message, parameters, t);
     }
 
     /**
-     *
      * 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 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).
+     * @param t          The associated <code>Throwable</code> (may be null).
      */
-    public void log(short level, String message, Object[] parameters, Throwable t)
-    {
+    public void log(short level, String message, Object[] parameters, Throwable t) {
         log(level, message, parameters, t, true);
     }
 
     /**
-     *
      * 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 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)
-            {
+    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++)
-                {
+                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
@@ -387,10 +355,8 @@
             }
             LogEvent event = new LogEvent(this, message, level, t);
             Target tgt;
-            synchronized (targets)
-            {
-                for (Iterator iter = targets.iterator(); iter.hasNext();)
-                {
+            synchronized (targets) {
+                for (Iterator iter = targets.iterator(); iter.hasNext(); ) {
                     tgt = (Target) iter.next();
                     if (!verifyLevel || (level >= tgt.getLevel()))
                         tgt.logEvent(event);
diff --git a/common/src/main/java/flex/messaging/log/Target.java b/common/src/main/java/flex/messaging/log/Target.java
index 7a39fb5..ef373cc 100644
--- a/common/src/main/java/flex/messaging/log/Target.java
+++ b/common/src/main/java/flex/messaging/log/Target.java
@@ -27,12 +27,11 @@
  * destination which may be a console, log file or some other custom
  * destination.
  */
-public interface Target
-{
+public interface Target {
     /**
      * Initializes the target with id and properties.
      *
-     * @param id id for the target.
+     * @param id         id for the target.
      * @param properties ConfigMap of properties for the target.
      */
     void initialize(String id, ConfigMap properties);
diff --git a/common/src/main/java/flex/messaging/util/BasicPrettyPrinter.java b/common/src/main/java/flex/messaging/util/BasicPrettyPrinter.java
index 19fa547..11698ce 100644
--- a/common/src/main/java/flex/messaging/util/BasicPrettyPrinter.java
+++ b/common/src/main/java/flex/messaging/util/BasicPrettyPrinter.java
@@ -26,15 +26,11 @@
 /**
  * Prettifies the representation of an Object as a String. Complex
  * types are not traversed.
- *
- *
  */
-public class BasicPrettyPrinter implements PrettyPrinter
-{
+public class BasicPrettyPrinter implements PrettyPrinter {
     protected ObjectTrace trace;
 
-    public BasicPrettyPrinter()
-    {
+    public BasicPrettyPrinter() {
     }
 
     /**
@@ -45,84 +41,59 @@
      *   <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
-        {
+    public String prettify(Object o) {
+        try {
             trace = new ObjectTrace();
             internalPrettify(o);
             return trace.toString();
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             return trace.toString();
-        }
-        finally
-        {
+        } finally {
             trace = null;
         }
     }
 
-    protected void internalPrettify(Object o)
-    {
-        if (o == null)
-        {
+    protected void internalPrettify(Object o) {
+        if (o == null) {
             trace.writeNull();
-        }
-        else if (o instanceof String)
-        {
-            String string = (String)o;
-            if (string.startsWith("<?xml"))
-            {
+        } else if (o instanceof String) {
+            String string = (String) o;
+            if (string.startsWith("<?xml")) {
                 trace.write(StringUtils.prettifyXML(string));
-            }
-            else
-            {
+            } else {
                 trace.write(string);
             }
-        }
-        else if (o instanceof Number || o instanceof Boolean || o instanceof Date
-                || o instanceof Calendar || o instanceof Character)
-        {
+        } else if (o instanceof Number || o instanceof Boolean || o instanceof Date
+                || o instanceof Calendar || o instanceof Character) {
             trace.write(o);
-        }
-        else
-        {
+        } else {
             prettifyComplexType(o);
         }
     }
 
-    protected void prettifyComplexType(Object o)
-    {
+    protected void prettifyComplexType(Object o) {
         StringBuffer header = new StringBuffer();
 
-        if (o instanceof PrettyPrintable)
-        {
-            PrettyPrintable pp = (PrettyPrintable)o;
+        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)
-        {
+        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
-        {
+        } else {
             header.append(className);
         }
 
@@ -138,27 +109,21 @@
      * @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);
+    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"))
-            {
+                    && !declaringClass.getName().startsWith("java.util")) {
                 return true;
             }
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
         }
 
         return false;
     }
 
-    public Object copy()
-    {
+    public Object copy() {
         return new BasicPrettyPrinter();
     }
 }
diff --git a/common/src/main/java/flex/messaging/util/ExceptionUtil.java b/common/src/main/java/flex/messaging/util/ExceptionUtil.java
index 595077a..3677618 100644
--- a/common/src/main/java/flex/messaging/util/ExceptionUtil.java
+++ b/common/src/main/java/flex/messaging/util/ExceptionUtil.java
@@ -26,45 +26,44 @@
 /**
  *
  */
-public class ExceptionUtil
-{
+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" };
+    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)
-    {
+    public static Throwable wrappedException(Throwable t) {
         // Handle these statically since they are core to Java
-        return (t instanceof InvocationTargetException)? 
-                ((InvocationTargetException)t).getTargetException() : getRootCauseWithReflection(t);
+        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) 
-    {
+    public static Throwable baseException(Throwable t) {
         Throwable wrapped = wrappedException(t);
-        return wrapped != null? baseException(wrapped) : 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) 
-    {
+    public static String toString(Throwable t) {
         StringWriter strWrt = new StringWriter();
         t.printStackTrace(new PrintWriter(strWrt));
 
@@ -75,19 +74,18 @@
      * 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 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) 
-    {
+    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())
-        {
+        while (!done && tokens.hasMoreElements()) {
             String token = tokens.nextToken();
             if (token.indexOf(lookingFor) == -1)
                 trace.append(token);
@@ -103,18 +101,17 @@
      * return the top n lines of this stack trace.
      *
      * <p>Example: ExceptionUtil.getStackTraceLines(exception, 10);</p>
-     * @param t the Throwable object
+     *
+     * @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) 
-    {
+    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++)
-        {
+        for (int i = 0; i < numLines; i++) {
             String token = tokens.nextToken();
             trace.append(token);
             trace.append(StringUtils.NEWLINE);
@@ -126,17 +123,16 @@
     /**
      * Return the "nth" method call from the stack trace of "t", where 0 is
      * the top.
-     * @param t the Throwable object
+     *
+     * @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) 
-    {
+    public static String getCallAt(Throwable t, int nth) {
         StringTokenizer tokens = new StringTokenizer(toString(t), "\n\r");
-        try 
-        {
+        try {
             // Skip the first line - the exception message
-            for(int i = 0; i <= nth; ++i)
+            for (int i = 0; i <= nth; ++i)
                 tokens.nextToken();
 
             // get the method name from the next token
@@ -147,14 +143,13 @@
             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) 
-            {
+            if (index3 >= 0) {
                 int index4 = token.indexOf(')', index3);
                 call.append(token.substring(index3, index4 < 0 ? token.length() : index4));
             }
             return call.toString();
+        } catch (NoSuchElementException e) {
         }
-        catch(NoSuchElementException e) {}
 
         return "unknown";
     }
@@ -163,11 +158,11 @@
     /**
      * 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)
-    {
+    public static String exceptionToString(Throwable t) {
         StringWriter sw = new StringWriter();
         PrintWriter out = new PrintWriter(sw);
 
@@ -175,22 +170,20 @@
         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 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)
-    {
+    public static String exceptionFollowedByRootCausesToString(Throwable t) {
         StringBuffer output = new StringBuffer();
         Throwable root = t;
-        while (root != null)
-        {
+        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
@@ -206,41 +199,35 @@
     /**
      * Recursively prints out a stack of wrapped exceptions.
      *
-     * @param th the Throwable object
-     * @param out the output writer to print to
+     * @param th    the Throwable object
+     * @param out   the output writer to print to
      * @param depth the number of levels the stack should be printed
      */
-    protected static void printExceptionStack(Throwable th, PrintWriter out, int depth){
+    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;
+        boolean printStackDepth = depth > 0;
 
         Throwable wrappedException = ExceptionUtil.wrappedException(th);
-        if (wrappedException != null)
-        {
+        if (wrappedException != null) {
             printStackDepth = true;
             printExceptionStack(wrappedException, out, depth + 1);
         }
 
-        if(printStackDepth){
+        if (printStackDepth) {
             out.write("[" + depth + "]");
         }
 
         th.printStackTrace(out);
     }
 
-    private static Throwable getRootCauseWithReflection(Throwable t)
-    {
-        for(int i = 0; i < unwrapMethods.length; i++)
-        {
+    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)
-            {
+            try {
+                m = t.getClass().getMethod(unwrapMethods[i], (Class[]) null);
+                return (Throwable) m.invoke(t, (Object[]) null);
+            } catch (Exception nsme) {
                 // ignore
             }
         }
diff --git a/common/src/main/java/flex/messaging/util/FileUtils.java b/common/src/main/java/flex/messaging/util/FileUtils.java
index 31e8d30..ac29db3 100644
--- a/common/src/main/java/flex/messaging/util/FileUtils.java
+++ b/common/src/main/java/flex/messaging/util/FileUtils.java
@@ -23,8 +23,7 @@
 /**
  *
  */
-public class FileUtils
-{
+public class FileUtils {
     public static final String UTF_8 = "UTF-8";
     public static final String UTF_16 = "UTF-16";
 
@@ -34,59 +33,43 @@
      * 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 in               InputStream containing BOM and must support mark().
      * @param default_encoding The default character set encoding. null or "" =&gt; system default
      * @return The file character set encoding.
      * @throws IOException an IOException, if something went wrong.
      */
-    public static final String consumeBOM(InputStream in, String default_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)
-        {
+        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)
-            {
+            if (System.getProperty("flex.platform.CLR") != null) {
                 return "UTF8";
-            }
-            else
-            {
+            } else {
                 return UTF_8;
             }
-        }
-        else
-        {
+        } else {
             in.reset();
             int b0 = in.read();
             int b1 = in.read();
-            if (b0 == 0xff && b1 == 0xfe || b0 == 0xfe && b1 == 0xff)
-            {
+            if (b0 == 0xff && b1 == 0xfe || b0 == 0xfe && b1 == 0xff) {
                 in.reset();
                 // UTF-16 reader will consume BOM
-                if (System.getProperty("flex.platform.CLR") != null)
-                {
+                if (System.getProperty("flex.platform.CLR") != null) {
                     return "UTF16";
-                }
-                else
-                {
+                } else {
                     return UTF_16;
                 }
-            }
-            else
-            {
+            } else {
                 // no BOM found
                 in.reset();
-                if (default_encoding != null && default_encoding.length() != 0)
-                {
+                if (default_encoding != null && default_encoding.length() != 0) {
                     return default_encoding;
-                }
-                else
-                {
+                } else {
                     return System.getProperty("file.encoding");
                 }
             }
diff --git a/common/src/main/java/flex/messaging/util/LocaleUtils.java b/common/src/main/java/flex/messaging/util/LocaleUtils.java
index 5800433..925af6b 100644
--- a/common/src/main/java/flex/messaging/util/LocaleUtils.java
+++ b/common/src/main/java/flex/messaging/util/LocaleUtils.java
@@ -21,8 +21,7 @@
 /**
  *
  */
-public class LocaleUtils
-{
+public class LocaleUtils {
     /**
      * Builds a <code>Locale</code> instance from the passed string. If the string
      * is <code>null</code> this method will return the default locale for the JVM.
@@ -30,24 +29,18 @@
      * @param locale The locale as a string.
      * @return The Locale instance built from the passed string.
      */
-    public static Locale buildLocale(String locale)
-    {
-        if (locale == null)
-        {
+    public static Locale buildLocale(String locale) {
+        if (locale == null) {
             return Locale.getDefault();
-        }
-        else
-        {
+        } else {
             int index = locale.indexOf('_');
-            if (index == -1)
-            {
+            if (index == -1) {
                 return new Locale(locale);
             }
             String language = locale.substring(0, index);
             String rest = locale.substring(index + 1);
             index = rest.indexOf('_');
-            if (index == -1)
-            {
+            if (index == -1) {
                 return new Locale(language, rest);
             }
             String country = rest.substring(0, index);
diff --git a/common/src/main/java/flex/messaging/util/ObjectTrace.java b/common/src/main/java/flex/messaging/util/ObjectTrace.java
index 646d72f..6bc57e9 100644
--- a/common/src/main/java/flex/messaging/util/ObjectTrace.java
+++ b/common/src/main/java/flex/messaging/util/ObjectTrace.java
@@ -20,14 +20,11 @@
 
 /**
  * Simple utility to trace an Object graph out to a StringBuffer.
- *
+ * <p>
  * Note that new lines are NOT added after the individual values
  * in complex type properties.
- *
- *
  */
-public class ObjectTrace
-{
+public class ObjectTrace {
 
 
     /* This boolean is used for suppressing debug output for selected properties.
@@ -35,57 +32,48 @@
      */
     public boolean nextElementExclude;
 
-    public ObjectTrace()
-    {
+    public ObjectTrace() {
         buffer = new StringBuffer(4096);
     }
 
-    public ObjectTrace(int bufferSize)
-    {
+    public ObjectTrace(int bufferSize) {
         buffer = new StringBuffer(bufferSize);
     }
 
-    public String toString()
-    {
+    public String toString() {
         return buffer.toString();
     }
 
-    public void write(Object o)
-    {
+    public void write(Object o) {
         if (m_nested <= 0)
             buffer.append(indentString());
 
         buffer.append(String.valueOf(o));
     }
 
-    public void writeNull()
-    {
+    public void writeNull() {
         if (m_nested <= 0)
             buffer.append(indentString());
 
         buffer.append("null");
     }
 
-    public void writeRef(int ref)
-    {
+    public void writeRef(int ref) {
         if (m_nested <= 0)
             buffer.append(indentString());
 
         buffer.append("(Ref #").append(ref).append(")");
     }
 
-    public void writeString(String s)
-    {
+    public void writeString(String s) {
         if (m_nested <= 0)
             buffer.append(indentString());
 
         buffer.append("\"").append(s).append("\"");
     }
 
-    public void startArray(String header)
-    {
-        if (header != null && header.length() > 0)
-        {
+    public void startArray(String header) {
+        if (header != null && header.length() > 0) {
             if (m_nested <= 0)
                 buffer.append(indentString());
 
@@ -96,21 +84,17 @@
         m_nested++;
     }
 
-    public void arrayElement(int index)
-    {
+    public void arrayElement(int index) {
         buffer.append(indentString()).append("[").append(index).append("] = ");
     }
 
-    public void endArray()
-    {
+    public void endArray() {
         m_indent--;
         m_nested--;
     }
 
-    public void startObject(String header)
-    {
-        if (header != null && header.length() > 0)
-        {
+    public void startObject(String header) {
+        if (header != null && header.length() > 0) {
             if (m_nested <= 0)
                 buffer.append(indentString());
 
@@ -121,29 +105,24 @@
         m_nested++;
     }
 
-    public void namedElement(String name)
-    {
-        if (Log.isExcludedProperty(name))
-        {
+    public void namedElement(String name) {
+        if (Log.isExcludedProperty(name)) {
             nextElementExclude = true;
         }
 
         buffer.append(indentString()).append(name).append(" = ");
     }
 
-    public void endObject()
-    {
+    public void endObject() {
         m_indent--;
         m_nested--;
     }
 
-    public void newLine()
-    {
+    public void newLine() {
         boolean alreadyPadded = false;
         int length = buffer.length();
 
-        if (length > 3)
-        {
+        if (length > 3) {
             String tail = buffer.substring(length - 3, length - 1); //Get last two chars in buffer
             alreadyPadded = tail.equals(newLine);
         }
@@ -158,11 +137,9 @@
      *
      * @return the ident string.
      */
-    protected String indentString()
-    {
+    protected String indentString() {
         StringBuffer sb = new StringBuffer();
-        for (int i = 0; i < m_indent; ++i)
-        {
+        for (int i = 0; i < m_indent; ++i) {
             sb.append("  ");
         }
         return sb.toString();
diff --git a/common/src/main/java/flex/messaging/util/PrettyPrintable.java b/common/src/main/java/flex/messaging/util/PrettyPrintable.java
index 68fcc6e..8f438f6 100644
--- a/common/src/main/java/flex/messaging/util/PrettyPrintable.java
+++ b/common/src/main/java/flex/messaging/util/PrettyPrintable.java
@@ -19,11 +19,8 @@
 /**
  * Allows an Object to customize how it is pretty printed in
  * logging/debugging output.
- *
- *
  */
-public interface PrettyPrintable
-{
+public interface PrettyPrintable {
     String toStringHeader();
 
     String toStringCustomProperty(String name);
diff --git a/common/src/main/java/flex/messaging/util/PrettyPrinter.java b/common/src/main/java/flex/messaging/util/PrettyPrinter.java
index d0f9de0..cb6e3dd 100644
--- a/common/src/main/java/flex/messaging/util/PrettyPrinter.java
+++ b/common/src/main/java/flex/messaging/util/PrettyPrinter.java
@@ -19,11 +19,8 @@
 /**
  * Implementations convert Object graphs to Strings for
  * logging and debugging.
- *
- *
  */
-public interface PrettyPrinter
-{
+public interface PrettyPrinter {
     String prettify(Object o);
 
     Object copy();
diff --git a/common/src/main/java/flex/messaging/util/PropertyStringResourceLoader.java b/common/src/main/java/flex/messaging/util/PropertyStringResourceLoader.java
index 21c2f59..c6cae72 100644
--- a/common/src/main/java/flex/messaging/util/PropertyStringResourceLoader.java
+++ b/common/src/main/java/flex/messaging/util/PropertyStringResourceLoader.java
@@ -40,17 +40,15 @@
  * </p>
  *
  * @see MessageFormat
- *
  */
-public class PropertyStringResourceLoader implements ResourceLoader
-{
+public class PropertyStringResourceLoader implements ResourceLoader {
     // The property file bundle that contains localized error strings for BlazeDS.
     public static final String PROPERTY_BUNDLE = "flex/messaging/errors";
 
     // The property file bundle that contains localized error strings for BlazeDS 
     // code specific to vendors (eg. LoginCommands for specific application serves)
     public static final String VENDORS_BUNDLE = "flex/messaging/vendors";
-    
+
     // The property file bundle that contains localized error strings for LCDS.
     public static final String LCDS_PROPERTY_BUNDLE = "flex/data/errors";
 
@@ -77,9 +75,8 @@
      * property bundles specified by the <code>PROPERTY_BUNDLE</code> and
      * <code>LCDS_PROPERTY_BUNDLE</code> fields.
      */
-    public PropertyStringResourceLoader()
-    {
-        this(new String[] {PROPERTY_BUNDLE, LCDS_PROPERTY_BUNDLE});
+    public PropertyStringResourceLoader() {
+        this(new String[]{PROPERTY_BUNDLE, LCDS_PROPERTY_BUNDLE});
     }
 
     /**
@@ -88,9 +85,8 @@
      *
      * @param propertyBundle The property bundles to use for lookups.
      */
-    public PropertyStringResourceLoader(String propertyBundle)
-    {
-        this(new String[] {propertyBundle});
+    public PropertyStringResourceLoader(String propertyBundle) {
+        this(new String[]{propertyBundle});
     }
 
     /**
@@ -99,49 +95,42 @@
      *
      * @param propertyBundles The list of the property bundles to use for lookups.
      */
-    public PropertyStringResourceLoader(String[] propertyBundles)
-    {
+    public PropertyStringResourceLoader(String[] propertyBundles) {
         this.propertyBundles = propertyBundles;
         logger = Log.getLogger(LOG_CATEGORY);
     }
 
     // Implements flex.messaging.util.ResourceLoader.init; inherits javadoc specification.
-    public void init(Map properties)
-    {}
+    public void init(Map properties) {
+    }
 
     // Implements flex.messaging.util.ResourceLoader.getString; inherits javadoc specification.
-    public String getString(String key)
-    {
+    public String getString(String key) {
         return getString(key, null, null);
     }
 
     // Implements flex.messaging.util.ResourceLoader.getString; inherits javadoc specification.
-    public String getString(String key, Object[] arguments)
-    {
+    public String getString(String key, Object[] arguments) {
         return getString(key, null, arguments);
     }
 
     // Implements flex.messaging.util.ResourceLoader.getString; inherits javadoc specification.
-    public String getString(String key, Locale locale)
-    {
+    public String getString(String key, Locale locale) {
         return getString(key, locale, null);
     }
 
     // Implements flex.messaging.util.ResourceLoader.getString; inherits javadoc specification.
-    public String getString(String key, Locale locale, Object[] arguments)
-    {
-        synchronized(strings)
-        {
-            if (defaultLocale == null)
-            {
+    public String getString(String key, Locale locale, Object[] arguments) {
+        synchronized (strings) {
+            if (defaultLocale == null) {
                 defaultLocale = getDefaultLocale();
             }
         }
         String value = null;
         String stringKey = null;
         String localeKey = (locale != null) ?
-                           generateLocaleKey(locale) :
-                           generateLocaleKey(defaultLocale);
+                generateLocaleKey(locale) :
+                generateLocaleKey(defaultLocale);
         String originalStringKey = generateStringKey(key, localeKey);
         int trimIndex = 0;
 
@@ -149,29 +138,22 @@
          * Attempt to get a string for the target locale - fail back to less specific
          * versions of the locale.
          */
-        while (true)
-        {
+        while (true) {
             loadStrings(localeKey);
             stringKey = generateStringKey(key, localeKey);
-            synchronized(strings)
-            {
+            synchronized (strings) {
                 value = (String) strings.get(stringKey);
-                if (value != null)
-                {
-                    if (!stringKey.equals(originalStringKey))
-                    {
+                if (value != null) {
+                    if (!stringKey.equals(originalStringKey)) {
                         strings.put(originalStringKey, value);
                     }
                     return substituteArguments(value, arguments);
                 }
             }
             trimIndex = localeKey.lastIndexOf('_');
-            if (trimIndex != -1)
-            {
+            if (trimIndex != -1) {
                 localeKey = localeKey.substring(0, trimIndex);
-            }
-            else
-            {
+            } else {
                 break;
             }
         }
@@ -180,15 +162,12 @@
          * Attempt to get the string in our default locale if it is
          * different than the requested locale.
          */
-        if ((locale != null) && (!locale.equals(defaultLocale)))
-        {
+        if ((locale != null) && (!locale.equals(defaultLocale))) {
             localeKey = generateLocaleKey(defaultLocale);
             stringKey = generateStringKey(key, localeKey);
-            synchronized(strings)
-            {
+            synchronized (strings) {
                 value = (String) strings.get(stringKey);
-                if (value != null)
-                {
+                if (value != null) {
                     strings.put(originalStringKey, value);
                     return substituteArguments(value, arguments);
                 }
@@ -198,11 +177,9 @@
         // As a last resort, try to get a non-locale-specific string.
         loadStrings("");
         stringKey = generateStringKey(key, "");
-        synchronized(strings)
-        {
+        synchronized (strings) {
             value = (String) strings.get(stringKey);
-            if (value != null)
-            {
+            if (value != null) {
                 strings.put(originalStringKey, value);
                 return substituteArguments(value, arguments);
             }
@@ -218,8 +195,7 @@
      *
      * @param locale The default locale to be used.
      */
-    public void setDefaultLocale(String locale)
-    {
+    public void setDefaultLocale(String locale) {
         defaultLocale = LocaleUtils.buildLocale(locale);
     }
 
@@ -228,17 +204,16 @@
      *
      * @param locale The default locale to be used.
      */
-    public void setDefaultLocale(Locale locale)
-    {
+    public void setDefaultLocale(Locale locale) {
         defaultLocale = locale;
     }
 
     /**
      * The default locale to be used when locating resources.
+     *
      * @return Locale the default Locale object
      */
-    public Locale getDefaultLocale()
-    {
+    public Locale getDefaultLocale() {
         if (defaultLocale == null)
             defaultLocale = Locale.getDefault();
 
@@ -250,89 +225,65 @@
      *
      * @param localeKey The locale to load strings for.
      */
-    protected synchronized void loadStrings(String localeKey)
-    {
-        if (loadedLocales.contains(localeKey))
-        {
+    protected synchronized void loadStrings(String localeKey) {
+        if (loadedLocales.contains(localeKey)) {
             return;
         }
 
-        if (propertyBundles != null)
-        {
-            for (int i = 0; i < propertyBundles.length; i++)
-            {
+        if (propertyBundles != null) {
+            for (int i = 0; i < propertyBundles.length; i++) {
                 String propertyBundle = propertyBundles[i];
                 loadProperties(localeKey, propertyBundle);
             }
         }
     }
 
-    protected InputStream loadFile(String filename)
-    {
+    protected InputStream loadFile(String filename) {
         ClassLoader loader = Thread.currentThread().getContextClassLoader();
         InputStream stream = loader.getResourceAsStream(filename);
-        
+
         // Try the properties file in our classloader too - just in case
-        if (stream == null)
-        {
+        if (stream == null) {
             stream = PropertyStringResourceLoader.class.getClassLoader().getResourceAsStream(filename);
         }
-        
+
         return stream;
     }
-    
+
     // Helper method for loadStrings.
-    protected void loadProperties(String localeKey, String propertyBundle)
-    {
+    protected void loadProperties(String localeKey, String propertyBundle) {
         // Build the path to the target property file.
         String filename = propertyBundle;
-        if (localeKey.length() > 0)
-        {
+        if (localeKey.length() > 0) {
             filename += "_" + localeKey;
         }
         filename += ".properties";
         // Load the property file.
-        InputStream stream = loadFile(filename); 
-            
+        InputStream stream = loadFile(filename);
+
         Properties props = new Properties();
-        if (stream != null)
-        {
-            try
-            {
+        if (stream != null) {
+            try {
                 props.load(stream);
-            }
-            catch (IOException ioe)
-            {
+            } catch (IOException ioe) {
                 logger.warn("There was a problem reading the string resource property file '" + filename + "' stream.", ioe);
-            }
-            catch (IllegalArgumentException iae)
-            {
+            } catch (IllegalArgumentException iae) {
                 logger.warn("The string resource property file '" + filename + "' contains a malformed Unicode escape sequence.", iae);
-            }
-            finally
-            {
-                try
-                {
+            } finally {
+                try {
                     stream.close();
-                }
-                catch (IOException ioe)
-                {
+                } catch (IOException ioe) {
                     logger.warn("The string resource property file '" + filename + "' stream failed to close.", ioe);
                 }
             }
-        }
-        else
-        {
+        } else {
             logger.warn("The class loader could not locate the string resource property file '" + filename + "'. This may not be an issue if a property file is available for a less specific locale or the default locale.");
         }
         // Move strings into string cache.
-        if (props.size() > 0)
-        {
-            synchronized(strings)
-            {
+        if (props.size() > 0) {
+            synchronized (strings) {
                 Iterator iter = props.keySet().iterator();
-                while (iter.hasNext())
-                {
+                while (iter.hasNext()) {
                     String key = (String) iter.next();
                     strings.put(generateStringKey(key, localeKey), props.getProperty(key));
                 }
@@ -346,20 +297,18 @@
      * @param locale The locale to generate a cache key for.
      * @return The generated cache key.
      */
-    private String generateLocaleKey(Locale locale)
-    {
+    private String generateLocaleKey(Locale locale) {
         return (locale == null) ? "" : locale.toString();
     }
 
     /**
      * Generates a cache key for a string resource.
      *
-     * @param key The string to generate a cache key for.
+     * @param key    The string to generate a cache key for.
      * @param locale The locale to retrieve the string for.
      * @return The generated cache key for the string resource.
      */
-    private String generateStringKey(String key, String locale)
-    {
+    private String generateStringKey(String key, String locale) {
         return (key + "-" + locale);
     }
 
@@ -367,11 +316,10 @@
      * Substitutes the specified arguments into a parameterized string.
      *
      * @param parameterized The string containing parameter tokens for substitution.
-     * @param arguments The arguments to substitute into the parameterized string.
+     * @param arguments     The arguments to substitute into the parameterized string.
      * @return The resulting substituted string.
      */
-    private String substituteArguments(String parameterized, Object[] arguments)
-    {
+    private String substituteArguments(String parameterized, Object[] arguments) {
         return MessageFormat.format(parameterized, arguments).trim();
     }
 
diff --git a/common/src/main/java/flex/messaging/util/ResourceLoader.java b/common/src/main/java/flex/messaging/util/ResourceLoader.java
index e980f4b..991a692 100644
--- a/common/src/main/java/flex/messaging/util/ResourceLoader.java
+++ b/common/src/main/java/flex/messaging/util/ResourceLoader.java
@@ -21,11 +21,8 @@
 
 /**
  * The root interface for classes that provide access to localized resources.
- *
- *
  */
-public interface ResourceLoader
-{
+public interface ResourceLoader {
     /**
      * Initializes the <code>ResourceLoader</code> using the specified properties.
      *
@@ -67,20 +64,20 @@
      * Gets a parameterized string for the given key and substitutes
      * the parameters using the passed array of arguments.
      *
-     * @param key The key for the target string.
+     * @param key       The key for the target string.
      * @param arguments The arguments to substitute into the parameterized string.
      * @return The substituted string for the given key.
-     * @exception IllegalArgumentException If the parameterized string is invalid,
-     *            or if an argument in the <code>arguments</code> array
-     *            is not of the type expected by the format element(s)
-     *            that use it.
+     * @throws IllegalArgumentException If the parameterized string is invalid,
+     *                                  or if an argument in the <code>arguments</code> array
+     *                                  is not of the type expected by the format element(s)
+     *                                  that use it.
      */
     String getString(String key, Object[] arguments);
 
     /**
      * Gets a string for the given key and locale.
      *
-     * @param key The key for the target string.
+     * @param key    The key for the target string.
      * @param locale The target locale for the string.
      * @return The localized string for the given key.
      */
@@ -90,14 +87,14 @@
      * Gets a parameterized string for the given key and locale and substitutes the
      * parameters using the passed array of arguments.
      *
-     * @param key The key for the target string.
-     * @param locale The target locale for the string.
+     * @param key       The key for the target string.
+     * @param locale    The target locale for the string.
      * @param arguments The arguments to substitute into the parameterized string.
      * @return The substituted localized string for the given key.
-     * @exception IllegalArgumentException If the parameterized string is invalid,
-     *            or if an argument in the <code>arguments</code> array
-     *            is not of the type expected by the format element(s)
-     *            that use it.
+     * @throws IllegalArgumentException If the parameterized string is invalid,
+     *                                  or if an argument in the <code>arguments</code> array
+     *                                  is not of the type expected by the format element(s)
+     *                                  that use it.
      */
     String getString(String key, Locale locale, Object[] arguments);
 
diff --git a/common/src/main/java/flex/messaging/util/StringUtils.java b/common/src/main/java/flex/messaging/util/StringUtils.java
index 5a33f2e..90c6947 100644
--- a/common/src/main/java/flex/messaging/util/StringUtils.java
+++ b/common/src/main/java/flex/messaging/util/StringUtils.java
@@ -30,15 +30,13 @@
 /**
  *
  */
-public class StringUtils
-{
+public class StringUtils {
     /**
      * The String to use for an OS specific line separator.
      */
     public static final String NEWLINE = System.getProperty("line.separator");
 
-    public static String substitute(String str, String from, String to)
-    {
+    public static String substitute(String str, String from, String to) {
         if (from == null || from.equals("") || to == null)
             return str;
 
@@ -50,8 +48,7 @@
         StringBuffer buf = new StringBuffer(str.length());
         int lastIndex = 0;
 
-        while (index != -1)
-        {
+        while (index != -1) {
             buf.append(str.substring(lastIndex, index));
             buf.append(to);
             lastIndex = index + from.length();
@@ -64,8 +61,7 @@
         return buf.toString();
     }
 
-    public static boolean findMatchWithWildcard(char[] src, char[] pat)
-    {
+    public static boolean findMatchWithWildcard(char[] src, char[] pat) {
         if (src == null || pat == null)
             return false;
 
@@ -83,10 +79,8 @@
         int srcIdx = 0;
         int patIdx = 0;
 
-        for (; srcIdx < srcLen; srcIdx++)
-        {
-            if (patIdx == patLen)
-            {
+        for (; srcIdx < srcLen; srcIdx++) {
+            if (patIdx == patLen) {
                 if (patLen < (srcLen - srcIdx))
                     patIdx = 0; //Start the search again
                 else
@@ -96,8 +90,7 @@
             char s = src[srcIdx];
             char m = pat[patIdx];
 
-            switch (m)
-            {
+            switch (m) {
                 case '*':
                     // star on the end
                     if (patIdx == pat.length - 1)
@@ -111,18 +104,14 @@
                     break;
 
                 default:
-                    if (s != m)
-                    {
-                        if (!star)
-                        {
+                    if (s != m) {
+                        if (!star) {
                             if (patLen < (srcLen - srcIdx))
                                 patIdx = 0; //Start the search again
                             else
                                 return false;
                         }
-                    }
-                    else
-                    {
+                    } else {
                         star = false;
                         ++patIdx;
                     }
@@ -130,13 +119,10 @@
             }
         }
 
-        if (patIdx < patLen)
-        {
+        if (patIdx < patLen) {
             //read off the rest of the pattern and make sure it's all wildcard
-            for (; patIdx < patLen; patLen++)
-            {
-                if (pat[patIdx] != '*')
-                {
+            for (; patIdx < patLen; patLen++) {
+                if (pat[patIdx] != '*') {
                     return false;
                 }
             }
@@ -150,36 +136,29 @@
     /**
      * Returns a prettified version of the XML, with indentations and
      * linefeeds.  Returns the original string if there was an error.
+     *
      * @param xml the xml string
      * @return String the prettified xml string
      */
-    public static String prettifyXML(String xml)
-    {
+    public static String prettifyXML(String xml) {
         String result = xml;
-        try
-        {
+        try {
             StringReader reader = new StringReader(xml);
             StringWriter writer = new StringWriter();
             Transformer transformer =
-                TransformerFactory.newInstance().newTransformer();
+                    TransformerFactory.newInstance().newTransformer();
             transformer.setOutputProperty(OutputKeys.METHOD, "xml");
             transformer.setOutputProperty(OutputKeys.INDENT, "yes");
             transformer.transform
-                (new StreamSource(reader), new StreamResult(writer));
+                    (new StreamSource(reader), new StreamResult(writer));
             writer.close();
 
             result = writer.toString();
-        }
-        catch (TransformerFactoryConfigurationError error)
-        {
+        } catch (TransformerFactoryConfigurationError error) {
             // Ignore.
-        }
-        catch (TransformerException error)
-        {
+        } catch (TransformerException error) {
             // Ignore.
-        }
-        catch (IOException error)
-        {
+        } catch (IOException error) {
             // Ignore.
         }
         return result;
@@ -188,14 +167,13 @@
     /**
      * Returns a prettified version of the string, or the original
      * string if the operation is not possible.
+     *
      * @param string the string to check
      * @return String the prettified string
      */
-    public static String prettifyString(String string)
-    {
+    public static String prettifyString(String string) {
         String result = string;
-        if (string.startsWith("<?xml"))
-        {
+        if (string.startsWith("<?xml")) {
             result = prettifyXML(string);
         }
         return result;
@@ -203,11 +181,11 @@
 
     /**
      * Returns true if a string is null or empty.
+     *
      * @param string the String to check
      * @return boolean true if the string is an empty string
      */
-    public static boolean isEmpty(String string)
-    {
+    public static boolean isEmpty(String string) {
         return string == null || string.length() == 0;
     }
 }
diff --git a/common/src/main/java/flex/messaging/util/UUIDUtils.java b/common/src/main/java/flex/messaging/util/UUIDUtils.java
index 9fd3c57..090e426 100644
--- a/common/src/main/java/flex/messaging/util/UUIDUtils.java
+++ b/common/src/main/java/flex/messaging/util/UUIDUtils.java
@@ -19,10 +19,9 @@
 import java.util.Random;
 import java.util.UUID;
 
-public class UUIDUtils
-{
+public class UUIDUtils {
     private static Random _weakRand = new Random();
-	
+
     /**
      * The spec indicates that our time value should be based on 100 nano
      * second increments but our time granularity is in milliseconds.
@@ -31,44 +30,48 @@
      * 100 nanos into a single millisecond.
      */
     private static final int MAX_IDS_PER_MILLI = 10000;
-	
+
     /**
-     *  Any given time-of-day value can only be used once; remember the last used
-     *  value so we don't reuse them.
-     *  <p>NOTE: this algorithm assumes the clock will not be turned back.
+     * Any given time-of-day value can only be used once; remember the last used
+     * value so we don't reuse them.
+     * <p>NOTE: this algorithm assumes the clock will not be turned back.
      */
     private static long lastUsedTOD = 0;
-    /** Counter to use when we need more than one id in the same millisecond. */
+    /**
+     * Counter to use when we need more than one id in the same millisecond.
+     */
     private static int numIdsThisMilli = 0;
-	
-    /**  Hex digits, used for padding UUID strings with random characters. */
+
+    /**
+     * Hex digits, used for padding UUID strings with random characters.
+     */
     private static final String alphaNum = "0123456789ABCDEF";
-	
-    /** 4 bits per hex character. */
+
+    /**
+     * 4 bits per hex character.
+     */
     private static final int BITS_PER_DIGIT = 4;
-	
+
     private static final int BITS_PER_INT = 32;
     private static final int BITS_PER_LONG = 64;
     private static final int DIGITS_PER_INT = BITS_PER_INT / BITS_PER_DIGIT;
     private static final int DIGITS_PER_LONG = BITS_PER_LONG / BITS_PER_DIGIT;
-	
+
     /**
-     *  @private
+     * @private
      */
-    private static char[] UPPER_DIGITS = new char[] {
-	'0', '1', '2', '3', '4', '5', '6', '7',
-	'8', '9', 'A', 'B', 'C', 'D', 'E', 'F',
+    private static char[] UPPER_DIGITS = new char[]{
+            '0', '1', '2', '3', '4', '5', '6', '7',
+            '8', '9', 'A', 'B', 'C', 'D', 'E', 'F',
     };
-	
+
     /**
      * Private constructor to prevent instances from being created.
      */
-    private UUIDUtils()
-    {
+    private UUIDUtils() {
     }
-	
+
     /**
-     *
      * Use the createUUID function when you need a unique string that you will
      * use as a persistent identifier in a distributed environment. To a very
      * high degree of certainty, this function returns a unique value; no other
@@ -78,34 +81,32 @@
      * Proper Format: `XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
      * where `X' stands for a hexadecimal digit (0-9 or A-F).
      */
-    public static String createUUID()
-    {
-		return createUUID(false);
-	}
-	
-    public static String createUUID(boolean secure) throws Error
-    {
+    public static String createUUID() {
+        return createUUID(false);
+    }
+
+    public static String createUUID(boolean secure) throws Error {
         Random rand = _weakRand;
-		if (secure)
-			throw new Error("Secure UUIDs not implemented");
-		
+        if (secure)
+            throw new Error("Secure UUIDs not implemented");
+
         StringBuffer s = new StringBuffer(36);
-		
+
         appendHexString(uniqueTOD(), false, 11, s);
-		
+
         //  Just use random padding characters, but ensure that the high bit
         //  is set to eliminate chances of collision with an IEEE 802 address.
-        s.append(  alphaNum.charAt( rand.nextInt(16) | 8 ) );
-		
+        s.append(alphaNum.charAt(rand.nextInt(16) | 8));
+
         //  Add random padding characters.
         appendRandomHexChars(32 - s.length(), rand, s);
-		
+
         //insert dashes in proper position. so the format matches CF
-        s.insert(8,"-");
-        s.insert(13,"-");
-        s.insert(18,"-");
-        s.insert(23,"-");
-		
+        s.insert(8, "-");
+        s.insert(13, "-");
+        s.insert(18, "-");
+        s.insert(23, "-");
+
         return s.toString();
     }
 
@@ -115,18 +116,15 @@
      * is not provided, null is returned.
      *
      * @param ba byte[] 16 bytes in length representing a 128-bit UID.
-     *
      * @return String representation of the UID, or null if an invalid
      * byte[] is provided.
      */
-    public static String fromByteArray(byte[] ba)
-    {
+    public static String fromByteArray(byte[] ba) {
         if (ba == null || ba.length != 16)
             return null;
 
         StringBuffer result = new StringBuffer(36);
-        for (int i = 0; i < 16; i++)
-        {
+        for (int i = 0; i < 16; i++) {
             if (i == 4 || i == 6 || i == 8 || i == 10)
                 result.append('-');
 
@@ -136,7 +134,7 @@
         return result.toString();
     }
 
-	
+
     /**
      * A utility method to check whether a String value represents a
      * correctly formatted UID value. UID values are expected to be
@@ -145,28 +143,23 @@
      * supported.
      *
      * @param uid The value to test whether it is formatted as a UID.
-     *
      * @return Returns true if the value is formatted as a UID.
      */
-    public static boolean isUID(String uid)
-    {
+    public static boolean isUID(String uid) {
         if (uid == null || uid.length() != 36)
             return false;
 
         char[] chars = uid.toCharArray();
-        for (int i = 0; i < 36; i++)
-        {
+        for (int i = 0; i < 36; i++) {
             char c = chars[i];
 
             // Check for correctly placed hyphens
-            if (i == 8 || i == 13 || i == 18 || i == 23)
-            {
+            if (i == 8 || i == 13 || i == 18 || i == 23) {
                 if (c != '-')
                     return false;
             }
             // We allow capital alpha-numeric hex digits only
-            else if (c < 48 || c > 70 || (c > 57 && c < 65))
-            {
+            else if (c < 48 || c > 70 || (c > 57 && c < 65)) {
                 return false;
             }
         }
@@ -179,12 +172,10 @@
      * format generated by createUID, otherwise null is returned.
      *
      * @param uid String representing a 128-bit UID.
-     *
      * @return byte[] 16 bytes in length representing the 128-bits of the
      * UID or null if the uid could not be converted.
      */
-    public static byte[] toByteArray(String uid)
-    {
+    public static byte[] toByteArray(String uid) {
         if (!isUID(uid))
             return null;
 
@@ -192,23 +183,20 @@
         char[] chars = uid.toCharArray();
         int r = 0;
 
-        for (int i = 0; i < chars.length; i++)
-        {
+        for (int i = 0; i < chars.length; i++) {
             if (chars[i] == '-')
                 continue;
             int h1 = Character.digit(chars[i], 16);
             i++;
             int h2 = Character.digit(chars[i], 16);
-            result[r++] = (byte)(((h1 << 4) | h2) & 0xFF);
+            result[r++] = (byte) (((h1 << 4) | h2) & 0xFF);
         }
         return result;
     }
 
-    private static void appendRandomHexChars(int n, Random rand, StringBuffer result)
-    {
+    private static void appendRandomHexChars(int n, Random rand, StringBuffer result) {
         int digitsPerInt = DIGITS_PER_INT;
-        while (n > 0)
-        {
+        while (n > 0) {
             int digitsToUse = Math.min(n, digitsPerInt);
             n -= digitsToUse;
             appendHexString(rand.nextInt(), true, digitsToUse, result);
@@ -216,15 +204,13 @@
     }
 
     private static void appendHexString
-        (long value, boolean prependZeroes, int nLeastSignificantDigits,
-         StringBuffer result)
-    {
+            (long value, boolean prependZeroes, int nLeastSignificantDigits,
+             StringBuffer result) {
         int bitsPerDigit = BITS_PER_DIGIT;
 
         long mask = (1L << bitsPerDigit) - 1;
 
-        if (nLeastSignificantDigits < DIGITS_PER_LONG)
-        {
+        if (nLeastSignificantDigits < DIGITS_PER_LONG) {
             // Clear the bits that we don't care about.
             value &= (1L << (bitsPerDigit * nLeastSignificantDigits)) - 1;
         }
@@ -233,25 +219,19 @@
         // last set of bits.
         int i = 0;
         long reorderedValue = 0;
-        if (value == 0)
-        {
+        if (value == 0) {
             // One zero is dumped.
             i++;
-        }
-        else
-        {
-            do
-            {
+        } else {
+            do {
                 reorderedValue = (reorderedValue << bitsPerDigit) | (value & mask);
                 value >>>= bitsPerDigit;
                 i++;
             } while (value != 0);
         }
 
-        if (prependZeroes)
-        {
-            for (int j = nLeastSignificantDigits - i; j > 0; j--)
-            {
+        if (prependZeroes) {
+            for (int j = nLeastSignificantDigits - i; j > 0; j--) {
                 result.append('0');
             }
         }
@@ -259,40 +239,37 @@
 
         // Dump the reordered sequence, with the most significant character
         // first.
-        for (; i > 0; i--)
-        {
+        for (; i > 0; i--) {
             result.append(alphaNum.charAt((int) (reorderedValue & mask)));
             reorderedValue >>>= bitsPerDigit;
         }
     }
 
-    private static String createInsecureUUID()
-    {
+    private static String createInsecureUUID() {
         StringBuffer s = new StringBuffer(36);
 
         appendHexString(uniqueTOD(), false, 11, s);
 
         //  Just use random padding characters, but ensure that the high bit
         //  is set to eliminate chances of collision with an IEEE 802 address.
-        s.append(  alphaNum.charAt( _weakRand.nextInt(16) | 8 ) );
+        s.append(alphaNum.charAt(_weakRand.nextInt(16) | 8));
 
         //  Add random padding characters.
         appendRandomHexChars(32 - s.length(), _weakRand, s);
 
         //insert dashes in proper position. so the format matches CF
-        s.insert(8,"-");
-        s.insert(13,"-");
-        s.insert(18,"-");
-        s.insert(23,"-");
+        s.insert(8, "-");
+        s.insert(13, "-");
+        s.insert(18, "-");
+        s.insert(23, "-");
 
         return s.toString();
     }
 
     /**
-     *  @return a time value, unique for calls to this method loaded by the same classloader.
+     * @return a time value, unique for calls to this method loaded by the same classloader.
      */
-    private static synchronized long uniqueTOD()
-    {
+    private static synchronized long uniqueTOD() {
         long currentTOD = System.currentTimeMillis();
 
         // Clock was set back... do not hang in this case waiting to catch up.
@@ -300,31 +277,28 @@
         if (currentTOD < lastUsedTOD)
             lastUsedTOD = currentTOD;
 
-        if (currentTOD == lastUsedTOD)
-        {
+        if (currentTOD == lastUsedTOD) {
             numIdsThisMilli++;
             /*
              * Fall back to the old technique of sleeping if we allocate
              * too many ids in one time interval.
              */
-            if (numIdsThisMilli >= MAX_IDS_PER_MILLI)
-            {
-                while ( currentTOD == lastUsedTOD )
-                {
-                    try { Thread.sleep(1); } catch ( Exception interrupt ) { /* swallow, wake up */ }
+            if (numIdsThisMilli >= MAX_IDS_PER_MILLI) {
+                while (currentTOD == lastUsedTOD) {
+                    try {
+                        Thread.sleep(1);
+                    } catch (Exception interrupt) { /* swallow, wake up */ }
                     currentTOD = System.currentTimeMillis();
                 }
                 lastUsedTOD = currentTOD;
                 numIdsThisMilli = 0;
             }
-        }
-        else
-        {
+        } else {
             //  We have a new TOD, reset the counter
             lastUsedTOD = currentTOD;
             numIdsThisMilli = 0;
         }
 
-        return lastUsedTOD * MAX_IDS_PER_MILLI + (long)numIdsThisMilli;
+        return lastUsedTOD * MAX_IDS_PER_MILLI + (long) numIdsThisMilli;
     }
 }
diff --git a/common/src/main/resources/flex/messaging/errors.properties b/common/src/main/resources/flex/messaging/errors.properties
index 6ff59b0..711ef91 100644
--- a/common/src/main/resources/flex/messaging/errors.properties
+++ b/common/src/main/resources/flex/messaging/errors.properties
@@ -12,7 +12,6 @@
 # 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.
-
 # IMPORTANT: Error messages are now split between two files in BlazeDS and LCDS.
 # This file is for BlazeDS error messages (which can be used by LCDS code as well).
 # LCDS only messages now live in a separate file in the LCDS branch. While editing
@@ -49,7 +48,6 @@
 # are not being used.
 # * Caution: Reusing a property key doesn't generate any error, so watch for typos.
 #            The last defined property with a duplicate key clobbers the earlier values.
-
 # 10000-10049: General LocalizedException messages (in MessageBrokerFilter and MessageBroker).
 10000=There was an unhandled failure on the server. {0}
 10001=Null endpoint id arrived on message.
@@ -104,7 +102,6 @@
 10038={0} ''{1}'' cannot service message ''{2}'' in stopped state.
 10039=Cannot create ''{0}'' with null id.
 10040=Cannot create ''{0}'' with id ''{1}''; another ''{0}'' is already registered with the same id.
-
 # 10050-10099: SecurityException messages.
 10050=Invalid login.
 10051=Login required.
@@ -122,7 +119,6 @@
 10066=Secure endpoint ''{0}'' must be contacted via a secure protocol.
 10067=SSO Cookie created sessions may only be invalidated by removal of Cookie on the client.
 10068=HTTP endpoint ''{0}'' must be contacted via a HTTP request with proper content type.
-
 # 10100-10149: Server configuration error messages.
 10100=Error initializing configuration parser.
 10101=An internal error occurred while parsing the services configuration.
@@ -180,12 +176,10 @@
 10149=Unrecognized tag found in <properties>.  Please consult the documentation to determine if the tag is invalid or belongs inside of a different tag: {0}
 10149-pattern-details=''{0}'' in {1} with id: ''{2}'' from file: {3}
 #No more here - continues to 11100-11150 block
-
 # 10150-10199: DataService error messages (in LCDS errors.properties)
 # These two were in DataService error messages block even though they are general server errors, so they are kept here.
 10163=Unable to locate a MessageBroker initialized with server id ''{0}''
 10169=Unexpected multiple values for property ''{0}''.
-
 # 10200-10249: Clustering error messages
 10200=Unable to create a cluster id named {0}.
 10201=Could not create replicated map of cluster nodes for cluster id {0}.
@@ -207,7 +201,6 @@
 10217=Destination ''{0}'' is referencing an undefined cluster ''{1}''. Please correct your destination configuration and restart.
 10218=Unable to create a cluster id named {0} because the root region could not be found.
 10219=Unable to service an endpoint operation received from a broadcast on cluster id ''{0}''.
-
 # 10300-10349: Serialization error messages
 10300=Error deserializing typed AMF object because the target server type ''{0}'' cannot be found.
 10301=Unknown AMF type ''{0}''.
@@ -226,7 +219,6 @@
 10314=Error deserializing the string with length ''{0}'', it exceeds the max-string-bytes limit of ''{1}''.
 10315=Error serialization exceeds the max object nest level of ''{0}''.
 10316=Error serialization exceeds the max collection object nest level of ''{0}''.
-
 # 10400-10449: Management error messages
 10400=The specified object name, ''{0}'', is malformed and cannot be used to create an ObjectName instance.
 10401=The MBean, ''{0}'', could not be unregistered because its preDeregister() method threw an exception.
@@ -257,7 +249,6 @@
 10426=The MBean, ''{0}'', cannot be registered because the previous MBean with the same name could not be unregistered possibly due to some security setting on the application server. This can be avoided by setting manageable property to false in the configuration file.
 10427=MBeanServerLocator ''{0}'' failed to retrieve MBeanServer.
 10428=The admin console registrar could not be found.
-
 # 10450-10499: Service error messages
 10450=Unable to create service ''{0}'' for ''{1}'' due to the following error: {2}.
 10451=Command forbidden on service ''{0}''.
@@ -265,10 +256,7 @@
 10453=Unable to create service ''{0}'' for ''{1}'' due to a dependency on commons-logging.jar. To resolve this, copy commons-logging.jar from WEB-INF/flex/jars to WEB-INF/lib or add your desired version of commons-logging.jar to the classpath for this web application.
 10454=The ''{0}'' service can only process messages of type ''{1}''.
 10455=Destination ''{0}'' is not registered with service ''{1}''.
-
-
 # 10500-10549: Data adapter error messages. (in LCDS errors.properties)
-
 # 10550-10599: MessageService error messages.
 10550=The selector expression is not valid: {0}
 10551=Not subscribed to destination ''{0}''.
@@ -280,12 +268,10 @@
 10558=Your sent message to the subtopic, ''{0}'', was blocked.
 10559=Duplicate subscription. Another client has already subscribed with the clientId, ''{0}''.
 10560=Attempt to subscribe to the subtopic, ''{0}'', on destination, ''{1}'', that does not allow wildcard subtopics failed.
-
 # 10600-10649: Message selector error messages.
 10600=Failed to parse the selector ''{0}''. {1}
 10601=Selector ''{0}'' attempted to match a value using an incompatible data type. Please review your selector expression and ensure that any string values you intend to match are quoted and non-string values are not.
 10602=Matching the selector ''{0}'' generated a parser error. {1}
-
 # 10650 - 10699: Remoting Service error messages.
 10650=Destination ''{0}'' is not registered with the Remoting Service.
 10652=Cannot create session scoped component for destination ''{0}'' because a session is not available.
@@ -296,7 +282,6 @@
 10658=The remoting method being configured for remoting destination ''{0}'' must have a non-null name.
 10659=The remoting method ''{0}'' for remoting destination ''{1}'' is attempting to reference security constraint ''{2}'' that is not defined.
 10660=The remoting method ''{0}'' is not defined by the source class for remoting destination ''{1}''.
-
 # 10700 - 10749: HTTP Proxy Service error messages.
 10700=Can't use ''..'' in URLs (security violation).
 10701=A destination that allows multiple domains or ports does not allow authentication.
@@ -321,9 +306,7 @@
 10717=Login required.
 10718=Access denied. User not authorized.
 10719=Invalid HTTP method ''{0}''
-
 # 10750-10799: RTMPS error messages. (in LCDS errors.properties)
-
 # 10800-10849: JMSAdapter error messages.
 10800=A <property> element for the <initial-context-environment> settings for the ''{0}'' destination does not specify both <name> and <value> subelements.
 10801=A <property> element for the <initial-context-environment> settings for the ''{0}'' destination specifies an invalid javax.naming.Context field for its <name>: {1}
@@ -351,7 +334,6 @@
 10823=JMS topic consumer for JMS destination ''{0}'' is configured to use durable subscriptions but it does not have a durable subscription name.
 10824=JMS invocation caught exception: {0}.
 # 10850-10899: RTMP error messages. (in LCDS errors.properties)
-
 # 11100-11149: Server configuration error messages. (continuation from 10100-10149 block)
 11100=Invalid channel endpoint URI, {0}, must begin with {1}.
 11101=The factory tag with class ''{0}'' does not implement the flex.messaging.FlexFactory interface.
@@ -404,29 +386,17 @@
 11148=UUID Generator class is not a valid subclass of ''{0}''.
 11149=Flex Configuration does not allow external entity defined by publicId ''{0}'' and SystemId ''{1}''
 # continued again in the 11400-11449 block
-
 # 11150-11199: license messages (in LCDS errors.properties)
-
 # 11200-11249: Data adapter error messages. (in LCDS errors.properties)
-
 # 11250-11300: SQL assembler error messages. (in LCDS errors.properties)
-
 # 11300-11349: Live Cycle Remoting error messages. (in LCDS errors.properties)
-
 # 11350-11399: WSRP Generation error messages. (in LCDS errors.properties)
-
 # 11400-11449: Server configuration error messages. (continuation from 11100-11149 block)
 11400=Only one validator is allowed to implement DeserializationValidator.  ''{0}'' has already been added.  ''{1}'' cannot be added as a validator.
-
 # 12000-12499: PDF Services error messages. (in LCDS errors.properties)
-
 # 13000-13499: Collaboration Services error messages.
-
 # 13500-13549: General SSL error messages. (in LCDS errors.properties)
-
 # 13550-13599: General socket server error messages (in LCDS errors.properties)
-
 # 13600-13649: flex.messaging.util.concurrent.Executor and related error messages.
 13600=Cannot create AsyncBeansWorkManagerExecutor because no WorkManager is bound in JNDI under the name ''{0}''.
-
 # 13650-13699: General NIO Endpoints error messages (in LCDS errors.properties)
\ No newline at end of file
diff --git a/core/AdobeInfo.xml b/core/AdobeInfo.xml
index 19a7eaa..c472157 100755
--- a/core/AdobeInfo.xml
+++ b/core/AdobeInfo.xml
@@ -17,8 +17,8 @@
   limitations under the License.
 
 -->
-    <manifest version="1.0">
-    <versioninfo> 
+<manifest version="1.0">
+    <versioninfo>
         <build AdobeIPNumber="0000494"/>
     </versioninfo>
 </manifest>
\ No newline at end of file
diff --git a/core/build.xml b/core/build.xml
index 24a9b38..ce083ff 100755
--- a/core/build.xml
+++ b/core/build.xml
@@ -25,7 +25,7 @@
 
     <property name="module.dir" value="${basedir}/core"/>
     <property name="module.lib.dir" location="${module.dir}/lib"/>
-    <property name="tomcat.lib.dir" location="${lib.dir}" />
+    <property name="tomcat.lib.dir" location="${lib.dir}"/>
     <property name="module.src" value="${module.dir}/src"/>
     <property name="module.classes" value="${module.dir}/classes"/>
     <property name="module.jar" value="${lib.dir}/flex-messaging-core.jar"/>
@@ -34,7 +34,7 @@
     <property name="common.src" value="${basedir}/common/src"/>
     <property name="remoting.src" value="${basedir}/remoting/src"/>
     <property name="proxy.src" value="${basedir}/proxy/src"/>
-    <property name="opt.src" value="${basedir}/opt/src"/>    
+    <property name="opt.src" value="${basedir}/opt/src"/>
 
     <property name="build.number" value=""/>
 
@@ -42,7 +42,8 @@
     <path id="classpath">
         <fileset dir="${lib.dir}" erroronmissingdir="false" includes="flex-messaging-common.jar"/>
         <fileset dir="${xalan.dir}" erroronmissingdir="false" includes="xalan-${xalan.version}.jar"/>
-        <fileset dir="${activemq.dir}" erroronmissingdir="false" includes="activemq-core/${activemq.version}/activemq-core-${activemq.version}.jar"/>
+        <fileset dir="${activemq.dir}" erroronmissingdir="false"
+                 includes="activemq-core/${activemq.version}/activemq-core-${activemq.version}.jar"/>
         <fileset dir="${servlet.dir}" erroronmissingdir="false" includes="servlet-api-${servlet.version}.jar"/>
         <fileset dir="${jms.dir}" erroronmissingdir="false" includes="${jms.jar}"/>
     </path>
@@ -61,34 +62,34 @@
     </target>
 
     <target name="compile" depends="prepare" description="compile">
-        <javac debug="${src.debug}" destdir="${module.classes}" 
-        	srcdir="${module.src}" classpathref="classpath" >
-            <include name="**/*.java" />
-           	<exclude name="flex/messaging/cluster/JGroupsCluster.java" />
-           	<exclude name="flex/messaging/cluster/ClusterNode.java" />
-           	<exclude name="flex/messaging/cluster/ClusterMembershipListener.java" />
+        <javac debug="${src.debug}" destdir="${module.classes}"
+               srcdir="${module.src}" classpathref="classpath">
+            <include name="**/*.java"/>
+            <exclude name="flex/messaging/cluster/JGroupsCluster.java"/>
+            <exclude name="flex/messaging/cluster/ClusterNode.java"/>
+            <exclude name="flex/messaging/cluster/ClusterMembershipListener.java"/>
         </javac>
         <echo file="${module.classes}/flex/messaging/version.properties" append="false">build=${build.number}</echo>
         <copy todir="${module.classes}/flex/messaging" overwrite="true">
             <fileset dir="${module.src}/flex/messaging" includes="*.properties"/>
         </copy>
-        <copy toDir="${module.classes}" file="${module.dir}/AdobeInfo.xml" />
+        <copy toDir="${module.classes}" file="${module.dir}/AdobeInfo.xml"/>
     </target>
 
-	<!-- only compile jgroups code if jgroups present -->
-	<condition property="jgroups.available">
-	  <available classname="org.jgroups.Channel" classpathref="classpath"/>
-	</condition>
+    <!-- only compile jgroups code if jgroups present -->
+    <condition property="jgroups.available">
+        <available classname="org.jgroups.Channel" classpathref="classpath"/>
+    </condition>
 
-	<target name="compile-jgroups" depends="prepare" if="jgroups.available">
-		<echo >-== Found JGroups, compiling JGroups cluster implementation ==-</echo>
+    <target name="compile-jgroups" depends="prepare" if="jgroups.available">
+        <echo>-== Found JGroups, compiling JGroups cluster implementation ==-</echo>
         <javac debug="${src.debug}" destdir="${module.classes}" srcdir="${module.src}"
-			classpathref="classpath" >
-           	<include name= "flex/messaging/cluster/JGroupsCluster.java" />
-           	<include name= "flex/messaging/cluster/ClusterNode.java" />
-           	<include name= "flex/messaging/cluster/ClusterMembershipListener.java" />
-		</javac>
-	</target>
+               classpathref="classpath">
+            <include name="flex/messaging/cluster/JGroupsCluster.java"/>
+            <include name="flex/messaging/cluster/ClusterNode.java"/>
+            <include name="flex/messaging/cluster/ClusterMembershipListener.java"/>
+        </javac>
+    </target>
 
     <!-- jar containing messaging core infrastructure -->
     <target name="jar" depends="compile,compile-jgroups">
@@ -99,10 +100,10 @@
             <include name="flex/core/**"/>
             <exclude name=".dependency-info/**"/>
             <manifest>
-        		<attribute name="Sealed" value="${manifest.sealed}"/>
-        		<attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Community Edition"/>
-			    <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/> 
-			    <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+                <attribute name="Sealed" value="${manifest.sealed}"/>
+                <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Community Edition"/>
+                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+                <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
             </manifest>
         </jar>
         <delete failonerror="false">
@@ -123,7 +124,7 @@
         <echo>modules/core clean</echo>
     </target>
 
-   <target name="javadoc">
+    <target name="javadoc">
         <path id="javadoc.classpath">
             <path refid="classpath"/>
             <fileset dir="${basedir}/opt/lib" includes="*.jar" excludes="catalina-708.jar"/>
@@ -131,29 +132,30 @@
         <mkdir dir="${basedir}/docs"/>
         <mkdir dir="${basedir}/docs/api"/>
         <javadoc
-             access="public" 
-             destdir="${basedir}/docs/api"
-             doclet="ExcludeDoclet"
-             docletpathref="javadoc.classpath"
-             author="false"
-             version="true"
-             use="true"
-             sourcePath="${common.src};${module.src};${remoting.src};${proxy.src};${opt.src}/jrun;${opt.src}/oracle;${opt.src}/tomcat;${opt.src}/weblogic;${opt.src}/websphere"
-             classpathref="javadoc.classpath"
-             packageNames="flex.*"
-             failonerror="true"
-             windowtitle="${manifest.Implementation-Title} - Public APIs">
- 
-             <doctitle><![CDATA[<h1>${manifest.Implementation-Title} - Public APIs</h1><h2>Build: ${manifest.Implementation-Version}.${build.number}</h2>]]></doctitle>
-             <bottom><![CDATA[<i>Copyright &#169; 2008 Adobe Systems Inc. All Rights Reserved.</i>]]></bottom>
-             <group title="Messaging APIs" packages="flex.messaging:flex.messaging.services"/>
-             <group title="AMF Serialization APIs" packages="flex.messaging.io.amf"/>
-             <group title="Logging and Debugging APIs" packages="flex.messaging.log"/>
-             <group title="Configuration APIs" packages="flex.messaging.config:flex.messaging.security"/>
-             <group title="Management APIs" packages="flex.management, flex.management.jmx, flex.management.runtime.*"/>
-             <link offline="false" href="http://java.sun.com/j2se/1.5.0/docs/api/" packagelistLoc="C:\tmp"/>
+                access="public"
+                destdir="${basedir}/docs/api"
+                doclet="ExcludeDoclet"
+                docletpathref="javadoc.classpath"
+                author="false"
+                version="true"
+                use="true"
+                sourcePath="${common.src};${module.src};${remoting.src};${proxy.src};${opt.src}/jrun;${opt.src}/oracle;${opt.src}/tomcat;${opt.src}/weblogic;${opt.src}/websphere"
+                classpathref="javadoc.classpath"
+                packageNames="flex.*"
+                failonerror="true"
+                windowtitle="${manifest.Implementation-Title} - Public APIs">
+
+            <doctitle>
+                <![CDATA[<h1>${manifest.Implementation-Title} - Public APIs</h1><h2>Build: ${manifest.Implementation-Version}.${build.number}</h2>]]></doctitle>
+            <bottom><![CDATA[<i>Copyright &#169; 2008 Adobe Systems Inc. All Rights Reserved.</i>]]></bottom>
+            <group title="Messaging APIs" packages="flex.messaging:flex.messaging.services"/>
+            <group title="AMF Serialization APIs" packages="flex.messaging.io.amf"/>
+            <group title="Logging and Debugging APIs" packages="flex.messaging.log"/>
+            <group title="Configuration APIs" packages="flex.messaging.config:flex.messaging.security"/>
+            <group title="Management APIs" packages="flex.management, flex.management.jmx, flex.management.runtime.*"/>
+            <link offline="false" href="http://java.sun.com/j2se/1.5.0/docs/api/" packagelistLoc="C:\tmp"/>
         </javadoc>
-        <zip destfile="${basedir}/docs/javadoc.zip" basedir="${basedir}/docs/api" />
+        <zip destfile="${basedir}/docs/javadoc.zip" basedir="${basedir}/docs/api"/>
     </target>
 
 </project>
diff --git a/core/pom.xml b/core/pom.xml
index 1ccd966..42bc75d 100755
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -16,53 +16,48 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>blazeds</artifactId>
-    <version>4.7.3</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>blazeds</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-core</artifactId>
+    <artifactId>flex-messaging-core</artifactId>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.flex.blazeds</groupId>
-      <artifactId>flex-messaging-common</artifactId>
-      <version>${project.version}</version>
-    </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-common</artifactId>
+            <version>4.8.0-SNAPSHOT</version>
+        </dependency>
 
-    <dependency>
-      <groupId>org.apache.activemq</groupId>
-      <artifactId>activemq-core</artifactId>
-      <optional>true</optional>
-    </dependency>
+        <dependency>
+            <groupId>org.jgroups</groupId>
+            <artifactId>jgroups</artifactId>
+            <optional>true</optional>
+        </dependency>
 
-    <dependency>
-      <groupId>jgroups</groupId>
-      <artifactId>jgroups</artifactId>
-      <optional>true</optional>
-    </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
 
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
+        <dependency>
+            <groupId>javax.jms</groupId>
+            <artifactId>javax.jms-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
 
-    <dependency>
-      <groupId>javax.jms</groupId>
-      <artifactId>javax.jms-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
 </project>
diff --git a/core/src/main/java/flex/management/BaseControl.java b/core/src/main/java/flex/management/BaseControl.java
index a66a104..22353ad 100644
--- a/core/src/main/java/flex/management/BaseControl.java
+++ b/core/src/main/java/flex/management/BaseControl.java
@@ -53,8 +53,7 @@
  * <code>ObjectName</code>s for all MBean instances.</p>
  */
 public abstract class BaseControl implements BaseControlMBean,
-        MBeanRegistration
-{
+        MBeanRegistration {
     /**
      * The prefix used for the domain part of control MBean names.
      */
@@ -65,7 +64,7 @@
     private static final int REG_EXCEPTION = 10403;
     private static final int REG_ALREADYEXISTS = 10404;
     private static final int REG_NOTCOMPLIANT = 10405;
-    private static final int DISABLE_MANAGEMENT = 10426;    
+    private static final int DISABLE_MANAGEMENT = 10426;
 
     protected Date startTimestamp;
     private BaseControl parent;
@@ -86,8 +85,7 @@
 
     // Implements flex.management.BaseControlMBean.getParent; inherits javadoc
     // specification.
-    public final ObjectName getParent()
-    {
+    public final ObjectName getParent() {
         return (parent != null) ? parent.getObjectName() : null;
     }
 
@@ -96,38 +94,35 @@
      * this control manages.
      *
      * @return An identifier for the application that hosts the component this
-     *         control manages.
+     * control manages.
      */
-    public String getApplicationId()
-    {
+    public String getApplicationId() {
         String id = null;
         // Our base implementation attempts to use the current servlet context
         // name as our application identifier.
         ServletConfig config = FlexContext.getServletConfig();
-        if (config != null)
-        {
+        if (config != null) {
             id = config.getServletContext().getServletContextName();
         }
         return (id != null) ? id.replace(":", "") : "";
     }
 
     /**
-     * Set the register object. 
+     * Set the register object.
+     *
      * @param registrar the registrar to set
      */
-    protected void setRegistrar(AdminConsoleDisplayRegistrar registrar)
-    {
+    protected void setRegistrar(AdminConsoleDisplayRegistrar registrar) {
         this.registrar = registrar;
     }
 
     /**
      * Return the registar object.
+     *
      * @return the registrar
      */
-    public AdminConsoleDisplayRegistrar getRegistrar()
-    {
-        if ((parent == null) && (this.registrar == null))
-        {
+    public AdminConsoleDisplayRegistrar getRegistrar() {
+        if ((parent == null) && (this.registrar == null)) {
             return new AdminConsoleDisplayRegistrar(null);
         }
 
@@ -139,10 +134,9 @@
      * parent; the parent may be null for root control MBeans.
      *
      * @param parent The parent <code>BaseControl</code> for this instance or
-     *        null if this instance is the root of a control hierarchy.
+     *               null if this instance is the root of a control hierarchy.
      */
-    public BaseControl(BaseControl parent)
-    {
+    public BaseControl(BaseControl parent) {
         this.parent = parent;
     }
 
@@ -151,8 +145,7 @@
      *
      * @return The parent <code>BaseControl</code>.
      */
-    public final BaseControl getParentControl()
-    {
+    public final BaseControl getParentControl() {
         return parent;
     }
 
@@ -162,31 +155,26 @@
      * <code>null</code>.
      *
      * @return The <code>MBeanServer</code> that this instance is registered
-     *         with.
+     * with.
      */
-    public final MBeanServer getMBeanServer()
-    {
+    public final MBeanServer getMBeanServer() {
         return server;
     }
 
     /**
      * Registers this instance with the MBean server.
-     *
+     * <p>
      * It may throw ManagementException If an <code>MBeanRegistrationException</code>
-     *         or <code>InstanceAlreadyExistsException</code> is thrown while
-     *         registering this MBean, the typed exception is wrapped in a
-     *         runtime <code>ManagementException</code> and rethrown.
+     * or <code>InstanceAlreadyExistsException</code> is thrown while
+     * registering this MBean, the typed exception is wrapped in a
+     * runtime <code>ManagementException</code> and rethrown.
      */
-    public final void register()
-    {
-        if (!registered)
-        {
+    public final void register() {
+        if (!registered) {
             MBeanServer server = MBeanServerLocatorFactory.getMBeanServerLocator().getMBeanServer();
             ObjectName name = getObjectName();
-            try
-            {
-                if (server.isRegistered(name))
-                {
+            try {
+                if (server.isRegistered(name)) {
                     server.unregisterMBean(name);
                 }
 
@@ -194,51 +182,38 @@
                 registered = true;
                 onRegistrationComplete();
 
-            }
-            catch (ManagementException me)
-            {
+            } catch (ManagementException me) {
                 throw me;
-            }
-            catch (MBeanRegistrationException mre)
-            {
+            } catch (MBeanRegistrationException mre) {
                 // Rethrow with useful message if this ever happens.
                 ManagementException me = new ManagementException();
-                me.setMessage(REG_EXCEPTION, new Object[] {name.toString()});
+                me.setMessage(REG_EXCEPTION, new Object[]{name.toString()});
                 me.setRootCause(mre);
                 throw me;
-            }
-            catch (InstanceAlreadyExistsException iaee)
-            {
+            } catch (InstanceAlreadyExistsException iaee) {
                 // If registration is not working at all, inform the user that
                 // they may
                 // work around the issue by disabling management (no MBeans will
                 // be registered).
-                if (!server.isRegistered(name))
-                {
+                if (!server.isRegistered(name)) {
                     ManagementException me = new ManagementException();
-                    me.setMessage(DISABLE_MANAGEMENT, new Object[] {name.toString()});
+                    me.setMessage(DISABLE_MANAGEMENT, new Object[]{name.toString()});
                     throw me;
-                }
-                else
-                {
+                } else {
                     // Rethrow with useful message if this ever happens.
                     ManagementException me = new ManagementException();
-                    me.setMessage(REG_ALREADYEXISTS, new Object[] {name.toString()});
+                    me.setMessage(REG_ALREADYEXISTS, new Object[]{name.toString()});
                     throw me;
                 }
-            }
-            catch (NotCompliantMBeanException ncme)
-            {
+            } catch (NotCompliantMBeanException ncme) {
                 // Rethrow with useful message if this ever happens.
                 ManagementException me = new ManagementException();
-                me.setMessage(REG_NOTCOMPLIANT, new Object[] {name.toString()});
+                me.setMessage(REG_NOTCOMPLIANT, new Object[]{name.toString()});
                 throw me;
-            }
-            catch (InstanceNotFoundException infe)
-            {
+            } catch (InstanceNotFoundException infe) {
                 // Rethrow with useful message if this ever happens.
                 ManagementException me = new ManagementException();
-                me.setMessage(UNREG_NOTFOUND, new Object[] {name.toString()});
+                me.setMessage(UNREG_NOTFOUND, new Object[]{name.toString()});
                 throw me;
             }
         }
@@ -250,8 +225,7 @@
      * access to the actual Object name should override this method rather than
      * the postRegister method.
      */
-    protected void onRegistrationComplete()
-    {
+    protected void onRegistrationComplete() {
 
     }
 
@@ -259,48 +233,36 @@
      * Unregisters this instance from the MBean server if it has been registered
      * previously.
      */
-    public final void unregister()
-    {
-        if (registered)
-        {
+    public final void unregister() {
+        if (registered) {
             // This method may be called when the JVM is being unloaded, so if
             // our
             // external error strings are loaded as missing, fall back to
             // hard-coded
             // strings.
-            try
-            {
-                if (server.isRegistered(registeredObjectName))
-                {
+            try {
+                if (server.isRegistered(registeredObjectName)) {
                     server.unregisterMBean(registeredObjectName);
                 }
 
                 registeredObjectName = null;
                 registered = false;
-            }
-            catch (ManagementException me)
-            {
+            } catch (ManagementException me) {
                 throw me;
-            }
-            catch (MBeanRegistrationException mre)
-            {
+            } catch (MBeanRegistrationException mre) {
                 // Rethrow with useful message if this ever happens.
                 ManagementException me = new ManagementException();
-                me.setMessage(UNREG_EXCEPTION, new Object[] {registeredObjectName.toString()});
-                if (me.getMessage().indexOf(Integer.toString(UNREG_EXCEPTION)) != -1)
-                {
+                me.setMessage(UNREG_EXCEPTION, new Object[]{registeredObjectName.toString()});
+                if (me.getMessage().indexOf(Integer.toString(UNREG_EXCEPTION)) != -1) {
                     me.setMessage("The MBean named, '" + registeredObjectName.toString() + "', could not be unregistered because its preDeregister() method threw an exception.");
                 }
                 me.setRootCause(mre);
                 throw me;
-            }
-            catch (InstanceNotFoundException infe)
-            {
+            } catch (InstanceNotFoundException infe) {
                 // Rethrow with useful message if this ever happens.
                 ManagementException me = new ManagementException();
-                me.setMessage(UNREG_NOTFOUND, new Object[] {registeredObjectName.toString()});
-                if (me.getMessage().indexOf(Integer.toString(UNREG_NOTFOUND)) != -1)
-                {
+                me.setMessage(UNREG_NOTFOUND, new Object[]{registeredObjectName.toString()});
+                if (me.getMessage().indexOf(Integer.toString(UNREG_NOTFOUND)) != -1) {
                     me.setMessage("The MBean named, '" + registeredObjectName.toString() + "', could not be unregistered because it is not currently registered.");
                 }
                 throw me;
@@ -329,18 +291,18 @@
      * <li>* optional containment keys</li>
      * </ul>
      * The runtime MBean model is hierarchical, with all MBeans ultimately
-     * contained by the root <code>MessageBrokerControlMBean</code>. The 
+     * contained by the root <code>MessageBrokerControlMBean</code>. The
      * <code>ObjectName</code>s used for these MBeans describe this
      * containment in the following fashion. First, the 'type' key for a
      * contained MBean indicates the containment hierarchy for the bean. So, the
      * <code>ObjectName</code> for an <code>RTMPEndpointControlMBean</code>
      * would be: <code>type=MessageBroker.RTMPEndpoint</code>
-     *
+     * <p>
      * In addition to the hierarchical 'type' key, the full
      * <code>ObjectName</code> for this <code>RTMPEndpointControlMBean</code>
      * also contains a containment key:
      * <code>MessageBroker=MessageBroker1</code>
-     *
+     * <p>
      * Optional containment keys have the format:
      * <em>{parent type}={parent name}</em>. A containment key is added for
      * each ancestor up to the root of the hierarchy and these keys allow the
@@ -358,18 +320,15 @@
      *
      * @return The <code>ObjectName</code> for this instance.
      */
-    public final ObjectName getObjectName()
-    {
+    public final ObjectName getObjectName() {
         if (registered)
             return registeredObjectName;
 
-        if (objectName == null)
-        {
+        if (objectName == null) {
             StringBuffer buffer = new StringBuffer();
             buffer.append(DOMAIN_PREFIX);
             String appId = getApplicationId();
-            if (appId != null && appId.length() > 0)
-            {
+            if (appId != null && appId.length() > 0) {
                 buffer.append('.');
                 buffer.append(appId);
             }
@@ -380,27 +339,23 @@
             types.add(getType());
             ids.add(getId());
             BaseControl ancestor = parent;
-            while (ancestor != null)
-            {
+            while (ancestor != null) {
                 types.add(ancestor.getType());
                 ids.add(ancestor.getId());
                 ancestor = ancestor.getParentControl();
             }
-            for (int i = types.size() - 1; i >= 0; --i)
-            {
-                buffer.append((String)types.get(i));
-                if (i > 0)
-                {
+            for (int i = types.size() - 1; i >= 0; --i) {
+                buffer.append((String) types.get(i));
+                if (i > 0) {
                     buffer.append('.');
                 }
             }
             buffer.append(',');
             // Add containment keys.
-            for (int i = ids.size() - 1; i >= 1; --i)
-            {
-                buffer.append((String)types.get(i));
+            for (int i = ids.size() - 1; i >= 1; --i) {
+                buffer.append((String) types.get(i));
                 buffer.append('=');
-                buffer.append((String)ids.get(i));
+                buffer.append((String) ids.get(i));
                 buffer.append(',');
             }
             buffer.append("id=");
@@ -408,15 +363,12 @@
             String name = buffer.toString();
             // TODO: Seth: add server identifier key if we're running in a
             // cluster?
-            try
-            {
+            try {
                 objectName = new ObjectName(name);
-            }
-            catch (MalformedObjectNameException mone)
-            {
+            } catch (MalformedObjectNameException mone) {
                 // Rethrow with useful message if this ever happens.
                 ManagementException me = new ManagementException();
-                me.setMessage(MALFORMED_OBJECTNAME, new Object[] {name});
+                me.setMessage(MALFORMED_OBJECTNAME, new Object[]{name});
                 throw me;
             }
         }
@@ -432,13 +384,12 @@
      * <code>super.preRegister()</code>.
      *
      * @param server The Mbean server in which the MBean will be registered.
-     * @param name The object name of the MBean.
+     * @param name   The object name of the MBean.
      * @return The name the MBean will be registered under.
      * @throws Exception when the process failed
      */
     public ObjectName preRegister(MBeanServer server, ObjectName name)
-            throws Exception
-    {
+            throws Exception {
         this.server = server;
         return (name == null) ? getObjectName() : name;
     }
@@ -450,10 +401,9 @@
      * base implementation is a no-op that may be overridden.
      *
      * @param registrationDone Indicates whether or not the MBean was
-     *        successfully registered in the MBean server.
+     *                         successfully registered in the MBean server.
      */
-    public void postRegister(Boolean registrationDone)
-    {
+    public void postRegister(Boolean registrationDone) {
         // No-op.
     }
 
@@ -462,10 +412,10 @@
      * Allows the MBean to perform any operations needed after having been
      * unregistered in the MBean server. This base implementation is a no-op
      * that may be overridden.
+     *
      * @throws Exception when the process failed
      */
-    public void preDeregister() throws Exception
-    {
+    public void preDeregister() throws Exception {
         // No-op.
     }
 
@@ -475,8 +425,7 @@
      * unregistered by the MBean server. This base implementation is a no-op
      * that may be overridden.
      */
-    public void postDeregister()
-    {
+    public void postDeregister() {
         // No-op.
     }
 
@@ -485,29 +434,25 @@
      *
      * @param value The start timestamp for the managed component.
      */
-    public void setStartTimestamp(Date value)
-    {
+    public void setStartTimestamp(Date value) {
         startTimestamp = value;
     }
 
     /**
      * Returns the difference between a start and end timestamps in
-     *          minutes. Differences of less than one minute are rounded up to
-     *          one minute to avoid frequency calculations reporting infinite
-     *          message frequencies.
+     * minutes. Differences of less than one minute are rounded up to
+     * one minute to avoid frequency calculations reporting infinite
+     * message frequencies.
+     *
      * @param startTime The start timestamp in milliseconds.
-     * @param endTime The end timestamp in milliseconds.
+     * @param endTime   The end timestamp in milliseconds.
      * @return The difference between a start and end timestamps in minutes.
      */
-    protected double differenceInMinutes(long startTime, long endTime)
-    {
+    protected double differenceInMinutes(long startTime, long endTime) {
         double minutes = (endTime - startTime) / 60000d;
-        if (minutes > 1d)
-        {
+        if (minutes > 1d) {
             return minutes;
-        }
-        else
-        {
+        } else {
             return 1d;
         }
     }
diff --git a/core/src/main/java/flex/management/BaseControlMBean.java b/core/src/main/java/flex/management/BaseControlMBean.java
index d1c4246..ecca9d0 100644
--- a/core/src/main/java/flex/management/BaseControlMBean.java
+++ b/core/src/main/java/flex/management/BaseControlMBean.java
@@ -23,8 +23,7 @@
  * The base MBean interface for management beans that control aspects of
  * Flex behavior on the server.
  */
-public interface BaseControlMBean
-{
+public interface BaseControlMBean {
     /**
      * Returns the id for this MBean. This is the value that is set for the
      * <code>id</code> key in the <code>ObjectName</code> for this MBean.
diff --git a/core/src/main/java/flex/management/MBeanLifecycleManager.java b/core/src/main/java/flex/management/MBeanLifecycleManager.java
index 60f1f10..65b28ea 100644
--- a/core/src/main/java/flex/management/MBeanLifecycleManager.java
+++ b/core/src/main/java/flex/management/MBeanLifecycleManager.java
@@ -28,36 +28,30 @@
  * Helper class for managing MBean lifecycles externally from the core server
  * components where necessary.
  */
-public class MBeanLifecycleManager
-{
+public class MBeanLifecycleManager {
     /**
-     * Unregisters all runtime MBeans that are registered in the same domain as the 
-     * MessageBrokerControl for the target MessageBroker. 
-     *  
+     * Unregisters all runtime MBeans that are registered in the same domain as the
+     * MessageBrokerControl for the target MessageBroker.
+     *
      * @param broker The MessageBroker component that has been stopped.
      */
-    public static void unregisterRuntimeMBeans(MessageBroker broker)
-    {        
+    public static void unregisterRuntimeMBeans(MessageBroker broker) {
         MBeanServer server = MBeanServerLocatorFactory.getMBeanServerLocator().getMBeanServer();
         ObjectName brokerMBean = broker.getControl().getObjectName();
         String domain = brokerMBean.getDomain();
-        try
-        {
+        try {
             ObjectName pattern = new ObjectName(domain + ":*");
             Set names = server.queryNames(pattern, null);
             Iterator iter = names.iterator();
-            while (iter.hasNext())
-            {
-                ObjectName on = (ObjectName)iter.next();
+            while (iter.hasNext()) {
+                ObjectName on = (ObjectName) iter.next();
                 server.unregisterMBean(on);
             }
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             // We're generally unregistering these during shutdown (possibly JVM shutdown)
             // so there's nothing to really do here because we aren't guaranteed access to
             // resources like system log files, localized messaging, etc.
         }
     }
-    
+
 }
diff --git a/core/src/main/java/flex/management/MBeanServerLocator.java b/core/src/main/java/flex/management/MBeanServerLocator.java
index 2a08e29..5e9f612 100644
--- a/core/src/main/java/flex/management/MBeanServerLocator.java
+++ b/core/src/main/java/flex/management/MBeanServerLocator.java
@@ -21,13 +21,12 @@
 /**
  * Interface for classes that locate MBeanServers to register MBeans with.
  */
-public interface MBeanServerLocator
-{
+public interface MBeanServerLocator {
     /**
      * Returns the MBeanServer to register our management MBeans with.
-     * 
+     *
      * @return The MBeanServer to register our management MBeans with.
      */
     MBeanServer getMBeanServer();
-    
+
 }
diff --git a/core/src/main/java/flex/management/MBeanServerLocatorFactory.java b/core/src/main/java/flex/management/MBeanServerLocatorFactory.java
index 29eb1b3..53393ff 100644
--- a/core/src/main/java/flex/management/MBeanServerLocatorFactory.java
+++ b/core/src/main/java/flex/management/MBeanServerLocatorFactory.java
@@ -23,14 +23,13 @@
 /**
  * Factory to get a <code>MBeanServerLocator</code>.
  */
-public class MBeanServerLocatorFactory
-{
+public class MBeanServerLocatorFactory {
     //--------------------------------------------------------------------------
     //
     // Private Static Variables
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * The MBeanServerLocator impl to use; lazily init'ed on first access.
      */
@@ -41,83 +40,76 @@
     // Public Static Methods
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Returns a <code>MBeanServerLocator</code> that exposes the <code>MBeanServer</code> to register MBeans with.
-     * 
+     *
      * @return The <code>MBeanServerLocator</code> that exposes the <code>MBeanServer</code> to register MBeans with.
      */
-    public static synchronized MBeanServerLocator getMBeanServerLocator()
-    {
-        if (locator == null)
-        {
+    public static synchronized MBeanServerLocator getMBeanServerLocator() {
+        if (locator == null) {
             // Try app-server specific locators.
             // WebSphere provides access to its MBeanServer via a custom admin API.
-            instantiateLocator("flex.management.WebSphereMBeanServerLocator", new String[] {"com.ibm.websphere.management.AdminServiceFactory"});
+            instantiateLocator("flex.management.WebSphereMBeanServerLocator", new String[]{"com.ibm.websphere.management.AdminServiceFactory"});
 
             // Sun JRE 1.5 based implementation
             if (locator == null)
-                locator =  new PlatformMBeanServerLocator();
-            
+                locator = new PlatformMBeanServerLocator();
+
             if (Log.isDebug())
                 Log.getLogger(LogCategories.MANAGEMENT_GENERAL).debug("Using MBeanServerLocator: " + locator.getClass().getName());
         }
         return locator;
     }
-    
+
     /**
      * Release static MBeanServerLocator
      * Called on MessageBroker shutdown.
      */
-    public static void clear()
-    {
+    public static void clear() {
         locator = null;
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Private Static Methods
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Helper method that attempts to load a specific MBeanServerLocator.
-     * 
-     * @param locatorClassName The classname of the desired MBeanServerLocator.
+     *
+     * @param locatorClassName     The classname of the desired MBeanServerLocator.
      * @param dependencyClassNames Any additional dependent classnames that the desired locator depends upon
-     *                            that should also be tested for availability.
+     *                             that should also be tested for availability.
      */
-    private static void instantiateLocator(String locatorClassName, String[] dependencyClassNames)
-    {
-        try
-        {
-            if (dependencyClassNames != null)
-            {
+    private static void instantiateLocator(String locatorClassName, String[] dependencyClassNames) {
+        try {
+            if (dependencyClassNames != null) {
                 for (int i = 0; i < dependencyClassNames.length; i++)
                     ClassUtil.createClass(dependencyClassNames[i]);
             }
-            
+
             Class locatorClass = ClassUtil.createClass(locatorClassName);
-            locator = (MBeanServerLocator)locatorClass.newInstance();
-        }
-        catch (Throwable t)
-        {
+            locator = (MBeanServerLocator) locatorClass.newInstance();
+        } catch (Throwable t) {
             if (Log.isDebug())
                 Log.getLogger(LogCategories.MANAGEMENT_MBEANSERVER).debug("Not using MBeanServerLocator: " + locatorClassName + ". Reason: " + t.getMessage());
         }
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Constructor
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Direct instantiation is not allowed.
-     * Use <code>getMBeanServerLocator()</code> to obtain a <code>MBeanServerLocator</code> 
+     * Use <code>getMBeanServerLocator()</code> to obtain a <code>MBeanServerLocator</code>
      * instance to lookup the proper MBean server to use.
      */
-    private MBeanServerLocatorFactory() {}
-    
+    private MBeanServerLocatorFactory() {
+    }
+
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/management/Manageable.java b/core/src/main/java/flex/management/Manageable.java
index be7eb4a..f14faa2 100644
--- a/core/src/main/java/flex/management/Manageable.java
+++ b/core/src/main/java/flex/management/Manageable.java
@@ -21,32 +21,31 @@
  * specific level of manageability is defined by the relationship between
  * a manageable component and its corresponding control.
  */
-public interface Manageable
-{
+public interface Manageable {
     /**
      * Returns <code>true</code> if the component is enabled for management.
-     * 
+     *
      * @return <code>true</code> if the component is enabled for management.
      */
     boolean isManaged();
-    
+
     /**
      * Enables or disables management for the component.
-     * 
+     *
      * @param enableManagement <code>true</code> to enable management, <code>false</code> to disable management.
      */
     void setManaged(boolean enableManagement);
-    
+
     /**
      * Returns the control MBean used to manage the component.
-     * 
+     *
      * @return The control MBean used to manage the component.
      */
     BaseControl getControl();
-    
+
     /**
      * Set the control MBean used to manage the component.
-     * 
+     *
      * @param control The <code>BaseControl</code> MBean used to manage the component.
      */
     void setControl(BaseControl control);
diff --git a/core/src/main/java/flex/management/ManageableComponent.java b/core/src/main/java/flex/management/ManageableComponent.java
index 02cccfc..5fb87f0 100644
--- a/core/src/main/java/flex/management/ManageableComponent.java
+++ b/core/src/main/java/flex/management/ManageableComponent.java
@@ -33,8 +33,7 @@
  * in the absence of external synchronization.
  * </p>
  */
-public abstract class ManageableComponent implements Manageable, FlexComponent
-{
+public abstract class ManageableComponent implements Manageable, FlexComponent {
     //--------------------------------------------------------------------------
     //
     // Protected Static Constants
@@ -64,10 +63,9 @@
      * management interface for this component.
      *
      * @param enableManagement <code>true</code> to enable management, <code>false</code> to disable
-     * management.
+     *                         management.
      */
-    public ManageableComponent(boolean enableManagement)
-    {
+    public ManageableComponent(boolean enableManagement) {
         setManaged(enableManagement);
     }
 
@@ -88,19 +86,19 @@
 
     /**
      * (non-JavaDoc)
+     *
      * @see Manageable#getControl()
      */
-    public BaseControl getControl()
-    {
+    public BaseControl getControl() {
         return control;
     }
 
     /**
      * (non-JavaDoc)
+     *
      * @see Manageable#setControl(BaseControl)
      */
-    public void setControl(BaseControl control)
-    {
+    public void setControl(BaseControl control) {
         this.control = control;
     }
 
@@ -118,8 +116,7 @@
      *
      * @return The id of the <code>ManageableComponent</code>.
      */
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
@@ -129,14 +126,11 @@
      *
      * @param id The id of the <code>ManageableComponent</code>.
      */
-    public void setId(String id)
-    {
-        if (isStarted())
-        {
+    public void setId(String id) {
+        if (isStarted()) {
             blockAssignmentWhileStarted("id");
         }
-        if (id == null)
-        {
+        if (id == null) {
             // Id of a component cannot be null.
             blockNullAssignment("id");
         }
@@ -154,10 +148,10 @@
 
     /**
      * (non-JavaDoc)
+     *
      * @see Manageable#isManaged()
      */
-    public boolean isManaged()
-    {
+    public boolean isManaged() {
         return managed;
     }
 
@@ -168,18 +162,14 @@
      *
      * @param enableManagement <code>true</code> to enable management, <code>false</code> to disable management.
      */
-    public void setManaged(boolean enableManagement)
-    {
-        if (isStarted() && control != null)
-        {
+    public void setManaged(boolean enableManagement) {
+        if (isStarted() && control != null) {
             blockAssignmentWhileStarted("managed");
         }
-        if (enableManagement && parent != null && !parent.isManaged())
-        {
-            if (Log.isWarn())
-            {
+        if (enableManagement && parent != null && !parent.isManaged()) {
+            if (Log.isWarn()) {
                 Log.getLogger(getLogCategory()).warn("Component: '" + id + "' cannot be managed" +
-                " since its parent is unmanaged.");
+                        " since its parent is unmanaged.");
             }
             return;
         }
@@ -200,8 +190,7 @@
      *
      * @return The parent of the component.
      */
-    public Manageable getParent()
-    {
+    public Manageable getParent() {
         return parent;
     }
 
@@ -211,21 +200,16 @@
      *
      * @param parent The parent of the component.
      */
-    public void setParent(Manageable parent)
-    {
-        if (isStarted())
-        {
+    public void setParent(Manageable parent) {
+        if (isStarted()) {
             blockAssignmentWhileStarted("parent");
         }
-        if (parent == null)
-        {
+        if (parent == null) {
             // Parent of a component cannot be null.
             blockNullAssignment("parent");
         }
-        if (!parent.isManaged() && isManaged())
-        {
-            if (Log.isWarn())
-            {
+        if (!parent.isManaged() && isManaged()) {
+            if (Log.isWarn()) {
                 Log.getLogger(getLogCategory()).warn("Component: '" + id + "' cannot be managed" +
                         " since its parent is unmanaged.");
             }
@@ -248,8 +232,7 @@
      *
      * @return <code>true</code> if the component is started.
      */
-    public boolean isStarted()
-    {
+    public boolean isStarted() {
         return started;
     }
 
@@ -258,13 +241,10 @@
      *
      * @param started true if the component is started.
      */
-    protected void setStarted(boolean started)
-    {
-        if (this.started != started)
-        {
+    protected void setStarted(boolean started) {
+        if (this.started != started) {
             this.started = started;
-            if (started && control != null)
-            {
+            if (started && control != null) {
                 control.setStartTimestamp(new Date());
             }
         }
@@ -284,8 +264,7 @@
      *
      * @return <code>true</code> if the component is valid.
      */
-    public boolean isValid()
-    {
+    public boolean isValid() {
         return valid;
     }
 
@@ -294,8 +273,7 @@
      *
      * @param valid true if the comoponent is valid.
      */
-    protected void setValid(boolean valid)
-    {
+    protected void setValid(boolean valid) {
         this.valid = valid;
     }
 
@@ -323,32 +301,29 @@
      * id and ignores the properties map argument.
      * Subclasses should call <code>super.initialize()</code>.
      *
-     * @param id Id of the <code>ManageableComponent</code>.
+     * @param id         Id of the <code>ManageableComponent</code>.
      * @param properties Properties for the <code>ManageableComponent</code>.
      */
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         setId(id);
     }
 
     /**
      * Validates and starts the component.
-     *
+     * <p>
      * Subclasses should call <code>super.start()</code>.
      */
-    public void start()
-    {
+    public void start() {
         validate();
         setStarted(true);
     }
 
     /**
      * Invalidates and stops the component.
-     *
+     * <p>
      * Subclasses should call <code>super.stop()</code>.
      */
-    public void stop()
-    {
+    public void stop() {
         invalidate();
         setStarted(false);
     }
@@ -365,8 +340,7 @@
      *
      * @param propertyName The name of the property being incorrectly assigned; included in the Exception message.
      */
-    protected void blockAssignmentWhileStarted(String propertyName)
-    {
+    protected void blockAssignmentWhileStarted(String propertyName) {
         ConfigurationException ce = new ConfigurationException();
         ce.setMessage(PROPERTY_CHANGE_AFTER_STARTUP, new Object[]{propertyName});
         throw ce;
@@ -378,8 +352,7 @@
      *
      * @param propertyName The name of the property being incorrectly assigned.
      */
-    protected void blockNullAssignment(String propertyName)
-    {
+    protected void blockNullAssignment(String propertyName) {
         ConfigurationException ce = new ConfigurationException();
         ce.setMessage(NULL_COMPONENT_PROPERTY, new Object[]{propertyName});
         throw ce;
@@ -390,8 +363,7 @@
      * This base implementation sets the valid property to false.
      * Subclasses should call <code>super.invalidate()</code>.
      */
-    protected void invalidate()
-    {
+    protected void invalidate() {
         setValid(false);
     }
 
@@ -403,15 +375,12 @@
      * If the component is not in a valid, startable state an Exception is thrown.
      * Subclasses should call <code>super.validate()</code>.
      */
-    protected void validate()
-    {
-        if (getId() == null)
-        {
+    protected void validate() {
+        if (getId() == null) {
             // Id of a component cannot be null.
             blockNullAssignment("id");
         }
-        if (getParent() == null)
-        {
+        if (getParent() == null) {
             // Parent of a component cannot be null.
             blockNullAssignment("parent");
         }
diff --git a/core/src/main/java/flex/management/ManagementException.java b/core/src/main/java/flex/management/ManagementException.java
index 593b7f2..3446474 100644
--- a/core/src/main/java/flex/management/ManagementException.java
+++ b/core/src/main/java/flex/management/ManagementException.java
@@ -19,12 +19,11 @@
 import flex.messaging.MessageException;
 
 /**
- * This exception type is thrown when errors occur generating 
+ * This exception type is thrown when errors occur generating
  * <code>ObjectName</code>s for MBeans, or when registering them or
  * accessing them via the MBean server.
  */
-public class ManagementException extends MessageException
-{
+public class ManagementException extends MessageException {
     // Inherits all functionality from MessageException.
     static final long serialVersionUID = 1296149563830613956L;
 }
diff --git a/core/src/main/java/flex/management/PlatformMBeanServerLocator.java b/core/src/main/java/flex/management/PlatformMBeanServerLocator.java
index c00fe42..7c7c2a3 100644
--- a/core/src/main/java/flex/management/PlatformMBeanServerLocator.java
+++ b/core/src/main/java/flex/management/PlatformMBeanServerLocator.java
@@ -26,11 +26,11 @@
  * The platform implementation of an MBeanServerLocator for Java 1.5+.
  * This locator exposes the platform MBeanServer.
  */
-public class PlatformMBeanServerLocator implements MBeanServerLocator
-{
-    /** {@inheritDoc} */
-    public synchronized MBeanServer getMBeanServer()
-    {
+public class PlatformMBeanServerLocator implements MBeanServerLocator {
+    /**
+     * {@inheritDoc}
+     */
+    public synchronized MBeanServer getMBeanServer() {
         return ManagementFactory.getPlatformMBeanServer();
     }
 
diff --git a/core/src/main/java/flex/management/jmx/Attribute.java b/core/src/main/java/flex/management/jmx/Attribute.java
index 54fe08b..21265fd 100644
--- a/core/src/main/java/flex/management/jmx/Attribute.java
+++ b/core/src/main/java/flex/management/jmx/Attribute.java
@@ -19,43 +19,39 @@
 /**
  * Remotable <code>Attribute</code> class that complies with Flash serialization requirements.
  */
-public class Attribute
-{
+public class Attribute {
     /**
      * The name of the attribute.
      */
     public String name;
-    
+
     /**
      * The value of the attribute.
      */
     public Object value;
-    
+
     /**
      * Constructs an empty <code>Attribute</code> instance.
-     *
      */
-    public Attribute()
-    {}
-    
+    public Attribute() {
+    }
+
     /**
      * Constructs an <code>Attribute</code> instance based upon a <code>javax.management.Attribute</code> instance.
-     * 
+     *
      * @param attribute The JMX <code>Attribute</code> to base this instance on.
      */
-    public Attribute(javax.management.Attribute attribute)
-    {
+    public Attribute(javax.management.Attribute attribute) {
         name = attribute.getName();
         value = attribute.getValue();
     }
-    
+
     /**
      * Utility method to convert this <code>Attribute</code> instance to a <code>javax.management.Attribute</code> instance.
-     * 
+     *
      * @return A JMX <code>Attribute</code> based upon this instance.
      */
-    public javax.management.Attribute toAttribute()
-    {
+    public javax.management.Attribute toAttribute() {
         return new javax.management.Attribute(name, value);
     }
 }
diff --git a/core/src/main/java/flex/management/jmx/MBeanAttributeInfo.java b/core/src/main/java/flex/management/jmx/MBeanAttributeInfo.java
index d9c6ba4..c3c48e0 100644
--- a/core/src/main/java/flex/management/jmx/MBeanAttributeInfo.java
+++ b/core/src/main/java/flex/management/jmx/MBeanAttributeInfo.java
@@ -17,22 +17,21 @@
 package flex.management.jmx;
 
 /**
- * Remotable <code>MBeanAttributeInfo</code> class that complies with Flash serialization requirements. 
- * The <code>isIs</code> property is not named <code>is</code> because <code>is</code> is 
+ * Remotable <code>MBeanAttributeInfo</code> class that complies with Flash serialization requirements.
+ * The <code>isIs</code> property is not named <code>is</code> because <code>is</code> is
  * an ActionScript keyword.
  */
-public class MBeanAttributeInfo
-{
+public class MBeanAttributeInfo {
     /**
      * The name of the attribute.
      */
     public String name;
-    
+
     /**
      * The class name of the attribute.
      */
     public String type;
-    
+
     /**
      * The description of the attribute.
      */
@@ -42,31 +41,30 @@
      * Whether the attribute can be read.
      */
     public boolean readable;
-    
+
     /**
      * Whether the attribute can be written.
      */
-    public boolean writable; 
-    
+    public boolean writable;
+
     /**
      * Whether the attribute has an "is" getter.
      */
     public boolean isIs;
-    
+
     /**
      * Constructs an empty <code>MBeanAttributeInfo</code> instance.
      */
-    public MBeanAttributeInfo()
-    {}
-    
+    public MBeanAttributeInfo() {
+    }
+
     /**
      * Constructs a <code>MBeanAttributeInfo</code> instance based upon a
      * <code>javax.management.MBeanAttributeInfo</code> instance.
-     * 
+     *
      * @param mbeanAttributeInfo The JMX <code>MBeanAttributeInfo</code> instance to base this instance on.
      */
-    public MBeanAttributeInfo(javax.management.MBeanAttributeInfo mbeanAttributeInfo)
-    {
+    public MBeanAttributeInfo(javax.management.MBeanAttributeInfo mbeanAttributeInfo) {
         name = mbeanAttributeInfo.getName();
         type = mbeanAttributeInfo.getType();
         description = mbeanAttributeInfo.getDescription();
@@ -74,21 +72,20 @@
         writable = mbeanAttributeInfo.isWritable();
         isIs = mbeanAttributeInfo.isIs();
     }
-    
+
     /**
      * Utility method to convert this <code>MBeanAttributeInfo</code> to a
      * <code>javax.management.MBeanAttributeInfo</code> instance.
-     * 
+     *
      * @return A JMX <code>MBeanAttributeInfo</code> based upon this instance.
      */
-    public javax.management.MBeanAttributeInfo toMBeanAttributeInfo()
-    {
+    public javax.management.MBeanAttributeInfo toMBeanAttributeInfo() {
         return new javax.management.MBeanAttributeInfo(name,
-                                                       type,
-                                                       description,
-                                                       readable,
-                                                       writable,
-                                                       isIs);
+                type,
+                description,
+                readable,
+                writable,
+                isIs);
     }
 
 }
diff --git a/core/src/main/java/flex/management/jmx/MBeanConstructorInfo.java b/core/src/main/java/flex/management/jmx/MBeanConstructorInfo.java
index 95a2474..3300260 100644
--- a/core/src/main/java/flex/management/jmx/MBeanConstructorInfo.java
+++ b/core/src/main/java/flex/management/jmx/MBeanConstructorInfo.java
@@ -19,86 +19,78 @@
 /**
  * Remotable <code>MBeanConstructorInfo</code> class that complies with Flash serialization requirements.
  */
-public class MBeanConstructorInfo
-{
+public class MBeanConstructorInfo {
     /**
      * The name of the constructor.
      */
     public String name;
-    
+
     /**
      * The description of the constructor.
      */
     public String description;
-    
+
     /**
      * The constructor's parameter signature.
      */
     public MBeanParameterInfo[] signature;
-    
+
     /**
      * Constructs an empty <code>MBeanConstructorInfo</code> instance.
-     *
      */
-    public MBeanConstructorInfo()
-    {}
-    
+    public MBeanConstructorInfo() {
+    }
+
     /**
      * Constructs a <code>MBeanConstructorInfo</code> instance based upon a
      * <code>javax.management.MBeanConstructorInfo</code> instance.
-     * 
+     *
      * @param mbeanConstructorInfo The <code>javax.management.MBeanConstructorInfo</code> to base this instance on.
      */
-    public MBeanConstructorInfo(javax.management.MBeanConstructorInfo mbeanConstructorInfo)
-    {
+    public MBeanConstructorInfo(javax.management.MBeanConstructorInfo mbeanConstructorInfo) {
         name = mbeanConstructorInfo.getName();
         description = mbeanConstructorInfo.getDescription();
         signature = convertSignature(mbeanConstructorInfo.getSignature());
     }
-    
+
     /**
      * Utility method to convert this <code>MBeanConstructorInfo</code> instance to a
      * <code>javax.management.MBeanConstructorInfo</code> instance.
-     * 
+     *
      * @return A JMX <code>MBeanConstructorInfo</code> based upon this instance.
      */
-    public javax.management.MBeanConstructorInfo toMBeanConstructorInfo()
-    {
+    public javax.management.MBeanConstructorInfo toMBeanConstructorInfo() {
         return new javax.management.MBeanConstructorInfo(name,
-                                                         description,
-                                                         convertSignature(signature));
-    }    
-    
+                description,
+                convertSignature(signature));
+    }
+
     /**
      * Utility method to convert the JMX constructor signature to our Flash friendly param type.
-     * 
+     *
      * @param source The JMX constructor signature params.
      * @return Flash friendly signature params.
      */
-    private MBeanParameterInfo[] convertSignature(javax.management.MBeanParameterInfo[] source)
-    {
+    private MBeanParameterInfo[] convertSignature(javax.management.MBeanParameterInfo[] source) {
         MBeanParameterInfo[] signature = new MBeanParameterInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
+        for (int i = 0; i < source.length; i++) {
             signature[i] = new MBeanParameterInfo(source[i]);
         }
         return signature;
     }
-    
+
     /**
      * Utility method to convert a Flash friendly construtor param signature to the JMX params.
-     * 
+     *
      * @param source The Flash friendly signature params.
      * @return The JMX constructor signature params.
      */
-    private javax.management.MBeanParameterInfo[] convertSignature(MBeanParameterInfo[] source)
-    {
+    private javax.management.MBeanParameterInfo[] convertSignature(MBeanParameterInfo[] source) {
         javax.management.MBeanParameterInfo[] signature = new javax.management.MBeanParameterInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
+        for (int i = 0; i < source.length; i++) {
             signature[i] = source[i].toMBeanParameterInfo();
         }
         return signature;
-    }   
+    }
 
 }
diff --git a/core/src/main/java/flex/management/jmx/MBeanInfo.java b/core/src/main/java/flex/management/jmx/MBeanInfo.java
index d44e507..a957abe 100644
--- a/core/src/main/java/flex/management/jmx/MBeanInfo.java
+++ b/core/src/main/java/flex/management/jmx/MBeanInfo.java
@@ -17,168 +17,153 @@
 package flex.management.jmx;
 
 /**
- * Remotable MBeanInfo class that complies with Flash serialization requirements. 
+ * Remotable MBeanInfo class that complies with Flash serialization requirements.
  * MBean Notifications are not currently supported.
  */
-public class MBeanInfo
-{
+public class MBeanInfo {
     /**
      * The Java class name for the MBean object.
      */
     public String className;
-    
+
     /**
      * The description of the MBean.
      */
     public String description;
-    
+
     /**
      * The attributes exposed for management.
      */
     public MBeanAttributeInfo[] attributes;
-    
+
     /**
      * The public constructors for the MBean.
      */
     public MBeanConstructorInfo[] constructors;
-    
+
     /**
      * The operations exposed by the MBean.
      */
     public MBeanOperationInfo[] operations;
-        
+
     /**
      * Constructs an empty <code>MBeanInfo</code> instance.
      */
-    public MBeanInfo()
-    {}
-    
+    public MBeanInfo() {
+    }
+
     /**
      * Constructs a <code>MBeanInfo</code> instance based upon a
      * <code>javax.management.MBeanInfo</code> instance.
-     * 
+     *
      * @param mbeanInfo The JMX <code>MBeanInfo</code> instance to base this instance on.
      */
-    public MBeanInfo(javax.management.MBeanInfo mbeanInfo)
-    {
+    public MBeanInfo(javax.management.MBeanInfo mbeanInfo) {
         className = mbeanInfo.getClassName();
         description = mbeanInfo.getDescription();
         attributes = convertAttributes(mbeanInfo.getAttributes());
         constructors = convertConstructors(mbeanInfo.getConstructors());
         operations = convertOperations(mbeanInfo.getOperations());
     }
-    
+
     /**
      * Utility method to convert this <code>MBeanInfo</code> to a
      * <code>javax.management.MBeanInfo</code> instance.
-     * 
+     *
      * @return A JMX <code>MBeanInfo</code> based upon this instance.
      */
-    public javax.management.MBeanInfo toMBeanInfo()
-    {
+    public javax.management.MBeanInfo toMBeanInfo() {
         return new javax.management.MBeanInfo(className,
-                                              description,
-                                              convertAttributes(attributes),
-                                              convertConstructors(constructors),
-                                              convertOperations(operations),
-                                              null);
-    }      
-    
+                description,
+                convertAttributes(attributes),
+                convertConstructors(constructors),
+                convertOperations(operations),
+                null);
+    }
+
     /**
      * Utility method to convert JMX attribute info instances to Flash friendly instances.
-     * 
+     *
      * @param source JMX attribute info instances.
      * @return Flash friendly attribute info instances.
      */
-    private MBeanAttributeInfo[] convertAttributes(javax.management.MBeanAttributeInfo[] source)
-    {
+    private MBeanAttributeInfo[] convertAttributes(javax.management.MBeanAttributeInfo[] source) {
         MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
+        for (int i = 0; i < source.length; i++) {
             attributes[i] = new MBeanAttributeInfo(source[i]);
         }
         return attributes;
-    }    
-    
+    }
+
     /**
      * Utility method to convert Flash friendly attribute info instances to JMX attribute info instances.
-     * 
+     *
      * @param source Flash friendly attribute info instances.
      * @return JMX attribute info instances.
      */
-    private javax.management.MBeanAttributeInfo[] convertAttributes(MBeanAttributeInfo[] source)
-    {
+    private javax.management.MBeanAttributeInfo[] convertAttributes(MBeanAttributeInfo[] source) {
         javax.management.MBeanAttributeInfo[] attributes = new javax.management.MBeanAttributeInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
+        for (int i = 0; i < source.length; i++) {
             attributes[i] = source[i].toMBeanAttributeInfo();
         }
         return attributes;
     }
-    
+
     /**
      * Utility method to convert JMX constructor info instances to Flash friendly constructor info
      * instances.
-     * 
+     *
      * @param source JMX constructor info instances.
      * @return Flash friendly constructor info instances.
      */
-    private MBeanConstructorInfo[] convertConstructors(javax.management.MBeanConstructorInfo[] source)
-    {
+    private MBeanConstructorInfo[] convertConstructors(javax.management.MBeanConstructorInfo[] source) {
         MBeanConstructorInfo[] constructors = new MBeanConstructorInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
-            constructors[i] = new MBeanConstructorInfo(source[i]);            
+        for (int i = 0; i < source.length; i++) {
+            constructors[i] = new MBeanConstructorInfo(source[i]);
         }
         return constructors;
     }
-    
+
     /**
      * Utility method to convert Flash friendly constructor info instances to JMX constructor info instances.
-     * 
+     *
      * @param source Flash friendly constructor info instances.
      * @return JMX constructor info instances.
      */
-    private javax.management.MBeanConstructorInfo[] convertConstructors(MBeanConstructorInfo[] source)
-    {
+    private javax.management.MBeanConstructorInfo[] convertConstructors(MBeanConstructorInfo[] source) {
         javax.management.MBeanConstructorInfo[] constructors = new javax.management.MBeanConstructorInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
+        for (int i = 0; i < source.length; i++) {
             constructors[i] = source[i].toMBeanConstructorInfo();
         }
         return constructors;
     }
-    
+
     /**
      * Utility method to convert JMX operation info instances to Flash friendly operation info instances.
-     * 
+     *
      * @param source JMX opereration info instances.
      * @return Flash friendly operation info instances.
      */
-    private MBeanOperationInfo[] convertOperations(javax.management.MBeanOperationInfo[] source)
-    {
+    private MBeanOperationInfo[] convertOperations(javax.management.MBeanOperationInfo[] source) {
         MBeanOperationInfo[] operations = new MBeanOperationInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
+        for (int i = 0; i < source.length; i++) {
             operations[i] = new MBeanOperationInfo(source[i]);
         }
         return operations;
     }
-    
+
     /**
      * Utility method to convert Flash friendly operation info instances to JMX operation info instances.
-     * 
-     * @param source Flash friendly operation info instances. 
+     *
+     * @param source Flash friendly operation info instances.
      * @return JMX operation info instances.
      */
-    private javax.management.MBeanOperationInfo[] convertOperations(MBeanOperationInfo[] source)
-    {
+    private javax.management.MBeanOperationInfo[] convertOperations(MBeanOperationInfo[] source) {
         javax.management.MBeanOperationInfo[] operations = new javax.management.MBeanOperationInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
+        for (int i = 0; i < source.length; i++) {
             operations[i] = source[i].toMBeanOperationInfo();
         }
         return operations;
     }
-    
+
 }
diff --git a/core/src/main/java/flex/management/jmx/MBeanOperationInfo.java b/core/src/main/java/flex/management/jmx/MBeanOperationInfo.java
index c6c6c45..ce18a30 100644
--- a/core/src/main/java/flex/management/jmx/MBeanOperationInfo.java
+++ b/core/src/main/java/flex/management/jmx/MBeanOperationInfo.java
@@ -19,99 +19,92 @@
 /**
  * Remotable MBeanOperationInfo class that complies with Flash serialization requirements.
  */
-public class MBeanOperationInfo
-{
+public class MBeanOperationInfo {
     /**
      * The operation name.
      */
     public String name;
-    
+
     /**
      * The operation description.
      */
     public String description;
-    
+
     /**
      * The operation's argument signature.
      */
     public MBeanParameterInfo[] signature;
-    
+
     /**
      * The operation's return type.
      */
     public String returnType;
-    
+
     /**
      * The impact of the operation; one of <code>INFO, ACTION, ACTION_INFO, UNKNOWN</code>.
      */
     public int impact;
-    
+
     /**
-     * Constructs an empty <code>MBeanOperationInfo</code> instance.    
+     * Constructs an empty <code>MBeanOperationInfo</code> instance.
      */
-    public MBeanOperationInfo()
-    {}
-    
+    public MBeanOperationInfo() {
+    }
+
     /**
      * Constructs a <code>MBeanOperationInfo</code> instance based upon a
      * <code>javax.management.MBeanOperationInfo</code> instance.
-     * 
+     *
      * @param mbeanOperationInfo The JMX <code>MBeanOperationInfo</code> instance to base this instance on.
      */
-    public MBeanOperationInfo(javax.management.MBeanOperationInfo mbeanOperationInfo)
-    {
+    public MBeanOperationInfo(javax.management.MBeanOperationInfo mbeanOperationInfo) {
         name = mbeanOperationInfo.getName();
         description = mbeanOperationInfo.getDescription();
         signature = convertSignature(mbeanOperationInfo.getSignature());
         returnType = mbeanOperationInfo.getReturnType();
         impact = mbeanOperationInfo.getImpact();
     }
-    
+
     /**
      * Utility method to convert this <code>MBeanOperationInfo</code> to a
      * <code>javax.management.MBeanOperationInfo</code> instance.
-     * 
+     *
      * @return A JMX <code>MBeanOperationInfo</code> based upon this instance.
      */
-    public javax.management.MBeanOperationInfo toMBeanOperationInfo()
-    {
+    public javax.management.MBeanOperationInfo toMBeanOperationInfo() {
         return new javax.management.MBeanOperationInfo(name,
-                                                       description,
-                                                       convertSignature(signature),
-                                                       returnType,
-                                                       impact);
+                description,
+                convertSignature(signature),
+                returnType,
+                impact);
     }
-    
+
     /**
      * Utility method to convert JMX parameter info instances to Flash friendly parameter info instances.
-     * 
+     *
      * @param source JMX parameter info instances.
      * @return Flash friendly parameter info instances.
      */
-    private MBeanParameterInfo[] convertSignature(javax.management.MBeanParameterInfo[] source)
-    {
+    private MBeanParameterInfo[] convertSignature(javax.management.MBeanParameterInfo[] source) {
         MBeanParameterInfo[] signature = new MBeanParameterInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
+        for (int i = 0; i < source.length; i++) {
             signature[i] = new MBeanParameterInfo(source[i]);
         }
         return signature;
     }
-    
+
     /**
      * Utility method to convert Flash friendly parameter info instances to JMX parameter info instances.
-     * 
+     *
      * @param source Flash friendly parameter info instances.
      * @return JMX parameter info instances.
      */
-    private javax.management.MBeanParameterInfo[] convertSignature(MBeanParameterInfo[] source)
-    {
+    private javax.management.MBeanParameterInfo[] convertSignature(MBeanParameterInfo[] source) {
         javax.management.MBeanParameterInfo[] signature = new javax.management.MBeanParameterInfo[source.length];
-        for (int i = 0; i < source.length; i++)
-        {
+        for (int i = 0; i < source.length; i++) {
             signature[i] = source[i].toMBeanParameterInfo();
         }
         return signature;
     }
-        
+
 }
diff --git a/core/src/main/java/flex/management/jmx/MBeanParameterInfo.java b/core/src/main/java/flex/management/jmx/MBeanParameterInfo.java
index e0fd4fe..a91f6db 100644
--- a/core/src/main/java/flex/management/jmx/MBeanParameterInfo.java
+++ b/core/src/main/java/flex/management/jmx/MBeanParameterInfo.java
@@ -18,55 +18,51 @@
 
 /**
  * Remotable MBeanParameterInfo class that complies with Flash serialization requirements.
-
  */
-public class MBeanParameterInfo
-{
+public class MBeanParameterInfo {
     /**
      * The name of the parameter.
      */
     public String name;
-    
+
     /**
      * The Java type for the parameter.
      */
     public String type;
-    
+
     /**
      * The description for the parameter.
      */
     public String description;
-    
+
     /**
      * Constructs an empty <code>MBeanParameterInfo</code> instance.
      */
-    public MBeanParameterInfo()
-    {}
-    
+    public MBeanParameterInfo() {
+    }
+
     /**
      * Constructs a <code>MBeanParameterInfo</code> instance based upon a
      * <code>javax.management.MBeanParameterInfo</code> instance.
-     * 
+     *
      * @param mbeanParameterInfo The JMX <code>MBeanParameterInfo</code> instance to base this instance on.
      */
-    public MBeanParameterInfo(javax.management.MBeanParameterInfo mbeanParameterInfo)
-    {
+    public MBeanParameterInfo(javax.management.MBeanParameterInfo mbeanParameterInfo) {
         name = mbeanParameterInfo.getName();
         type = mbeanParameterInfo.getType();
         description = mbeanParameterInfo.getDescription();
     }
-    
+
     /**
      * Utility method to convert this <code>MBeanParameterInfo</code> to a
      * <code>javax.management.MBeanParameterInfo</code> instance.
-     * 
+     *
      * @return A JMX <code>MBeanParameterInfo</code> based upon this instance.
      */
-    public javax.management.MBeanParameterInfo toMBeanParameterInfo()
-    {
+    public javax.management.MBeanParameterInfo toMBeanParameterInfo() {
         return new javax.management.MBeanParameterInfo(name,
-                                                       type,
-                                                       description);
+                type,
+                description);
     }
 
 }
diff --git a/core/src/main/java/flex/management/jmx/MBeanServerGateway.java b/core/src/main/java/flex/management/jmx/MBeanServerGateway.java
index f60c401..a7ddcce 100644
--- a/core/src/main/java/flex/management/jmx/MBeanServerGateway.java
+++ b/core/src/main/java/flex/management/jmx/MBeanServerGateway.java
@@ -40,12 +40,12 @@
 
 /**
  * Remoting gateway to the MBean server that hosts Flex MBeans.
- *
+ * <p>
  * Some base javax.management.MBeanServer methods are unimplemented due to the
  * fact that we're interacting with the MBean server from remote Flash clients.
  * Some methods have been modified to better suite remote Flash clients. Other
  * methods are additive, serving as a convenience for Flex applications.
- *
+ * <p>
  * Unimplemented methods from the base MBeanServer API:
  * <ul>
  *   <li>getDomains() - JMX 1.2</li>
@@ -58,7 +58,7 @@
  *   <li>getClassLoader() - meaningless to a Flash client.</li>
  *   <li>getClassLoaderRepository() - meaningless to a Flash client.</li>
  * </ul>
- *
+ * <p>
  * Modifications to the base MBeanServer API:
  * <ul>
  *   <li>* All ObjectName arguments are typed as String because serialization in either
@@ -71,7 +71,7 @@
  *   <li>getAttributes() returns an Array of Attributes rather than an AttributeList.</li>
  *   <li>setAttributes() accepts and returns Arrays of Attributes rather than AttributeLists.</li>
  * </ul>
- *
+ * <p>
  * Additonal Flex-specific methods:
  * <ul>
  *   <li>getFlexMBeanCount()</li>
@@ -79,8 +79,7 @@
  *   <li>getFlexMBeanObjectNames()</li>
  * </ul>
  */
-public class MBeanServerGateway
-{
+public class MBeanServerGateway {
     // Error string constants.
     private static final int MALFORMED_OBJECTNAME = 10400;
     private static final int GETINFO_INTROSPECTION_ERR = 10406;
@@ -103,15 +102,14 @@
     private static final int SETATTRIB_EXCEPTION = 10423;
     private static final int INVALID_ATTRIB_VALUE = 10424;
     private static final int SETATTRIBS_REFLECT_ERR = 10425;
-    
+
     private MBeanServer server;
 
     /**
      * Constructs a new MBeanServerGateway. The gateway exposes the MBean server
      * that Flex MBean are registered with in a remoting-friendly fashion.
      */
-    public MBeanServerGateway()
-    {
+    public MBeanServerGateway() {
         server = MBeanServerLocatorFactory.getMBeanServerLocator().getMBeanServer();
     }
 
@@ -124,44 +122,34 @@
     /**
      * Instantiates and registers an MBean with the MBean server.
      *
-     * @param className The class name for the MBean to instantiate.
+     * @param className  The class name for the MBean to instantiate.
      * @param objectName The object name of the MBean.
      * @return An ObjectInstance containing the ObjectName and Java class name of the new MBean.
      */
-    public ObjectInstance createMBean(String className, String objectName)
-    {
+    public ObjectInstance createMBean(String className, String objectName) {
         javax.management.ObjectName name = null;
         if (objectName != null)
             name = validateObjectName(objectName);
-        try
-        {
+        try {
             return new ObjectInstance(server.createMBean(className, name));
-        }
-        catch (ReflectionException re)
-        {
+        } catch (ReflectionException re) {
             ManagementException me = new ManagementException();
-            me.setMessage(CREATE_ERR, new Object[] {name});
+            me.setMessage(CREATE_ERR, new Object[]{name});
             me.setRootCause(re);
             throw me;
-        }
-        catch (InstanceAlreadyExistsException iaee)
-        {
+        } catch (InstanceAlreadyExistsException iaee) {
             ManagementException me = new ManagementException();
-            me.setMessage(INSTANCE_EXISTS, new Object[] {name});
+            me.setMessage(INSTANCE_EXISTS, new Object[]{name});
             me.setRootCause(iaee);
             throw me;
-        }
-        catch (MBeanException mbe)
-        {
+        } catch (MBeanException mbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(CREATE_ERR, new Object[] {name});
+            me.setMessage(CREATE_ERR, new Object[]{name});
             me.setRootCause(mbe);
             throw me;
-        }
-        catch (NotCompliantMBeanException ncmbe)
-        {
+        } catch (NotCompliantMBeanException ncmbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(NOT_COMPLIANT, new Object[] {className});
+            me.setMessage(NOT_COMPLIANT, new Object[]{className});
             me.setRootCause(ncmbe);
             throw me;
         }
@@ -171,55 +159,43 @@
      * Instantiates and registers an MBean with the MBean server. The class loader
      * to use to load the MBean class is identified by its ObjectName.
      *
-     * @param className The class name for the MBean to instantiate.
+     * @param className  The class name for the MBean to instantiate.
      * @param objectName The object name of the MBean.
      * @param loaderName The object name of the desired class loader.
      * @return An ObjectInstance containing the ObjectName and Java class name of the new MBean.
      */
-    public ObjectInstance createMBean(String className, String objectName, String loaderName)
-    {
+    public ObjectInstance createMBean(String className, String objectName, String loaderName) {
         javax.management.ObjectName name = null;
         javax.management.ObjectName loader = null;
         if (objectName != null)
             name = validateObjectName(objectName);
         if (loaderName != null)
             loader = validateObjectName(loaderName);
-        try
-        {
+        try {
             return new ObjectInstance(server.createMBean(className, name, loader));
-        }
-        catch (ReflectionException re)
-        {
+        } catch (ReflectionException re) {
             ManagementException me = new ManagementException();
-            me.setMessage(CREATE_ERR, new Object[] {name});
+            me.setMessage(CREATE_ERR, new Object[]{name});
             me.setRootCause(re);
             throw me;
-        }
-        catch (InstanceAlreadyExistsException iaee)
-        {
+        } catch (InstanceAlreadyExistsException iaee) {
             ManagementException me = new ManagementException();
-            me.setMessage(INSTANCE_EXISTS, new Object[] {name});
+            me.setMessage(INSTANCE_EXISTS, new Object[]{name});
             me.setRootCause(iaee);
             throw me;
-        }
-        catch (MBeanException mbe)
-        {
+        } catch (MBeanException mbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(CREATE_ERR, new Object[] {name});
+            me.setMessage(CREATE_ERR, new Object[]{name});
             me.setRootCause(mbe);
             throw me;
-        }
-        catch (NotCompliantMBeanException ncmbe)
-        {
+        } catch (NotCompliantMBeanException ncmbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(NOT_COMPLIANT, new Object[] {className});
+            me.setMessage(NOT_COMPLIANT, new Object[]{className});
             me.setRootCause(ncmbe);
             throw me;
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {name});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{name});
             me.setRootCause(infe);
             throw me;
         }
@@ -228,46 +204,36 @@
     /**
      * Instantiates and registers an MBean with the MBean server.
      *
-     * @param className The class name for the MBean to instantiate.
+     * @param className  The class name for the MBean to instantiate.
      * @param objectName The object name of the MBean.
-     * @param params An array of parameters to pass to the MBean constructor.
-     * @param signature An array containing the type signature for the constructor to invoke.
+     * @param params     An array of parameters to pass to the MBean constructor.
+     * @param signature  An array containing the type signature for the constructor to invoke.
      * @return An ObjectInstance containing the ObjectName and Java class name of the new MBean.
      */
-    public ObjectInstance createMBean(String className, String objectName, Object[] params, String[] signature)
-    {
+    public ObjectInstance createMBean(String className, String objectName, Object[] params, String[] signature) {
         javax.management.ObjectName name = null;
         if (objectName != null)
             name = validateObjectName(objectName);
-        try
-        {
+        try {
             return new ObjectInstance(server.createMBean(className, name, params, signature));
-        }
-        catch (ReflectionException re)
-        {
+        } catch (ReflectionException re) {
             ManagementException me = new ManagementException();
-            me.setMessage(CREATE_ERR, new Object[] {name});
+            me.setMessage(CREATE_ERR, new Object[]{name});
             me.setRootCause(re);
             throw me;
-        }
-        catch (InstanceAlreadyExistsException iaee)
-        {
+        } catch (InstanceAlreadyExistsException iaee) {
             ManagementException me = new ManagementException();
-            me.setMessage(INSTANCE_EXISTS, new Object[] {name});
+            me.setMessage(INSTANCE_EXISTS, new Object[]{name});
             me.setRootCause(iaee);
             throw me;
-        }
-        catch (MBeanException mbe)
-        {
+        } catch (MBeanException mbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(CREATE_ERR, new Object[] {name});
+            me.setMessage(CREATE_ERR, new Object[]{name});
             me.setRootCause(mbe);
             throw me;
-        }
-        catch (NotCompliantMBeanException ncmbe)
-        {
+        } catch (NotCompliantMBeanException ncmbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(NOT_COMPLIANT, new Object[] {className});
+            me.setMessage(NOT_COMPLIANT, new Object[]{className});
             me.setRootCause(ncmbe);
             throw me;
         }
@@ -277,57 +243,45 @@
      * Instantiates and registers an MBean with the MBean server. The class loader
      * to use to load the MBean class is identified by its ObjectName.
      *
-     * @param className The class name for the MBean to instantiate.
+     * @param className  The class name for the MBean to instantiate.
      * @param objectName The object name of the MBean.
      * @param loaderName The object name of the desired class loader.
-     * @param params An array of parameters to pass to the MBean constructor.
-     * @param signature An array containing the type signature for the constructor to invoke.
+     * @param params     An array of parameters to pass to the MBean constructor.
+     * @param signature  An array containing the type signature for the constructor to invoke.
      * @return An ObjectInstance containing the ObjectName and Java class name of the new MBean.
      */
-    public ObjectInstance createMBean(String className, String objectName, String loaderName, Object[] params, String[] signature)
-    {
+    public ObjectInstance createMBean(String className, String objectName, String loaderName, Object[] params, String[] signature) {
         javax.management.ObjectName name = null;
         javax.management.ObjectName loader = null;
         if (objectName != null)
             name = validateObjectName(objectName);
         if (loaderName != null)
             loader = validateObjectName(loaderName);
-        try
-        {
+        try {
             return new ObjectInstance(server.createMBean(className, name, loader, params, signature));
-        }
-        catch (ReflectionException re)
-        {
+        } catch (ReflectionException re) {
             ManagementException me = new ManagementException();
-            me.setMessage(CREATE_ERR, new Object[] {name});
+            me.setMessage(CREATE_ERR, new Object[]{name});
             me.setRootCause(re);
             throw me;
-        }
-        catch (InstanceAlreadyExistsException iaee)
-        {
+        } catch (InstanceAlreadyExistsException iaee) {
             ManagementException me = new ManagementException();
-            me.setMessage(INSTANCE_EXISTS, new Object[] {name});
+            me.setMessage(INSTANCE_EXISTS, new Object[]{name});
             me.setRootCause(iaee);
             throw me;
-        }
-        catch (MBeanException mbe)
-        {
+        } catch (MBeanException mbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(CREATE_ERR, new Object[] {name});
+            me.setMessage(CREATE_ERR, new Object[]{name});
             me.setRootCause(mbe);
             throw me;
-        }
-        catch (NotCompliantMBeanException ncmbe)
-        {
+        } catch (NotCompliantMBeanException ncmbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(NOT_COMPLIANT, new Object[] {className});
+            me.setMessage(NOT_COMPLIANT, new Object[]{className});
             me.setRootCause(ncmbe);
             throw me;
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {name});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{name});
             me.setRootCause(infe);
             throw me;
         }
@@ -336,37 +290,29 @@
     /**
      * Registers a pre-existing object as an MBean with the MBean server.
      *
-     * @param object The object to register as an MBean.
+     * @param object     The object to register as an MBean.
      * @param objectName The object name for the MBean.
      * @return An ObjectInstance containing the ObjectName and Java class name of the new MBean.
      */
-    public ObjectInstance registerMBean(Object object, String objectName)
-    {
+    public ObjectInstance registerMBean(Object object, String objectName) {
         javax.management.ObjectName name = null;
         if (objectName != null)
             name = validateObjectName(objectName);
-        try
-        {
+        try {
             return new ObjectInstance(server.registerMBean(object, name));
-        }
-        catch (InstanceAlreadyExistsException iaee)
-        {
+        } catch (InstanceAlreadyExistsException iaee) {
             ManagementException me = new ManagementException();
-            me.setMessage(INSTANCE_EXISTS, new Object[] {name});
+            me.setMessage(INSTANCE_EXISTS, new Object[]{name});
             me.setRootCause(iaee);
             throw me;
-        }
-        catch (NotCompliantMBeanException ncmbe)
-        {
+        } catch (NotCompliantMBeanException ncmbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(NOT_COMPLIANT, new Object[] {object.getClass().getName()});
+            me.setMessage(NOT_COMPLIANT, new Object[]{object.getClass().getName()});
             me.setRootCause(ncmbe);
             throw me;
-        }
-        catch (MBeanRegistrationException mbre)
-        {
+        } catch (MBeanRegistrationException mbre) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_PREREG_ERR, new Object[] {name});
+            me.setMessage(MBEAN_PREREG_ERR, new Object[]{name});
             me.setRootCause(mbre);
             throw me;
         }
@@ -377,24 +323,18 @@
      *
      * @param objectName The object name of the MBean to unregister.
      */
-    public void unregisterMBean(String objectName)
-    {
+    public void unregisterMBean(String objectName) {
         javax.management.ObjectName name = validateObjectName(objectName);
-        try
-        {
+        try {
             server.unregisterMBean(name);
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {name});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{name});
             me.setRootCause(infe);
             throw me;
-        }
-        catch (MBeanRegistrationException mbre)
-        {
+        } catch (MBeanRegistrationException mbre) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_PREDEREG_ERR, new Object[] {name});
+            me.setMessage(MBEAN_PREDEREG_ERR, new Object[]{name});
             me.setRootCause(mbre);
             throw me;
         }
@@ -407,17 +347,13 @@
      * @param objectName The object name of the MBean.
      * @return An ObjectInstance containing the ObjectName and Java class name of the MBean.
      */
-    public ObjectInstance getObjectInstance(String objectName)
-    {
+    public ObjectInstance getObjectInstance(String objectName) {
         javax.management.ObjectName name = validateObjectName(objectName);
-        try
-        {
+        try {
             return new ObjectInstance(server.getObjectInstance(name));
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {name});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{name});
             me.setRootCause(infe);
             throw me;
         }
@@ -434,23 +370,18 @@
      * @param objectName The object name pattern identifying the MBeans to retrieve.
      * @return A set of ObjectInstances for the selected MBeans.
      */
-    public ObjectInstance[] queryMBeans(String objectName)
-    {
+    public ObjectInstance[] queryMBeans(String objectName) {
         javax.management.ObjectName name = validateObjectName(objectName);
         Set result = server.queryMBeans(name, null);
         int n = result.size();
-        if (n > 0)
-        {
+        if (n > 0) {
             ObjectInstance[] toReturn = new ObjectInstance[n];
             int i = 0;
-            for (Iterator iter = result.iterator(); iter.hasNext();) 
-            {
-                toReturn[i++] = new ObjectInstance((javax.management.ObjectInstance)iter.next());
+            for (Iterator iter = result.iterator(); iter.hasNext(); ) {
+                toReturn[i++] = new ObjectInstance((javax.management.ObjectInstance) iter.next());
             }
             return toReturn;
-        }
-        else
-        {
+        } else {
             return new ObjectInstance[0];
         }
     }
@@ -466,23 +397,18 @@
      * @param objectName The object name pattern identifying the MBean names to retrieve.
      * @return A set of ObjectNames for the selected MBeans.
      */
-    public ObjectName[] queryNames(String objectName)
-    {
+    public ObjectName[] queryNames(String objectName) {
         javax.management.ObjectName name = validateObjectName(objectName);
         Set result = server.queryNames(name, null);
         int n = result.size();
-        if (n > 0)
-        {
+        if (n > 0) {
             ObjectName[] toReturn = new ObjectName[n];
             int i = 0;
-            for (Iterator iter = result.iterator(); iter.hasNext();)
-            {
-                toReturn[i++] = new ObjectName((javax.management.ObjectName)iter.next());
+            for (Iterator iter = result.iterator(); iter.hasNext(); ) {
+                toReturn[i++] = new ObjectName((javax.management.ObjectName) iter.next());
             }
             return toReturn;
-        }
-        else
-        {
+        } else {
             return new ObjectName[0];
         }
     }
@@ -493,8 +419,7 @@
      * @param objectName The object name of the MBean to be checked.
      * @return True if the MBean is already registered in the MBean server, false otherwise.
      */
-    public boolean isRegistered(String objectName)
-    {
+    public boolean isRegistered(String objectName) {
         javax.management.ObjectName name = validateObjectName(objectName);
         return server.isRegistered(name);
     }
@@ -504,8 +429,7 @@
      *
      * @return The number of registered MBeans.
      */
-    public Integer getMBeanCount()
-    {
+    public Integer getMBeanCount() {
         return server.getMBeanCount();
     }
 
@@ -513,46 +437,34 @@
      * Gets the value of a specific attribute of a named MBean. The MBean is identified by its object name.
      *
      * @param objectName The object name of the MBean from which the attribute is to be retrieved.
-     * @param attribute The name of the attribute to be retrieved.
+     * @param attribute  The name of the attribute to be retrieved.
      * @return The value of the retrieved attribute.
      */
-    public Object getAttribute(String objectName, String attribute)
-    {
+    public Object getAttribute(String objectName, String attribute) {
         javax.management.ObjectName name = validateObjectName(objectName);
-        try
-        {
+        try {
             return server.getAttribute(name, attribute);
-        }
-        catch (AttributeNotFoundException anfe)
-        {
+        } catch (AttributeNotFoundException anfe) {
             ManagementException me = new ManagementException();
-            me.setMessage(ATTRIB_NOTFOUND, new Object[] {attribute, name});
+            me.setMessage(ATTRIB_NOTFOUND, new Object[]{attribute, name});
             me.setRootCause(anfe);
             throw me;
-        }
-        catch (MBeanException mbe)
-        {
+        } catch (MBeanException mbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(GETATTRIB_EXCEPTION, new Object[] {attribute, name});
+            me.setMessage(GETATTRIB_EXCEPTION, new Object[]{attribute, name});
             me.setRootCause(mbe);
             throw me;
-        }
-        catch (ReflectionException re)
-        {
+        } catch (ReflectionException re) {
             ManagementException me = new ManagementException();
-            me.setMessage(GETATTRIB_REFLECT_ERR, new Object[] {attribute, name});
+            me.setMessage(GETATTRIB_REFLECT_ERR, new Object[]{attribute, name});
             me.setRootCause(re);
             throw me;
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {name});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{name});
             me.setRootCause(infe);
             throw me;
-        }
-        catch (RuntimeOperationsException roe)
-        {
+        } catch (RuntimeOperationsException roe) {
             ManagementException me = new ManagementException();
             me.setMessage(GETATTRIB_NULL_ARGUMENT);
             me.setRootCause(roe);
@@ -567,35 +479,26 @@
      * @param attributes The names of the attributes to get values for.
      * @return The attributes, each containing their name and value.
      */
-    public Attribute[] getAttributes(String objectName, String[] attributes)
-    {
+    public Attribute[] getAttributes(String objectName, String[] attributes) {
         javax.management.ObjectName name = validateObjectName(objectName);
-        try
-        {
+        try {
             AttributeList result = server.getAttributes(name, attributes);
             Attribute[] values = new Attribute[result.size()];
-            for (int i = 0; i < result.size(); i++)
-            {
-                values[i] = new Attribute((javax.management.Attribute)result.get(i));
+            for (int i = 0; i < result.size(); i++) {
+                values[i] = new Attribute((javax.management.Attribute) result.get(i));
             }
             return values;
-        }
-        catch (ReflectionException re)
-        {
+        } catch (ReflectionException re) {
             ManagementException me = new ManagementException();
-            me.setMessage(GETATTRIBS_REFLECT_ERR, new Object[] {name});
+            me.setMessage(GETATTRIBS_REFLECT_ERR, new Object[]{name});
             me.setRootCause(re);
             throw me;
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {name});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{name});
             me.setRootCause(infe);
             throw me;
-        }
-        catch (RuntimeOperationsException roe)
-        {
+        } catch (RuntimeOperationsException roe) {
             ManagementException me = new ManagementException();
             me.setMessage(GETATTRIBS_NULL_ARGUMENT);
             me.setRootCause(roe);
@@ -607,48 +510,36 @@
      * Sets the value of the attribute for the specified MBean.
      *
      * @param objectName The name of the MBean.
-     * @param attribute The attribute to set.
+     * @param attribute  The attribute to set.
      */
-    public void setAttribute(String objectName, Attribute attribute)
-    {
+    public void setAttribute(String objectName, Attribute attribute) {
         javax.management.ObjectName name = validateObjectName(objectName);
         javax.management.Attribute attrib = validateAttribute(attribute);
-        try
-        {
+        try {
             server.setAttribute(name, attrib);
-        }
-        catch (ReflectionException re)
-        {
+        } catch (ReflectionException re) {
             ManagementException me = new ManagementException();
-            me.setMessage(SETATTRIB_REFLECT_ERR, new Object[] {attrib.getName(), name});
+            me.setMessage(SETATTRIB_REFLECT_ERR, new Object[]{attrib.getName(), name});
             me.setRootCause(re);
             throw me;
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {name});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{name});
             me.setRootCause(infe);
             throw me;
-        }
-        catch (AttributeNotFoundException anfe)
-        {
+        } catch (AttributeNotFoundException anfe) {
             ManagementException me = new ManagementException();
-            me.setMessage(ATTRIB_NOTFOUND, new Object[] {attrib.getName(), name});
+            me.setMessage(ATTRIB_NOTFOUND, new Object[]{attrib.getName(), name});
             me.setRootCause(anfe);
             throw me;
-        }
-        catch (MBeanException mbe)
-        {
+        } catch (MBeanException mbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(SETATTRIB_EXCEPTION, new Object[] {attrib.getName(), name});
+            me.setMessage(SETATTRIB_EXCEPTION, new Object[]{attrib.getName(), name});
             me.setRootCause(mbe);
             throw me;
-        }
-        catch (InvalidAttributeValueException iave)
-        {
+        } catch (InvalidAttributeValueException iave) {
             ManagementException me = new ManagementException();
-            me.setMessage(INVALID_ATTRIB_VALUE, new Object[] {attrib.getValue(), attrib.getName(), name});
+            me.setMessage(INVALID_ATTRIB_VALUE, new Object[]{attrib.getValue(), attrib.getName(), name});
             me.setRootCause(iave);
             throw me;
         }
@@ -661,35 +552,27 @@
      * @param attributes The attributes to set.
      * @return The attributes that were set with their new values.
      */
-    public Attribute[] setAttributes(String objectName, Attribute[] attributes)
-    {
+    public Attribute[] setAttributes(String objectName, Attribute[] attributes) {
         javax.management.ObjectName name = validateObjectName(objectName);
         AttributeList attribList = new AttributeList();
-        for (int i = 0; i < attributes.length; i++)
-        {
+        for (int i = 0; i < attributes.length; i++) {
             attribList.add(attributes[i].toAttribute());
         }
-        try
-        {
+        try {
             AttributeList result = server.setAttributes(name, attribList);
             Attribute[] values = new Attribute[result.size()];
-            for (int i = 0; i < result.size(); i++)
-            {
-                values[i] = new Attribute((javax.management.Attribute)result.get(i));
+            for (int i = 0; i < result.size(); i++) {
+                values[i] = new Attribute((javax.management.Attribute) result.get(i));
             }
             return values;
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {name});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{name});
             me.setRootCause(infe);
             throw me;
-        }
-        catch (ReflectionException re)
-        {
+        } catch (ReflectionException re) {
             ManagementException me = new ManagementException();
-            me.setMessage(SETATTRIBS_REFLECT_ERR, new Object[] {name});
+            me.setMessage(SETATTRIBS_REFLECT_ERR, new Object[]{name});
             me.setRootCause(re);
             throw me;
         }
@@ -698,37 +581,29 @@
     /**
      * Invokes an operation on an MBean.
      *
-     * @param objectName The object name of the MBean to invoke the operation on.
+     * @param objectName    The object name of the MBean to invoke the operation on.
      * @param operationName The operation to invoke.
-     * @param params The parameters for the operation invocation.
-     * @param signature The parameter signature for the operation.
+     * @param params        The parameters for the operation invocation.
+     * @param signature     The parameter signature for the operation.
      * @return The object returned by the operation invocation.
      */
-    public Object invoke(String objectName, String operationName, Object[] params, String[] signature)
-    {
+    public Object invoke(String objectName, String operationName, Object[] params, String[] signature) {
         javax.management.ObjectName name = validateObjectName(objectName);
-        try
-        {
+        try {
             return server.invoke(name, operationName, params, signature);
-        }
-        catch (ReflectionException re)
-        {
+        } catch (ReflectionException re) {
             ManagementException me = new ManagementException();
-            me.setMessage(INVOKE_REFLECT_ERR, new Object[]  {operationName, objectName});
+            me.setMessage(INVOKE_REFLECT_ERR, new Object[]{operationName, objectName});
             me.setRootCause(re);
             throw me;
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {objectName});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{objectName});
             me.setRootCause(infe);
             throw me;
-        }
-        catch (MBeanException mbe)
-        {
+        } catch (MBeanException mbe) {
             ManagementException me = new ManagementException();
-            me.setMessage(INVOKE_ERR, new Object[]  {operationName, objectName});
+            me.setMessage(INVOKE_ERR, new Object[]{operationName, objectName});
             me.setRootCause(mbe);
             throw me;
         }
@@ -739,8 +614,7 @@
      *
      * @return The default domain.
      */
-    public String getDefaultDomain()
-    {
+    public String getDefaultDomain() {
         return server.getDefaultDomain();
     }
 
@@ -751,31 +625,23 @@
      * @param objectName The name of the MBean to get metadata for.
      * @return An MBeanInfo instance that describes the MBean.
      */
-    public flex.management.jmx.MBeanInfo getMBeanInfo(String objectName)
-    {
+    public flex.management.jmx.MBeanInfo getMBeanInfo(String objectName) {
         javax.management.ObjectName name = validateObjectName(objectName);
-        try
-        {
+        try {
             return new MBeanInfo(server.getMBeanInfo(name));
-        }
-        catch (IntrospectionException ie)
-        {
+        } catch (IntrospectionException ie) {
             ManagementException me = new ManagementException();
-            me.setMessage(GETINFO_INTROSPECTION_ERR, new Object[] {objectName});
+            me.setMessage(GETINFO_INTROSPECTION_ERR, new Object[]{objectName});
             me.setRootCause(ie);
             throw me;
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {objectName});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{objectName});
             me.setRootCause(infe);
             throw me;
-        }
-        catch (ReflectionException re)
-        {
+        } catch (ReflectionException re) {
             ManagementException me = new ManagementException();
-            me.setMessage(GETINFO_REFLECT_ERR, new Object[] {objectName});
+            me.setMessage(GETINFO_REFLECT_ERR, new Object[]{objectName});
             me.setRootCause(re);
             throw me;
         }
@@ -786,20 +652,16 @@
      * Returns true if the specified MBean is an instance of the specified class; otherwise false.
      *
      * @param objectName The object name of the MBean.
-     * @param className The name of the class.
+     * @param className  The name of the class.
      * @return true if the specified MBean is an instance of the specified class; otherwise false.
      */
-    public boolean isInstanceOf(String objectName, String className)
-    {
+    public boolean isInstanceOf(String objectName, String className) {
         javax.management.ObjectName name = validateObjectName(objectName);
-        try
-        {
+        try {
             return server.isInstanceOf(name, className);
-        }
-        catch (InstanceNotFoundException infe)
-        {
+        } catch (InstanceNotFoundException infe) {
             ManagementException me = new ManagementException();
-            me.setMessage(MBEAN_NOTFOUND, new Object[] {objectName});
+            me.setMessage(MBEAN_NOTFOUND, new Object[]{objectName});
             me.setRootCause(infe);
             throw me;
         }
@@ -816,15 +678,13 @@
      *
      * @return The object names for all Flex related MBeans.
      */
-    public ObjectName[] getFlexMBeanObjectNames()
-    {
+    public ObjectName[] getFlexMBeanObjectNames() {
         javax.management.ObjectName pattern = validateObjectName(BaseControl.DOMAIN_PREFIX + "*:*");
         Set result = server.queryNames(pattern, null);
         ObjectName[] names = new ObjectName[result.size()];
         int i = 0;
-        for (Iterator iter = result.iterator(); iter.hasNext(); )
-        {
-            names[i++] = new ObjectName((javax.management.ObjectName)iter.next());
+        for (Iterator iter = result.iterator(); iter.hasNext(); ) {
+            names[i++] = new ObjectName((javax.management.ObjectName) iter.next());
         }
         return names;
     }
@@ -834,8 +694,7 @@
      *
      * @return The number of narrowed Flex MBeans registered in the MBean server.
      */
-    public Integer getFlexMBeanCount()
-    {
+    public Integer getFlexMBeanCount() {
         return new Integer(getFlexMBeanObjectNames().length);
     }
 
@@ -845,25 +704,21 @@
      *
      * @return The narrowed list of Flex domains in which any MBean is currently registered.
      */
-    public String[] getFlexDomains()
-    {
+    public String[] getFlexDomains() {
         ObjectName[] names = getFlexMBeanObjectNames();
         Set domains = new TreeSet();
         String name;
         String domain;
-        if (names.length > 0)
-        {
-            for (int i = 0; i < names.length; ++i)
-            {
+        if (names.length > 0) {
+            for (int i = 0; i < names.length; ++i) {
                 name = names[i].canonicalName;
                 domain = name.substring(0, name.indexOf(':'));
-                if (!domains.contains(domain))
-                {
+                if (!domains.contains(domain)) {
                     domains.add(domain);
                 }
             }
         }
-        return (String[])domains.toArray(new String[domains.size()]);
+        return (String[]) domains.toArray(new String[domains.size()]);
     }
 
     ///////////////////////////////
@@ -878,16 +733,12 @@
      * @param objectName The object name to validate.
      * @return The valid ObjectName.
      */
-    private javax.management.ObjectName validateObjectName(String objectName)
-    {
-        try
-        {
+    private javax.management.ObjectName validateObjectName(String objectName) {
+        try {
             return new javax.management.ObjectName(objectName);
-        }
-        catch (MalformedObjectNameException mone)
-        {
+        } catch (MalformedObjectNameException mone) {
             ManagementException me = new ManagementException();
-            me.setMessage(MALFORMED_OBJECTNAME, new Object[] {objectName});
+            me.setMessage(MALFORMED_OBJECTNAME, new Object[]{objectName});
             throw me;
         }
     }
@@ -898,8 +749,7 @@
      * @param attribute The attribute to validate.
      * @return The valid Attribute.
      */
-    private javax.management.Attribute validateAttribute(Attribute attribute)
-    {
+    private javax.management.Attribute validateAttribute(Attribute attribute) {
         return attribute.toAttribute();
     }
 
diff --git a/core/src/main/java/flex/management/jmx/ObjectInstance.java b/core/src/main/java/flex/management/jmx/ObjectInstance.java
index 8985ee0..9102d20 100644
--- a/core/src/main/java/flex/management/jmx/ObjectInstance.java
+++ b/core/src/main/java/flex/management/jmx/ObjectInstance.java
@@ -21,46 +21,42 @@
 /**
  * Remotable ObjectInstance representation that complies with Flash serialization requirements.
  */
-public class ObjectInstance
-{
+public class ObjectInstance {
     /**
      * The object name part of the <code>ObjectInstance</code>.
      */
     public ObjectName objectName;
-    
+
     /**
      * The class name part of the <code>ObjectInstance</code>.
      */
     public String className;
-    
+
     /**
      * Constructs an empty <code>ObjectInstance</code> instance.
-     *
      */
-    public ObjectInstance()
-    {}
-    
+    public ObjectInstance() {
+    }
+
     /**
      * Constructs a <code>ObjectInstance</code> instance based upon a
      * <code>javax.management.ObjectInstance</code> instance.
-     * 
+     *
      * @param objectInstance The JMX <code>ObjectInstance</code> instance to base this instance on.
      */
-    public ObjectInstance(javax.management.ObjectInstance objectInstance)
-    {
+    public ObjectInstance(javax.management.ObjectInstance objectInstance) {
         objectName = new ObjectName(objectInstance.getObjectName());
         className = objectInstance.getClassName();
     }
-    
+
     /**
      * Utility method to convert this <code>ObjectInstance</code> to a
      * <code>javax.management.ObjectInstance</code> instance.
-     * 
+     *
      * @return A JMX <code>ObjectInstance</code> based upon this instance.
      * @throws MalformedObjectNameException an exception
      */
-    public javax.management.ObjectInstance toObjectInstance() throws MalformedObjectNameException
-    {
+    public javax.management.ObjectInstance toObjectInstance() throws MalformedObjectNameException {
         return new javax.management.ObjectInstance(objectName.toObjectName(), className);
     }
 }
diff --git a/core/src/main/java/flex/management/jmx/ObjectName.java b/core/src/main/java/flex/management/jmx/ObjectName.java
index b55ebb4..fcfcf46 100644
--- a/core/src/main/java/flex/management/jmx/ObjectName.java
+++ b/core/src/main/java/flex/management/jmx/ObjectName.java
@@ -20,78 +20,75 @@
 import javax.management.MalformedObjectNameException;
 
 /**
- * Remotable ObjectName representation that complies with Flash serialization requirements. 
+ * Remotable ObjectName representation that complies with Flash serialization requirements.
  * This class is JMX 1.1 compliant.
  */
-public class ObjectName
-{
+public class ObjectName {
     /**
      * String representation of the list of key properties sorted in lexical order.
      */
     public String canonicalKeyPropertyListString;
-    
+
     /**
      * Canonical form of the name with properties sorted in lexical order.
      */
     public String canonicalName;
-    
+
     /**
      * The domain part of the object name.
      */
     public String domain;
-    
+
     /**
      * A Hashtable containing key-property pairs.
      */
     public Hashtable keyPropertyList;
-    
+
     /**
-     * String representation of the key properties. 
+     * String representation of the key properties.
      */
-    public String keyPropertyListString;    
-    
+    public String keyPropertyListString;
+
     /**
      * Indicates whether the object name is a pattern.
      */
     public boolean pattern;
-    
+
     /**
      * Indicates whether the object name is a pattern on key properties.
      */
     public boolean propertyPattern;
-    
+
     /**
      * Constructs an empty <code>ObjectName</code> instance.
      */
-    public ObjectName()
-    {}
-    
+    public ObjectName() {
+    }
+
     /**
      * Constructs a <code>ObjectName</code> instance based upon a
      * <code>javax.management.ObjectName</code> instance.
-     * 
+     *
      * @param objectName The JMX <code>ObjectName</code> instance to base this instance on.
      */
-    public ObjectName(javax.management.ObjectName objectName)
-    {
+    public ObjectName(javax.management.ObjectName objectName) {
         canonicalKeyPropertyListString = objectName.getCanonicalKeyPropertyListString();
         canonicalName = objectName.getCanonicalName();
         domain = objectName.getDomain();
         keyPropertyList = objectName.getKeyPropertyList();
         keyPropertyListString = objectName.getKeyPropertyListString();
-        pattern = objectName.isPattern();        
+        pattern = objectName.isPattern();
         propertyPattern = objectName.isPropertyPattern();
     }
-    
+
     /**
      * Utility method to convert this <code>ObjectName</code> to a
      * <code>javax.management.ObjectName</code> instance.
-     * 
+     *
      * @return A JMX <code>ObjectName</code> based upon this instance.
      * @throws MalformedObjectNameException an exception
      */
-    public javax.management.ObjectName toObjectName() throws MalformedObjectNameException
-    {
+    public javax.management.ObjectName toObjectName() throws MalformedObjectNameException {
         return new javax.management.ObjectName(domain, keyPropertyList);
     }
 
diff --git a/core/src/main/java/flex/management/runtime/AdminConsoleDisplayRegistrar.java b/core/src/main/java/flex/management/runtime/AdminConsoleDisplayRegistrar.java
index f16dbce..95cb735 100644
--- a/core/src/main/java/flex/management/runtime/AdminConsoleDisplayRegistrar.java
+++ b/core/src/main/java/flex/management/runtime/AdminConsoleDisplayRegistrar.java
@@ -25,78 +25,63 @@
 /**
  *
  */
-public class AdminConsoleDisplayRegistrar extends BaseControl implements AdminConsoleDisplayRegistrarMBean
-{
+public class AdminConsoleDisplayRegistrar extends BaseControl implements AdminConsoleDisplayRegistrarMBean {
     public static final String ID = "AdminConsoleDisplay";
-    
+
     private HashMap registeredExposedObjects;
-    
-    public AdminConsoleDisplayRegistrar(BaseControl parent)
-    {
+
+    public AdminConsoleDisplayRegistrar(BaseControl parent) {
         super(parent);
         registeredExposedObjects = new HashMap();
         register();
     }
 
-    public void registerObject(int type, String beanName, String propertyName)
-    {
+    public void registerObject(int type, String beanName, String propertyName) {
         Object objects = registeredExposedObjects.get(new Integer(type));
-        if (objects != null)
-        {
-            ((ArrayList)objects).add(beanName + ":" + propertyName);
-        }
-        else
-        {
+        if (objects != null) {
+            ((ArrayList) objects).add(beanName + ":" + propertyName);
+        } else {
             if (type < 1)
                 return;
-            
+
             objects = new ArrayList();
-            ((ArrayList)objects).add(beanName + ":" + propertyName);
+            ((ArrayList) objects).add(beanName + ":" + propertyName);
             registeredExposedObjects.put(new Integer(type), objects);
         }
     }
-    
-    public void registerObjects(int type, String beanName, String[] propertyNames)
-    {
-        for (int i = 0; i < propertyNames.length; i++)
-        {
+
+    public void registerObjects(int type, String beanName, String[] propertyNames) {
+        for (int i = 0; i < propertyNames.length; i++) {
             registerObject(type, beanName, propertyNames[i]);
         }
     }
-    
-    public void registerObjects(int[] types, String beanName, String[] propertyNames)
-    {
-        for (int j = 0; j < types.length; j++)
-        {
+
+    public void registerObjects(int[] types, String beanName, String[] propertyNames) {
+        for (int j = 0; j < types.length; j++) {
             registerObjects(types[j], beanName, propertyNames);
         }
     }
-    
-    public Integer[] getSupportedTypes() throws IOException
-    {
+
+    public Integer[] getSupportedTypes() throws IOException {
         Object[] array = registeredExposedObjects.keySet().toArray();
         Integer[] types = new Integer[array.length];
-        for (int i = 0; i < array.length; i++)
-        {
-            types[i] = (Integer)array[i];
+        for (int i = 0; i < array.length; i++) {
+            types[i] = (Integer) array[i];
         }
         return types;
     }
 
-    public String[] listForType(int type) throws IOException
-    {
+    public String[] listForType(int type) throws IOException {
         Object list = registeredExposedObjects.get(new Integer(type));
-        
-        return (list != null) ? (String[]) ((ArrayList)list).toArray(new String[0]) : new String[0];
+
+        return (list != null) ? (String[]) ((ArrayList) list).toArray(new String[0]) : new String[0];
     }
 
-    public String getId()
-    {
+    public String getId() {
         return ID;
     }
 
-    public String getType()
-    {
+    public String getType() {
         return ID;
     }
 
diff --git a/core/src/main/java/flex/management/runtime/AdminConsoleDisplayRegistrarMBean.java b/core/src/main/java/flex/management/runtime/AdminConsoleDisplayRegistrarMBean.java
index be7b36a..ff9f579 100644
--- a/core/src/main/java/flex/management/runtime/AdminConsoleDisplayRegistrarMBean.java
+++ b/core/src/main/java/flex/management/runtime/AdminConsoleDisplayRegistrarMBean.java
@@ -23,11 +23,10 @@
 /**
  *
  */
-public interface AdminConsoleDisplayRegistrarMBean extends BaseControlMBean
-{
-    
+public interface AdminConsoleDisplayRegistrarMBean extends BaseControlMBean {
+
     Integer[] getSupportedTypes() throws IOException;
-    
+
     String[] listForType(int type) throws IOException;
- 
+
 }
diff --git a/core/src/main/java/flex/management/runtime/AdminConsoleTypes.java b/core/src/main/java/flex/management/runtime/AdminConsoleTypes.java
index a63085d..2e52100 100644
--- a/core/src/main/java/flex/management/runtime/AdminConsoleTypes.java
+++ b/core/src/main/java/flex/management/runtime/AdminConsoleTypes.java
@@ -19,17 +19,16 @@
 /**
  * The interface defines a number of constants for admin console types.
  */
-public interface AdminConsoleTypes
-{
+public interface AdminConsoleTypes {
     static final int GENERAL_SERVER = 1;
     static final int GENERAL_POLLABLE = 2;
     static final int GENERAL_OPERATION = 3;
-    
+
     static final int GRAPH_BY_POLL_INTERVAL = 50;
-    
+
     static final int ENDPOINT_SCALAR = 100;
     static final int ENDPOINT_POLLABLE = 101;
-    
+
     static final int DESTINATION_GENERAL = 150;
     static final int DESTINATION_POLLABLE = 151;
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/DestinationControl.java b/core/src/main/java/flex/management/runtime/messaging/DestinationControl.java
index 2f40783..0b6a87f 100644
--- a/core/src/main/java/flex/management/runtime/messaging/DestinationControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/DestinationControl.java
@@ -30,29 +30,26 @@
  * monitoring and managing a <code>Destination</code> at runtime.
  */
 public abstract class DestinationControl extends BaseControl implements
-        DestinationControlMBean
-{
+        DestinationControlMBean {
     protected Destination destination;
     private ObjectName adapter;
-        
+
     /**
      * Constructs a new <code>DestinationControl</code> instance.
-     * 
+     *
      * @param destination The <code>Destination</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent      The parent MBean in the management hierarchy.
      */
-    public DestinationControl(Destination destination, BaseControl parent)
-    {
+    public DestinationControl(Destination destination, BaseControl parent) {
         super(parent);
         this.destination = destination;
     }
-        
+
     /*
      *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getId()
      */
-    public String getId()
-    {
+    public String getId() {
         return destination.getId();
     }
 
@@ -60,57 +57,51 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.DestinationControlMBean#getAdapter()
      */
-    public ObjectName getAdapter()
-    {
+    public ObjectName getAdapter() {
         return adapter;
     }
-    
+
     /**
      * Sets the <code>ObjectName</code> for the adapter associated with the managed destination.
-     * 
+     *
      * @param value The <code>ObjectName</code> for the adapter.
      */
-    public void setAdapter(ObjectName value)
-    {
+    public void setAdapter(ObjectName value) {
         adapter = value;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.DestinationControlMBean#isRunning()
      */
-    public Boolean isRunning()
-    {
+    public Boolean isRunning() {
         return Boolean.valueOf(destination.isStarted());
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.DestinationControlMBean#getStartTimestamp()
      */
-    public Date getStartTimestamp()
-    {
+    public Date getStartTimestamp() {
         return startTimestamp;
     }
-        
+
     /*
      *  (non-Javadoc)
      * @see javax.management.MBeanRegistration#preDeregister()
      */
-    public void preDeregister() throws Exception
-    {
-        ServiceControl parent = (ServiceControl)getParentControl();
+    public void preDeregister() throws Exception {
+        ServiceControl parent = (ServiceControl) getParentControl();
         parent.removeDestination(getObjectName());
-        
+
         // Unregister adapter of the destination
         ServiceAdapter child = destination.getAdapter();
-        if (child.getControl() != null)
-        {
+        if (child.getControl() != null) {
             child.getControl().unregister();
             child.setControl(null);
             child.setManaged(false);
         }
-        
+
         super.preDeregister();
     }
 
diff --git a/core/src/main/java/flex/management/runtime/messaging/DestinationControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/DestinationControlMBean.java
index e77ac6d..b4096b8 100644
--- a/core/src/main/java/flex/management/runtime/messaging/DestinationControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/DestinationControlMBean.java
@@ -26,8 +26,7 @@
 /**
  * Defines the runtime monitoring and management interface for managed destinations.
  */
-public interface DestinationControlMBean extends BaseControlMBean
-{
+public interface DestinationControlMBean extends BaseControlMBean {
     /**
      * Returns the <code>ObjectName</code> for the adapter associated with this
      * managed destination.
@@ -35,7 +34,9 @@
      * @return The <code>ObjectName</code> for the adapter.
      * @throws IOException Throws IOException.
      */
-    ObjectName getAdapter() throws IOException;;
+    ObjectName getAdapter() throws IOException;
+
+    ;
 
     /**
      * Returns <code>true</code> if the <code>Destination</code> is running.
diff --git a/core/src/main/java/flex/management/runtime/messaging/MessageBrokerControl.java b/core/src/main/java/flex/management/runtime/messaging/MessageBrokerControl.java
index 84359c3..8cb2093 100644
--- a/core/src/main/java/flex/management/runtime/messaging/MessageBrokerControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/MessageBrokerControl.java
@@ -38,8 +38,7 @@
  * The <code>MessageBrokerControl</code> class is the MBean implemenation for monitoring
  * and managing a <code>MessageBroker</code> at runtime.
  */
-public class MessageBrokerControl extends BaseControl implements MessageBrokerControlMBean
-{
+public class MessageBrokerControl extends BaseControl implements MessageBrokerControlMBean {
     private static final Object classMutex = new Object();
     private static final String TYPE = "MessageBroker";
     private static int instanceCount = 0;
@@ -59,8 +58,7 @@
      *
      * @param broker The <code>MessageBroker</code> managed by this MBean.
      */
-    public MessageBrokerControl(MessageBroker broker)
-    {
+    public MessageBrokerControl(MessageBroker broker) {
         super(null);
         this.broker = broker;
         endpointNames = new ArrayList();
@@ -70,20 +68,18 @@
         streamingAmfEndpoints = new ArrayList();
         streamingHttpEndpoints = new ArrayList();
         services = new ArrayList();
-        synchronized (classMutex)
-        {
+        synchronized (classMutex) {
             id = TYPE + ++instanceCount;
         }
 
         setRegistrar(new AdminConsoleDisplayRegistrar(this));
     }
 
-    protected void onRegistrationComplete()
-    {
+    protected void onRegistrationComplete() {
         String name = this.getObjectName().getCanonicalName();
         getRegistrar().registerObject(AdminConsoleTypes.GENERAL_POLLABLE, name, "FlexSessionCount");
-        getRegistrar().registerObjects(new int[] {AdminConsoleTypes.GENERAL_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL },
-                name, new String[] {"AMFThroughput", "HTTPThroughput", "EnterpriseThroughput"});
+        getRegistrar().registerObjects(new int[]{AdminConsoleTypes.GENERAL_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL},
+                name, new String[]{"AMFThroughput", "HTTPThroughput", "EnterpriseThroughput"});
 
         getRegistrar().registerObject(AdminConsoleTypes.GENERAL_SERVER, name, "MaxFlexSessionsInCurrentHour");
     }
@@ -92,8 +88,7 @@
      *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getId()
      */
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
@@ -101,8 +96,7 @@
      *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getType()
      */
-    public String getType()
-    {
+    public String getType() {
         return TYPE;
     }
 
@@ -110,8 +104,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.MessageBrokerControlMBean#isRunning()
      */
-    public Boolean isRunning()
-    {
+    public Boolean isRunning() {
         return Boolean.valueOf(broker.isStarted());
     }
 
@@ -119,8 +112,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.MessageBrokerControlMBean#getStartTimestamp()
      */
-    public Date getStartTimestamp()
-    {
+    public Date getStartTimestamp() {
         return startTimestamp;
     }
 
@@ -128,13 +120,11 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.MessageBrokerControlMBean#getEndpoints()
      */
-    public ObjectName[] getEndpoints() throws IOException
-    {
+    public ObjectName[] getEndpoints() throws IOException {
         int size = endpointNames.size();
         ObjectName[] endpointNameObjects = new ObjectName[size];
-        for (int i = 0; i < size; ++i)
-        {
-            endpointNameObjects[i] = (ObjectName)endpointNames.get(i);
+        for (int i = 0; i < size; ++i) {
+            endpointNameObjects[i] = (ObjectName) endpointNames.get(i);
         }
         return endpointNameObjects;
     }
@@ -144,8 +134,7 @@
      *
      * @param value The endpoint <code>Endpoint</code>.
      */
-    public void addEndpoint(Endpoint value)
-    {
+    public void addEndpoint(Endpoint value) {
         if (value instanceof AMFEndpoint)
             amfEndpoints.add(value);
         else if (value instanceof HTTPEndpoint)
@@ -165,8 +154,7 @@
      *
      * @param value The endpoint <code>ObjectName</code>.
      */
-    public void removeEndpoint(ObjectName value)
-    {
+    public void removeEndpoint(ObjectName value) {
         endpointNames.remove(value);
     }
 
@@ -174,13 +162,11 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.MessageBrokerControlMBean#getServices()
      */
-    public ObjectName[] getServices() throws IOException
-    {
+    public ObjectName[] getServices() throws IOException {
         int size = services.size();
         ObjectName[] serviceNames = new ObjectName[size];
-        for (int i = 0; i < size; ++i)
-        {
-            serviceNames[i] = (ObjectName)services.get(i);
+        for (int i = 0; i < size; ++i) {
+            serviceNames[i] = (ObjectName) services.get(i);
         }
         return serviceNames;
     }
@@ -190,8 +176,7 @@
      *
      * @param value The service <code>ObjectName</code>.
      */
-    public void addService(ObjectName value)
-    {
+    public void addService(ObjectName value) {
         services.add(value);
     }
 
@@ -200,8 +185,7 @@
      *
      * @param value The service <code>ObjectName</code>.
      */
-    public void removeService(ObjectName value)
-    {
+    public void removeService(ObjectName value) {
         services.remove(value);
     }
 
@@ -209,8 +193,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.MessageBrokerControlMBean#getFlexSessionCount()
      */
-    public Integer getFlexSessionCount()
-    {
+    public Integer getFlexSessionCount() {
         return broker.getFlexSessionManager().getFlexSessionCount();
     }
 
@@ -218,16 +201,14 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.MessageBrokerControlMBean#getMaxFlexSessionsInCurrentHour()
      */
-    public Integer getMaxFlexSessionsInCurrentHour()
-    {
+    public Integer getMaxFlexSessionsInCurrentHour() {
         return broker.getFlexSessionManager().getMaxFlexSessionsInCurrentHour();
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getRTMPConnectionCount()
      */
-    public Integer getEnterpriseConnectionCount() throws IOException
-    {
+    public Integer getEnterpriseConnectionCount() throws IOException {
         int connections = 0;
     /*
         for (int i = 0; i < rtmpEndpoints.size(); i++)
@@ -241,52 +222,45 @@
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getAMFThroughput()
      */
-    public Long getAMFThroughput() throws IOException
-    {
+    public Long getAMFThroughput() throws IOException {
         return new Long(calculateEndpointThroughput(amfEndpoints));
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getHTTPThroughput()
      */
-    public Long getHTTPThroughput() throws IOException
-    {
+    public Long getHTTPThroughput() throws IOException {
         return new Long(calculateEndpointThroughput(httpEndpoints));
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getRTMPThroughput()
      */
-    public Long getEnterpriseThroughput() throws IOException
-    {
+    public Long getEnterpriseThroughput() throws IOException {
         return new Long(calculateEndpointThroughput(enterpriseEndpoints));
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getStreamingAMFThroughput()
      */
-    public Long getStreamingAMFThroughput() throws IOException
-    {
+    public Long getStreamingAMFThroughput() throws IOException {
         return new Long(calculateEndpointThroughput(streamingAmfEndpoints));
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageBrokerControlMBean#getStreamingHTTPThroughput()
      */
-    public Long getStreamingHTTPThroughput() throws IOException
-    {
+    public Long getStreamingHTTPThroughput() throws IOException {
         return new Long(calculateEndpointThroughput(streamingHttpEndpoints));
     }
 
-    private long calculateEndpointThroughput(List endpoints)
-    {
+    private long calculateEndpointThroughput(List endpoints) {
         long throughput = 0;
 
-        for (int i = 0; i < endpoints.size(); i++)
-        {
+        for (int i = 0; i < endpoints.size(); i++) {
             // This method shouldn't be used with Lists containing objects that are not AbstractEndpoints
             if (endpoints.get(i) instanceof AbstractEndpoint)
-                throughput += ((AbstractEndpoint)endpoints.get(i)).getThroughput();
+                throughput += ((AbstractEndpoint) endpoints.get(i)).getThroughput();
         }
 
         return throughput;
diff --git a/core/src/main/java/flex/management/runtime/messaging/MessageBrokerControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/MessageBrokerControlMBean.java
index 7270133..0a05b21 100644
--- a/core/src/main/java/flex/management/runtime/messaging/MessageBrokerControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/MessageBrokerControlMBean.java
@@ -25,8 +25,7 @@
 /**
  * Defines the runtime monitoring and management interface for managed <code>MessageBroker</code>s.
  */
-public interface MessageBrokerControlMBean extends BaseControlMBean
-{
+public interface MessageBrokerControlMBean extends BaseControlMBean {
     /**
      * Returns <code>true</code> if the <code>MessageBroker</code> is running.
      *
diff --git a/core/src/main/java/flex/management/runtime/messaging/MessageDestinationControl.java b/core/src/main/java/flex/management/runtime/messaging/MessageDestinationControl.java
index 9dc7411..c3a5ecd 100644
--- a/core/src/main/java/flex/management/runtime/messaging/MessageDestinationControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/MessageDestinationControl.java
@@ -30,8 +30,7 @@
  * monitoring and managing a <code>MessageDestination</code> at runtime.
  */
 public class MessageDestinationControl extends DestinationControl implements
-        MessageDestinationControlMBean
-{
+        MessageDestinationControlMBean {
     private static final String TYPE = "MessageDestination";
     private ObjectName messageCache;
     private ObjectName throttleManager;
@@ -45,155 +44,139 @@
     private long serviceCommandStart;
     private AtomicInteger serviceMessageFromAdapterCount = new AtomicInteger(0);
     private Date lastServiceMessageFromAdapterTimestamp;
-    private long serviceMessageFromAdapterStart;   
+    private long serviceMessageFromAdapterStart;
+
     /**
      * Constructs a new <code>MessageDestinationControl</code> instance.
-     * 
+     *
      * @param destination The destination managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent      The parent MBean in the management hierarchy.
      */
-    public MessageDestinationControl(Destination destination, BaseControl parent)
-    {
-        super(destination, parent);          
+    public MessageDestinationControl(Destination destination, BaseControl parent) {
+        super(destination, parent);
         serviceMessageStart = System.currentTimeMillis();
         serviceCommandStart = serviceMessageStart;
-        serviceMessageFromAdapterStart = serviceMessageStart;             
+        serviceMessageFromAdapterStart = serviceMessageStart;
     }
-    
-    protected void onRegistrationComplete()
-    {
+
+    protected void onRegistrationComplete() {
         String name = this.getObjectName().getCanonicalName();
-        
-        String[] pollablePerInterval = { "ServiceCommandCount", "ServiceMessageCount",
-                "ServiceMessageFromAdapterCount" };
-        String[] pollableGeneral = { "ServiceCommandFrequency", "ServiceMessageFrequency",
-                "ServiceMessageFromAdapterFrequency", "LastServiceCommandTimestamp", 
+
+        String[] pollablePerInterval = {"ServiceCommandCount", "ServiceMessageCount",
+                "ServiceMessageFromAdapterCount"};
+        String[] pollableGeneral = {"ServiceCommandFrequency", "ServiceMessageFrequency",
+                "ServiceMessageFromAdapterFrequency", "LastServiceCommandTimestamp",
                 "LastServiceMessageTimestamp", "LastServiceMessageFromAdapterTimestamp"};
-        
+
         getRegistrar().registerObjects(
-                new int[] {AdminConsoleTypes.DESTINATION_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL},
+                new int[]{AdminConsoleTypes.DESTINATION_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL},
                 name, pollablePerInterval);
         getRegistrar().registerObjects(AdminConsoleTypes.DESTINATION_POLLABLE, name,
                 pollableGeneral);
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getType()
      */
-    public String getType()
-    {
+    public String getType() {
         return TYPE;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.MessageDestinationControlMBean#getMessageCache()
      */
-    public ObjectName getMessageCache()
-    {
+    public ObjectName getMessageCache() {
         return messageCache;
     }
-    
+
     /**
      * Sets the <code>ObjectName</code> for the message cache used by the managed destination.
-     * 
+     *
      * @param value The <code>ObjectName</code> for the message cache.
      */
-    public void setMessageCache(ObjectName value)
-    {
+    public void setMessageCache(ObjectName value) {
         messageCache = value;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.MessageDestinationControlMBean#getThrottleManager()
      */
-    public ObjectName getThrottleManager()
-    {
+    public ObjectName getThrottleManager() {
         return throttleManager;
     }
-    
+
     /**
      * Sets the <code>ObjectName</code> for the throttle manager used by the managed destination.
-     * 
+     *
      * @param value The <code>ObjectName</code> for the throttle manager.
      */
-    public void setThrottleManager(ObjectName value)
-    {
+    public void setThrottleManager(ObjectName value) {
         throttleManager = value;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.MessageDestinationControlMBean#getSubscriptionManager()
      */
-    public ObjectName getSubscriptionManager()
-    {
+    public ObjectName getSubscriptionManager() {
         return subscriptionManager;
     }
-    
+
     /**
      * Sets the <code>ObjectName</code> for the subscription manager used by the managed destination.
-     * 
+     *
      * @param value The <code>ObjectName</code> for the subscription manager.
      */
-    public void setSubscriptionManager(ObjectName value)
-    {
+    public void setSubscriptionManager(ObjectName value) {
         subscriptionManager = value;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#getServiceMessageCount()
      */
-    public Integer getServiceMessageCount()
-    {
+    public Integer getServiceMessageCount() {
         return Integer.valueOf(serviceMessageCount.get());
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#resetServiceMessageCount()
      */
-    public void resetServiceMessageCount()
-    {
+    public void resetServiceMessageCount() {
         serviceMessageStart = System.currentTimeMillis();
         serviceMessageCount = new AtomicInteger(0);
         lastServiceMessageTimestamp = null;
     }
-    
+
     /**
      * Increments the count of messages serviced.
      */
-    public void incrementServiceMessageCount()
-    {
+    public void incrementServiceMessageCount() {
         serviceMessageCount.incrementAndGet();
         lastServiceMessageTimestamp = new Date();
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#getLastServiceMessageTimestamp()
      */
-    public Date getLastServiceMessageTimestamp()
-    {
+    public Date getLastServiceMessageTimestamp() {
         return lastServiceMessageTimestamp;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#getServiceMessageFrequency()
      */
-    public Double getServiceMessageFrequency()
-    {
-        if (serviceMessageCount.get() > 0)
-        {
+    public Double getServiceMessageFrequency() {
+        if (serviceMessageCount.get() > 0) {
             double runtime = differenceInMinutes(serviceMessageStart, System.currentTimeMillis());
-            return new Double(serviceMessageCount.get()/runtime);
-        }
-        else
-        {
+            return new Double(serviceMessageCount.get() / runtime);
+        } else {
             return new Double(0);
         }
     }
@@ -202,53 +185,45 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#getServiceCommandCount()
      */
-    public Integer getServiceCommandCount()
-    {        
+    public Integer getServiceCommandCount() {
         return Integer.valueOf(serviceCommandCount.get());
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#resetServiceCommandCount()
      */
-    public void resetServiceCommandCount()
-    {
+    public void resetServiceCommandCount() {
         serviceCommandStart = System.currentTimeMillis();
         serviceCommandCount = new AtomicInteger(0);
         lastServiceCommandTimestamp = null;
     }
-    
+
     /**
      * Increments the count of command messages serviced.
      */
-    public void incrementServiceCommandCount()
-    {
+    public void incrementServiceCommandCount() {
         serviceCommandCount.incrementAndGet();
         lastServiceCommandTimestamp = new Date();
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#getLastServiceCommandTimestamp()
      */
-    public Date getLastServiceCommandTimestamp()
-    {
+    public Date getLastServiceCommandTimestamp() {
         return lastServiceCommandTimestamp;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#getServiceCommandFrequency()
      */
-    public Double getServiceCommandFrequency()
-    {
-        if (serviceCommandCount.get() > 0)
-        {
+    public Double getServiceCommandFrequency() {
+        if (serviceCommandCount.get() > 0) {
             double runtime = differenceInMinutes(serviceCommandStart, System.currentTimeMillis());
-            return new Double(serviceCommandCount.get()/runtime);
-        }
-        else
-        {
+            return new Double(serviceCommandCount.get() / runtime);
+        } else {
             return new Double(0);
         }
     }
@@ -257,54 +232,46 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#getServiceMessageFromAdapterCount()
      */
-    public Integer getServiceMessageFromAdapterCount()
-    {
+    public Integer getServiceMessageFromAdapterCount() {
         return Integer.valueOf(serviceMessageFromAdapterCount.get());
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#resetServiceMessageFromAdapterCount()
      */
-    public void resetServiceMessageFromAdapterCount()
-    {
+    public void resetServiceMessageFromAdapterCount() {
         serviceMessageFromAdapterStart = System.currentTimeMillis();
         serviceMessageFromAdapterCount = new AtomicInteger(0);
         lastServiceMessageFromAdapterTimestamp = null;
     }
-    
+
     /**
      * Increments the count of messages from adapters processed.
      */
-    public void incrementServiceMessageFromAdapterCount()
-    {
+    public void incrementServiceMessageFromAdapterCount() {
         serviceMessageFromAdapterCount.incrementAndGet();
         lastServiceMessageFromAdapterTimestamp = new Date();
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#getLastServiceMessageFromAdapterTimestamp()
      */
-    public Date getLastServiceMessageFromAdapterTimestamp()
-    {
+    public Date getLastServiceMessageFromAdapterTimestamp() {
         return lastServiceMessageFromAdapterTimestamp;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.MessageDestinationControlMBean#getServiceMessageFromAdapterFrequency()
      */
-    public Double getServiceMessageFromAdapterFrequency()
-    {
-        if (serviceMessageFromAdapterCount.get() > 0)
-        {
+    public Double getServiceMessageFromAdapterFrequency() {
+        if (serviceMessageFromAdapterCount.get() > 0) {
             double runtime = differenceInMinutes(serviceMessageFromAdapterStart, System.currentTimeMillis());
-            return new Double(serviceMessageFromAdapterCount.get()/runtime);
-        }
-        else
-        {
+            return new Double(serviceMessageFromAdapterCount.get() / runtime);
+        } else {
             return new Double(0);
         }
-    }    
+    }
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/MessageDestinationControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/MessageDestinationControlMBean.java
index cbe4492..9ee7fbe 100644
--- a/core/src/main/java/flex/management/runtime/messaging/MessageDestinationControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/MessageDestinationControlMBean.java
@@ -26,8 +26,7 @@
  * Defines the runtime monitoring and management interface for managed
  * <code>MessageDestination</code>s.
  */
-public interface MessageDestinationControlMBean extends DestinationControlMBean
-{
+public interface MessageDestinationControlMBean extends DestinationControlMBean {
     /**
      * Returns the <code>ObjectName</code> for the message cache used by the managed
      * destination.
diff --git a/core/src/main/java/flex/management/runtime/messaging/client/FlexClientManagerControl.java b/core/src/main/java/flex/management/runtime/messaging/client/FlexClientManagerControl.java
index 273da33..9776717 100644
--- a/core/src/main/java/flex/management/runtime/messaging/client/FlexClientManagerControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/client/FlexClientManagerControl.java
@@ -23,18 +23,15 @@
 /**
  *
  */
-public class FlexClientManagerControl extends BaseControl implements FlexClientManagerControlMBean
-{
+public class FlexClientManagerControl extends BaseControl implements FlexClientManagerControlMBean {
     private FlexClientManager flexClientManager;
-    
-    public FlexClientManagerControl(BaseControl parent, FlexClientManager manager)
-    {
-        super(parent);        
+
+    public FlexClientManagerControl(BaseControl parent, FlexClientManager manager) {
+        super(parent);
         flexClientManager = manager;
     }
-    
-    public void onRegistrationComplete()
-    {
+
+    public void onRegistrationComplete() {
         String name = getObjectName().getCanonicalName();
         getRegistrar().registerObject(AdminConsoleTypes.GENERAL_POLLABLE, name, "FlexClientCount");
     }
@@ -42,56 +39,49 @@
     /* (non-Javadoc)
      * @see flex.management.BaseControl#getId()
      */
-    public String getId()
-    {
+    public String getId() {
         return flexClientManager.getId();
     }
 
     /* (non-Javadoc)
      * @see flex.management.BaseControl#getType()
      */
-    public String getType()
-    {
+    public String getType() {
         return flexClientManager.getId();
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.client.FlexClientManagerControlMBean#getClientIds()
      */
-    public String[] getClientIds() 
-    {
+    public String[] getClientIds() {
         return flexClientManager.getClientIds();
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.client.FlexClientManagerControlMBean#getClientLastUse(java.lang.String)
      */
-    public Long getClientLastUse(String clientId)
-    {
+    public Long getClientLastUse(String clientId) {
         return new Long(flexClientManager.getFlexClient(clientId).getLastUse());
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.client.FlexClientManagerControlMBean#getClientSessionCount(java.lang.String)
      */
-    public Integer getClientSessionCount(String clientId)
-    {
+    public Integer getClientSessionCount(String clientId) {
         return new Integer(flexClientManager.getFlexClient(clientId).getSessionCount());
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.client.FlexClientManagerControlMBean#getClientSubscriptionCount(java.lang.String)
      */
-    public Integer getClientSubscriptionCount(String clientId)
-    {
+    public Integer getClientSubscriptionCount(String clientId) {
         return new Integer(flexClientManager.getFlexClient(clientId).getSubscriptionCount());
     }
-    
+
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.client.FlexClientManagerControlMBean#getFlexClientCount()
      */
-    public Integer getFlexClientCount() 
-    {
+    public Integer getFlexClientCount() {
         return new Integer(flexClientManager.getFlexClientCount());
-    }    
+    }
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/client/FlexClientManagerControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/client/FlexClientManagerControlMBean.java
index f063259..2743ed5 100644
--- a/core/src/main/java/flex/management/runtime/messaging/client/FlexClientManagerControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/client/FlexClientManagerControlMBean.java
@@ -23,8 +23,7 @@
 /**
  * Defines the runtime monitoring and management interface for managed flex client managers.
  */
-public interface FlexClientManagerControlMBean extends BaseControlMBean
-{
+public interface FlexClientManagerControlMBean extends BaseControlMBean {
     /**
      * Returns ids of managed clients.
      *
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/AMFEndpointControl.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/AMFEndpointControl.java
index cd224d4..3658cad 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/AMFEndpointControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/AMFEndpointControl.java
@@ -24,8 +24,7 @@
  * for monitoring and managing an <code>AMFEndpoint</code> at runtime.
  */
 public class AMFEndpointControl extends PollingEndpointControl implements
-        AMFEndpointControlMBean
-{
+        AMFEndpointControlMBean {
     private static final String TYPE = "AMFEndpoint";
 
     /**
@@ -33,16 +32,16 @@
      * endpoint and parent MBean.
      *
      * @param endpoint The <code>AMFEndpoint</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent   The parent MBean in the management hierarchy.
      */
-    public AMFEndpointControl(AMFEndpoint endpoint, BaseControl parent)
-    {
+    public AMFEndpointControl(AMFEndpoint endpoint, BaseControl parent) {
         super(endpoint, parent);
     }
 
-    /** {@inheritDoc} */
-    public String getType()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String getType() {
         return TYPE;
     }
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/AMFEndpointControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/AMFEndpointControlMBean.java
index 22c8cc6..0211144 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/AMFEndpointControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/AMFEndpointControlMBean.java
@@ -20,7 +20,6 @@
 /**
  * Defines the runtime monitoring and management interface for managed AMF endpoints.
  */
-public interface AMFEndpointControlMBean extends PollingEndpointControlMBean
-{
+public interface AMFEndpointControlMBean extends PollingEndpointControlMBean {
     // Empty for now.
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/EndpointControl.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/EndpointControl.java
index f6bbfb6..108de27 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/EndpointControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/EndpointControl.java
@@ -31,8 +31,7 @@
  * The <code>EndpointControl</code> class is the MBean implementation for
  * monitoring and managing an <code>Endpoint</code> at runtime.
  */
-public abstract class EndpointControl extends BaseControl implements EndpointControlMBean
-{
+public abstract class EndpointControl extends BaseControl implements EndpointControlMBean {
     protected Endpoint endpoint;
     private AtomicInteger serviceMessageCount = new AtomicInteger(0);
     private Date lastServiceMessageTimestamp;
@@ -45,28 +44,26 @@
      * parent MBean.
      *
      * @param endpoint The <code>Endpoint</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent   The parent MBean in the management hierarchy.
      */
-    public EndpointControl(Endpoint endpoint, BaseControl parent)
-    {
+    public EndpointControl(Endpoint endpoint, BaseControl parent) {
         super(parent);
         this.endpoint = endpoint;
         serviceMessageStart = System.currentTimeMillis();
     }
 
 
-    protected void onRegistrationComplete()
-    {
+    protected void onRegistrationComplete() {
         String name = this.getObjectName().getCanonicalName();
-        String[] generalNames = { "SecurityConstraint"};
-        String[] generalPollables = { "ServiceMessageCount", "LastServiceMessageTimestamp", "ServiceMessageFrequency"};
+        String[] generalNames = {"SecurityConstraint"};
+        String[] generalPollables = {"ServiceMessageCount", "LastServiceMessageTimestamp", "ServiceMessageFrequency"};
         String[] pollableGraphByInterval = {"BytesDeserialized", "BytesSerialized"};
 
         getRegistrar().registerObjects(AdminConsoleTypes.ENDPOINT_SCALAR,
                 name, generalNames);
         getRegistrar().registerObjects(AdminConsoleTypes.ENDPOINT_POLLABLE,
                 name, generalPollables);
-        getRegistrar().registerObjects(new int[] {AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL, AdminConsoleTypes.ENDPOINT_POLLABLE},
+        getRegistrar().registerObjects(new int[]{AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL, AdminConsoleTypes.ENDPOINT_POLLABLE},
                 name, pollableGraphByInterval);
     }
 
@@ -74,8 +71,7 @@
      *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getId()
      */
-    public String getId()
-    {
+    public String getId() {
         return endpoint.getId();
     }
 
@@ -83,8 +79,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.EndpointControlMBean#isRunning()
      */
-    public Boolean isRunning()
-    {
+    public Boolean isRunning() {
         return Boolean.valueOf(endpoint.isStarted());
     }
 
@@ -92,8 +87,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.EndpointControlMBean#getStartTimestamp()
      */
-    public Date getStartTimestamp()
-    {
+    public Date getStartTimestamp() {
         return startTimestamp;
     }
 
@@ -101,8 +95,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.EndpointControlMBean#getServiceMessageCount()
      */
-    public Integer getServiceMessageCount()
-    {
+    public Integer getServiceMessageCount() {
         return Integer.valueOf(serviceMessageCount.get());
     }
 
@@ -110,8 +103,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.EndpointControlMBean#resetServiceMessageCount()
      */
-    public void resetServiceMessageCount()
-    {
+    public void resetServiceMessageCount() {
         serviceMessageStart = System.currentTimeMillis();
         serviceMessageCount = new AtomicInteger(0);
         lastServiceMessageTimestamp = null;
@@ -120,8 +112,7 @@
     /**
      * Increments the count of <code>serviceMessage()</code> invocations by the endpoint.
      */
-    public void incrementServiceMessageCount()
-    {
+    public void incrementServiceMessageCount() {
         serviceMessageCount.incrementAndGet();
         lastServiceMessageTimestamp = new Date();
     }
@@ -130,8 +121,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.EndpointControlMBean#getLastServiceMessageTimestamp()
      */
-    public Date getLastServiceMessageTimestamp()
-    {
+    public Date getLastServiceMessageTimestamp() {
         return lastServiceMessageTimestamp;
     }
 
@@ -139,15 +129,11 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.EndpointControlMBean#getServiceMessageFrequency()
      */
-    public Double getServiceMessageFrequency()
-    {
-        if (serviceMessageCount.get() > 0)
-        {
+    public Double getServiceMessageFrequency() {
+        if (serviceMessageCount.get() > 0) {
             double runtime = differenceInMinutes(serviceMessageStart, System.currentTimeMillis());
-            return new Double(serviceMessageCount.get()/runtime);
-        }
-        else
-        {
+            return new Double(serviceMessageCount.get() / runtime);
+        } else {
             return new Double(0);
         }
     }
@@ -156,43 +142,34 @@
      *  (non-Javadoc)
      * @see javax.management.MBeanRegistration#preDeregister()
      */
-    public void preDeregister() throws Exception
-    {
-        MessageBrokerControl parent = (MessageBrokerControl)getParentControl();
+    public void preDeregister() throws Exception {
+        MessageBrokerControl parent = (MessageBrokerControl) getParentControl();
         parent.removeEndpoint(getObjectName());
     }
 
-    public String getURI()
-    {
+    public String getURI() {
         return endpoint.getUrl();
     }
 
-    public String getSecurityConstraint()
-    {
+    public String getSecurityConstraint() {
         return getSecurityConstraintOf(endpoint);
     }
 
-    public static String getSecurityConstraintOf(Endpoint endpoint)
-    {
+    public static String getSecurityConstraintOf(Endpoint endpoint) {
         String result = "None";
 
         SecurityConstraint constraint = endpoint.getSecurityConstraint();
-        if (constraint != null)
-        {
+        if (constraint != null) {
             String authMethod = constraint.getMethod();
-            if (authMethod != null)
-            {
+            if (authMethod != null) {
                 StringBuffer buffer = new StringBuffer();
                 buffer.append(authMethod);
 
                 List roles = constraint.getRoles();
-                if ((roles != null) && !roles.isEmpty())
-                {
+                if ((roles != null) && !roles.isEmpty()) {
                     buffer.append(':');
-                    for (int i = 0; i < roles.size(); i++)
-                    {
-                        if (i > 0)
-                        {
+                    for (int i = 0; i < roles.size(); i++) {
+                        if (i > 0) {
                             buffer.append(',');
                         }
                         buffer.append(' ');
@@ -209,12 +186,13 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.EndpointControlMBean#getBytesDeserialized()
      */
-    public Long getBytesDeserialized(){
+    public Long getBytesDeserialized() {
         return Long.valueOf(bytesDeserialized.get());
     }
 
     /**
      * Increments the count of bytes deserialized by the endpoint.
+     *
      * @param currentBytesDeserialized the bytes is deserialized
      */
     public void addToBytesDeserialized(int currentBytesDeserialized) {
@@ -231,6 +209,7 @@
 
     /**
      * Increments the count of bytes serialized by the endpoint.
+     *
      * @param currentBytesSerialized the bytes is serialized
      */
     public void addToBytesSerialized(int currentBytesSerialized) {
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/EndpointControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/EndpointControlMBean.java
index 48844a3..b624818 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/EndpointControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/EndpointControlMBean.java
@@ -24,8 +24,7 @@
 /**
  * Defines the runtime monitoring and management interface for managed endpoints.
  */
-public interface EndpointControlMBean extends BaseControlMBean
-{
+public interface EndpointControlMBean extends BaseControlMBean {
     /**
      * Returns <code>true</code> if the <code>Endpoint</code> is running.
      *
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/HTTPEndpointControl.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/HTTPEndpointControl.java
index e0daf9a..cf88a41 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/HTTPEndpointControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/HTTPEndpointControl.java
@@ -24,8 +24,7 @@
  * for monitoring and managing a <code>HTTPEndpoint</code> at runtime.
  */
 public class HTTPEndpointControl extends PollingEndpointControl implements
-    HTTPEndpointControlMBean
-{
+        HTTPEndpointControlMBean {
     private static final String TYPE = "HTTPEndpoint";
 
     /**
@@ -33,16 +32,16 @@
      * endpoint and parent MBean.
      *
      * @param endpoint The <code>HTTPEndpoint</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent   The parent MBean in the management hierarchy.
      */
-    public HTTPEndpointControl(HTTPEndpoint endpoint, BaseControl parent)
-    {
+    public HTTPEndpointControl(HTTPEndpoint endpoint, BaseControl parent) {
         super(endpoint, parent);
     }
 
-    /** {@inheritDoc} */
-    public String getType()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String getType() {
         return TYPE;
     }
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/HTTPEndpointControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/HTTPEndpointControlMBean.java
index 7d4f8e7..0228581 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/HTTPEndpointControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/HTTPEndpointControlMBean.java
@@ -19,7 +19,6 @@
 /**
  * Defines the runtime monitoring and management interface for managed HTTP endpoints.
  */
-public interface HTTPEndpointControlMBean extends PollingEndpointControlMBean
-{
+public interface HTTPEndpointControlMBean extends PollingEndpointControlMBean {
     // Empty for now.
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/PollingEndpointControl.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/PollingEndpointControl.java
index de4db0f..ce401bb 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/PollingEndpointControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/PollingEndpointControl.java
@@ -25,22 +25,19 @@
  * for monitoring and managing a <tt>BasePollingHTTPEndpoint</tt> at runtime.
  */
 public abstract class PollingEndpointControl extends EndpointControl implements
-        PollingEndpointControlMBean
-{
+        PollingEndpointControlMBean {
     /**
      * Constructs a <tt>PollingEndpointControl</tt>, assigning managed message
      * endpoint and parent MBean.
      *
      * @param endpoint The <code>BasePollingHTTPEndpoint</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent   The parent MBean in the management hierarchy.
      */
-    public PollingEndpointControl(BasePollingHTTPEndpoint endpoint, BaseControl parent)
-    {
+    public PollingEndpointControl(BasePollingHTTPEndpoint endpoint, BaseControl parent) {
         super(endpoint, parent);
     }
 
-    protected void onRegistrationComplete()
-    {
+    protected void onRegistrationComplete() {
         super.onRegistrationComplete();
 
         String name = this.getObjectName().getCanonicalName();
@@ -54,9 +51,8 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.endpoints.PollingEndpointControlMBean#getMaxWaitingPollRequests()
      */
-    public Integer getMaxWaitingPollRequests()
-    {
-        int maxWaitingPollRequests = ((BasePollingHTTPEndpoint)endpoint).getMaxWaitingPollRequests();
+    public Integer getMaxWaitingPollRequests() {
+        int maxWaitingPollRequests = ((BasePollingHTTPEndpoint) endpoint).getMaxWaitingPollRequests();
         return new Integer(maxWaitingPollRequests);
     }
 
@@ -64,9 +60,8 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.endpoints.PollingEndpointControlMBean#getWaitingPollRequestsCount()
      */
-    public Integer getWaitingPollRequestsCount()
-    {
-        int waitingPollRequestsCount = ((BasePollingHTTPEndpoint)endpoint).getWaitingPollRequestsCount();
+    public Integer getWaitingPollRequestsCount() {
+        int waitingPollRequestsCount = ((BasePollingHTTPEndpoint) endpoint).getWaitingPollRequestsCount();
         return new Integer(waitingPollRequestsCount);
     }
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/PollingEndpointControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/PollingEndpointControlMBean.java
index 2c30b49..64ed864 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/PollingEndpointControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/PollingEndpointControlMBean.java
@@ -22,8 +22,7 @@
  * Defines the runtime monitoring and management interface for managed polling
  * endpoints.
  */
-public interface PollingEndpointControlMBean extends EndpointControlMBean
-{
+public interface PollingEndpointControlMBean extends EndpointControlMBean {
     /**
      * Returns the maximum number of server poll response threads that will be
      * waiting for messages to arrive for clients.
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingAMFEndpointControl.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingAMFEndpointControl.java
index 00d7022..780d5c5 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingAMFEndpointControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingAMFEndpointControl.java
@@ -24,8 +24,7 @@
  * for monitoring and managing an <code>StreamingAMFEndpoint</code> at runtime.
  */
 public class StreamingAMFEndpointControl extends StreamingEndpointControl implements
-        StreamingAMFEndpointControlMBean
-{
+        StreamingAMFEndpointControlMBean {
     private static final String TYPE = "StreamingAMFEndpoint";
 
     /**
@@ -33,16 +32,16 @@
      * endpoint and parent MBean.
      *
      * @param endpoint The <code>StreamingAMFEndpoint</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent   The parent MBean in the management hierarchy.
      */
-    public StreamingAMFEndpointControl(StreamingAMFEndpoint endpoint, BaseControl parent)
-    {
+    public StreamingAMFEndpointControl(StreamingAMFEndpoint endpoint, BaseControl parent) {
         super(endpoint, parent);
     }
 
-    /** {@inheritDoc} */
-    public String getType()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String getType() {
         return TYPE;
     }
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingAMFEndpointControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingAMFEndpointControlMBean.java
index 32d05b9..8a448a1 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingAMFEndpointControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingAMFEndpointControlMBean.java
@@ -17,10 +17,9 @@
 package flex.management.runtime.messaging.endpoints;
 
 /**
- * Defines the runtime monitoring and management interface for managed streaming 
+ * Defines the runtime monitoring and management interface for managed streaming
  * AMF endpoints.
  */
-public interface StreamingAMFEndpointControlMBean extends StreamingEndpointControlMBean
-{
+public interface StreamingAMFEndpointControlMBean extends StreamingEndpointControlMBean {
     // Empty for now
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingEndpointControl.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingEndpointControl.java
index b3cdc64..29b2424 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingEndpointControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingEndpointControl.java
@@ -27,42 +27,38 @@
  * for monitoring and managing a <code>BaseStreamingHTTPEndpoint</code> at runtime.
  */
 public abstract class StreamingEndpointControl extends EndpointControl implements
-        StreamingEndpointControlMBean
-{   
+        StreamingEndpointControlMBean {
     private int pushCount;
     private Date lastPushTimeStamp;
     private long pushStart;
-    
+
     /**
-     * Constructs a <code>StreamingEndpointControl</code>, assigning managed message 
+     * Constructs a <code>StreamingEndpointControl</code>, assigning managed message
      * endpoint and parent MBean.
-     * 
+     *
      * @param endpoint The <code>BaseStreamingHTTPEndpoint</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent   The parent MBean in the management hierarchy.
      */
-    public StreamingEndpointControl(BaseStreamingHTTPEndpoint endpoint, BaseControl parent)
-    {
+    public StreamingEndpointControl(BaseStreamingHTTPEndpoint endpoint, BaseControl parent) {
         super(endpoint, parent);
     }
-        
-    protected void onRegistrationComplete()
-    {
+
+    protected void onRegistrationComplete() {
         super.onRegistrationComplete();
-        
+
         String name = this.getObjectName().getCanonicalName();
-        String[] generalPollables = { "LastPushTimestamp", "PushCount", "PushFrequency", "StreamingClientsCount"};
-        
+        String[] generalPollables = {"LastPushTimestamp", "PushCount", "PushFrequency", "StreamingClientsCount"};
+
         getRegistrar().registerObjects(AdminConsoleTypes.ENDPOINT_POLLABLE, name, generalPollables);
         getRegistrar().registerObject(AdminConsoleTypes.ENDPOINT_SCALAR, name, "MaxStreamingClients");
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.endpoints.StreamingEndpointControlMBean#getMaxStreamingClients()
      */
-    public Integer getMaxStreamingClients() 
-    {
-        int maxStreamingClientsCount = ((BaseStreamingHTTPEndpoint)endpoint).getMaxStreamingClients();
+    public Integer getMaxStreamingClients() {
+        int maxStreamingClientsCount = ((BaseStreamingHTTPEndpoint) endpoint).getMaxStreamingClients();
         return new Integer(maxStreamingClientsCount);
     }
 
@@ -70,64 +66,55 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.endpoints.StreamingEndpointControlMBean#getPushCount()
      */
-    public Integer getPushCount()
-    {
+    public Integer getPushCount() {
         return new Integer(pushCount);
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.endpoints.StreamingEndpointControlMBean#resetPushCount()
      */
-    public void resetPushCount()
-    {
+    public void resetPushCount() {
         pushStart = System.currentTimeMillis();
         pushCount = 0;
         lastPushTimeStamp = null;
     }
-    
+
     /**
      * Increments the count of messages pushed by the endpoint.
      */
-    public void incrementPushCount()
-    {
+    public void incrementPushCount() {
         ++pushCount;
         lastPushTimeStamp = new Date();
-    }    
-    
+    }
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.endpoints.StreamingEndpointControlMBean#getLastPushTimestamp()
      */
-    public Date getLastPushTimestamp()
-    {
+    public Date getLastPushTimestamp() {
         return lastPushTimeStamp;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.endpoints.StreamingEndpointControlMBean#getPushFrequency()
      */
-    public Double getPushFrequency()
-    {
-        if (pushCount > 0)
-        {
+    public Double getPushFrequency() {
+        if (pushCount > 0) {
             double runtime = differenceInMinutes(pushStart, System.currentTimeMillis());
-            return new Double(pushCount/runtime);
-        }
-        else
-        {
+            return new Double(pushCount / runtime);
+        } else {
             return new Double(0);
         }
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.messaging.endpoints.StreamingEndpointControlMBean#isRunning()
      */
-    public Integer getStreamingClientsCount()
-    {
-        int streamingClientsCount = ((BaseStreamingHTTPEndpoint)endpoint).getStreamingClientsCount();
+    public Integer getStreamingClientsCount() {
+        int streamingClientsCount = ((BaseStreamingHTTPEndpoint) endpoint).getStreamingClientsCount();
         return new Integer(streamingClientsCount);
     }
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingEndpointControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingEndpointControlMBean.java
index b8c684e..03b0346 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingEndpointControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingEndpointControlMBean.java
@@ -23,8 +23,7 @@
  * Defines the runtime monitoring and management interface for managed streaming
  * endpoints.
  */
-public interface StreamingEndpointControlMBean extends EndpointControlMBean
-{
+public interface StreamingEndpointControlMBean extends EndpointControlMBean {
     /**
      * Returns the maximum number of clients that will be allowed to establish
      * a streaming HTTP connection with the endpoint.
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingHTTPEndpointControl.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingHTTPEndpointControl.java
index a103b95..d98090c 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingHTTPEndpointControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingHTTPEndpointControl.java
@@ -24,8 +24,7 @@
  * for monitoring and managing a <code>StreamingHTTPEndpoint</code> at runtime.
  */
 public class StreamingHTTPEndpointControl extends StreamingEndpointControl implements
-    StreamingHTTPEndpointControlMBean
-{
+        StreamingHTTPEndpointControlMBean {
     private static final String TYPE = "StreamingHTTPEndpoint";
 
     /**
@@ -33,16 +32,16 @@
      * endpoint and parent MBean.
      *
      * @param endpoint The <code>StreamingHTTPEndpoint</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent   The parent MBean in the management hierarchy.
      */
-    public StreamingHTTPEndpointControl(StreamingHTTPEndpoint endpoint, BaseControl parent)
-    {
+    public StreamingHTTPEndpointControl(StreamingHTTPEndpoint endpoint, BaseControl parent) {
         super(endpoint, parent);
     }
 
-    /** {@inheritDoc} */
-    public String getType()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String getType() {
         return TYPE;
     }
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingHTTPEndpointControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingHTTPEndpointControlMBean.java
index f17cb85..432e5c4 100644
--- a/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingHTTPEndpointControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/endpoints/StreamingHTTPEndpointControlMBean.java
@@ -17,10 +17,9 @@
 package flex.management.runtime.messaging.endpoints;
 
 /**
- * Defines the runtime monitoring and management interface for managed streaming 
+ * Defines the runtime monitoring and management interface for managed streaming
  * HTTP endpoints.
  */
-public interface StreamingHTTPEndpointControlMBean extends StreamingEndpointControlMBean
-{
+public interface StreamingHTTPEndpointControlMBean extends StreamingEndpointControlMBean {
     // Empty for now
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/log/LogControl.java b/core/src/main/java/flex/management/runtime/messaging/log/LogControl.java
index d0b5843..fb9fc0e 100644
--- a/core/src/main/java/flex/management/runtime/messaging/log/LogControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/log/LogControl.java
@@ -26,81 +26,74 @@
  * for monitoring and managing a <code>Log</code> at runtime through the <code>LogManager</code>.
  */
 public class LogControl extends BaseControl implements
-        LogControlMBean
-{
+        LogControlMBean {
 
     private static final String TYPE = "Log"; // The type registered with the mbean server
     private LogManager logManager; // Reference to the LogManager which interfaces with Log
-        
-    
+
+
     /**
      * Creates the mbean and registers it with the mbean server.
-     * 
-     * @param parent BaseControl
+     *
+     * @param parent  BaseControl
      * @param manager A reference to the LogManager
      */
-    public LogControl(BaseControl parent, LogManager manager)
-    {
+    public LogControl(BaseControl parent, LogManager manager) {
         super(parent);
         this.logManager = manager;
         register();
     }
-    
-    
+
+
     /**
      * Sets the logging level for the target associated with the unique ID searchId.
+     *
      * @param searchId the search ID
-     * @param level the log level
+     * @param level    the log level
      */
-    public void changeTargetLevel(String searchId, String level)
-    {
+    public void changeTargetLevel(String searchId, String level) {
         Target selectedTarget = Log.getTarget(searchId);
-        if (selectedTarget != null)
-        {
+        if (selectedTarget != null) {
             selectedTarget.setLevel(new Short(level).shortValue());
         }
     }
-    
+
     /* (non-Javadoc)
      * @see flex.management.BaseControl#getId()
      */
-    public String getId()
-    {
+    public String getId() {
         return logManager.getId();
     }
-    
+
     /* (non-Javadoc)
      * @see flex.management.BaseControl#getType()
      */
-    public String getType()
-    {
+    public String getType() {
         return TYPE;
     }
 
     /**
      * Return a string array of the loggers.
+     *
      * @return a string array of loggers
      */
-    public String[] getLoggers()
-    {
+    public String[] getLoggers() {
         return logManager.getLoggers();
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.log.LogControlMBean#getTargets()
      */
-    public String[] getTargets()
-    {
+    public String[] getTargets() {
         return logManager.getTargetIds();
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.log.LogControlMBean#addFilterForTarget(java.lang.String, java.lang.String)
      */
-    public void addFilterForTarget(String targetId, String filter)
-    {
+    public void addFilterForTarget(String targetId, String filter) {
         AbstractTarget target = (AbstractTarget) logManager.getTarget(targetId);
-        
+
         if (target != null && logManager.checkFilter(filter))
             target.addFilter(filter);
     }
@@ -108,40 +101,35 @@
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.log.LogControlMBean#getTargetFilters(java.lang.String)
      */
-    public String[] getTargetFilters(String targetId)
-    {
+    public String[] getTargetFilters(String targetId) {
         return logManager.getTargetFilters(targetId);
     }
 
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.log.LogControlMBean#removeFilterForTarget(java.lang.String, java.lang.String)
      */
-    public void removeFilterForTarget(String targetId, String filter)
-    {
+    public void removeFilterForTarget(String targetId, String filter) {
         AbstractTarget target = (AbstractTarget) logManager.getTarget(targetId);
-        
+
         if (target != null && target.containsFilter(filter))
             target.removeFilter(filter);
     }
-    
+
     /* (non-Javadoc)
      * @see flex.management.runtime.messaging.log.LogControlMBean#getCategories()
      */
-    public String[] getCategories()
-    {
+    public String[] getCategories() {
         return (String[]) logManager.getCategories().toArray(new String[0]);
     }
 
 
-    public Integer getTargetLevel(String searchId)
-    {
+    public Integer getTargetLevel(String searchId) {
         AbstractTarget target = (AbstractTarget) logManager.getTarget(searchId);
-        
-        if (target != null)
-        {
+
+        if (target != null) {
             return new Integer(target.getLevel());
         } else
             return new Integer(-1);
     }
-    
+
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/log/LogControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/log/LogControlMBean.java
index 762c895..2353cf2 100644
--- a/core/src/main/java/flex/management/runtime/messaging/log/LogControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/log/LogControlMBean.java
@@ -22,8 +22,7 @@
 /**
  * Defines the exposed properties and operations of the LogControl.
  */
-public interface LogControlMBean extends BaseControlMBean
-{
+public interface LogControlMBean extends BaseControlMBean {
     /**
      * Returns the array of log targets.
      *
@@ -58,14 +57,14 @@
      * Changes the target level.
      *
      * @param targetId The target id.
-     * @param level The target level.
+     * @param level    The target level.
      */
     void changeTargetLevel(String targetId, String level);
 
     /**
      * Adds a filter for the target.
      *
-     * @param filter The filter.
+     * @param filter   The filter.
      * @param targetId The target id.
      */
     void addFilterForTarget(String filter, String targetId);
@@ -73,7 +72,7 @@
     /**
      * Removes a filter from the target.
      *
-     * @param filter The filter.
+     * @param filter   The filter.
      * @param targetId The target id.
      */
     void removeFilterForTarget(String filter, String targetId);
diff --git a/core/src/main/java/flex/management/runtime/messaging/log/LogManager.java b/core/src/main/java/flex/management/runtime/messaging/log/LogManager.java
index b9c63b5..3a0ed80 100644
--- a/core/src/main/java/flex/management/runtime/messaging/log/LogManager.java
+++ b/core/src/main/java/flex/management/runtime/messaging/log/LogManager.java
@@ -16,6 +16,7 @@
  */
 
 package flex.management.runtime.messaging.log;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -33,8 +34,7 @@
  * because Log lives in the common package, so it cannot extend ManageableComponent itself,
  * which is necessary for a class to be exposed through MBeans.
  */
-public class LogManager extends ManageableComponent
-{
+public class LogManager extends ManageableComponent {
 
     private static final String LOG_CATEGORY = LogCategories.CONFIGURATION; // Log category used by LogManager (ManageableComponent)
     private static final int NULL_LOG_REF_EXCEPTION = 10031;
@@ -49,13 +49,11 @@
     /**
      * Public constructor required by ManageableComponent.
      */
-    public LogManager()
-    {
+    public LogManager() {
         this(true);
     }
 
-    public LogManager(boolean enableManagement)
-    {
+    public LogManager(boolean enableManagement) {
         super(enableManagement);
         setId(ID);
 
@@ -64,10 +62,8 @@
     }
 
 
-    public void setupLogControl()
-    {
-        if (!isSetup)
-        {
+    public void setupLogControl() {
+        if (!isSetup) {
             controller = new LogControl(getParent().getControl(), this);
             setControl(controller);
             controller.register();
@@ -75,10 +71,8 @@
         }
     }
 
-    public void stop()
-    {
-        if (!isStarted())
-        {
+    public void stop() {
+        if (!isStarted()) {
             return;
         }
 
@@ -86,10 +80,8 @@
         super.stop();
 
         // Remove management
-        if (isManaged())
-        {
-            if (getControl() != null)
-            {
+        if (isManaged()) {
+            if (getControl() != null) {
                 getControl().unregister();
                 setControl(null);
             }
@@ -97,34 +89,32 @@
         }
     }
 
-    public void setLog(Log logInstance)
-    {
+    public void setLog(Log logInstance) {
         log = logInstance;
     }
 
     /* (non-Javadoc)
      * @see flex.management.ManageableComponent#getLogCategory()
      */
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
     /**
      * Gets the Loggers as a string array.
+     *
      * @return a String array
      */
-    public String[] getLoggers()
-    {
+    public String[] getLoggers() {
         return log.getLoggers();
     }
 
     /**
      * Gets the Target IDs.
+     *
      * @return a string array
      */
-    public String[] getTargetIds()
-    {
+    public String[] getTargetIds() {
         return (String[]) Log.getTargetMap().keySet().toArray(new String[0]);
     }
 
@@ -134,18 +124,17 @@
      * @param targetId the target ID
      * @return the target from the Log, or null if it is not found
      */
-    public Target getTarget(String targetId)
-    {
+    public Target getTarget(String targetId) {
         return (Target) Log.getTargetMap().get(targetId);
     }
 
     /**
      * Gets the filters for a given target.
+     *
      * @param targetId the target ID
      * @return a string array
      */
-    public String[] getTargetFilters(String targetId)
-    {
+    public String[] getTargetFilters(String targetId) {
 
         Target target = getTarget(targetId);
 
@@ -154,9 +143,8 @@
 
         List filterObjects = target.getFilters();
         String[] filters = new String[filterObjects.size()];
-        for (int i = 0; i < filterObjects.size(); i++)
-        {
-            filters[i] = (String)filterObjects.get(i);
+        for (int i = 0; i < filterObjects.size(); i++) {
+            filters[i] = (String) filterObjects.get(i);
         }
 
         return filters;
@@ -164,32 +152,30 @@
 
     /**
      * Check whether a filter is valid.
+     *
      * @param filter the filter string to check
      * @return whether the category exists in LogCategories
      */
-    public boolean checkFilter(String filter)
-    {
+    public boolean checkFilter(String filter) {
         return categoryManager.checkFilter(filter);
     }
 
     /**
      * Return a list of categories in LogCategories.
+     *
      * @return the list of categories in LogCategories
      */
-    public List getCategories()
-    {
+    public List getCategories() {
         return categoryManager.getCategories();
     }
 
-    protected void validate()
-    {
+    protected void validate() {
         if (isValid())
             return;
 
         super.validate();
 
-        if (log == null)
-        {
+        if (log == null) {
             invalidate();
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(NULL_LOG_REF_EXCEPTION, new Object[]{});
@@ -202,8 +188,7 @@
      * This private class keeps track of what categories exist in LogCategories by implementing
      * LogCategories and reflecting the interface's properties.
      */
-    private class CategoryManager implements LogCategories
-    {
+    private class CategoryManager implements LogCategories {
         private List categories;
 
         /**
@@ -211,19 +196,14 @@
          * Note this will be incorrect if additional public properties are added to this class
          * or to the interface LogCategories.
          */
-        public CategoryManager()
-        {
+        public CategoryManager() {
             categories = new ArrayList();
 
             Field[] categoryFields = this.getClass().getFields();
-            for (int i = 0; i < categoryFields.length; i++)
-            {
-                try
-                {
-                    categories.add((String)categoryFields[i].get(this));
-                }
-                catch (IllegalAccessException iae)
-                {
+            for (int i = 0; i < categoryFields.length; i++) {
+                try {
+                    categories.add((String) categoryFields[i].get(this));
+                } catch (IllegalAccessException iae) {
                     // Illegal Access on reflection
                 }
             }
@@ -232,16 +212,14 @@
 
         /**
          * Check if any categories match with the filter (the filter is valid or not).
+         *
          * @param filter the filter string to check
          * @return whether the filter is valid  (with or without a trailing .*)
          */
-        public boolean checkFilter(String filter)
-        {
+        public boolean checkFilter(String filter) {
 
-            for (int i = 0; i < categories.size(); i++)
-            {
-                if (Log.checkFilterToCategory((String)filter, (String)categories.get(i)))
-                {
+            for (int i = 0; i < categories.size(); i++) {
+                if (Log.checkFilterToCategory((String) filter, (String) categories.get(i))) {
                     return true;
                 }
             }
@@ -250,10 +228,10 @@
 
         /**
          * Return a list of log categories.
+         *
          * @return List a list of the categories
          */
-        public List getCategories()
-        {
+        public List getCategories() {
             return Collections.unmodifiableList(new ArrayList(categories));
         }
     }
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/MessageServiceControl.java b/core/src/main/java/flex/management/runtime/messaging/services/MessageServiceControl.java
index 99e0e85..87db999 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/MessageServiceControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/MessageServiceControl.java
@@ -24,8 +24,7 @@
  * for monitoring and managing a <code>MessageService</code> at runtime.
  */
 public class MessageServiceControl extends ServiceControl implements
-        MessageServiceControlMBean
-{
+        MessageServiceControlMBean {
     private static final String TYPE = "MessageService";
 
     /**
@@ -33,16 +32,16 @@
      * message service and parent MBean.
      *
      * @param service The <code>MessageService</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent  The parent MBean in the management hierarchy.
      */
-    public MessageServiceControl(MessageService service, BaseControl parent)
-    {
+    public MessageServiceControl(MessageService service, BaseControl parent) {
         super(service, parent);
     }
 
-    /** {@inheritDoc} */
-    public String getType()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String getType() {
         return TYPE;
     }
 
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/MessageServiceControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/services/MessageServiceControlMBean.java
index 72ac1c8..067acf3 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/MessageServiceControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/MessageServiceControlMBean.java
@@ -20,7 +20,6 @@
 /**
  * Defines the runtime monitoring and management interface for managed message services.
  */
-public interface MessageServiceControlMBean extends ServiceControlMBean
-{
+public interface MessageServiceControlMBean extends ServiceControlMBean {
     // Empty for now.
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/ServiceAdapterControl.java b/core/src/main/java/flex/management/runtime/messaging/services/ServiceAdapterControl.java
index 69c99e7..16435cc 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/ServiceAdapterControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/ServiceAdapterControl.java
@@ -23,63 +23,57 @@
 import flex.messaging.services.ServiceAdapter;
 
 /**
- * The <code>ServiceAdapterControl</code> class is the base MBean implementation 
+ * The <code>ServiceAdapterControl</code> class is the base MBean implementation
  * for monitoring and managing a <code>ServiceAdapter</code> at runtime.
  */
 public abstract class ServiceAdapterControl extends BaseControl implements
-        ServiceAdapterControlMBean
-{
-    protected ServiceAdapter serviceAdapter;  
+        ServiceAdapterControlMBean {
+    protected ServiceAdapter serviceAdapter;
 
     /**
-     * Constructs a <code>ServiceAdapterControl</code>, assigning its id, managed service 
+     * Constructs a <code>ServiceAdapterControl</code>, assigning its id, managed service
      * adapter and parent MBean.
-     * 
+     *
      * @param serviceAdapter The <code>ServiceAdapter</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent         The parent MBean in the management hierarchy.
      */
-    public ServiceAdapterControl(ServiceAdapter serviceAdapter, BaseControl parent)
-    {
-        super(parent);    
-        this.serviceAdapter = serviceAdapter;  
+    public ServiceAdapterControl(ServiceAdapter serviceAdapter, BaseControl parent) {
+        super(parent);
+        this.serviceAdapter = serviceAdapter;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getId()
      */
-    public String getId()
-    {
+    public String getId() {
         return serviceAdapter.getId();
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.ServiceAdapterControlMBean#isRunning()
      */
-    public Boolean isRunning()
-    {
+    public Boolean isRunning() {
         return Boolean.valueOf(serviceAdapter.isStarted());
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.ServiceAdapterControlMBean#getStartTimestamp()
      */
-    public Date getStartTimestamp()
-    {
+    public Date getStartTimestamp() {
         return startTimestamp;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see javax.management.MBeanRegistration#preDeregister()
      */
-    public void preDeregister() throws Exception
-    {
-        DestinationControl parent = (DestinationControl)getParentControl();
+    public void preDeregister() throws Exception {
+        DestinationControl parent = (DestinationControl) getParentControl();
         parent.setAdapter(null);
-       
+
         super.preDeregister();
     }
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/ServiceAdapterControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/services/ServiceAdapterControlMBean.java
index 5bcc57c..217885c 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/ServiceAdapterControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/ServiceAdapterControlMBean.java
@@ -24,8 +24,7 @@
 /**
  * Defines the runtime monitoring and management interface for service adapters.
  */
-public interface ServiceAdapterControlMBean extends BaseControlMBean
-{
+public interface ServiceAdapterControlMBean extends BaseControlMBean {
     /**
      * Returns <code>true</code> if the <code>ServiceAdapter</code> is running.
      *
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/ServiceControl.java b/core/src/main/java/flex/management/runtime/messaging/services/ServiceControl.java
index da3c605..d685a74 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/ServiceControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/ServiceControl.java
@@ -32,112 +32,101 @@
  * The <code>ServiceControl</code> class is the MBean implementation for
  * monitoring and managing a <code>Service</code> at runtime.
  */
-public abstract class ServiceControl extends BaseControl implements ServiceControlMBean
-{
+public abstract class ServiceControl extends BaseControl implements ServiceControlMBean {
     protected Service service;
     private List destinations;
-    
+
     /**
      * Constructs a <code>ServiceControl</code>, assigning its id, managed service and
      * parent MBean.
-     * 
+     *
      * @param service The <code>Service</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent  The parent MBean in the management hierarchy.
      */
-    public ServiceControl(Service service, BaseControl parent)
-    {
+    public ServiceControl(Service service, BaseControl parent) {
         super(parent);
         this.service = service;
-        destinations = new ArrayList(); 
+        destinations = new ArrayList();
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getId()
      */
-    public String getId()
-    {
+    public String getId() {
         return service.getId();
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.ServiceControlMBean#isRunning()
      */
-    public Boolean isRunning()
-    {
+    public Boolean isRunning() {
         return Boolean.valueOf(service.isStarted());
     }
-    
-    
+
+
     /**
      * Adds the <code>ObjectName</code> of a destination registered with the managed service.
-     * 
+     *
      * @param value The <code>ObjectName</code> of a destination registered with the managed service.
      */
-    public void addDestination(ObjectName value)
-    {
+    public void addDestination(ObjectName value) {
         destinations.add(value);
     }
-    
+
     /**
      * Removes the <code>ObjectName</code> of a destination registered with the managed service.
-     * 
+     *
      * @param value The <code>ObjectName</code> of a destination registered with the managed service.
      */
-    public void removeDestination(ObjectName value)
-    {
+    public void removeDestination(ObjectName value) {
         destinations.remove(value);
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.ServiceControlMBean#getDestinations()
      */
-    public ObjectName[] getDestinations()
-    {
+    public ObjectName[] getDestinations() {
         int size = destinations.size();
         ObjectName[] destinationNames = new ObjectName[size];
-        for (int i = 0; i < size; ++i)
-        {
-            destinationNames[i] = (ObjectName)destinations.get(i);
+        for (int i = 0; i < size; ++i) {
+            destinationNames[i] = (ObjectName) destinations.get(i);
         }
         return destinationNames;
     }
-    
-    
+
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.ServiceControlMBean#getStartTimestamp()
      */
-    public Date getStartTimestamp()
-    {
+    public Date getStartTimestamp() {
         return startTimestamp;
     }
-    
-    
+
+
     /*
      *  (non-Javadoc)
      * @see javax.management.MBeanRegistration#preDeregister()
      */
-    public void preDeregister() throws Exception
-    {
-        MessageBrokerControl parent = (MessageBrokerControl)getParentControl();
+    public void preDeregister() throws Exception {
+        MessageBrokerControl parent = (MessageBrokerControl) getParentControl();
         parent.removeService(getObjectName());
-        
+
         // Unregister destinations of the service
-        for (Iterator iter = service.getDestinations().values().iterator(); iter.hasNext();) {
+        for (Iterator iter = service.getDestinations().values().iterator(); iter.hasNext(); ) {
             Destination child = (Destination) iter.next();
-            if (child.getControl() != null)
-            {
+            if (child.getControl() != null) {
                 child.getControl().unregister();
                 child.setControl(null);
                 child.setManaged(false);
             }
-            
+
         }
-        
+
         super.preDeregister();
     }
-    
+
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/ServiceControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/services/ServiceControlMBean.java
index 4baa624..97af62b 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/ServiceControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/ServiceControlMBean.java
@@ -25,8 +25,7 @@
 /**
  * Defines the runtime monitoring and management interface for managed services.
  */
-public interface ServiceControlMBean extends BaseControlMBean
-{
+public interface ServiceControlMBean extends BaseControlMBean {
 
     /**
      * Returns <code>true</code> if the <code>Service</code> is running.
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/messaging/SubscriptionManagerControl.java b/core/src/main/java/flex/management/runtime/messaging/services/messaging/SubscriptionManagerControl.java
index 48362fa..90c5715 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/messaging/SubscriptionManagerControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/messaging/SubscriptionManagerControl.java
@@ -27,101 +27,85 @@
  * monitoring and managing a <code>SubscriptionManager</code> at runtime.
  */
 public class SubscriptionManagerControl extends BaseControl implements
-        SubscriptionManagerControlMBean
-{
+        SubscriptionManagerControlMBean {
     private SubscriptionManager subscriptionManager;
-    
+
     /**
      * Constructs a new <code>SubscriptionManagerControl</code> instance, assigning its
      * backing <code>SubscriptionManager</code>.
-     * 
+     *
      * @param subscriptionManager The <code>SubscriptionManager</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent              The parent MBean in the management hierarchy.
      */
-    public SubscriptionManagerControl(SubscriptionManager subscriptionManager, BaseControl parent)
-    {
+    public SubscriptionManagerControl(SubscriptionManager subscriptionManager, BaseControl parent) {
         super(parent);
         this.subscriptionManager = subscriptionManager;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getId()
      */
-    public String getId()
-    {
+    public String getId() {
         return subscriptionManager.getId();
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getType()
      */
-    public String getType()
-    {
+    public String getType() {
         return SubscriptionManager.TYPE;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.SubscriptionManagerControlMBean#getSubscriberCount()
      */
-    public Integer getSubscriberCount()
-    {
+    public Integer getSubscriberCount() {
         Set subscriberIds = subscriptionManager.getSubscriberIds();
-        if (subscriberIds != null)
-        {
-            return new Integer(subscriberIds.size());            
-        }
-        else
-        {
+        if (subscriberIds != null) {
+            return new Integer(subscriberIds.size());
+        } else {
             return new Integer(0);
         }
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.SubscriptionManagerControlMBean#getSubscriberIds()
      */
-    public String[] getSubscriberIds()
-    {
+    public String[] getSubscriberIds() {
         Set subscriberIds = subscriptionManager.getSubscriberIds();
-        if (subscriberIds != null)
-        {
+        if (subscriberIds != null) {
             String[] ids = new String[subscriberIds.size()];
-            return (String[])subscriberIds.toArray(ids);
-        }
-        else
-        {
+            return (String[]) subscriberIds.toArray(ids);
+        } else {
             return new String[0];
-        }                
+        }
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.SubscriptionManagerControlMBean#removeSubscriber(java.lang.String)
      */
-    public void removeSubscriber(String subscriberId)
-    {
+    public void removeSubscriber(String subscriberId) {
         MessageClient subscriber = subscriptionManager.getSubscriber(subscriberId);
-        if (subscriber != null)
-        {
+        if (subscriber != null) {
             subscriptionManager.removeSubscriber(subscriber);
         }
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.SubscriptionManagerControlMBean#removeAllSubscribers()
      */
-    public void removeAllSubscribers()
-    {
+    public void removeAllSubscribers() {
         String[] subscriberIds = getSubscriberIds();
         int length = subscriberIds.length;
-        for (int i = 0; i < length; ++i)
-        {
+        for (int i = 0; i < length; ++i) {
             removeSubscriber(subscriberIds[i]);
         }
     }
-    
+
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/messaging/SubscriptionManagerControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/services/messaging/SubscriptionManagerControlMBean.java
index 50e60d8..6eb62b3 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/messaging/SubscriptionManagerControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/messaging/SubscriptionManagerControlMBean.java
@@ -24,8 +24,7 @@
  * Defines the runtime monitoring and management interface for
  * <code>SubscriptionManager</code>s.
  */
-public interface SubscriptionManagerControlMBean extends BaseControlMBean
-{
+public interface SubscriptionManagerControlMBean extends BaseControlMBean {
     /**
      * Returns the count of active subscribers.
      *
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/messaging/ThrottleManagerControl.java b/core/src/main/java/flex/management/runtime/messaging/services/messaging/ThrottleManagerControl.java
index dc89ee2..02277e8 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/messaging/ThrottleManagerControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/messaging/ThrottleManagerControl.java
@@ -27,8 +27,7 @@
  * monitoring and managing a <code>ThrottleManager</code> at runtime.
  */
 public class ThrottleManagerControl extends BaseControl implements
-        ThrottleManagerControlMBean
-{
+        ThrottleManagerControlMBean {
     private ThrottleManager throttleManager;
     private long clientIncomingMessageThrottleStart;
     private int clientIncomingMessageThrottleCount;
@@ -48,10 +47,9 @@
      * backing <code>ThrottleManager</code>.
      *
      * @param throttleManager The <code>ThrottleManager</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent          The parent MBean in the management hierarchy.
      */
-    public ThrottleManagerControl(ThrottleManager throttleManager, BaseControl parent)
-    {
+    public ThrottleManagerControl(ThrottleManager throttleManager, BaseControl parent) {
         super(parent);
         this.throttleManager = throttleManager;
         clientIncomingMessageThrottleStart = System.currentTimeMillis();
@@ -61,8 +59,7 @@
     }
 
     @Override
-    protected void onRegistrationComplete()
-    {
+    protected void onRegistrationComplete() {
         String name = this.getObjectName().getCanonicalName();
         String[] attributes = {
                 "ClientIncomingMessageThrottleCount", "ClientIncomingMessageThrottleFrequency",
@@ -81,8 +78,7 @@
      * @see flex.management.BaseControlMBean#getId()
      */
     @Override
-    public String getId()
-    {
+    public String getId() {
         return throttleManager.getId();
     }
 
@@ -91,8 +87,7 @@
      * @see flex.management.BaseControlMBean#getType()
      */
     @Override
-    public String getType()
-    {
+    public String getType() {
         return ThrottleManager.TYPE;
     }
 
@@ -100,16 +95,14 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getClientIncomingMessageThrottleCount()
      */
-    public Integer getClientIncomingMessageThrottleCount()
-    {
+    public Integer getClientIncomingMessageThrottleCount() {
         return Integer.valueOf(clientIncomingMessageThrottleCount);
     }
 
     /**
      * Increments the count of throttled incoming client messages.
      */
-    public void incrementClientIncomingMessageThrottleCount()
-    {
+    public void incrementClientIncomingMessageThrottleCount() {
         ++clientIncomingMessageThrottleCount;
         lastClientIncomingMessageThrottleTimestamp = new Date();
     }
@@ -118,8 +111,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#resetClientIncomingMessageThrottleCount()
      */
-    public void resetClientIncomingMessageThrottleCount()
-    {
+    public void resetClientIncomingMessageThrottleCount() {
         clientIncomingMessageThrottleStart = System.currentTimeMillis();
         clientIncomingMessageThrottleCount = 0;
         lastClientIncomingMessageThrottleTimestamp = null;
@@ -129,8 +121,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getLastClientIncomingMessageThrottleTimestamp()
      */
-    public Date getLastClientIncomingMessageThrottleTimestamp()
-    {
+    public Date getLastClientIncomingMessageThrottleTimestamp() {
         return lastClientIncomingMessageThrottleTimestamp;
     }
 
@@ -138,12 +129,10 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getClientIncomingMessageThrottleFrequency()
      */
-    public Double getClientIncomingMessageThrottleFrequency()
-    {
-        if (clientIncomingMessageThrottleCount > 0)
-        {
+    public Double getClientIncomingMessageThrottleFrequency() {
+        if (clientIncomingMessageThrottleCount > 0) {
             double runtime = differenceInMinutes(clientIncomingMessageThrottleStart, System.currentTimeMillis());
-            return new Double(clientIncomingMessageThrottleCount/runtime);
+            return new Double(clientIncomingMessageThrottleCount / runtime);
         }
         return new Double(0);
     }
@@ -152,16 +141,14 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getClientOutgoingMessageThrottleCount()
      */
-    public Integer getClientOutgoingMessageThrottleCount()
-    {
+    public Integer getClientOutgoingMessageThrottleCount() {
         return Integer.valueOf(clientOutgoingMessageThrottleCount);
     }
 
     /**
      * Increments the count of throttled outgoing client messages.
      */
-    public void incrementClientOutgoingMessageThrottleCount()
-    {
+    public void incrementClientOutgoingMessageThrottleCount() {
         ++clientOutgoingMessageThrottleCount;
         lastClientOutgoingMessageThrottleTimestamp = new Date();
     }
@@ -170,8 +157,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#resetClientOutgoingMessageThrottleCount()
      */
-    public void resetClientOutgoingMessageThrottleCount()
-    {
+    public void resetClientOutgoingMessageThrottleCount() {
         clientOutgoingMessageThrottleStart = System.currentTimeMillis();
         clientOutgoingMessageThrottleCount = 0;
         lastClientOutgoingMessageThrottleTimestamp = null;
@@ -181,8 +167,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getLastClientOutgoingMessageThrottleTimestamp()
      */
-    public Date getLastClientOutgoingMessageThrottleTimestamp()
-    {
+    public Date getLastClientOutgoingMessageThrottleTimestamp() {
         return lastClientOutgoingMessageThrottleTimestamp;
     }
 
@@ -190,12 +175,10 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getClientOutgoingMessageThrottleFrequency()
      */
-    public Double getClientOutgoingMessageThrottleFrequency()
-    {
-        if (clientOutgoingMessageThrottleCount > 0)
-        {
+    public Double getClientOutgoingMessageThrottleFrequency() {
+        if (clientOutgoingMessageThrottleCount > 0) {
             double runtime = differenceInMinutes(clientOutgoingMessageThrottleStart, System.currentTimeMillis());
-            return new Double(clientOutgoingMessageThrottleCount/runtime);
+            return new Double(clientOutgoingMessageThrottleCount / runtime);
         }
         return new Double(0);
     }
@@ -204,16 +187,14 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getDestinationIncomingMessageThrottleCount()
      */
-    public Integer getDestinationIncomingMessageThrottleCount()
-    {
+    public Integer getDestinationIncomingMessageThrottleCount() {
         return Integer.valueOf(destinationIncomingMessageThrottleCount);
     }
 
     /**
      * Increments the count of throttled incoming destination messages.
      */
-    public void incrementDestinationIncomingMessageThrottleCount()
-    {
+    public void incrementDestinationIncomingMessageThrottleCount() {
         ++destinationIncomingMessageThrottleCount;
         lastDestinationIncomingMessageThrottleTimestamp = new Date();
     }
@@ -222,8 +203,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#resetDestinationIncomingMessageThrottleCount()
      */
-    public void resetDestinationIncomingMessageThrottleCount()
-    {
+    public void resetDestinationIncomingMessageThrottleCount() {
         destinationIncomingMessageThrottleStart = System.currentTimeMillis();
         destinationIncomingMessageThrottleCount = 0;
         lastDestinationIncomingMessageThrottleTimestamp = null;
@@ -233,8 +213,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getLastDestinationIncomingMessageThrottleTimestamp()
      */
-    public Date getLastDestinationIncomingMessageThrottleTimestamp()
-    {
+    public Date getLastDestinationIncomingMessageThrottleTimestamp() {
         return lastDestinationIncomingMessageThrottleTimestamp;
     }
 
@@ -242,12 +221,10 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getDestinationIncomingMessageThrottleFrequency()
      */
-    public Double getDestinationIncomingMessageThrottleFrequency()
-    {
-        if (destinationIncomingMessageThrottleCount > 0)
-        {
+    public Double getDestinationIncomingMessageThrottleFrequency() {
+        if (destinationIncomingMessageThrottleCount > 0) {
             double runtime = differenceInMinutes(destinationIncomingMessageThrottleStart, System.currentTimeMillis());
-            return new Double(destinationIncomingMessageThrottleCount/runtime);
+            return new Double(destinationIncomingMessageThrottleCount / runtime);
         }
         return new Double(0);
     }
@@ -256,16 +233,14 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getDestinationOutgoingMessageThrottleCount()
      */
-    public Integer getDestinationOutgoingMessageThrottleCount()
-    {
+    public Integer getDestinationOutgoingMessageThrottleCount() {
         return Integer.valueOf(destinationOutgoingMessageThrottleCount);
     }
 
     /**
      * Increments the count of throttled outgoing destination messages.
      */
-    public void incrementDestinationOutgoingMessageThrottleCount()
-    {
+    public void incrementDestinationOutgoingMessageThrottleCount() {
         ++destinationOutgoingMessageThrottleCount;
         lastDestinationOutgoingMessageThrottleTimestamp = new Date();
     }
@@ -274,8 +249,7 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#resetDestinationOutgoingMessageThrottleCount()
      */
-    public void resetDestinationOutgoingMessageThrottleCount()
-    {
+    public void resetDestinationOutgoingMessageThrottleCount() {
         destinationOutgoingMessageThrottleStart = System.currentTimeMillis();
         destinationOutgoingMessageThrottleCount = 0;
         lastDestinationOutgoingMessageThrottleTimestamp = null;
@@ -285,17 +259,14 @@
      *  (non-Javadoc)
      * @see flex.management.runtime.ThrottleManagerControlMBean#getLastDestinationOutgoingMessageThrottleTimestamp()
      */
-    public Date getLastDestinationOutgoingMessageThrottleTimestamp()
-    {
+    public Date getLastDestinationOutgoingMessageThrottleTimestamp() {
         return lastDestinationOutgoingMessageThrottleTimestamp;
     }
 
-    public Double getDestinationOutgoingMessageThrottleFrequency()
-    {
-        if (destinationOutgoingMessageThrottleCount > 0)
-        {
+    public Double getDestinationOutgoingMessageThrottleFrequency() {
+        if (destinationOutgoingMessageThrottleCount > 0) {
             double runtime = differenceInMinutes(destinationOutgoingMessageThrottleStart, System.currentTimeMillis());
-            return new Double(destinationOutgoingMessageThrottleCount/runtime);
+            return new Double(destinationOutgoingMessageThrottleCount / runtime);
         }
         return new Double(0);
     }
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/messaging/ThrottleManagerControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/services/messaging/ThrottleManagerControlMBean.java
index 75ba9ba..1c33009 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/messaging/ThrottleManagerControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/messaging/ThrottleManagerControlMBean.java
@@ -25,8 +25,7 @@
  * Defines the runtime monitoring and management interface for
  * <code>ThrottleManager</code>s.
  */
-public interface ThrottleManagerControlMBean extends BaseControlMBean
-{
+public interface ThrottleManagerControlMBean extends BaseControlMBean {
     /**
      * Returns the number of incoming client messages that have been
      * throttled.
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/ActionScriptAdapterControl.java b/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/ActionScriptAdapterControl.java
index 597f0b0..3dc4026 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/ActionScriptAdapterControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/ActionScriptAdapterControl.java
@@ -24,8 +24,7 @@
  * The <code>ActionScriptAdapterControl</code> class is the MBean implemenation
  * for monitoring and managing <code>ActionScriptAdapter</code>s at runtime.
  */
-public class ActionScriptAdapterControl extends ServiceAdapterControl implements ActionScriptAdapterControlMBean
-{
+public class ActionScriptAdapterControl extends ServiceAdapterControl implements ActionScriptAdapterControlMBean {
     private static final String TYPE = "ActionScriptAdapter";
 
     /**
@@ -33,16 +32,16 @@
      * <code>ActionScriptAdapter</code> and parent MBean.
      *
      * @param serviceAdapter The <code>ActionScriptAdapter</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent         The parent MBean in the management hierarchy.
      */
-    public ActionScriptAdapterControl(ActionScriptAdapter serviceAdapter, BaseControl parent)
-    {
+    public ActionScriptAdapterControl(ActionScriptAdapter serviceAdapter, BaseControl parent) {
         super(serviceAdapter, parent);
     }
 
-    /** {@inheritDoc} */
-    public String getType()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String getType() {
         return TYPE;
     }
 
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/ActionScriptAdapterControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/ActionScriptAdapterControlMBean.java
index 6c7f534..2a3da71 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/ActionScriptAdapterControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/ActionScriptAdapterControlMBean.java
@@ -22,7 +22,6 @@
  * Defines the runtime monitoring and management interface for managed
  * ActionScript messaging adapters.
  */
-public interface ActionScriptAdapterControlMBean extends ServiceAdapterControlMBean
-{
+public interface ActionScriptAdapterControlMBean extends ServiceAdapterControlMBean {
     // empty for now
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/JMSAdapterControl.java b/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/JMSAdapterControl.java
index d65bff0..3ca695e 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/JMSAdapterControl.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/JMSAdapterControl.java
@@ -25,20 +25,18 @@
  * for monitoring and managing <code>JMSAdapter</code>s at runtime.
  */
 public class JMSAdapterControl extends ServiceAdapterControl implements
-        JMSAdapterControlMBean
-{
+        JMSAdapterControlMBean {
     private static final String TYPE = "JMSAdapter";
     private JMSAdapter jmsAdapter;
-    
+
     /**
      * Constructs a <code>JMSAdapterControl</code>, assigning its id, managed
      * <code>JMSAdapter</code> and parent MBean.
-     * 
+     *
      * @param serviceAdapter The <code>JMSAdapter</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent         The parent MBean in the management hierarchy.
      */
-    public JMSAdapterControl(JMSAdapter serviceAdapter, BaseControl parent)
-    {
+    public JMSAdapterControl(JMSAdapter serviceAdapter, BaseControl parent) {
         super(serviceAdapter, parent);
         jmsAdapter = serviceAdapter;
     }
@@ -47,71 +45,63 @@
      *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getType()
      */
-    public String getType()
-    {
+    public String getType() {
         return TYPE;
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.JMSAdapterControlMBean#getTopicProducerCount()
      */
-    public Integer getTopicProducerCount()
-    {
+    public Integer getTopicProducerCount() {
         return new Integer(jmsAdapter.getTopicProducerCount());
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.JMSAdapterControlMBean#getTopicConsumerCount()
      */
-    public Integer getTopicConsumerCount()
-    {
+    public Integer getTopicConsumerCount() {
         return new Integer(jmsAdapter.getTopicConsumerCount());
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.JMSAdapterControlMBean#getTopicConsumerIds()
      */
-    public String[] getTopicConsumerIds()
-    {
+    public String[] getTopicConsumerIds() {
         return jmsAdapter.getTopicConsumerIds();
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.JMSAdapterControlMBean#getQueueProducerCount()
      */
-    public Integer getQueueProducerCount()
-    {
+    public Integer getQueueProducerCount() {
         return new Integer(jmsAdapter.getQueueProducerCount());
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.JMSAdapterControlMBean#getQueueConsumerCount()
      */
-    public Integer getQueueConsumerCount()
-    {        
+    public Integer getQueueConsumerCount() {
         return new Integer(jmsAdapter.getQueueConsumerCount());
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.JMSAdapterControlMBean#getQueueConsumerIds()
      */
-    public String[] getQueueConsumerIds()
-    {
+    public String[] getQueueConsumerIds() {
         return jmsAdapter.getQueueConsumerIds();
     }
-    
+
     /*
      *  (non-Javadoc)
      * @see flex.management.runtime.JMSAdapterControlMBean#removeConsumer(java.lang.String)
      */
-    public void removeConsumer(String consumerId)
-    {
+    public void removeConsumer(String consumerId) {
         jmsAdapter.removeConsumer(consumerId);
     }
 }
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/JMSAdapterControlMBean.java b/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/JMSAdapterControlMBean.java
index 2683f4e..a983b59 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/JMSAdapterControlMBean.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/messaging/adapters/JMSAdapterControlMBean.java
@@ -23,8 +23,7 @@
 /**
  * Defines the runtime monitoring and management interface for managed JMS adapters.
  */
-public interface JMSAdapterControlMBean extends ServiceAdapterControlMBean
-{
+public interface JMSAdapterControlMBean extends ServiceAdapterControlMBean {
     /**
      * Returns the number of topic producers for the adapter.
      *
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/messaging/package-info.java b/core/src/main/java/flex/management/runtime/messaging/services/messaging/package-info.java
index 3e0f105..c5f7770 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/messaging/package-info.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/messaging/package-info.java
@@ -14,5 +14,5 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 package flex.management.runtime.messaging.services.messaging;
\ No newline at end of file
diff --git a/core/src/main/java/flex/management/runtime/messaging/services/package-info.java b/core/src/main/java/flex/management/runtime/messaging/services/package-info.java
index e9cdb22..e29c86b 100644
--- a/core/src/main/java/flex/management/runtime/messaging/services/package-info.java
+++ b/core/src/main/java/flex/management/runtime/messaging/services/package-info.java
@@ -14,5 +14,5 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 package flex.management.runtime.messaging.services;
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/AbstractConnectionAwareSession.java b/core/src/main/java/flex/messaging/AbstractConnectionAwareSession.java
index 6c93dc1..5fe4a19 100644
--- a/core/src/main/java/flex/messaging/AbstractConnectionAwareSession.java
+++ b/core/src/main/java/flex/messaging/AbstractConnectionAwareSession.java
@@ -19,13 +19,11 @@
 import java.util.concurrent.CopyOnWriteArrayList;
 
 /**
- *
  * Abstract base class for <tt>ConnectionAwareSession</tt> implementations.
  * Provides support for registering <tt>FlexSessionConnectivityListener</tt>s
  * along with protected methods to notify registered listeners of <tt>FlexSessionConnectivityEvent</tt>s.
  */
-public abstract class AbstractConnectionAwareSession extends FlexSession implements ConnectionAwareSession
-{
+public abstract class AbstractConnectionAwareSession extends FlexSession implements ConnectionAwareSession {
     //--------------------------------------------------------------------------
     //
     // Properties
@@ -33,16 +31,14 @@
     //--------------------------------------------------------------------------
 
     /**
-     *
      * Constructs a new instance.
      *
      * @param sessionProvider The provider that instantiated this instance.
      */
-    public AbstractConnectionAwareSession(AbstractFlexSessionProvider sessionProvider)
-    {
+    public AbstractConnectionAwareSession(AbstractFlexSessionProvider sessionProvider) {
         super(sessionProvider);
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Properties
@@ -52,7 +48,7 @@
     //----------------------------------
     //  connected
     //----------------------------------
-    
+
     /**
      * Connected flag for the session.
      */
@@ -60,67 +56,58 @@
 
     /**
      * Returns whether the session is connected.
-     * 
+     *
      * @return true if the session is connected; otherwise false.
      */
-    public boolean isConnected()
-    {
-        synchronized (lock)
-        {
+    public boolean isConnected() {
+        synchronized (lock) {
             return connected;
         }
     }
-    
+
     /**
      * Sets the connected state for the session.
-     * 
+     *
      * @param value true for a connected session; false for a disconnected session.
      */
-    public void setConnected(boolean value)
-    {
+    public void setConnected(boolean value) {
         boolean notify = false;
-        synchronized (lock)
-        {
-            if (connected != value)
-            {
+        synchronized (lock) {
+            if (connected != value) {
                 connected = value;
                 notify = true;
             }
         }
-        if (notify)
-        {
+        if (notify) {
             if (!value)
                 notifySessionDisconnected();
             else
                 notifySessionConnected();
         }
     }
-    
+
     //----------------------------------
     //  connectivityListeners
     //----------------------------------
-    
+
     /**
      * The list of connectivity listeners for the session.
      */
     private volatile CopyOnWriteArrayList<FlexSessionConnectivityListener> connectivityListeners;
-    
+
     /**
      * (non-JavaDoc)
+     *
      * @see flex.messaging.ConnectionAwareSession#addConnectivityListener(FlexSessionConnectivityListener)
      */
-    public void addConnectivityListener(FlexSessionConnectivityListener listener)
-    {
-        if (connectivityListeners == null)
-        {
-            synchronized (lock)
-            {
+    public void addConnectivityListener(FlexSessionConnectivityListener listener) {
+        if (connectivityListeners == null) {
+            synchronized (lock) {
                 if (connectivityListeners == null)
-                    connectivityListeners = new CopyOnWriteArrayList<FlexSessionConnectivityListener>(); 
+                    connectivityListeners = new CopyOnWriteArrayList<FlexSessionConnectivityListener>();
             }
         }
-        if (connectivityListeners.addIfAbsent(listener) && isConnected())
-        {
+        if (connectivityListeners.addIfAbsent(listener) && isConnected()) {
             // If the listener is added when the session has already connected, notify it at add time.
             FlexSessionConnectivityEvent event = new FlexSessionConnectivityEvent(this);
             listener.sessionConnected(event);
@@ -129,43 +116,39 @@
 
     /**
      * (non-JavaDoc)
+     *
      * @see flex.messaging.ConnectionAwareSession#removeConnectivityListener(FlexSessionConnectivityListener)
      */
-    public void removeConnectivityListener(FlexSessionConnectivityListener listener)
-    {
+    public void removeConnectivityListener(FlexSessionConnectivityListener listener) {
         if (connectivityListeners == null) return;
         connectivityListeners.remove(listener);
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Protected Methods
     //
     //--------------------------------------------------------------------------    
-    
+
     /**
      * Notifies registered <tt>FlexSessionConnectivityListener</tt>s that the session has connected.
      */
-    protected void notifySessionConnected()
-    {
-        if (connectivityListeners != null)
-        {
+    protected void notifySessionConnected() {
+        if (connectivityListeners != null) {
             FlexSessionConnectivityEvent event = new FlexSessionConnectivityEvent(this);
             for (FlexSessionConnectivityListener listener : connectivityListeners)
                 listener.sessionDisconnected(event);
         }
     }
-    
+
     /**
      * Notifies registered <tt>FlexSessionConnectivityListener</tt>s that the session has disconnected.
      */
-    protected void notifySessionDisconnected()
-    {
-        if (connectivityListeners != null)
-        {
+    protected void notifySessionDisconnected() {
+        if (connectivityListeners != null) {
             FlexSessionConnectivityEvent event = new FlexSessionConnectivityEvent(this);
             for (FlexSessionConnectivityListener listener : connectivityListeners)
-                listener.sessionDisconnected(event);            
+                listener.sessionDisconnected(event);
         }
-    }    
+    }
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/AbstractFlexSessionProvider.java b/core/src/main/java/flex/messaging/AbstractFlexSessionProvider.java
index 07c17be..a05c3ca 100644
--- a/core/src/main/java/flex/messaging/AbstractFlexSessionProvider.java
+++ b/core/src/main/java/flex/messaging/AbstractFlexSessionProvider.java
@@ -19,14 +19,12 @@
 import flex.messaging.config.ConfigMap;
 
 /**
- *
  * Base for FlexSessionProvider implementations.
  * Providers are protocol-specific factories for concrete FlexSession implementations.
  * They are registered with a FlexSessionManager, which acts as the central point of control
  * for tracking all active FlexSessions and for dispatching creation events to FlexSessionListeners.
  */
-public abstract class AbstractFlexSessionProvider implements FlexComponent
-{
+public abstract class AbstractFlexSessionProvider implements FlexComponent {
     //--------------------------------------------------------------------------
     //
     // Variables
@@ -37,7 +35,7 @@
      * Instance lock.
      */
     protected final Object lock = new Object();
-    
+
     //--------------------------------------------------------------------------
     //
     // Properties
@@ -49,47 +47,43 @@
     //----------------------------------
 
     private volatile FlexSessionManager flexSessionManager;
-    
+
     /**
      * Returns the <tt>FlexSessionManager</tt> this provider is currently registered to.
-     * 
+     *
      * @return The <tt>FlexSessionManager</tt> this provider is currently registered to.
      */
-    public FlexSessionManager getFlexSessionManager()
-    {
+    public FlexSessionManager getFlexSessionManager() {
         return flexSessionManager;
     }
-    
+
     /**
      * Sets the <tt>FlexSessionManager</tt> this provider is registered to.
-     * 
+     *
      * @param value The <tt>FlexSessionManager</tt> this provider is registered to.
      */
-    public void setFlexSessionManager(final FlexSessionManager value)
-    {
+    public void setFlexSessionManager(final FlexSessionManager value) {
         flexSessionManager = value;
     }
-    
+
     //----------------------------------
     //  logCategory
     //----------------------------------
 
-    private boolean started;    
-    
+    private boolean started;
+
     /**
      * Indicates whether the component is started and running.
-     * 
-     * @return <code>true</code> if the component has started; 
-     *         otherwise <code>false</code>.
+     *
+     * @return <code>true</code> if the component has started;
+     * otherwise <code>false</code>.
      */
-    public boolean isStarted()
-    {
-        synchronized (lock)
-        {
+    public boolean isStarted() {
+        synchronized (lock) {
             return started;
         }
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Public Methods
@@ -99,47 +93,41 @@
     /**
      * Initializes the component with configuration information.
      *
-     * @param id The id of the component.
+     * @param id        The id of the component.
      * @param configMap The properties for configuring component.
      */
-    public void initialize(final String id, final ConfigMap configMap)
-    {
+    public void initialize(final String id, final ConfigMap configMap) {
         // No-op.
     }
-    
+
     /**
      * Removes a <tt>FlexSession</tt> created by this provider.
      * This callback is invoked by <tt>FlexSession</tt>s when they are invalidated.
      *
      * @param session The <tt>FlexSession</tt> being invalidated.
      */
-    public void removeFlexSession(final FlexSession session)
-    {
+    public void removeFlexSession(final FlexSession session) {
         FlexSessionManager manager = getFlexSessionManager();
         if (manager != null)
             manager.unregisterFlexSession(session);
     }
-    
+
     /**
      * Invoked to start the component.
      * This base implementation changes the components state such that {@link #isStarted()} returns true.
      */
-    public void start()
-    {
-        synchronized (lock)
-        {
+    public void start() {
+        synchronized (lock) {
             started = true;
         }
     }
-    
+
     /**
      * Invoked to stop the component.
      * This base implementation changes the components state such that {@link #isStarted()} returns false.
      */
-    public void stop()
-    {
-        synchronized (lock)
-        {
+    public void stop() {
+        synchronized (lock) {
             started = false;
         }
     }
diff --git a/core/src/main/java/flex/messaging/ConnectionAwareSession.java b/core/src/main/java/flex/messaging/ConnectionAwareSession.java
index 41132f2..9d4d9fd 100644
--- a/core/src/main/java/flex/messaging/ConnectionAwareSession.java
+++ b/core/src/main/java/flex/messaging/ConnectionAwareSession.java
@@ -20,43 +20,42 @@
  * Sessions that directly track their connection state support notifying interested
  * listeners of connectivity changes.
  */
-public interface ConnectionAwareSession
-{
+public interface ConnectionAwareSession {
     //----------------------------------
     //  connected
     //----------------------------------
 
     /**
      * Returns true if the session is connected; otherwise false.
-     * 
+     *
      * @return true if the session is connected; otherwise false.
      */
     boolean isConnected();
-    
+
     /**
      * Sets the connected state for the session.
-     * 
+     *
      * @param value true if the session is connected; false if disconnected.
      */
     void setConnected(boolean value);
-    
+
     //----------------------------------
     //  connectivityListeners
     //----------------------------------
-    
+
     /**
      * Registers a session connectivity listener with the session.
      * This listener will be notified when the session acquires or looses connectivity
      * to the remote host.
-     * 
+     *
      * @param listener The <tt>FlexSessionConnectivityListener</tt> to register with the session.
      */
     void addConnectivityListener(FlexSessionConnectivityListener listener);
-    
+
     /**
      * Unregisters a session connectivity listener from the session.
      * The unregistered listener will no longer be notified of session connectivity changes.
-     * 
+     *
      * @param listener The <tt>FlexSessionConnectivityListener</tt> to unregister from the session.
      */
     void removeConnectivityListener(FlexSessionConnectivityListener listener);
diff --git a/core/src/main/java/flex/messaging/Destination.java b/core/src/main/java/flex/messaging/Destination.java
index 312e371..fc8a733 100644
--- a/core/src/main/java/flex/messaging/Destination.java
+++ b/core/src/main/java/flex/messaging/Destination.java
@@ -36,18 +36,22 @@
 import flex.messaging.config.ConfigurationException;
 import flex.messaging.config.NetworkSettings;
 import flex.messaging.config.SecurityConstraint;
+
 /**
  * The <code>Destination</code> class is a source and sink for messages sent through
  * a service destination and uses an adapter to process messages.
  */
-public class Destination extends ManageableComponent implements java.io.Serializable
-{
+public class Destination extends ManageableComponent implements java.io.Serializable {
     static final long serialVersionUID = -977001797620881435L;
 
-    /** Default log category for <code>Destination</code>. */
+    /**
+     * Default log category for <code>Destination</code>.
+     */
     public static final String LOG_CATEGORY = LogCategories.SERVICE_GENERAL;
-    
-    /** Hard coded id for the push destination */
+
+    /**
+     * Hard coded id for the push destination
+     */
     public static final String PUSH_DESTINATION_ID = "_DS_PUSH_";
 
     // Errors
@@ -73,8 +77,7 @@
     /**
      * Constructs an unmanaged <code>Destination</code> instance.
      */
-    public Destination()
-    {
+    public Destination() {
         this(false);
     }
 
@@ -82,10 +85,9 @@
      * Constructs a <code>Destination</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>Destination</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public Destination(boolean enableManagement)
-    {
+    public Destination(boolean enableManagement) {
         super(enableManagement);
 
         networkSettings = new NetworkSettings();
@@ -101,29 +103,25 @@
      * Initializes the <code>Destination</code> with the properties.
      * If subclasses override, they must call <code>super.initialize()</code>.
      *
-     * @param id The id of the destination.
+     * @param id         The id of the destination.
      * @param properties Properties for the destination.
      */
     @Override
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
-        if (properties == null || properties.size() == 0)
-        {
+        if (properties == null || properties.size() == 0) {
             initialized = true;
             return;
         }
 
         ConfigMap network = properties.getPropertyAsMap(NetworkSettings.NETWORK_ELEMENT, null);
 
-        if (network != null)
-        {
+        if (network != null) {
             networkSettings.setReliable(network.getPropertyAsBoolean(NetworkSettings.RELIABLE_ELEMENT, false));
 
             ConfigMap clusterInfo = network.getPropertyAsMap(ClusterSettings.CLUSTER_ELEMENT, null);
-            if (clusterInfo != null)
-            {
+            if (clusterInfo != null) {
                 // Mark these as used so we do not get warnings about them.
                 network.allowProperty(ClusterSettings.CLUSTER_ELEMENT);
                 clusterInfo.allowProperty(ClusterSettings.REF_ATTR);
@@ -142,12 +140,11 @@
     }
 
     /**
-     *  Returns whether or not the destination has been initialized.
+     * Returns whether or not the destination has been initialized.
      *
      * @return True, if the destination has been initialized.
      */
-    public boolean isInitialized()
-    {
+    public boolean isInitialized() {
         return initialized;
     }
 
@@ -156,22 +153,17 @@
      * it is started. If subclasses override, they must call <code>super.validate()</code>.
      */
     @Override
-    protected void validate()
-    {
+    protected void validate() {
         if (isValid())
             return;
 
         super.validate();
 
-        if (getAdapter() == null)
-        {
+        if (getAdapter() == null) {
             String defaultAdapterId = getService().getDefaultAdapter();
-            if (defaultAdapterId != null)
-            {
+            if (defaultAdapterId != null) {
                 createAdapter(defaultAdapterId);
-            }
-            else
-            {
+            } else {
                 invalidate();
                 // Destination '{id}' must specify at least one adapter.
                 ConfigurationException ex = new ConfigurationException();
@@ -180,19 +172,15 @@
             }
         }
 
-        if (channelIds != null)
-        {
+        if (channelIds != null) {
             List<String> brokerChannelIds = getService().getMessageBroker().getChannelIds();
-            for (Iterator<String> iter = channelIds.iterator(); iter.hasNext();)
-            {
+            for (Iterator<String> iter = channelIds.iterator(); iter.hasNext(); ) {
                 String id = iter.next();
-                if (brokerChannelIds == null || !brokerChannelIds.contains(id))
-                {
+                if (brokerChannelIds == null || !brokerChannelIds.contains(id)) {
                     iter.remove();
-                    if (Log.isWarn())
-                    {
+                    if (Log.isWarn()) {
                         Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." +
-                                " Removing the channel.",
+                                        " Removing the channel.",
                                 new Object[]{id});
                     }
                 }
@@ -200,15 +188,11 @@
         }
 
         // Set the default channels if needed
-        if (channelIds == null)
-        {
+        if (channelIds == null) {
             List<String> defaultChannelIds = getService().getDefaultChannels();
-            if (defaultChannelIds != null && defaultChannelIds.size() > 0)
-            {
+            if (defaultChannelIds != null && defaultChannelIds.size() > 0) {
                 setChannels(defaultChannelIds);
-            }
-            else
-            {
+            } else {
                 invalidate();
                 // Destination '{id}' must specify at least one channel.
                 ConfigurationException ex = new ConfigurationException();
@@ -220,8 +204,7 @@
         MessageBroker broker = getService().getMessageBroker();
 
         // Validate the security constraint
-        if (securityConstraint == null && securityConstraintRef != null)
-        {
+        if (securityConstraint == null && securityConstraintRef != null) {
             securityConstraint = broker.getSecurityConstraint(securityConstraintRef);
             // No need to throw an error as MessageBroker automatically throws
             // an error if no such constraint exists
@@ -230,8 +213,7 @@
         ClusterManager cm = broker.getClusterManager();
 
         // Set clustering if needed
-        if (getNetworkSettings().getClusterId() != null || cm.getDefaultClusterId() != null)
-        {
+        if (getNetworkSettings().getClusterId() != null || cm.getDefaultClusterId() != null) {
             cm.clusterDestination(this);
         }
     }
@@ -243,10 +225,8 @@
      * override, they must call <code>super.start()</code>.
      */
     @Override
-    public void start()
-    {
-        if (isStarted())
-        {
+    public void start() {
+        if (isStarted()) {
             // Needed for adapters added after startup.
             getAdapter().start();
             return;
@@ -254,22 +234,19 @@
 
         // Check if the Service is started
         Service service = getService();
-        if (!service.isStarted())
-        {
-            if (Log.isWarn())
-            {
+        if (!service.isStarted()) {
+            if (Log.isWarn()) {
                 Log.getLogger(getLogCategory()).warn("Destination with id '{0}' cannot be started" +
-                        " when its Service with id '{1}' is not started.",
+                                " when its Service with id '{1}' is not started.",
                         new Object[]{getId(), service.getId()});
             }
             return;
         }
 
         // Set up management
-        if (isManaged() && service.isManaged())
-        {
+        if (isManaged() && service.isManaged()) {
             setupDestinationControl(service);
-            ServiceControl controller = (ServiceControl)service.getControl();
+            ServiceControl controller = (ServiceControl) service.getControl();
             if (getControl() != null)
                 controller.addDestination(getControl().getObjectName());
         }
@@ -283,11 +260,9 @@
      * The default implementation of this method stops all of the adapters
      * of the destination.
      * If subclasses override, they must call <code>super.stop()</code>.
-     *
      */
     @Override
-    public void stop()
-    {
+    public void stop() {
         if (!isStarted())
             return;
 
@@ -296,10 +271,8 @@
         super.stop();
 
         // Remove management
-        if (isManaged() && getService().isManaged())
-        {
-            if (getControl() != null)
-            {
+        if (isManaged() && getService().isManaged()) {
+            if (getControl() != null) {
                 getControl().unregister();
                 setControl(null);
             }
@@ -319,8 +292,7 @@
      *
      * @return The <code>ServiceAdapter</code> for the <code>Destination</code>.
      */
-    public ServiceAdapter getAdapter()
-    {
+    public ServiceAdapter getAdapter() {
         return adapter;
     }
 
@@ -329,7 +301,7 @@
      * if the <code>Destination</code> that created it is manageable,
      * and set its <code>Destination</code> to the <code>Destination</code> that
      * created it.
-     *
+     * <p>
      * In order to use this method, <code>Destination</code> should have an assigned
      * <code>Service</code> and the id provided for the adapter should already
      * be registered with the <code>Service</code>.
@@ -337,18 +309,15 @@
      * @param id The id of the <code>ServiceAdapter</code>.
      * @return The <code>ServiceAdapter</code> instanced created.
      */
-    public ServiceAdapter createAdapter(String id)
-    {
-        if (getService() == null)
-        {
+    public ServiceAdapter createAdapter(String id) {
+        if (getService() == null) {
             // Destination cannot create adapter '{0}' without its Service set.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(NO_SERVICE, new Object[]{id});
             throw ex;
         }
         Map<String, String> adapterClasses = getService().getRegisteredAdapters();
-        if (!adapterClasses.containsKey(id))
-        {
+        if (!adapterClasses.containsKey(id)) {
             // No adapter with id '{0}' is registered with the service '{1}'.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.UNREGISTERED_ADAPTER, new Object[]{id, getService().getId()});
@@ -358,9 +327,9 @@
         String adapterClassName = adapterClasses.get(id);
         Class<?> adapterClass = ClassUtil.createClass(adapterClassName,
                 FlexContext.getMessageBroker() == null ?
-                      null : FlexContext.getMessageBroker().getClassLoader());
+                        null : FlexContext.getMessageBroker().getClassLoader());
 
-        ServiceAdapter adapter = (ServiceAdapter)ClassUtil.createDefaultInstance(adapterClass, ServiceAdapter.class);
+        ServiceAdapter adapter = (ServiceAdapter) ClassUtil.createDefaultInstance(adapterClass, ServiceAdapter.class);
         adapter.setId(id);
         adapter.setManaged(isManaged());
         adapter.setDestination(this);
@@ -376,13 +345,11 @@
      *
      * @param adapter The adapter for the destination.
      */
-    public void setAdapter(ServiceAdapter adapter)
-    {
+    public void setAdapter(ServiceAdapter adapter) {
         if (getAdapter() == adapter) // No need to reset the adapter.
             return;
 
-        if (adapter == null)
-        {
+        if (adapter == null) {
             removeAdapter();
             return;
         }
@@ -396,8 +363,7 @@
      *
      * @param adapter The adapter for the destination.
      */
-    private void addAdapter(ServiceAdapter adapter)
-    {
+    private void addAdapter(ServiceAdapter adapter) {
         removeAdapter();
 
         this.adapter = adapter;
@@ -410,11 +376,9 @@
      * Used by setAdapter and addAdapter. It removes the current adapter
      * of the destination
      */
-    private void removeAdapter()
-    {
+    private void removeAdapter() {
         ServiceAdapter adapter = getAdapter();
-        if (adapter != null)
-        {
+        if (adapter != null) {
             adapter.stop();
         }
         this.adapter = null;
@@ -432,8 +396,7 @@
      * @return <code>true</code> if the clustered <code>Destination</code> shares a common backend;
      * otherwise <code>false</code>.
      */
-    public boolean isBackendShared()
-    {
+    public boolean isBackendShared() {
         if (!isStarted())
             return false;
 
@@ -446,8 +409,7 @@
      *
      * @return The list of channel ids of the <code>Destination</code>.
      */
-    public List<String> getChannels()
-    {
+    public List<String> getChannels() {
         return channelIds;
     }
 
@@ -458,22 +420,18 @@
      *
      * @param id The id of the channel.
      */
-    public void addChannel(String id)
-    {
+    public void addChannel(String id) {
         if (channelIds == null)
             channelIds = new ArrayList<String>();
         else if (channelIds.contains(id))
             return;
 
-        if (isStarted())
-        {
+        if (isStarted()) {
             List<String> brokerChannelIds = getService().getMessageBroker().getChannelIds();
-            if (brokerChannelIds == null || !brokerChannelIds.contains(id))
-            {
-                if (Log.isWarn())
-                {
+            if (brokerChannelIds == null || !brokerChannelIds.contains(id)) {
+                if (Log.isWarn()) {
                     Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." +
-                            " Not adding the channel.",
+                                    " Not adding the channel.",
                             new Object[]{id});
                 }
                 return;
@@ -490,8 +448,7 @@
      * @param id The id of the channel.
      * @return <code>true</code> if the list contained the channel id.
      */
-    public boolean removeChannel(String id)
-    {
+    public boolean removeChannel(String id) {
         return channelIds != null && channelIds.remove(id);
     }
 
@@ -502,21 +459,16 @@
      *
      * @param ids List of channel ids.
      */
-    public void setChannels(List<String> ids)
-    {
-        if (ids != null && isStarted())
-        {
+    public void setChannels(List<String> ids) {
+        if (ids != null && isStarted()) {
             List<String> brokerChannelIds = getService().getMessageBroker().getChannelIds();
-            for (Iterator<String> iter = ids.iterator(); iter.hasNext();)
-            {
+            for (Iterator<String> iter = ids.iterator(); iter.hasNext(); ) {
                 String id = iter.next();
-                if (brokerChannelIds == null || !brokerChannelIds.contains(id))
-                {
+                if (brokerChannelIds == null || !brokerChannelIds.contains(id)) {
                     iter.remove();
-                    if (Log.isWarn())
-                    {
+                    if (Log.isWarn()) {
                         Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." +
-                                " Not adding the channel.",
+                                        " Not adding the channel.",
                                 new Object[]{id});
                     }
                 }
@@ -535,13 +487,11 @@
      *
      * @return <code>true</code> if the <code>Destination</code> is clustered; otherwise <code>false</code>.
      */
-    public boolean isClustered()
-    {
+    public boolean isClustered() {
         if (!isStarted())
             return false;
 
-        if (!clusteredCalculated)
-        {
+        if (!clusteredCalculated) {
             ClusterManager clm = getService().getMessageBroker().getClusterManager();
             clustered = clm.isDestinationClustered(getService().getClass().getName(), getId());
             clusteredCalculated = true;
@@ -557,16 +507,14 @@
      * @param id The id of the <code>Destination</code>.
      */
     @Override
-    public void setId(String id)
-    {
+    public void setId(String id) {
         String oldId = getId();
 
         super.setId(id);
 
         // Update the destination id in the service and MessageBroker
         Service service = getService();
-        if (service != null)
-        {
+        if (service != null) {
             service.removeDestination(oldId);
             service.addDestination(this);
         }
@@ -577,8 +525,7 @@
      *
      * @return The <code>NetworkSettings</code> of the <code>Destination</code>.
      */
-    public NetworkSettings getNetworkSettings()
-    {
+    public NetworkSettings getNetworkSettings() {
         return networkSettings;
     }
 
@@ -587,8 +534,7 @@
      *
      * @param networkSettings The <code>NetworkSettings</code> of the <code>Destination</code>.
      */
-    public void setNetworkSettings(NetworkSettings networkSettings)
-    {
+    public void setNetworkSettings(NetworkSettings networkSettings) {
         this.networkSettings = networkSettings;
     }
 
@@ -597,9 +543,8 @@
      *
      * @return The <code>Service</code> managing this <code>Destination</code>.
      */
-    public Service getService()
-    {
-        return (Service)getParent();
+    public Service getService() {
+        return (Service) getParent();
     }
 
     /**
@@ -609,8 +554,7 @@
      *
      * @param service The <code>Service</code> managing this <code>Destination</code>.
      */
-    public void setService(Service service)
-    {
+    public void setService(Service service) {
         Service oldService = getService();
 
         setParent(service);
@@ -630,10 +574,9 @@
      *
      * @return The Java class name for the <code>Service</code> manageing this <code>Destination</code>.
      */
-    public String getServiceType()
-    {
+    public String getServiceType() {
         Service service = getService();
-        return service != null? service.getClass().getName() : null;
+        return service != null ? service.getClass().getName() : null;
     }
 
     /**
@@ -644,8 +587,7 @@
      *
      * @return The <code>SecurityConstraint</code> of the <code>Destination</code>.
      */
-    public SecurityConstraint getSecurityConstraint()
-    {
+    public SecurityConstraint getSecurityConstraint() {
         return securityConstraint;
     }
 
@@ -654,8 +596,7 @@
      *
      * @param securityConstraint The <code>SecurityConstraint</code> of the <code>Destination</code>.
      */
-    public void setSecurityConstraint(SecurityConstraint securityConstraint)
-    {
+    public void setSecurityConstraint(SecurityConstraint securityConstraint) {
         this.securityConstraint = securityConstraint;
     }
 
@@ -667,10 +608,8 @@
      *
      * @param ref <code>SecurityConstraint</code> reference.
      */
-    public void setSecurityConstraint(String ref)
-    {
-        if (isStarted())
-        {
+    public void setSecurityConstraint(String ref) {
+        if (isStarted()) {
             MessageBroker msgBroker = getService().getMessageBroker();
             securityConstraint = msgBroker.getSecurityConstraint(ref);
             // No need to throw an error as MessageBroker automatically throws
@@ -691,8 +630,7 @@
      * @return A <tt>ConfigMap</tt> of destination properties that the client needs.
      * @see flex.messaging.Destination#describeDestination(boolean)
      */
-    public ConfigMap describeDestination()
-    {
+    public ConfigMap describeDestination() {
         return describeDestination(true);
     }
 
@@ -704,8 +642,7 @@
      * @param onlyReliable Determines whether only reliable destination configuration should be returned.
      * @return A <tt>ConfigMap</tt> of destination properties that the client needs.
      */
-    public ConfigMap describeDestination(boolean onlyReliable)
-    {
+    public ConfigMap describeDestination(boolean onlyReliable) {
         boolean reliable = networkSettings != null && networkSettings.isReliable();
         if (onlyReliable && !reliable)
             return null;
@@ -714,8 +651,7 @@
         destinationConfig.addProperty(ConfigurationConstants.ID_ATTR, getId());
 
         // Include network settings if reliability for the destination is enabled.
-        if (reliable)
-        {
+        if (reliable) {
             ConfigMap properties = new ConfigMap();
             ConfigMap network = new ConfigMap();
 
@@ -730,8 +666,7 @@
         }
 
         ConfigMap channelsConfig = new ConfigMap();
-        for (String id : channelIds)
-        {
+        for (String id : channelIds) {
             ConfigMap channelConfig = new ConfigMap();
             channelConfig.addProperty(ConfigurationConstants.REF_ATTR, id);
             channelsConfig.addProperty(ConfigurationConstants.CHANNEL_ELEMENT, channelConfig);
@@ -746,13 +681,11 @@
     /**
      * Method for setting an extra property for the destination at runtime.
      *
-     * @param name The name of the property.
+     * @param name  The name of the property.
      * @param value The value of the property.
      */
-    public void addExtraProperty(String name, Object value)
-    {
-        if (extraProperties == null)
-        {
+    public void addExtraProperty(String name, Object value) {
+        if (extraProperties == null) {
             extraProperties = new HashMap<String, Object>();
         }
 
@@ -765,9 +698,8 @@
      * @param name The name of the property.
      * @return The value of the property or null if the property does not exist.
      */
-    public Object getExtraProperty(String name)
-    {
-        return extraProperties != null? extraProperties.get(name) : null;
+    public Object getExtraProperty(String name) {
+        return extraProperties != null ? extraProperties.get(name) : null;
     }
 
     //--------------------------------------------------------------------------
@@ -783,8 +715,7 @@
      * @return The log category.
      */
     @Override
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -794,8 +725,7 @@
      *
      * @param service The <code>Service</code> that manages this <code>Destination</code>.
      */
-    protected void setupDestinationControl(Service service)
-    {
+    protected void setupDestinationControl(Service service) {
         // Manageable subclasses should override this template method.
         setManaged(false);
     }
diff --git a/core/src/main/java/flex/messaging/DestructibleFlexFactory.java b/core/src/main/java/flex/messaging/DestructibleFlexFactory.java
index d9c6a1e..5715432 100644
--- a/core/src/main/java/flex/messaging/DestructibleFlexFactory.java
+++ b/core/src/main/java/flex/messaging/DestructibleFlexFactory.java
@@ -20,15 +20,13 @@
  * Implementors of <code>FlexFactory</code> should also implement this interface
  * if their factory has custom destruction behavior.
  */
-public interface DestructibleFlexFactory 
-{    
+public interface DestructibleFlexFactory {
     /**
      * This method is called when a component that uses this factory is removed.
      * This method gives the factory a chance to clean up resources that may have
      * been allocated for the component and may now be ready for destruction.
-     * 
-     * @param instanceInfo The FactoryInstance to be destroyed
      *
+     * @param instanceInfo The FactoryInstance to be destroyed
      */
     void destroyFactoryInstance(FactoryInstance instanceInfo);
 }
diff --git a/core/src/main/java/flex/messaging/FactoryDestination.java b/core/src/main/java/flex/messaging/FactoryDestination.java
index 2857e3c..eac494b 100644
--- a/core/src/main/java/flex/messaging/FactoryDestination.java
+++ b/core/src/main/java/flex/messaging/FactoryDestination.java
@@ -20,78 +20,75 @@
 import flex.messaging.config.ConfigurationException;
 import flex.messaging.log.Log;
 
-public abstract class FactoryDestination extends Destination
-{   
-    private static final String FACTORY = "factory";       
+public abstract class FactoryDestination extends Destination {
+    private static final String FACTORY = "factory";
     private static final String DEFAULT_FACTORY = "java";
-    
+
     // Errors
     private static int INVALID_FACTORY = 11103;
     private static int FACTORY_CANNOT_BE_RETURNED = 11118;
-    
+
     // FactoryDestination's properties 
     private FlexFactory factory;
     private String source;
     private String scope = FlexFactory.SCOPE_REQUEST;
-    
+
     // FactoryDestination internal
     private String factoryId = DEFAULT_FACTORY;
-    private FactoryInstance factoryInstance; 
+    private FactoryInstance factoryInstance;
     private ConfigMap factoryProperties;
-    
+
     //--------------------------------------------------------------------------
     //
     // Constructor
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Constructs an unmanaged <code>FactoryDestination</code> instance.
      */
-    public FactoryDestination()
-    {
+    public FactoryDestination() {
         this(false);
     }
-    
+
     /**
      * Constructs a <code>FactoryDestination</code> with the indicated management.
-     * 
+     *
      * @param enableManagement <code>true</code> if the <code>FactoryDestination</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public FactoryDestination(boolean enableManagement)
-    {
+    public FactoryDestination(boolean enableManagement) {
         super(enableManagement);
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Initialize, validate, start, and stop methods. 
     //
     //--------------------------------------------------------------------------
-    
+
     /**
-     * Initializes the <code>FactoryDestination</code> with the properties. 
-     * @param id the factory id
+     * Initializes the <code>FactoryDestination</code> with the properties.
+     *
+     * @param id         the factory id
      * @param properties Properties for the <code>FactoryDestination</code>.
      */
-    public void initialize(String id, ConfigMap properties)
-    {  
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
-        
+
         if (properties == null || properties.size() == 0)
             return;
 
         // Need to cache this for later. TODO: We shouldn't need to do this.
         factoryProperties = properties;
 
-        factoryId = properties.getPropertyAsString(FACTORY, factoryId);        
+        factoryId = properties.getPropertyAsString(FACTORY, factoryId);
         scope = properties.getPropertyAsString(FlexFactory.SCOPE, scope);
         source = properties.getPropertyAsString(FlexFactory.SOURCE, source);
 
         if (source == null)
             source = getId();
-        
+
         if (factory != null)
             factory.initialize(getId(), factoryProperties);
     }
@@ -100,34 +97,30 @@
      * Verifies that the <code>FactoryDestination</code> is in valid state before
      * it is started.
      */
-    protected void validate()
-    {               
+    protected void validate() {
         if (isValid())
-            return; 
-       
+            return;
+
         super.validate();
 
-        if (factory == null)
-        {
-            if (factoryId == null)
-            {
+        if (factory == null) {
+            if (factoryId == null) {
                 factoryId = DEFAULT_FACTORY;
             }
             MessageBroker broker = getService().getMessageBroker();
             FlexFactory f = broker.getFactory(factoryId);
-            if (f == null)
-            {
+            if (f == null) {
                 ConfigurationException ex = new ConfigurationException();
-                ex.setMessage(INVALID_FACTORY, new Object[] {getId(), factoryId});
+                ex.setMessage(INVALID_FACTORY, new Object[]{getId(), factoryId});
                 throw ex;
             }
             factory = f;
         }
-        
+
         if (scope == null)
             scope = FlexFactory.SCOPE_REQUEST;
-        
-        if (source == null)        
+
+        if (source == null)
             source = getId();
     }
 
@@ -136,41 +129,36 @@
     // Public Getters and Setters for Destination properties
     //         
     //--------------------------------------------------------------------------    
-    
+
     /**
      * Returns the factory of the <code>FactoryDestination</code>. Before a valid
      * <code>FlexFactory</code> can be returned, <code>MessageBroker</code> and
      * hence <code>Service</code> of the <code>Destination</code> has to be set.
+     *
      * @return FlexFactory the FlexFactory object
      */
-    public FlexFactory getFactory()
-    {
-        if (factory == null)
-        {
-            if (factoryId == null)
-            {
+    public FlexFactory getFactory() {
+        if (factory == null) {
+            if (factoryId == null) {
                 factoryId = DEFAULT_FACTORY;
             }
-            if (getService() == null)
-            {
+            if (getService() == null) {
                 // Factory cannot be returned without ''{0}'' set.
                 ConfigurationException ex = new ConfigurationException();
-                ex.setMessage(FACTORY_CANNOT_BE_RETURNED, new Object[] {"Service"});
+                ex.setMessage(FACTORY_CANNOT_BE_RETURNED, new Object[]{"Service"});
                 throw ex;
             }
-            if (getService().getMessageBroker() == null)
-            {
+            if (getService().getMessageBroker() == null) {
                 // Factory cannot be returned without ''{0}'' set.
                 ConfigurationException ex = new ConfigurationException();
-                ex.setMessage(FACTORY_CANNOT_BE_RETURNED, new Object[] {"MessageBroker"});
+                ex.setMessage(FACTORY_CANNOT_BE_RETURNED, new Object[]{"MessageBroker"});
                 throw ex;
             }
             MessageBroker broker = getService().getMessageBroker();
             FlexFactory f = broker.getFactory(factoryId);
-            if (f == null)
-            {
+            if (f == null) {
                 ConfigurationException ex = new ConfigurationException();
-                ex.setMessage(INVALID_FACTORY, new Object[] {getId(), factoryId});
+                ex.setMessage(INVALID_FACTORY, new Object[]{getId(), factoryId});
                 throw ex;
             }
             factory = f;
@@ -179,59 +167,54 @@
     }
 
     /**
-     * Sets the factory of the <code>FactoryDestination</code>. 
+     * Sets the factory of the <code>FactoryDestination</code>.
      * <code>MessageBroker</code> has to know the factory before it can be
-     * assigned to the destination. 
-     * 
+     * assigned to the destination.
+     *
      * @param id The id of the factory.
-     */    
-    public void setFactory(String id)
-    {        
-        if (isStarted())
-        {
+     */
+    public void setFactory(String id) {
+        if (isStarted()) {
             MessageBroker broker = getService().getMessageBroker();
             FlexFactory factory = broker.getFactory(id);
-            if (factory == null)
-            {
+            if (factory == null) {
                 ConfigurationException ex = new ConfigurationException();
-                ex.setMessage(INVALID_FACTORY, new Object[] {getId(), factory});
+                ex.setMessage(INVALID_FACTORY, new Object[]{getId(), factory});
                 throw ex;
             }
             setFactory(factory);
         }
         factoryId = id;
     }
-    
+
     /**
-     * Sets the factory of the <code>FactoryDestination</code>. 
-     * 
+     * Sets the factory of the <code>FactoryDestination</code>.
+     *
      * @param factory the FlexFactory object
      */
-    public void setFactory(FlexFactory factory)
-    {
+    public void setFactory(FlexFactory factory) {
         this.factory = factory;
     }
-    
+
     /**
-     * Returns the <code>FactoryInstance</code>. <code>FactoryInstance</code> 
+     * Returns the <code>FactoryInstance</code>. <code>FactoryInstance</code>
      * stores configuration state used for retrieving an instance from
      * the factory. This needs to be called after calling <code>setSource</code>
      * and <code>setScope</code> methods.
-     * @return FactoryInstance current FactoryInstance object 
+     *
+     * @return FactoryInstance current FactoryInstance object
      */
-    public FactoryInstance getFactoryInstance()
-    {
+    public FactoryInstance getFactoryInstance() {
         // This is needed for HibernateAssembler
         return getFactoryInstance(factoryProperties);
     }
-    
+
     /**
      * Returns a <code>FactoryInstance</code> using the properties passed in.
-     * 
-     * @param properties Properties to be used while creating the <code>FactoryInstance</code>. 
+     *
+     * @param properties Properties to be used while creating the <code>FactoryInstance</code>.
      */
-    private FactoryInstance getFactoryInstance(ConfigMap properties)
-    {
+    private FactoryInstance getFactoryInstance(ConfigMap properties) {
         // Automatically create a factory instance if not already set  
         if (factoryInstance == null)
             factoryInstance = createFactoryInstance(properties);
@@ -241,27 +224,25 @@
 
     /**
      * Creates a factory instance using the properties passed in.
-     * 
-     * @param properties Properties to be used while creating the <code>FactoryInstance</code>. 
+     *
+     * @param properties Properties to be used while creating the <code>FactoryInstance</code>.
      */
-    private FactoryInstance createFactoryInstance(ConfigMap properties)
-    {   
+    private FactoryInstance createFactoryInstance(ConfigMap properties) {
         if (properties == null)
             properties = new ConfigMap();
-        
+
         properties.put(FlexFactory.SOURCE, source);
         properties.put(FlexFactory.SCOPE, scope);
         FactoryInstance factoryInstance = getFactory().createFactoryInstance(getId(), properties);
         return factoryInstance;
     }
-    
+
     /**
      * Returns the scope of the <code>FactoryDestination</code>.
-     * 
+     *
      * @return scope of the <code>FactoryDestination</code>.
      */
-    public String getScope()
-    {
+    public String getScope() {
         return scope;
     }
 
@@ -269,73 +250,64 @@
      * Sets the scope of the <code>FactoryDestination</code> that is used
      * in <code>FactoryInstance</code> creation. Scope cannot be changed to and
      * from application scope once <code>FactoryInstance</code> is initialized.
-     * 
+     *
      * @param scope the scope
      */
-    public void setScope(String scope)
-    {        
-        if (factoryInstance != null)
-        {
-            if (FlexFactory.SCOPE_APPLICATION.equals(this.scope) 
-                    && !FlexFactory.SCOPE_APPLICATION.equals(scope))
-            {
+    public void setScope(String scope) {
+        if (factoryInstance != null) {
+            if (FlexFactory.SCOPE_APPLICATION.equals(this.scope)
+                    && !FlexFactory.SCOPE_APPLICATION.equals(scope)) {
                 if (Log.isWarn())
                     Log.getLogger(getLogCategory()).warn(
-                            "Current scope is "+FlexFactory.SCOPE_APPLICATION
-                            +" and it cannot be changed to "+scope
-                            +" once factory instance is initialized.");
+                            "Current scope is " + FlexFactory.SCOPE_APPLICATION
+                                    + " and it cannot be changed to " + scope
+                                    + " once factory instance is initialized.");
                 return;
-            }
-            else if (!FlexFactory.SCOPE_APPLICATION.equals(this.scope) 
-                        && FlexFactory.SCOPE_APPLICATION.equals(scope))
-            {
+            } else if (!FlexFactory.SCOPE_APPLICATION.equals(this.scope)
+                    && FlexFactory.SCOPE_APPLICATION.equals(scope)) {
                 if (Log.isWarn())
                     Log.getLogger(getLogCategory()).warn(
-                            "Current scope is "+this.scope
-                            +" and it cannot be changed to "+FlexFactory.SCOPE_APPLICATION
-                            +" once factory instance is initialized.");
+                            "Current scope is " + this.scope
+                                    + " and it cannot be changed to " + FlexFactory.SCOPE_APPLICATION
+                                    + " once factory instance is initialized.");
                 return;
             }
             factoryInstance.setScope(scope);
         }
         this.scope = scope;
     }
-    
+
     /**
-     * Gets the source of the <code>FactoryDestination</code>. 
-     * 
-     * @return the source of the <code>FactoryDestination</code>. 
+     * Gets the source of the <code>FactoryDestination</code>.
+     *
+     * @return the source of the <code>FactoryDestination</code>.
      */
-    public String getSource()
-    {
+    public String getSource() {
         return source;
     }
 
     /**
      * Sets the source of the <code>FactoryDestination</code> that is used
-     * in <code>FactoryInstance</code> creation. Source cannot be changed once  
+     * in <code>FactoryInstance</code> creation. Source cannot be changed once
      * <code>FactoryInstance</code> is initialized and the scope is application.
-     * 
+     *
      * @param source the source string
      */
-    public void setSource(String source)
-    {   
-        if (factoryInstance != null)     
-        {
-            if (FlexFactory.SCOPE_APPLICATION.equals(scope))
-            {
+    public void setSource(String source) {
+        if (factoryInstance != null) {
+            if (FlexFactory.SCOPE_APPLICATION.equals(scope)) {
                 if (Log.isWarn())
                     Log.getLogger(getLogCategory()).warn(
                             "Source of the destination cannot be changed once "
-                            + "factory instance is already initialized and it has "
-                            + FlexFactory.SCOPE_APPLICATION +" scope");
+                                    + "factory instance is already initialized and it has "
+                                    + FlexFactory.SCOPE_APPLICATION + " scope");
                 return;
-            }            
+            }
             factoryInstance.setSource(source);
         }
         this.source = source;
-    }   
-    
+    }
+
     /**
      * This method first calls stop on its superclass <code>Destination</code> and then
      * removes any assemblers from the ServletContext or Session that are ready for removal.
@@ -344,18 +316,14 @@
      * then it is only removed if its reference count (maintained in <code>MessageBroker</code>) is
      * down to zero
      */
-    public void stop()
-    {
-        if (isStarted())
-        {
+    public void stop() {
+        if (isStarted()) {
             super.stop();
             // destroy factory instance to free up resources
             if (factory != null && (factory instanceof DestructibleFlexFactory))
-                ((DestructibleFlexFactory)factory).destroyFactoryInstance(factoryInstance);    
-        }
-        else
-        {
+                ((DestructibleFlexFactory) factory).destroyFactoryInstance(factoryInstance);
+        } else {
             super.stop();
         }
-    }    
+    }
 }
diff --git a/core/src/main/java/flex/messaging/FactoryInstance.java b/core/src/main/java/flex/messaging/FactoryInstance.java
index e39faed..e19162a 100644
--- a/core/src/main/java/flex/messaging/FactoryInstance.java
+++ b/core/src/main/java/flex/messaging/FactoryInstance.java
@@ -27,8 +27,7 @@
  *
  * @see flex.messaging.FlexFactory
  */
-public class FactoryInstance 
-{
+public class FactoryInstance {
     private static final int INVALID_SCOPE = 10653;
 
     private FlexFactory factory;
@@ -39,20 +38,18 @@
 
     /**
      * Normally FactoryInstances are constructed by Data Services during startup so you
-     * do not need to use this method.  It is typically called from the 
+     * do not need to use this method.  It is typically called from the
      * FlexFactory.createFactoryInstance method as Data Services is parsing
-     * the destination configuration information for a given destination.  
-     * You can override this method to extract additional configuration for 
+     * the destination configuration information for a given destination.
+     * You can override this method to extract additional configuration for
      * your component from the properties argument.
      *
-     * @param factory the FlexFactory this FactoryInstance is created from
-     * @param id the Destination's id
-     * @param properties the configuration properties for this destination.  
-     *
+     * @param factory    the FlexFactory this FactoryInstance is created from
+     * @param id         the Destination's id
+     * @param properties the configuration properties for this destination.
      * @see flex.messaging.config.ConfigMap
      */
-    public FactoryInstance(FlexFactory factory, String id, ConfigMap properties)
-    {
+    public FactoryInstance(FlexFactory factory, String id, ConfigMap properties) {
         this.factory = factory;
         this.id = id;
         this.properties = properties;
@@ -60,67 +57,65 @@
 
     /**
      * Get the factory instance ID.
+     *
      * @return The destination's id that this FactoryInstance is associated with.
      */
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
     /**
      * Since many factories may provide components in different
      * scopes, this is abstracted in the base factory instance class.
+     *
      * @param scope the scope
      */
-    public void setScope(String scope)
-    {
+    public void setScope(String scope) {
         this.scope = scope;
 
         if (!FlexFactory.SCOPE_SESSION.equals(scope)
                 && !FlexFactory.SCOPE_APPLICATION.equals(scope)
-                && !FlexFactory.SCOPE_REQUEST.equals(scope))
-        {
+                && !FlexFactory.SCOPE_REQUEST.equals(scope)) {
             // Invalid scope setting for RemotingService destination '{id}'.
             // Valid options are 'request', 'session', or 'application'.
             ConfigurationException ex = new ConfigurationException();
-            ex.setMessage(INVALID_SCOPE, new Object[] {id, "\'request\', \'session\', or \'application\'"});
+            ex.setMessage(INVALID_SCOPE, new Object[]{id, "\'request\', \'session\', or \'application\'"});
             throw ex;
         }
 
     }
-    
+
     /**
      * Get the scope.
+     *
      * @return String the scope
      */
-    public String getScope()
-    {
+    public String getScope() {
         return scope;
     }
 
     /**
-     * This is by convention the main property for the defining the 
+     * This is by convention the main property for the defining the
      * instance we create with this factory.  It may be the class name
      * for the JavaFactory or the id for a factory that uses ids.
      *
      * @param source source
      */
-    public void setSource(String source)
-    {
+    public void setSource(String source) {
         this.source = source;
     }
-    
+
     /**
      * Get the source.
+     *
      * @return String the source string
      */
-    public String getSource()
-    {
+    public String getSource() {
         return source;
     }
 
     /**
-     * If possible, returns the class for the underlying configuration.  
+     * If possible, returns the class for the underlying configuration.
      * This method can return null if the class is not known until the lookup
      * method is called.  The goal is so the factories which know the class
      * at startup time can provide earlier error detection.  If the class is not
@@ -130,8 +125,7 @@
      * @return the class for this configured instance or null if the class
      * is not known until lookup time.
      */
-    public Class getInstanceClass()
-    {
+    public Class getInstanceClass() {
         return null;
     }
 
@@ -141,14 +135,14 @@
      * instance is configured with.  For example, if you are defining a remote object
      * destination, your FactoryInstance can be configured with additional XML tags
      * underneath the properties tag for your destination.  It is important that
-     * if you expect additional properties that you access in the ConfigMap or call 
+     * if you expect additional properties that you access in the ConfigMap or call
      * allowProperty on that property when the FactoryInstance is created.  Otherwise,
      * these properties can generate warnings about "unexpected" configuration.
+     *
      * @return ConfigMap the ConfigMap that this factory was created with
      * @see flex.messaging.config.ConfigMap
      */
-    public ConfigMap getProperties()
-    {
+    public ConfigMap getProperties() {
         return properties;
     }
 
@@ -157,10 +151,10 @@
      * factory.  This just calls the lookup method on the factory that this
      * instance was created on.  You override this method to return the
      * specific component for this destination.
+     *
      * @return Object the object lookup
      */
-    public Object lookup()
-    {
+    public Object lookup() {
         return factory.lookup(this);
     }
 
@@ -173,9 +167,8 @@
      * events via the FlexContext.
      *
      * @param instance the instance returned via the lookup method for this
-     * destination for this operation.
+     *                 destination for this operation.
      */
-    public void operationComplete(Object instance)
-    {
+    public void operationComplete(Object instance) {
     }
 }
diff --git a/core/src/main/java/flex/messaging/FlexComponent.java b/core/src/main/java/flex/messaging/FlexComponent.java
index 8f76444..cdbedd3 100644
--- a/core/src/main/java/flex/messaging/FlexComponent.java
+++ b/core/src/main/java/flex/messaging/FlexComponent.java
@@ -22,11 +22,10 @@
  * the server to manage the running state of server components
  * through a consistent interface.
  */
-public interface FlexComponent extends FlexConfigurable
-{
+public interface FlexComponent extends FlexConfigurable {
     /**
      * Invoked to start the component.
-     * The {@link FlexConfigurable#initialize(String, flex.messaging.config.ConfigMap)} method inherited 
+     * The {@link FlexConfigurable#initialize(String, flex.messaging.config.ConfigMap)} method inherited
      * from the {@link FlexConfigurable} interface must be invoked before this method is invoked.
      * Once this method returns, {@link #isStarted()} must return true.
      */
@@ -40,9 +39,9 @@
 
     /**
      * Indicates whether the component is started and running.
-     * 
-     * @return <code>true</code> if the component has started; 
-     *         otherwise <code>false</code>.
+     *
+     * @return <code>true</code> if the component has started;
+     * otherwise <code>false</code>.
      */
-    boolean isStarted();   
+    boolean isStarted();
 }
diff --git a/core/src/main/java/flex/messaging/FlexConfigurable.java b/core/src/main/java/flex/messaging/FlexConfigurable.java
index 402d3c3..5cda9e0 100644
--- a/core/src/main/java/flex/messaging/FlexConfigurable.java
+++ b/core/src/main/java/flex/messaging/FlexConfigurable.java
@@ -23,12 +23,11 @@
  * the FlexConfigurable interface to get access to the configuration
  * properties like a regular component in the system.
  */
-public interface FlexConfigurable
-{
+public interface FlexConfigurable {
     /**
      * Initializes the component with configuration information.
      *
-     * @param id The id of the component.
+     * @param id        The id of the component.
      * @param configMap The properties for configuring component.
      */
     void initialize(String id, ConfigMap configMap);
diff --git a/core/src/main/java/flex/messaging/FlexContext.java b/core/src/main/java/flex/messaging/FlexContext.java
index 79e4b96..9afa73a 100644
--- a/core/src/main/java/flex/messaging/FlexContext.java
+++ b/core/src/main/java/flex/messaging/FlexContext.java
@@ -35,8 +35,7 @@
  * Any, or all, of the properties exposed by this class may be <code>null</code> depending upon
  * the current execution context so test for that before attempting to interact with them.
  */
-public class FlexContext
-{
+public class FlexContext {
     private static ThreadLocal<FlexClient> flexClients = new ThreadLocal<FlexClient>();
     private static ThreadLocal<FlexSession> sessions = new ThreadLocal<FlexSession>();
     private static ThreadLocal<MessageBroker> messageBrokers = new ThreadLocal<MessageBroker>();
@@ -49,18 +48,17 @@
     private static ThreadLocal<MessageRoutedNotifier> messageRoutedNotifiers = new ThreadLocal<MessageRoutedNotifier>();
     private static ServletConfig lastGoodServletConfig;
 
-    private FlexContext()
-    {
+    private FlexContext() {
     }
 
     /**
      * Users should not call this.
      *
-     * @param flexClient the Flex client
-     * @param session the Flex session
-     * @param broker the message broker
-     * @param request the http servlet request
-     * @param response the http servlet response
+     * @param flexClient    the Flex client
+     * @param session       the Flex session
+     * @param broker        the message broker
+     * @param request       the http servlet request
+     * @param response      the http servlet response
      * @param servletConfig the servlet config
      */
     public static void setThreadLocalObjects(FlexClient flexClient,
@@ -68,8 +66,7 @@
                                              MessageBroker broker,
                                              HttpServletRequest request,
                                              HttpServletResponse response,
-                                             ServletConfig servletConfig)
-    {
+                                             ServletConfig servletConfig) {
         if (flexClients == null) // In case releaseThreadLocalObjects has been called.
             return;
 
@@ -86,20 +83,17 @@
      * Users should not call this.
      *
      * @param flexClient the Flex client
-     * @param session the Flex session
-     * @param broker the message broker
+     * @param session    the Flex session
+     * @param broker     the message broker
      */
-    public static void setThreadLocalObjects(FlexClient flexClient, FlexSession session, MessageBroker broker)
-    {
+    public static void setThreadLocalObjects(FlexClient flexClient, FlexSession session, MessageBroker broker) {
         setThreadLocalObjects(flexClient, session, broker, null, null, null);
     }
 
     /**
      * Users should not call this.
-     *
      */
-    public static void clearThreadLocalObjects()
-    {
+    public static void clearThreadLocalObjects() {
         if (flexClients == null) // In case releaseThreadLocalObjects has been called.
             return;
 
@@ -124,9 +118,8 @@
      *
      * @return HttpServletRequest current HttpServletRequest object
      */
-    public static HttpServletRequest getHttpRequest()
-    {
-        return requests != null? requests.get() : null;
+    public static HttpServletRequest getHttpRequest() {
+        return requests != null ? requests.get() : null;
     }
 
     /**
@@ -134,8 +127,7 @@
      *
      * @param value HttpServletRequest object
      */
-    public static void setThreadLocalHttpRequest(HttpServletRequest value)
-    {
+    public static void setThreadLocalHttpRequest(HttpServletRequest value) {
         if (requests == null)
             return;
 
@@ -152,9 +144,8 @@
      *
      * @return HttpServletResponse current HttpServletResponse object
      */
-    public static HttpServletResponse getHttpResponse()
-    {
-        return responses != null? responses.get() : null;
+    public static HttpServletResponse getHttpResponse() {
+        return responses != null ? responses.get() : null;
     }
 
     /**
@@ -162,8 +153,7 @@
      *
      * @param value HttpServletResponse object
      */
-    public static void setThreadLocalHttpResponse(HttpServletResponse value)
-    {
+    public static void setThreadLocalHttpResponse(HttpServletResponse value) {
         if (responses == null)
             return;
 
@@ -180,9 +170,8 @@
      *
      * @return HttpServletRequest tunnel HttpServletRequest object
      */
-    public static HttpServletRequest getTunnelHttpRequest()
-    {
-        return tunnelRequests != null? tunnelRequests.get() : null;
+    public static HttpServletRequest getTunnelHttpRequest() {
+        return tunnelRequests != null ? tunnelRequests.get() : null;
     }
 
     /**
@@ -190,8 +179,7 @@
      *
      * @param value HttpServletRequest object
      */
-    public static void setThreadLocalTunnelHttpRequest(HttpServletRequest value)
-    {
+    public static void setThreadLocalTunnelHttpRequest(HttpServletRequest value) {
         if (tunnelRequests == null)
             return;
 
@@ -207,10 +195,8 @@
      *
      * @return ServletConfig current ServletConfig object
      */
-    public static ServletConfig getServletConfig()
-    {
-        if (servletConfigs != null && servletConfigs.get() != null)
-        {
+    public static ServletConfig getServletConfig() {
+        if (servletConfigs != null && servletConfigs.get() != null) {
             return servletConfigs.get();
         }
         return lastGoodServletConfig;
@@ -221,17 +207,13 @@
      *
      * @param value ServletConfig object
      */
-    public static void setThreadLocalServletConfig(ServletConfig value)
-    {
+    public static void setThreadLocalServletConfig(ServletConfig value) {
         if (servletConfigs == null)
             return;
 
-        if (value == null)
-        {
+        if (value == null) {
             servletConfigs.remove();
-        }
-        else
-        {
+        } else {
             servletConfigs.set(value);
             lastGoodServletConfig = value;
         }
@@ -242,9 +224,8 @@
      *
      * @return ServletContext current ServletContext object
      */
-    public static ServletContext getServletContext()
-    {
-        return getServletConfig() != null? getServletConfig().getServletContext() : null;
+    public static ServletContext getServletContext() {
+        return getServletConfig() != null ? getServletConfig().getServletContext() : null;
     }
 
     /**
@@ -252,9 +233,8 @@
      *
      * @return FlexClient the current FlexClient object
      */
-    public static FlexClient getFlexClient()
-    {
-        return flexClients != null? flexClients.get() : null;
+    public static FlexClient getFlexClient() {
+        return flexClients != null ? flexClients.get() : null;
     }
 
     /**
@@ -262,8 +242,7 @@
      *
      * @param flexClient FlexClient object
      */
-    public static void setThreadLocalFlexClient(FlexClient flexClient)
-    {
+    public static void setThreadLocalFlexClient(FlexClient flexClient) {
         if (flexClients == null)
             return;
 
@@ -278,9 +257,8 @@
      *
      * @return FlexSession the current FlexSession object
      */
-    public static FlexSession getFlexSession()
-    {
-        return sessions != null? sessions.get() : null;
+    public static FlexSession getFlexSession() {
+        return sessions != null ? sessions.get() : null;
     }
 
     /**
@@ -288,8 +266,7 @@
      *
      * @param session FlexSession object
      */
-    public static void setThreadLocalSession(FlexSession session)
-    {
+    public static void setThreadLocalSession(FlexSession session) {
         if (sessions == null)
             return;
 
@@ -304,9 +281,8 @@
      *
      * @return The MessageBroker for the current request
      */
-    public static MessageBroker getMessageBroker()
-    {
-        return messageBrokers != null? messageBrokers.get() : null;
+    public static MessageBroker getMessageBroker() {
+        return messageBrokers != null ? messageBrokers.get() : null;
     }
 
     /**
@@ -314,8 +290,7 @@
      *
      * @param value MessageBroker object
      */
-    public static void setThreadLocalMessageBroker(MessageBroker value)
-    {
+    public static void setThreadLocalMessageBroker(MessageBroker value) {
         // This is a special case because MessageBroker is sometimes accessed by
         // services, destinations, adapters during shutdown so it needs to be set
         // on the context even if a previous MessageBrokerServlet#destroy called
@@ -334,9 +309,8 @@
      *
      * @return The Endpoint for the current message
      */
-    public static Endpoint getEndpoint()
-    {
-        return endpoints != null? endpoints.get() : null;
+    public static Endpoint getEndpoint() {
+        return endpoints != null ? endpoints.get() : null;
     }
 
     /**
@@ -344,8 +318,7 @@
      *
      * @param value Endpoint object
      */
-    public static void setThreadLocalEndpoint(Endpoint value)
-    {
+    public static void setThreadLocalEndpoint(Endpoint value) {
         if (endpoints == null)
             return;
 
@@ -360,9 +333,8 @@
      *
      * @return MessageRoutedNotifier object
      */
-    public static MessageRoutedNotifier getMessageRoutedNotifier()
-    {
-        return messageRoutedNotifiers != null? messageRoutedNotifiers.get() : null;
+    public static MessageRoutedNotifier getMessageRoutedNotifier() {
+        return messageRoutedNotifiers != null ? messageRoutedNotifiers.get() : null;
     }
 
     /**
@@ -370,8 +342,7 @@
      *
      * @param value MessageRoutedNotifier object
      */
-    public static void setMessageRoutedNotifier(MessageRoutedNotifier value)
-    {
+    public static void setMessageRoutedNotifier(MessageRoutedNotifier value) {
         if (messageRoutedNotifiers == null)
             return;
 
@@ -387,9 +358,8 @@
      *
      * @return true if message from a peer
      */
-    public static boolean isMessageFromPeer()
-    {
-        return messageFromPeer != null? messageFromPeer.get() : false;
+    public static boolean isMessageFromPeer() {
+        return messageFromPeer != null ? messageFromPeer.get() : false;
     }
 
     /**
@@ -398,8 +368,7 @@
      *
      * @param value True if the message came from a peer; otherwise false.
      */
-    public static void setMessageFromPeer(boolean value)
-    {
+    public static void setMessageFromPeer(boolean value) {
         if (messageFromPeer == null)
             return;
 
@@ -411,14 +380,13 @@
      *
      * @return true if per-client-authentication is turned on.
      */
-    public static boolean isPerClientAuthentication()
-    {
+    public static boolean isPerClientAuthentication() {
         MessageBroker messageBroker = getMessageBroker();
         if (messageBroker == null)
             return false;
 
         LoginManager loginManager = messageBroker.getLoginManager();
-        return loginManager == null? false : loginManager.isPerClientAuthentication();
+        return loginManager == null ? false : loginManager.isPerClientAuthentication();
     }
 
     /**
@@ -428,16 +396,14 @@
      *
      * @return The principal associated with the session.
      */
-    public static Principal getUserPrincipal()
-    {
-        if (isPerClientAuthentication())
-        {
+    public static Principal getUserPrincipal() {
+        if (isPerClientAuthentication()) {
             FlexClient client = getFlexClient();
-            return client != null? client.getUserPrincipal() : null;
+            return client != null ? client.getUserPrincipal() : null;
         }
 
         FlexSession session = getFlexSession();
-        return session != null? session.getUserPrincipal() : null;
+        return session != null ? session.getUserPrincipal() : null;
     }
 
     /**
@@ -447,8 +413,7 @@
      * @param userPrincipal The principal to associate with the FlexClient or FlexSession
      *                      depending upon whether perClientAuthentication is in use.
      */
-    public static void setUserPrincipal(Principal userPrincipal)
-    {
+    public static void setUserPrincipal(Principal userPrincipal) {
         if (isPerClientAuthentication())
             getFlexClient().setUserPrincipal(userPrincipal);
         else
@@ -458,8 +423,7 @@
     /**
      * Create the static thread local storage.
      */
-    public static void createThreadLocalObjects()
-    {
+    public static void createThreadLocalObjects() {
         if (flexClients == null) // Allocate if needed.
         {
             flexClients = new ThreadLocal<FlexClient>();
@@ -479,10 +443,9 @@
      * Destroy the static thread local storage.
      * Call ONLY on shutdown
      */
-    public static void releaseThreadLocalObjects()
-    {
+    public static void releaseThreadLocalObjects() {
         clearThreadLocalObjects();
-        
+
         flexClients = null;
         sessions = null;
         messageBrokers = null;
diff --git a/core/src/main/java/flex/messaging/FlexFactory.java b/core/src/main/java/flex/messaging/FlexFactory.java
index 18cacf3..330e629 100644
--- a/core/src/main/java/flex/messaging/FlexFactory.java
+++ b/core/src/main/java/flex/messaging/FlexFactory.java
@@ -29,17 +29,26 @@
  * create a new component instance.  In some cases, this means you avoid writing
  * glue code for each service you want to expose to flex clients.
  */
-public interface FlexFactory extends FlexConfigurable
-{
-    /** Request scope string. */
+public interface FlexFactory extends FlexConfigurable {
+    /**
+     * Request scope string.
+     */
     String SCOPE_REQUEST = "request";
-    /** Session scope string. */
+    /**
+     * Session scope string.
+     */
     String SCOPE_SESSION = "session";
-    /** Application scope string .*/
+    /**
+     * Application scope string .
+     */
     String SCOPE_APPLICATION = "application";
-    /** Scope string. */
+    /**
+     * Scope string.
+     */
     String SCOPE = "scope";
-    /** Source string. */
+    /**
+     * Source string.
+     */
     String SOURCE = "source";
 
     /**
@@ -52,18 +61,18 @@
      * an instance of this object.  If the instance is application
      * scoped, the FactoryInstance may contain a reference to the
      * instance directly.
-     *
+     * <p>
      * Any valid properties used for this configuration
      * must be accessed to avoid warnings about unused configuration
      * elements.  If your factory is only used for application
      * scoped components, you do not need to implement
      * this method as the lookup method itself can be used
      * to validate its configuration.
-     *
+     * <p>
      * The id property is used as a name to help you identify
      * this factory instance for any errors it might generate.
      *
-     * @param id id of the factory
+     * @param id         id of the factory
      * @param properties properties
      * @return a new FactoryInstance instance
      */
@@ -74,7 +83,7 @@
      * When Data Services wants an instance of a given factory destination, it calls the
      * FactoryInstance.lookup to retrieve that instance.  That method in turn
      * calls this method by default.
-     *
+     * <p>
      * For simple FlexFactory implementations which do not need to
      * add additional configuration properties or logic to the FactoryInstance class,
      * by implementing this method you can avoid having to add an additional subclass of
diff --git a/core/src/main/java/flex/messaging/FlexRemoteCredentials.java b/core/src/main/java/flex/messaging/FlexRemoteCredentials.java
index 99a927b..e089949 100644
--- a/core/src/main/java/flex/messaging/FlexRemoteCredentials.java
+++ b/core/src/main/java/flex/messaging/FlexRemoteCredentials.java
@@ -25,8 +25,7 @@
  * the FlexSession methods getRemoteCredentials and putRemoteCredentials to associate
  * the remote credentials with a specific destination.
  */
-public class FlexRemoteCredentials
-{
+public class FlexRemoteCredentials {
     private String service;
 
     private String destination;
@@ -40,14 +39,14 @@
      * created automatically when the client specifies them via the setRemoteCredentials
      * method in ActionScript.  You'd use this if you wanted to set your remote credentials
      * on the server and not have them specified on the client.
-     * @param service the service id
+     *
+     * @param service     the service id
      * @param destination the destination id
-     * @param username the user name
+     * @param username    the user name
      * @param credentials the user credentials
      */
-    public FlexRemoteCredentials(String service, String destination, 
-            String username, Object credentials)
-    {
+    public FlexRemoteCredentials(String service, String destination,
+                                 String username, Object credentials) {
         super();
         this.service = service;
         this.destination = destination;
@@ -57,37 +56,37 @@
 
     /**
      * Returns the user name from the remote credentials.
+     *
      * @return String the user name
      */
-    public String getUsername()
-    {
+    public String getUsername() {
         return username;
     }
 
     /**
      * Returns the credentials themselves (usually a password).
+     *
      * @return Object the credentials object
      */
-    public Object getCredentials()
-    {
+    public Object getCredentials() {
         return credentials;
     }
 
     /**
      * Returns the id of the service these credentials are registered for.
+     *
      * @return String the service id
      */
-    public String getService()
-    {
+    public String getService() {
         return service;
     }
 
     /**
      * Returns the destination for the service.
+     *
      * @return String the destination id
      */
-    public String getDestination()
-    {
+    public String getDestination() {
         return destination;
     }
 }
diff --git a/core/src/main/java/flex/messaging/FlexSession.java b/core/src/main/java/flex/messaging/FlexSession.java
index 4f34f8a..f2778f1 100644
--- a/core/src/main/java/flex/messaging/FlexSession.java
+++ b/core/src/main/java/flex/messaging/FlexSession.java
@@ -36,8 +36,7 @@
 /**
  * The base for FlexSession implementations.
  */
-public abstract class FlexSession extends TimeoutAbstractObject implements FlexClientListener, MessageClientListener
-{
+public abstract class FlexSession extends TimeoutAbstractObject implements FlexClientListener, MessageClientListener {
     //--------------------------------------------------------------------------
     //
     // Public Static Variables
@@ -77,22 +76,18 @@
     //--------------------------------------------------------------------------
 
     /**
-     *
      * @deprecated Post 2.6.1 releases require use of the constructor that takes an <tt>AbstractFlexSessionProvider</tt> argument.
      */
-    public FlexSession()
-    {
+    public FlexSession() {
         this(null);
     }
 
     /**
-     *
      * Constructs a new FlexSession instance.
      *
      * @param sessionProvider The provider that instantiated this instance.
      */
-    public FlexSession(AbstractFlexSessionProvider sessionProvider)
-    {
+    public FlexSession(AbstractFlexSessionProvider sessionProvider) {
         this.sessionProvider = sessionProvider;
     }
 
@@ -106,12 +101,10 @@
      * Adds a session created listener that will be notified when new sessions
      * are created.
      *
-     * @see flex.messaging.FlexSessionListener
-     *
      * @param listener The listener to add.
+     * @see flex.messaging.FlexSessionListener
      */
-    public static void addSessionCreatedListener(FlexSessionListener listener)
-    {
+    public static void addSessionCreatedListener(FlexSessionListener listener) {
         if (listener != null)
             createdListeners.addIfAbsent(listener);
     }
@@ -119,12 +112,10 @@
     /**
      * Removes a session created listener.
      *
-     * @see flex.messaging.FlexSessionListener
-     *
      * @param listener The listener to remove.
+     * @see flex.messaging.FlexSessionListener
      */
-    public static void removeSessionCreatedListener(FlexSessionListener listener)
-    {
+    public static void removeSessionCreatedListener(FlexSessionListener listener) {
         if (listener != null)
             createdListeners.remove(listener);
     }
@@ -197,9 +188,8 @@
     //----------------------------------
 
     /**
-     *
      * Used internally to manage async long-polls; not for public use.
-     *
+     * <p>
      * A map of endpoint to async poll objects that keeps track of what
      * client is parked on a long-poll with what endpoint.
      * We only want an endpoint to have a single connection to a client.
@@ -221,13 +211,11 @@
     private final AbstractFlexSessionProvider sessionProvider;
 
     /**
-     *
      * Returns the session provider that created this instance.
      *
      * @return The session provider that created this instance.
      */
-    public AbstractFlexSessionProvider getFlexSessionProvider()
-    {
+    public AbstractFlexSessionProvider getFlexSessionProvider() {
         return sessionProvider;
     }
 
@@ -245,16 +233,14 @@
      * this method for backwards compatibility.  This method will produce
      * correct results when perClientAuthentication is false.  However, it will
      * not return correct results when perClientAuthentication is true.
-     *
+     * <p>
      * Returns the principal associated with the session. If the client has not
      * authenticated the principal will be null.
      *
      * @return The principal associated with the session.
      */
-    public Principal getUserPrincipal()
-    {
-        synchronized (lock)
-        {
+    public Principal getUserPrincipal() {
+        synchronized (lock) {
             checkValid();
             return userPrincipal;
         }
@@ -267,10 +253,8 @@
      *
      * @param userPrincipal The principal to associate with the session.
      */
-    public void setUserPrincipal(Principal userPrincipal)
-    {
-        synchronized (lock)
-        {
+    public void setUserPrincipal(Principal userPrincipal) {
+        synchronized (lock) {
             checkValid();
             this.userPrincipal = userPrincipal;
         }
@@ -281,7 +265,6 @@
     //----------------------------------
 
     /**
-     *
      * Used internally by streaming endpoints to enforce session level streaming
      * connection limits; not for public use.
      * This flag is volatile to allow for consistent reads across thread without
@@ -294,7 +277,6 @@
     //----------------------------------
 
     /**
-     *
      * Used internally by streaming and long polling endpoints to enforce session
      * level streaming connection limits; not for public use. Default value is -1
      * (limitless)
@@ -306,18 +288,16 @@
     //----------------------------------
 
     /**
-     *
      * Used internally by streaming and long polling endpoints to enforce
      * session level streaming connection limits; not for public use.
-     *
+     * <p>
      * Some browsers put limits on the number of connections per session. For
      * example, Firefox has network.http.max-connections-per-server=8 limit which
      * limits the number of streaming connections per session to 7. Similarly,
      * IE has a limit of 2 per session.
-     *
+     * <p>
      * This variable is used by streaming and long polling endpoint to keep
      * track of open connections per session and disallow them when needed.
-     *
      */
     public int streamingConnectionsCount;
 
@@ -331,26 +311,23 @@
     private boolean useSmallMessages;
 
     /**
-     *
      * Determines whether the server can attempt to send small messages
      * for those messages that have a small form. This setting can be overridden
      * by an endpoint's enableSmallMessages switch which controls whether
      * small messages should be sent, even if they are supported.
-     *
+     * <p>
      * The default is false.
      *
      * @return true if the server can attempt to send small messages.
      */
-    public boolean useSmallMessages()
-    {
+    public boolean useSmallMessages() {
         return useSmallMessages;
     }
 
     /**
      * @param value true if the server can attempt to send small messages.
      */
-    public void setUseSmallMessages(boolean value)
-    {
+    public void setUseSmallMessages(boolean value) {
         useSmallMessages = value;
     }
 
@@ -359,9 +336,8 @@
     //----------------------------------
 
     /**
-     *
      * Used internally to manage wait()-based long-polls; not for public use.
-     *
+     * <p>
      * This is the monitor that a request handling thread associated with this
      * FlexSession is waiting on. Normally, the waiting request handling thread will wait until
      * a new message arrives that can be returned in a poll response or its wait interval times out.
@@ -381,16 +357,12 @@
      *
      * @param listener The listener to add.
      */
-    public void addSessionAttributeListener(FlexSessionAttributeListener listener)
-    {
-        if (listener != null)
-        {
+    public void addSessionAttributeListener(FlexSessionAttributeListener listener) {
+        if (listener != null) {
             checkValid();
 
-            if (attributeListeners == null)
-            {
-                synchronized (lock)
-                {
+            if (attributeListeners == null) {
+                synchronized (lock) {
                     if (attributeListeners == null)
                         attributeListeners = new CopyOnWriteArrayList<FlexSessionAttributeListener>();
                 }
@@ -406,20 +378,15 @@
      * have been unbound from the session and any FlexSessionBindingListeners
      * and FlexSessionAttributeListeners have been notified.
      *
-     * @see flex.messaging.FlexSessionListener
-     *
      * @param listener The listener to add.
+     * @see flex.messaging.FlexSessionListener
      */
-    public void addSessionDestroyedListener(FlexSessionListener listener)
-    {
-        if (listener != null)
-        {
+    public void addSessionDestroyedListener(FlexSessionListener listener) {
+        if (listener != null) {
             checkValid();
 
-            if (destroyedListeners == null)
-            {
-                synchronized (lock)
-                {
+            if (destroyedListeners == null) {
+                synchronized (lock) {
                     if (destroyedListeners == null)
                         destroyedListeners = new CopyOnWriteArrayList<FlexSessionListener>();
                 }
@@ -436,10 +403,8 @@
      * @param name The name the target attribute is bound to.
      * @return The attribute bound to the specified name.
      */
-    public Object getAttribute(String name)
-    {
-        synchronized (lock)
-        {
+    public Object getAttribute(String name) {
+        synchronized (lock) {
             checkValid();
 
             return (attributes == null) ? null : attributes.get(name);
@@ -451,10 +416,8 @@
      *
      * @return A snapshot of the names of all attributes bound to the session.
      */
-    public Enumeration<String> getAttributeNames()
-    {
-        synchronized (lock)
-        {
+    public Enumeration<String> getAttributeNames() {
+        synchronized (lock) {
             checkValid();
 
             if (attributes == null)
@@ -467,28 +430,25 @@
     }
 
     /**
-     *
      * Implements MessageClientListener.
      * Handling created events is a no-op.
      *
      * @param messageClient The new MessageClient.
      */
-    public void messageClientCreated(MessageClient messageClient) {}
+    public void messageClientCreated(MessageClient messageClient) {
+    }
 
     /**
-     *
      * Implements MessageClientListener.
      * Notification that an associated MessageClient was destroyed.
      *
      * @param messageClient The MessageClient that was destroyed.
      */
-    public void messageClientDestroyed(MessageClient messageClient)
-    {
+    public void messageClientDestroyed(MessageClient messageClient) {
         unregisterMessageClient(messageClient);
     }
 
     /**
-     *
      * FlexClient invokes this to determine whether the session can be used to push messages
      * to the client.
      *
@@ -497,13 +457,11 @@
     public abstract boolean isPushSupported();
 
     /**
-     *
      * FlexClient invokes this to push a message to a remote client.
      *
      * @param message The message to push.
      */
-    public void push(Message message)
-    {
+    public void push(Message message) {
         throw new UnsupportedOperationException("Push not supported.");
     }
 
@@ -512,12 +470,10 @@
      *
      * @param name The name of the attribute to remove.
      */
-    public void removeAttribute(String name)
-    {
+    public void removeAttribute(String name) {
         Object value; // Used for event dispatch after the attribute is removed.
 
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid(); // Re-enters lock but should be fast because we're already holding it.
 
             value = (attributes != null) ? attributes.remove(name) : null;
@@ -536,8 +492,7 @@
      *
      * @param listener The listener to remove.
      */
-    public void removeSessionAttributeListener(FlexSessionAttributeListener listener)
-    {
+    public void removeSessionAttributeListener(FlexSessionAttributeListener listener) {
         // No need to check validity; removing a listener is always ok.
         if (listener != null && attributeListeners != null)
             attributeListeners.remove(listener);
@@ -546,12 +501,10 @@
     /**
      * Removes a session destroy listener.
      *
-     * @see flex.messaging.FlexSessionListener
-     *
      * @param listener The listener to remove.
+     * @see flex.messaging.FlexSessionListener
      */
-    public void removeSessionDestroyedListener(FlexSessionListener listener)
-    {
+    public void removeSessionDestroyedListener(FlexSessionListener listener) {
         // No need to check validity; removing a listener is always ok.
         if (listener != null && destroyedListeners != null)
             destroyedListeners.remove(listener);
@@ -560,14 +513,12 @@
     /**
      * Binds an attribute value to the session under the specified name.
      *
-     * @param name The name to bind the attribute under.
+     * @param name  The name to bind the attribute under.
      * @param value The value of the attribute.
      */
-    public void setAttribute(String name, Object value)
-    {
+    public void setAttribute(String name, Object value) {
         // Null value is the same as removeAttribute().
-        if (value == null)
-        {
+        if (value == null) {
             removeAttribute(name);
             return;
         }
@@ -575,8 +526,7 @@
         Object oldValue; // Used to determine which events to dispatch after the set is performed.
 
         // Only synchronize for the attribute mutation; event dispatch doesn't require it.
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid(); // Re-enters lock but should be fast because we're already holding it.
 
             if (attributes == null)
@@ -585,13 +535,10 @@
             oldValue = attributes.put(name, value);
         }
 
-        if (oldValue == null)
-        {
+        if (oldValue == null) {
             notifyAttributeBound(name, value);
             notifyAttributeAdded(name, value);
-        }
-        else
-        {
+        } else {
             notifyAttributeUnbound(name, oldValue);
             notifyAttributeReplaced(name, oldValue);
             notifyAttributeBound(name, value);
@@ -603,26 +550,20 @@
      *
      * @param credentials The remote credentials.
      */
-    public void putRemoteCredentials(FlexRemoteCredentials credentials)
-    {
-        if (credentials != null)
-        {
+    public void putRemoteCredentials(FlexRemoteCredentials credentials) {
+        if (credentials != null) {
             // We only need to hold the lock to lazy-init the remoteCredentials variable.
-            if (remoteCredentials == null)
-            {
-                synchronized (lock)
-                {
+            if (remoteCredentials == null) {
+                synchronized (lock) {
                     // Init size to 4 because that's the number of shipping service types
                     // (messaging, remoting, proxy, data management).
                     if (remoteCredentials == null)
                         remoteCredentials = new HashMap(4);
                 }
             }
-            synchronized (remoteCredentials)
-            {
-                Map serviceMap = (Map)remoteCredentials.get(credentials.getService());
-                if (serviceMap == null)
-                {
+            synchronized (remoteCredentials) {
+                Map serviceMap = (Map) remoteCredentials.get(credentials.getService());
+                if (serviceMap == null) {
                     // Init size to half the normal number of buckets; most services won't have a large
                     // number of destinations with remote credentials.
                     serviceMap = new HashMap(7);
@@ -636,20 +577,17 @@
     /**
      * Returns the remote credentials stored in the session for the specified service destination.
      *
-     * @param serviceId The service id.
+     * @param serviceId     The service id.
      * @param destinationId The destination id.
      * @return The stored remote credentials for the specified service destination.
      */
-    public FlexRemoteCredentials getRemoteCredentials(String serviceId, String destinationId)
-    {
-        if (serviceId != null && destinationId != null)
-        {
+    public FlexRemoteCredentials getRemoteCredentials(String serviceId, String destinationId) {
+        if (serviceId != null && destinationId != null) {
             if (remoteCredentials == null)
                 return null;
-            synchronized (remoteCredentials)
-            {
-                Map serviceMap = (Map)remoteCredentials.get(serviceId);
-                return (serviceMap != null) ? (FlexRemoteCredentials)serviceMap.get(destinationId) : null;
+            synchronized (remoteCredentials) {
+                Map serviceMap = (Map) remoteCredentials.get(serviceId);
+                return (serviceMap != null) ? (FlexRemoteCredentials) serviceMap.get(destinationId) : null;
             }
         }
         return null;
@@ -658,20 +596,16 @@
     /**
      * Clears any stored remote credentials from the session for the specified service destination.
      *
-     * @param serviceId The service Id.
+     * @param serviceId     The service Id.
      * @param destinationId The destination Id.
      */
-    public void clearRemoteCredentials(String serviceId, String destinationId)
-    {
-        if (serviceId != null && destinationId != null)
-        {
+    public void clearRemoteCredentials(String serviceId, String destinationId) {
+        if (serviceId != null && destinationId != null) {
             if (remoteCredentials == null)
                 return;
-            synchronized (remoteCredentials)
-            {
-                Map serviceMap = (Map)remoteCredentials.get(serviceId);
-                if (serviceMap != null)
-                {
+            synchronized (remoteCredentials) {
+                Map serviceMap = (Map) remoteCredentials.get(serviceId);
+                if (serviceMap != null) {
                     serviceMap.put(destinationId, null);
                 }
             }
@@ -681,10 +615,8 @@
     /**
      * Invalidates the FlexSession.
      */
-    public void invalidate()
-    {
-        synchronized (lock)
-        {
+    public void invalidate() {
+        synchronized (lock) {
             if (!valid || invalidating)
                 return; // Already shutting down.
 
@@ -695,17 +627,14 @@
         }
 
         // Unregister all FlexClients.
-        if (!flexClients.isEmpty())
-        {
-            for (FlexClient flexClient :  flexClients)
+        if (!flexClients.isEmpty()) {
+            for (FlexClient flexClient : flexClients)
                 unregisterFlexClient(flexClient);
         }
 
         // Invalidate associated MessageClient subscriptions.
-        if (messageClients != null && !messageClients.isEmpty())
-        {
-            for (Iterator<MessageClient> iter = messageClients.iterator(); iter.hasNext();)
-            {
+        if (messageClients != null && !messageClients.isEmpty()) {
+            for (Iterator<MessageClient> iter = messageClients.iterator(); iter.hasNext(); ) {
                 MessageClient messageClient = iter.next();
                 messageClient.removeMessageClientDestroyedListener(this);
                 messageClient.invalidate();
@@ -715,18 +644,15 @@
 
 
         // Notify destroy listeners that we're shutting the FlexSession down.
-        if (destroyedListeners != null && !destroyedListeners.isEmpty())
-        {
-            for (FlexSessionListener destroyListener : destroyedListeners)
-            {
+        if (destroyedListeners != null && !destroyedListeners.isEmpty()) {
+            for (FlexSessionListener destroyListener : destroyedListeners) {
                 destroyListener.sessionDestroyed(this);
             }
             destroyedListeners.clear();
         }
 
         // Unbind all attributes.
-        if (attributes != null && !attributes.isEmpty())
-        {
+        if (attributes != null && !attributes.isEmpty()) {
             Set<String> keySet = attributes.keySet();
             String[] keys = keySet.toArray(new String[keySet.size()]);
             for (String key : keys)
@@ -737,19 +663,15 @@
 
         internalInvalidate();
 
-        synchronized (lock)
-        {
+        synchronized (lock) {
             valid = false;
             invalidating = false;
         }
 
         // Notify any waiting threads.
-        if (waitMonitor != null)
-        {
-            for (FlexClient.EndpointQueue endpointQueue : waitMonitor.values())
-            {
-                synchronized (endpointQueue)
-                {
+        if (waitMonitor != null) {
+            for (FlexClient.EndpointQueue endpointQueue : waitMonitor.values()) {
+                synchronized (endpointQueue) {
                     endpointQueue.notifyAll();
                 }
             }
@@ -761,7 +683,8 @@
      * Invoked after the FlexSession has performed generic shutdown but right before the session's valid
      * property flips to false.
      */
-    protected void internalInvalidate() {}
+    protected void internalInvalidate() {
+    }
 
     /**
      * Returns a snapshot of the FlexClients associated with the FlexSession
@@ -771,11 +694,9 @@
      *
      * @return A snapshot of the current list of FlexSessions associated with the FlexClient.
      */
-    public List<FlexClient> getFlexClients()
-    {
+    public List<FlexClient> getFlexClients() {
         List<FlexClient> currentFlexClients = null;
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid(); // Re-enters lock but should be fast because we're already holding it.
 
             currentFlexClients = new ArrayList<FlexClient>(flexClients); // Make a copy of the current list to return.
@@ -791,15 +712,13 @@
      *
      * @return A snapshot of the current list of MessageClients associated with the FlexSession.
      */
-    public List<MessageClient> getMessageClients()
-    {
+    public List<MessageClient> getMessageClients() {
         List<MessageClient> currentMessageClients = null;
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid(); // Re-enters lock but should be fast because we're already holding it.
 
             currentMessageClients = (messageClients != null) ? new ArrayList<MessageClient>(messageClients) // Make a copy of the current list to return.
-                                                             : new ArrayList<MessageClient>(); // Return an empty list.
+                    : new ArrayList<MessageClient>(); // Return an empty list.
         }
         return currentMessageClients;
     }
@@ -817,8 +736,7 @@
      * @param role The role to test.
      * @return true if the user is in the role; otherwise false.
      */
-    public boolean isUserInRole(String role)
-    {
+    public boolean isUserInRole(String role) {
         ArrayList list = new ArrayList();
         list.add(role);
         return FlexContext.getMessageBroker().getLoginManager().checkRoles(userPrincipal, list);
@@ -829,16 +747,13 @@
      *
      * @return true if the session is valid; otherwise false.
      */
-    public boolean isValid()
-    {
-        synchronized (lock)
-        {
+    public boolean isValid() {
+        synchronized (lock) {
             return valid;
         }
     }
 
     /**
-     *
      * Implements FlexClientListener interface.
      * Notification that a FlexClient was created.
      * This is a no-op because the FlexSession is never added as a static FlexClient created listener
@@ -847,62 +762,51 @@
      *
      * @param flexClient The FlexClient that was created.
      */
-    public void clientCreated(FlexClient flexClient) {}
+    public void clientCreated(FlexClient flexClient) {
+    }
 
     /**
-     *
      * Implements FlexClientListener interface.
      * Notification that an associated FlexClient was destroyed.
      *
      * @param flexClient The FlexClient that was destroyed.
      */
-    public void clientDestroyed(FlexClient flexClient)
-    {
+    public void clientDestroyed(FlexClient flexClient) {
         unregisterFlexClient(flexClient);
     }
 
     /**
-     *
      * Used internally to associate a FlexClient with the FlexSession.
      *
      * @param flexClient The FlexClient to assocaite with the session.
      */
-    public void registerFlexClient(FlexClient flexClient)
-    {
-        if (flexClients.addIfAbsent(flexClient))
-        {
+    public void registerFlexClient(FlexClient flexClient) {
+        if (flexClients.addIfAbsent(flexClient)) {
             flexClient.addClientDestroyedListener(this);
             flexClient.registerFlexSession(this);
         }
     }
 
     /**
-     *
      * Used internally to disassociate a FlexClient from the FlexSession.
      *
      * @param flexClient The FlexClient to disassociate from the session.
      */
-    public void unregisterFlexClient(FlexClient flexClient)
-    {
-        if (flexClients.remove(flexClient))
-        {
+    public void unregisterFlexClient(FlexClient flexClient) {
+        if (flexClients.remove(flexClient)) {
             flexClient.removeClientDestroyedListener(this);
             flexClient.unregisterFlexSession(this);
         }
     }
 
     /**
-     *
      * Used internally to associate a MessagClient (subscription) with the FlexSession.
      *
      * @param messageClient The MessageClient to associate with the session.
      */
-    public void registerMessageClient(MessageClient messageClient)
-    {
-        if (messageClients == null)
-        {
-            synchronized (lock)
-            {
+    public void registerMessageClient(MessageClient messageClient) {
+        if (messageClients == null) {
+            synchronized (lock) {
                 if (messageClients == null)
                     messageClients = new CopyOnWriteArrayList<MessageClient>();
             }
@@ -913,13 +817,11 @@
     }
 
     /**
-     *
      * Used internally to disassociate a MessageClient (subscription) from a FlexSession.
      *
      * @param messageClient The MessageClient to disassociate from the session.
      */
-    public void unregisterMessageClient(MessageClient messageClient)
-    {
+    public void unregisterMessageClient(MessageClient messageClient) {
         if (messageClients != null && messageClients.remove(messageClient))
             messageClient.removeMessageClientDestroyedListener(this);
     }
@@ -929,8 +831,7 @@
      *
      * @see flex.messaging.util.TimeoutCapable#timeout()
      */
-    public void timeout()
-    {
+    public void timeout() {
         invalidate();
     }
 
@@ -943,12 +844,9 @@
     /**
      * Ensures that the session has not been invalidated.
      */
-    protected void checkValid()
-    {
-        synchronized (lock)
-        {
-            if (!valid)
-            {
+    protected void checkValid() {
+        synchronized (lock) {
+            if (!valid) {
                 LocalizedException e = new LocalizedException();
                 e.setMessage(FLEX_SESSION_INVALIDATED);
                 throw e;
@@ -959,13 +857,11 @@
     /**
      * Notify attribute listeners that an attribute has been added.
      *
-     * @param name The name of the attribute.
+     * @param name  The name of the attribute.
      * @param value The new value of the attribute.
      */
-    protected void notifyAttributeAdded(String name, Object value)
-    {
-        if (attributeListeners != null && !attributeListeners.isEmpty())
-        {
+    protected void notifyAttributeAdded(String name, Object value) {
+        if (attributeListeners != null && !attributeListeners.isEmpty()) {
             FlexSessionBindingEvent event = new FlexSessionBindingEvent(this, name, value);
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
             for (FlexSessionAttributeListener attribListener : attributeListeners)
@@ -976,28 +872,24 @@
     /**
      * Notify binding listener that it has been bound to the session.
      *
-     * @param name The attribute name.
+     * @param name  The attribute name.
      * @param value The attribute that has been bound.
      */
-    protected void notifyAttributeBound(String name, Object value)
-    {
-        if ((value != null) && (value instanceof FlexSessionBindingListener))
-        {
+    protected void notifyAttributeBound(String name, Object value) {
+        if ((value != null) && (value instanceof FlexSessionBindingListener)) {
             FlexSessionBindingEvent bindingEvent = new FlexSessionBindingEvent(this, name);
-            ((FlexSessionBindingListener)value).valueBound(bindingEvent);
+            ((FlexSessionBindingListener) value).valueBound(bindingEvent);
         }
     }
 
     /**
      * Notify attribute listeners that an attribute has been removed.
      *
-     * @param name The name of the attribute.
+     * @param name  The name of the attribute.
      * @param value The previous value of the attribute.
      */
-    protected void notifyAttributeRemoved(String name, Object value)
-    {
-        if (attributeListeners != null && !attributeListeners.isEmpty())
-        {
+    protected void notifyAttributeRemoved(String name, Object value) {
+        if (attributeListeners != null && !attributeListeners.isEmpty()) {
             FlexSessionBindingEvent event = new FlexSessionBindingEvent(this, name, value);
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
             for (FlexSessionAttributeListener attribListener : attributeListeners)
@@ -1008,13 +900,11 @@
     /**
      * Notify attribute listeners that an attribute has been replaced.
      *
-     * @param name The name of the attribute.
+     * @param name  The name of the attribute.
      * @param value The previous value of the attribute.
      */
-    protected void notifyAttributeReplaced(String name, Object value)
-    {
-        if (attributeListeners != null && !attributeListeners.isEmpty())
-        {
+    protected void notifyAttributeReplaced(String name, Object value) {
+        if (attributeListeners != null && !attributeListeners.isEmpty()) {
             FlexSessionBindingEvent event = new FlexSessionBindingEvent(this, name, value);
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
             for (FlexSessionAttributeListener attribListener : attributeListeners)
@@ -1025,15 +915,13 @@
     /**
      * Notify binding listener that it has been unbound from the session.
      *
-     * @param name The attribute name.
+     * @param name  The attribute name.
      * @param value The attribute that has been unbound.
      */
-    protected void notifyAttributeUnbound(String name, Object value)
-    {
-        if ((value != null) && (value instanceof FlexSessionBindingListener))
-        {
+    protected void notifyAttributeUnbound(String name, Object value) {
+        if ((value != null) && (value instanceof FlexSessionBindingListener)) {
             FlexSessionBindingEvent bindingEvent = new FlexSessionBindingEvent(this, name);
-            ((FlexSessionBindingListener)value).valueUnbound(bindingEvent);
+            ((FlexSessionBindingListener) value).valueUnbound(bindingEvent);
         }
     }
 
@@ -1042,22 +930,19 @@
      * session create listeners of the event.
      * This method must be invoked in the subclass constructor.
      */
-    protected void notifyCreated()
-    {
+    protected void notifyCreated() {
         // This guard is here only to prevent duplicate notifications if there's a coding error
         // in the subclass. Not likely..
-        synchronized (lock)
-        {
+        synchronized (lock) {
             if (creationNotified)
                 return;
 
             creationNotified = true;
         }
 
-        if (!createdListeners.isEmpty())
-        {
+        if (!createdListeners.isEmpty()) {
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
-            for (Iterator<FlexSessionListener> iter = createdListeners.iterator(); iter.hasNext();)
+            for (Iterator<FlexSessionListener> iter = createdListeners.iterator(); iter.hasNext(); )
                 iter.next().sessionCreated(this);
         }
     }
diff --git a/core/src/main/java/flex/messaging/FlexSessionAttributeListener.java b/core/src/main/java/flex/messaging/FlexSessionAttributeListener.java
index feba243..7dcace6 100644
--- a/core/src/main/java/flex/messaging/FlexSessionAttributeListener.java
+++ b/core/src/main/java/flex/messaging/FlexSessionAttributeListener.java
@@ -19,27 +19,26 @@
 /**
  * Interface for Flex session attribute listeners.
  */
-public interface FlexSessionAttributeListener
-{
+public interface FlexSessionAttributeListener {
     /**
      * Callback invoked after an attribute is added to the session.
-     * 
+     *
      * @param event The event containing the associated session and attribute
      *              information.
      */
     void attributeAdded(FlexSessionBindingEvent event);
-    
+
     /**
      * Callback invoked after an attribute is removed from the session.
-     * 
+     *
      * @param event The event containing the associated session and attribute
      *              information.
      */
     void attributeRemoved(FlexSessionBindingEvent event);
-    
+
     /**
      * Callback invoked after an attribute has been replaced with a new value.
-     * 
+     *
      * @param event The event containing the associated session and attribute
      *              information.
      */
diff --git a/core/src/main/java/flex/messaging/FlexSessionBindingEvent.java b/core/src/main/java/flex/messaging/FlexSessionBindingEvent.java
index 512c7a9..8a293af 100644
--- a/core/src/main/java/flex/messaging/FlexSessionBindingEvent.java
+++ b/core/src/main/java/flex/messaging/FlexSessionBindingEvent.java
@@ -20,8 +20,7 @@
  * Event used to notify FlexSessionAttributeListeners of changes to session
  * attributes.
  */
-public class FlexSessionBindingEvent
-{
+public class FlexSessionBindingEvent {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -30,26 +29,24 @@
 
     /**
      * Constructs an event for an attribute that is bound or unbound from a session.
-     * 
+     *
      * @param session The associated session.
-     * @param name The attribute name.
+     * @param name    The attribute name.
      */
-    public FlexSessionBindingEvent(FlexSession session, String name)
-    {
+    public FlexSessionBindingEvent(FlexSession session, String name) {
         this.session = session;
         this.name = name;
     }
-    
+
     /**
-     * Constructs an event for an attribute that is added to a session or 
+     * Constructs an event for an attribute that is added to a session or
      * replaced by a new value.
-     * 
+     *
      * @param session The associated session.
-     * @param name The attribute name.
-     * @param value The attribute value.
+     * @param name    The attribute name.
+     * @param value   The attribute value.
      */
-    public FlexSessionBindingEvent(FlexSession session, String name, Object value)
-    {
+    public FlexSessionBindingEvent(FlexSession session, String name, Object value) {
         this.session = session;
         this.name = name;
         this.value = value;
@@ -65,50 +62,47 @@
      * The session that generated the event.
      */
     private FlexSession session;
-    
+
     /**
      * The name of the attribute associated with the event.
      */
     private String name;
-    
+
     /**
      * The value of the attribute associated with the event.
      */
     private Object value;
-    
+
     //--------------------------------------------------------------------------
     //
     // Methods
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Returns the Flex session that generated the event.
-     * 
+     *
      * @return The Flex session that generated the event.
      */
-    public FlexSession getSession()
-    {
+    public FlexSession getSession() {
         return session;
     }
-    
+
     /**
      * Returns the name of the attribute associated with the event.
-     * 
+     *
      * @return The name of the attribute associated with the event.
      */
-    public String getName()
-    {
+    public String getName() {
         return name;
     }
-    
+
     /**
      * Returns the value of the attribute associated with the event.
-     * 
+     *
      * @return The value of the attribute associated with the event.
      */
-    public Object getValue()
-    {
+    public Object getValue() {
         return value;
     }
 }
diff --git a/core/src/main/java/flex/messaging/FlexSessionBindingListener.java b/core/src/main/java/flex/messaging/FlexSessionBindingListener.java
index 3c9b98e..e606fc0 100644
--- a/core/src/main/java/flex/messaging/FlexSessionBindingListener.java
+++ b/core/src/main/java/flex/messaging/FlexSessionBindingListener.java
@@ -20,19 +20,18 @@
  * Interface to be notified when the object is bound or unbound from the Flex
  * session.
  */
-public interface FlexSessionBindingListener
-{
+public interface FlexSessionBindingListener {
     /**
      * Callback invoked when the object is bound to a Flex session.
-     * 
+     *
      * @param event The event containing the associated session and attribute
      *              information.
      */
     void valueBound(FlexSessionBindingEvent event);
-    
+
     /**
      * Callback invoked when the object is unbound from a Flex session.
-     * 
+     *
      * @param event The event containing the associated session and attribute
      *              information.
      */
diff --git a/core/src/main/java/flex/messaging/FlexSessionConnectivityEvent.java b/core/src/main/java/flex/messaging/FlexSessionConnectivityEvent.java
index 4f1e9bd..7a0ff46 100644
--- a/core/src/main/java/flex/messaging/FlexSessionConnectivityEvent.java
+++ b/core/src/main/java/flex/messaging/FlexSessionConnectivityEvent.java
@@ -21,8 +21,7 @@
 /**
  * An event dispatched when the connection state for a session changes.
  */
-public class FlexSessionConnectivityEvent extends EventObject
-{
+public class FlexSessionConnectivityEvent extends EventObject {
     /**
      *
      */
@@ -30,21 +29,19 @@
 
     /**
      * Constructs a new <tt>FlexSessionConnectivityEvent</tt> using the supplied source <tt>ConnectionAwareSession</tt>.
-     * 
+     *
      * @param session The session whose connection state has changed.
      */
-    public FlexSessionConnectivityEvent(ConnectionAwareSession session)
-    {
+    public FlexSessionConnectivityEvent(ConnectionAwareSession session) {
         super(session);
     }
-    
+
     /**
      * Returns the session whose connection state has changed.
-     * 
+     *
      * @return The session whose connection state has changed.
      */
-    public ConnectionAwareSession getFlexSession()
-    {
-        return (ConnectionAwareSession)getSource();
+    public ConnectionAwareSession getFlexSession() {
+        return (ConnectionAwareSession) getSource();
     }
 }
diff --git a/core/src/main/java/flex/messaging/FlexSessionConnectivityListener.java b/core/src/main/java/flex/messaging/FlexSessionConnectivityListener.java
index 2fc1137..c69e523 100644
--- a/core/src/main/java/flex/messaging/FlexSessionConnectivityListener.java
+++ b/core/src/main/java/flex/messaging/FlexSessionConnectivityListener.java
@@ -20,18 +20,17 @@
  * The listener interface for receiving FlexSession connectivity events.
  */
 
-public interface FlexSessionConnectivityListener
-{
+public interface FlexSessionConnectivityListener {
     /**
      * Invoked when the session has connected to the remote host.
-     * 
+     *
      * @param event The <tt>FlexSessionConnectivityEvent</tt> for the connect event.
      */
     void sessionConnected(FlexSessionConnectivityEvent event);
-    
+
     /**
      * Invoked when the session has disconnected from or lost connectivity to the remote host.
-     * 
+     *
      * @param event The <tt>FlexSessionConnectivityEvent</tt> for the disconnect event.
      */
     void sessionDisconnected(FlexSessionConnectivityEvent event);
diff --git a/core/src/main/java/flex/messaging/FlexSessionListener.java b/core/src/main/java/flex/messaging/FlexSessionListener.java
index b9058d5..3407c18 100644
--- a/core/src/main/java/flex/messaging/FlexSessionListener.java
+++ b/core/src/main/java/flex/messaging/FlexSessionListener.java
@@ -22,8 +22,7 @@
  * To listen for FlexSession destruction, the implementation class instance must add itself as a listener to
  * a specific FlexSession instance via the <code>addSessionDestroyedListener()</code> method.
  */
-public interface FlexSessionListener
-{
+public interface FlexSessionListener {
     /**
      * Notification that a FlexSession was created.
      *
diff --git a/core/src/main/java/flex/messaging/FlexSessionManager.java b/core/src/main/java/flex/messaging/FlexSessionManager.java
index 9ce1407..0fb1bd0 100644
--- a/core/src/main/java/flex/messaging/FlexSessionManager.java
+++ b/core/src/main/java/flex/messaging/FlexSessionManager.java
@@ -23,47 +23,42 @@
 import java.util.concurrent.ConcurrentHashMap;
 
 /**
- * Manages FlexSession instances for a MessageBroker. 
+ * Manages FlexSession instances for a MessageBroker.
  */
-public class FlexSessionManager extends ManageableComponent
-{
+public class FlexSessionManager extends ManageableComponent {
     public static final String TYPE = "FlexSessionManager";
-    
+
     private static final long MILLIS_IN_HOUR = 3600000;
-    
+
     //--------------------------------------------------------------------------
     //
     // Constructors
     //
     //--------------------------------------------------------------------------
-    
+
     /**
-     *
      * Constructs a <tt>FlexSessionManager</tt> for the passed <tt>MessageBroker</tt>.
-     * 
+     *
      * @param broker The root <tt>MessageBroker</tt> using this <tt>FlexSessionManager</tt>.
      */
-    public FlexSessionManager(MessageBroker broker)
-    {
+    public FlexSessionManager(MessageBroker broker) {
         this(false, broker);
     }
-    
+
     /**
-     *
      * Constructs a <tt>FlexSessionManager</tt> for the passed <tt>MessageBroker</tt> and optionally enables management.
      *
      * @param enableManagement <code>true</code> if the <tt>FlexSessionManager</tt>
      *                         is manageable; otherwise <code>false</code>.
-     * @param broker the message broker
+     * @param broker           the message broker
      */
-    public FlexSessionManager(boolean enableManagement, MessageBroker broker)
-    {
+    public FlexSessionManager(boolean enableManagement, MessageBroker broker) {
         super(enableManagement);
-        
+
         super.setId(TYPE);
-        
+
         this.broker = broker;
-        
+
         this.setParent(broker);
     }
 
@@ -77,43 +72,40 @@
      * Instance-level lock.
      */
     private final Object lock = new Object();
-    
+
     //--------------------------------------------------------------------------
     //
     // Properties
     //
     //--------------------------------------------------------------------------
-    
+
     //----------------------------------
     //  logCategory
     //----------------------------------
-    
+
     /**
      * Returns the log category for this component.
-     * 
+     *
      * @return The log category for this component.
      */
     @Override
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LogCategories.ENDPOINT_FLEXSESSION;
     }
-    
+
     //----------------------------------
     //  flexSessionCount
     //----------------------------------
-    
+
     private int flexSessionCount;
-    
+
     /**
      * Returns the total count of active FlexSessions.
-     * 
+     *
      * @return The total count of active FlexSessions.
      */
-    public int getFlexSessionCount()
-    {
-        synchronized (lock)
-        {
+    public int getFlexSessionCount() {
+        synchronized (lock) {
             return flexSessionCount;
         }
     }
@@ -123,122 +115,108 @@
     //----------------------------------
 
     private final ConcurrentHashMap<Class<? extends FlexSession>, AbstractFlexSessionProvider> providers = new ConcurrentHashMap<Class<? extends FlexSession>, AbstractFlexSessionProvider>();
-    
+
     /**
      * Returns the registered <tt>FlexSessionProvider</tt> implementation for the specified <tt>FlexSession</tt> type.
-     * 
+     *
      * @param sessionClass The specific <tt>FlexSession</tt> type to get a provider for.
      * @return The registered <tt>FlexSessionProvider</tt> or <code>null</code> if no provider is registered.
      */
-    public AbstractFlexSessionProvider getFlexSessionProvider(Class<? extends FlexSession> sessionClass)
-    {
+    public AbstractFlexSessionProvider getFlexSessionProvider(Class<? extends FlexSession> sessionClass) {
         return providers.get(sessionClass);
     }
-    
+
     /**
      * Registers a <tt>FlexSessionProvider</tt> implementation for a specified <tt>FlexSession</tt> type.
-     * 
+     *
      * @param sessionClass The specific <tt>FlexSession</tt> type to register a provider for.
-     * @param provider The corresponding <tt>FlexSessionProvider</tt> to register.
+     * @param provider     The corresponding <tt>FlexSessionProvider</tt> to register.
      * @return The previously registered provider, or <code>null</code> if no provider was registered for this session type.
      */
-    public AbstractFlexSessionProvider registerFlexSessionProvider(Class<? extends FlexSession> sessionClass, AbstractFlexSessionProvider provider)    
-    {
+    public AbstractFlexSessionProvider registerFlexSessionProvider(Class<? extends FlexSession> sessionClass, AbstractFlexSessionProvider provider) {
         provider.setFlexSessionManager(this);
         AbstractFlexSessionProvider previousProvider = providers.putIfAbsent(sessionClass, provider);
-        
-        if (previousProvider != null)
-        {
+
+        if (previousProvider != null) {
             previousProvider.stop();
             previousProvider.setFlexSessionManager(null);
         }
-        
+
         if (isStarted())
             provider.start();
 
         return previousProvider;
     }
-    
+
     /**
      * Unregisters a <tt>FlexSessionProvider</tt> implementation for a specified <tt>FlexSession</tt> type.
-     * 
+     *
      * @param sessionClass The specific <tt>FlexSession</tt> type to unregister a provider for.
      */
-    public void unregisterFlexSessionProvider(Class<? extends FlexSession> sessionClass)
-    {
+    public void unregisterFlexSessionProvider(Class<? extends FlexSession> sessionClass) {
         AbstractFlexSessionProvider provider = providers.remove(sessionClass);
-        if (provider != null)
-        {
+        if (provider != null) {
             provider.stop();
             provider.setFlexSessionManager(null);
         }
     }
-    
+
     //----------------------------------
     //  flexSessions
     //----------------------------------
-    
+
     /**
      * Registers a new <tt>FlexSession</tt> with the <tt>FlexSessionManager</tt>.
-     * 
+     *
      * @param session The new <tt>FlexSession</tt>.
      */
-    public void registerFlexSession(FlexSession session)
-    {
-        synchronized (lock)
-        {
-            ++flexSessionCount;            
+    public void registerFlexSession(FlexSession session) {
+        synchronized (lock) {
+            ++flexSessionCount;
             resetMaxFlexSessionsInCurrentHour(flexSessionCount);
         }
     }
-    
+
     /**
      * Unregisters an invalidated <tt>FlexSession</tt> from the <tt>FlexSessionManager</tt>.
-     * 
+     *
      * @param session The invalidated <tt>FlexSession</tt>.
      */
-    public void unregisterFlexSession(FlexSession session)
-    {
-        synchronized (lock)
-        {
+    public void unregisterFlexSession(FlexSession session) {
+        synchronized (lock) {
             --flexSessionCount;
-            resetMaxFlexSessionsInCurrentHour(flexSessionCount);            
+            resetMaxFlexSessionsInCurrentHour(flexSessionCount);
         }
     }
-    
+
     //----------------------------------
     //  maxFlexSessionsInCurrentHour
     //----------------------------------
-    
+
     private int maxSessionCountInCurrentHour;
     private long currentHourStartTimestamp = System.currentTimeMillis();
-    
-    public int getMaxFlexSessionsInCurrentHour()
-    {
-        synchronized (lock)
-        {            
+
+    public int getMaxFlexSessionsInCurrentHour() {
+        synchronized (lock) {
             // Make sure we report the correct value if the system has been idle across an hour transition.
             resetMaxFlexSessionsInCurrentHour(flexSessionCount);
-            
+
             return maxSessionCountInCurrentHour;
         }
     }
-    
+
     /* Must be called within a synchronized block. */
-    private void resetMaxFlexSessionsInCurrentHour(int currentCount)
-    {
+    private void resetMaxFlexSessionsInCurrentHour(int currentCount) {
         long offset = (System.currentTimeMillis() - currentHourStartTimestamp) / MILLIS_IN_HOUR;
         if (offset > 0) // Shift to the current hour and reset to the current session count.
         {
             currentHourStartTimestamp += (MILLIS_IN_HOUR * offset);
             maxSessionCountInCurrentHour = currentCount;
-        }
-        else if (maxSessionCountInCurrentHour < currentCount)
-        {
+        } else if (maxSessionCountInCurrentHour < currentCount) {
             maxSessionCountInCurrentHour = currentCount;
         }
     }
-    
+
     //----------------------------------
     //  messageBroker
     //----------------------------------
@@ -250,51 +228,46 @@
      *
      * @return The parent <tt>MessageBroker</tt> instance.
      */
-    public MessageBroker getMessageBroker()
-    {
+    public MessageBroker getMessageBroker() {
         return broker;
-    }    
-    
+    }
+
     //--------------------------------------------------------------------------
     //
     // Public Methods
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Starts the <tt>FlexSessionManager</tt>.
      * Any registered <tt>FlexSession</tt>s providers are also started.
      */
     @Override
-    public void start()
-    {
+    public void start() {
         if (isStarted())
             return;
-        
-        for (AbstractFlexSessionProvider provider : providers.values())
-        {
+
+        for (AbstractFlexSessionProvider provider : providers.values()) {
             if (!provider.isStarted())
                 provider.start();
-        }           
-        
+        }
+
         super.start();
     }
-    
+
     /**
      * Stops the <tt>FlexSessionManager</tt>.
-     * Any registered <tt>FlexSession</tt> providers are stopped and unregistered. 
+     * Any registered <tt>FlexSession</tt> providers are stopped and unregistered.
      */
     @Override
-    public void stop()
-    {
+    public void stop() {
         if (!isStarted())
             return;
-        
+
         super.stop();
 
         Enumeration<Class<? extends FlexSession>> sessionClasses = providers.keys();
-        while (sessionClasses.hasMoreElements())
-        {
+        while (sessionClasses.hasMoreElements()) {
             Class<? extends FlexSession> sessionClass = sessionClasses.nextElement();
             unregisterFlexSessionProvider(sessionClass);
         }
diff --git a/core/src/main/java/flex/messaging/HttpFlexSession.java b/core/src/main/java/flex/messaging/HttpFlexSession.java
index 3bf626a..3f90eda 100644
--- a/core/src/main/java/flex/messaging/HttpFlexSession.java
+++ b/core/src/main/java/flex/messaging/HttpFlexSession.java
@@ -40,8 +40,7 @@
  * FlexSession implementation for use with HTTP-based channels.
  */
 public class HttpFlexSession extends FlexSession
-    implements HttpSessionBindingListener, HttpSessionListener, HttpSessionAttributeListener, Serializable
-{
+        implements HttpSessionBindingListener, HttpSessionListener, HttpSessionAttributeListener, Serializable {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -49,21 +48,18 @@
     //--------------------------------------------------------------------------
 
     /**
-     *
      * Not for public use. This constructor is used to create an instance of this class that
      * will operate as a javax.servlet.http.HttpSessionListener registered in web.xml.
      */
-    public HttpFlexSession()
-    {}
+    public HttpFlexSession() {
+    }
 
     /**
-     *
      * Not for public use. Constructs new instances that effectively wrap pre-existing JEE HttpSession instances.
      *
      * @param provider HttpFlexSessionProvider object
      */
-    public HttpFlexSession(HttpFlexSessionProvider provider) 
-    {
+    public HttpFlexSession(HttpFlexSessionProvider provider) {
         super(provider);
     }
 
@@ -127,7 +123,6 @@
     /* package-private */ HttpSession httpSession;
 
     /**
-     *
      * Static lock for creating httpSessionToFlexSession map
      */
     public static final Object mapLock = new Object();
@@ -141,20 +136,18 @@
 
     /**
      * HttpSessionAttributeListener callback; processes the addition of an attribute to an HttpSession.
-     *
+     * <p>
      * NOTE: Callback is not made against an HttpFlexSession associated with a request
      * handling thread.
+     *
      * @param event the HttpSessionBindingEvent
      */
-    public void attributeAdded(HttpSessionBindingEvent event)
-    {
-        if (!event.getName().equals(SESSION_ATTRIBUTE))
-        {
+    public void attributeAdded(HttpSessionBindingEvent event) {
+        if (!event.getName().equals(SESSION_ATTRIBUTE)) {
             // Accessing flexSession via map because it may have already been unbound from httpSession.
             Map httpSessionToFlexSessionMap = getHttpSessionToFlexSessionMap(event.getSession());
-            HttpFlexSession flexSession = (HttpFlexSession)httpSessionToFlexSessionMap.get(event.getSession().getId());
-            if (flexSession != null)
-            {
+            HttpFlexSession flexSession = (HttpFlexSession) httpSessionToFlexSessionMap.get(event.getSession().getId());
+            if (flexSession != null) {
                 String name = event.getName();
                 Object value = event.getValue();
                 flexSession.notifyAttributeBound(name, value);
@@ -165,20 +158,18 @@
 
     /**
      * HttpSessionAttributeListener callback; processes the removal of an attribute from an HttpSession.
-     *
+     * <p>
      * NOTE: Callback is not made against an HttpFlexSession associated with a request
      * handling thread.
+     *
      * @param event the HttpSessionBindingEvent
      */
-    public void attributeRemoved(HttpSessionBindingEvent event)
-    {
-        if (!event.getName().equals(SESSION_ATTRIBUTE))
-        {
+    public void attributeRemoved(HttpSessionBindingEvent event) {
+        if (!event.getName().equals(SESSION_ATTRIBUTE)) {
             // Accessing flexSession via map because it may have already been unbound from httpSession.
             Map httpSessionToFlexSessionMap = getHttpSessionToFlexSessionMap(event.getSession());
-            HttpFlexSession flexSession = (HttpFlexSession)httpSessionToFlexSessionMap.get(event.getSession().getId());
-            if (flexSession != null)
-            {
+            HttpFlexSession flexSession = (HttpFlexSession) httpSessionToFlexSessionMap.get(event.getSession().getId());
+            if (flexSession != null) {
                 String name = event.getName();
                 Object value = event.getValue();
                 flexSession.notifyAttributeUnbound(name, value);
@@ -189,20 +180,18 @@
 
     /**
      * HttpSessionAttributeListener callback; processes the replacement of an attribute in an HttpSession.
-     *
+     * <p>
      * NOTE: Callback is not made against an HttpFlexSession associated with a request
      * handling thread.
+     *
      * @param event the HttpSessionBindingEvent
      */
-    public void attributeReplaced(HttpSessionBindingEvent event)
-    {
-        if (!event.getName().equals(SESSION_ATTRIBUTE))
-        {
+    public void attributeReplaced(HttpSessionBindingEvent event) {
+        if (!event.getName().equals(SESSION_ATTRIBUTE)) {
             // Accessing flexSession via map because it may have already been unbound from httpSession.
             Map httpSessionToFlexSessionMap = getHttpSessionToFlexSessionMap(event.getSession());
-            HttpFlexSession flexSession = (HttpFlexSession)httpSessionToFlexSessionMap.get(event.getSession().getId());
-            if (flexSession != null)
-            {
+            HttpFlexSession flexSession = (HttpFlexSession) httpSessionToFlexSessionMap.get(event.getSession().getId());
+            if (flexSession != null) {
                 String name = event.getName();
                 Object value = event.getValue();
                 Object newValue = flexSession.getAttribute(name);
@@ -219,43 +208,34 @@
      * Not intended for public use.
      *
      * @param req The Http request.
-     *
      * @return The HttpFlexSession.
-     * 
-     * @deprecated This method has been deprecated in favor of session providers registered with a <tt>MessageBroker</tt>.
      * @see flex.messaging.FlexSessionManager
      * @see flex.messaging.HttpFlexSessionProvider
+     * @deprecated This method has been deprecated in favor of session providers registered with a <tt>MessageBroker</tt>.
      */
-    public static HttpFlexSession getFlexSession(HttpServletRequest req)
-    {
+    public static HttpFlexSession getFlexSession(HttpServletRequest req) {
         HttpFlexSession flexSession;
         HttpSession httpSession = req.getSession(true);
 
-        if (!isHttpSessionListener && !warnedNoEventRedispatch)
-        {
+        if (!isHttpSessionListener && !warnedNoEventRedispatch) {
             warnedNoEventRedispatch = true;
             if (Log.isWarn())
                 Log.getLogger(WARN_LOG_CATEGORY).warn("HttpFlexSession has not been registered as a listener in web.xml for this application so no events will be dispatched to FlexSessionAttributeListeners or FlexSessionBindingListeners. To correct this, register flex.messaging.HttpFlexSession as a listener in web.xml.");
         }
 
         boolean isNew = false;
-        synchronized (httpSession)
-        {
-            flexSession = (HttpFlexSession)httpSession.getAttribute(HttpFlexSession.SESSION_ATTRIBUTE);
-            if (flexSession == null)
-            {
+        synchronized (httpSession) {
+            flexSession = (HttpFlexSession) httpSession.getAttribute(HttpFlexSession.SESSION_ATTRIBUTE);
+            if (flexSession == null) {
                 flexSession = new HttpFlexSession();
                 // Correlate this FlexSession to the HttpSession before triggering any listeners.
                 FlexContext.setThreadLocalSession(flexSession);
                 httpSession.setAttribute(SESSION_ATTRIBUTE, flexSession);
                 flexSession.setHttpSession(httpSession);
                 isNew = true;
-            }
-            else
-            {
+            } else {
                 FlexContext.setThreadLocalSession(flexSession);
-                if (flexSession.httpSession == null)
-                {
+                if (flexSession.httpSession == null) {
                     // httpSession is null if the instance is new or is from
                     // serialization.
                     flexSession.setHttpSession(httpSession);
@@ -264,8 +244,7 @@
             }
         }
 
-        if (isNew)
-        {
+        if (isNew) {
             flexSession.notifyCreated();
 
             if (Log.isDebug())
@@ -273,7 +252,7 @@
         }
 
         return flexSession;
-    }    
+    }
 
     /**
      * Returns the user principal associated with the session. This will
@@ -281,11 +260,9 @@
      *
      * @return The Principal associated with the session.
      */
-    public Principal getUserPrincipal()
-    {
+    public Principal getUserPrincipal() {
         Principal p = super.getUserPrincipal();
-        if (p == null)
-        {
+        if (p == null) {
             HttpServletRequest req = FlexContext.getHttpRequest();
             if (req != null && req.getAttribute(INVALIDATED_REQUEST) == null)
                 p = req.getUserPrincipal();
@@ -296,8 +273,7 @@
     /**
      * Invalidates the session.
      */
-    public void invalidate()
-    {
+    public void invalidate() {
         // If the HttpFlexSession is the current active FlexSession for the thread
         // we'll invalidate it but we need to recreate a new HttpFlexSession because
         // the client's HttpSession is still active.
@@ -306,7 +282,6 @@
     }
 
     /**
-     *
      * Used by Http endpoints when they receive notification from a client that it has
      * disconnected its channel.
      * Supports invalidating the HttpFlexSession and underlying JEE HttpSession without
@@ -314,27 +289,19 @@
      *
      * @param recreate true if the http session should be recreated.
      */
-    public void invalidate(boolean recreate)
-    {
-        synchronized (httpSession)
-        {
-            try
-            {
+    public void invalidate(boolean recreate) {
+        synchronized (httpSession) {
+            try {
                 // Invalidating the HttpSession will trigger invalidation of the HttpFlexSession
                 // either via the sessionDestroyed() event if registration as an HttpSession listener worked
                 // or via the valueUnbound() event if it didn't.
                 httpSession.invalidate();
-            }
-            catch (IllegalStateException e)
-            {
+            } catch (IllegalStateException e) {
                 // Make sure any related mapping is removed.
-                try
-                {
+                try {
                     Map httpSessionToFlexSessionMap = getHttpSessionToFlexSessionMap(httpSession);
                     httpSessionToFlexSessionMap.remove(httpSession.getId());
-                }
-                catch (Exception ignore)
-                {
+                } catch (Exception ignore) {
                     // NOWARN
                 }
 
@@ -342,26 +309,24 @@
                 super.invalidate();
             }
         }
-        if (recreate)
-        {
+        if (recreate) {
             HttpServletRequest req = FlexContext.getHttpRequest();
 
-            if (req != null)
-            {
+            if (req != null) {
                 // Set an attribute on the request denoting that the userPrincipal in the request
                 // is now invalid.
                 req.setAttribute(INVALIDATED_REQUEST, "true");
 
                 AbstractFlexSessionProvider sessionProvider = getFlexSessionProvider();
-                
+
                 // BLZ-531: When using spring integration getting a null pointer exception when calling invalidate 
                 // on a FlexSession twice
                 // If originally the HttpFlexSession was created using the deprecated HttpFlexSession.getFlexSession(request) API, 
                 // it does not have an associated AbstractFlexSessionProvider. Invoking invalidate(true) on such a session 
                 // results in the "recreated" FlexSession being NULL. To prevent this from happening, in case session provider 
                 // is NULL, we create the session using the deprecated HttpFlexSession.getFlexSession(request) API.
-                FlexSession session = sessionProvider == null ? 
-                        getFlexSession(req) : ((HttpFlexSessionProvider)sessionProvider).getOrCreateSession(req);
+                FlexSession session = sessionProvider == null ?
+                        getFlexSession(req) : ((HttpFlexSessionProvider) sessionProvider).getOrCreateSession(req);
 
                 FlexContext.setThreadLocalObjects(FlexContext.getFlexClient(),
                         session, FlexContext.getMessageBroker(), req,
@@ -378,8 +343,7 @@
      * @param name The name the target attribute is bound to.
      * @return The attribute bound to the specified name.
      */
-    public Object getAttribute(String name)
-    {
+    public Object getAttribute(String name) {
         return httpSession.getAttribute(name);
     }
 
@@ -388,8 +352,7 @@
      *
      * @return The names of all attributes bound to the session.
      */
-    public Enumeration getAttributeNames()
-    {
+    public Enumeration getAttributeNames() {
         return httpSession.getAttributeNames();
     }
 
@@ -398,20 +361,17 @@
      *
      * @return The Id for the session.
      */
-    public String getId()
-    {
+    public String getId() {
         return httpSession.getId();
     }
 
     /**
-     *
      * FlexClient invokes this to determine whether the session can be used to push messages
      * to the client.
      *
      * @return true if the FlexSession supports direct push; otherwise false (polling is assumed).
      */
-    public boolean isPushSupported()
-    {
+    public boolean isPushSupported() {
         return false;
     }
 
@@ -420,8 +380,7 @@
      *
      * @param name The name of the attribute to remove.
      */
-    public void removeAttribute(String name)
-    {
+    public void removeAttribute(String name) {
         httpSession.removeAttribute(name);
     }
 
@@ -432,10 +391,10 @@
      * session destruction.
      * NOTE: This method is not invoked against an HttpFlexSession associated with a request
      * handling thread.
+     *
      * @param event the HttpSessionEvent
      */
-    public void sessionCreated(HttpSessionEvent event)
-    {
+    public void sessionCreated(HttpSessionEvent event) {
         isHttpSessionListener = true;
     }
 
@@ -444,15 +403,14 @@
      * When an HttpSession is destroyed, the associated HttpFlexSession is also destroyed.
      * NOTE: This method is not invoked against an HttpFlexSession associated with a request
      * handling thread.
+     *
      * @param event the HttpSessionEvent
      */
-    public void sessionDestroyed(HttpSessionEvent event)
-    {
+    public void sessionDestroyed(HttpSessionEvent event) {
         HttpSession session = event.getSession();
         Map httpSessionToFlexSessionMap = getHttpSessionToFlexSessionMap(session);
-        HttpFlexSession flexSession = (HttpFlexSession)httpSessionToFlexSessionMap.remove(session.getId());
-        if (flexSession != null)
-        {
+        HttpFlexSession flexSession = (HttpFlexSession) httpSessionToFlexSessionMap.remove(session.getId());
+        if (flexSession != null) {
             // invalidate the flex session
             flexSession.superInvalidate();
 
@@ -461,23 +419,18 @@
             // but Java servlet 2.4 says session destroy is first, then attributes.
             // Guard against pre-2.4 containers that dispatch events in an incorrect order, 
             // meaning skip attribute processing here if the underlying session state is no longer valid.
-            try
-            {
-                for (Enumeration e = session.getAttributeNames(); e.hasMoreElements(); )
-                {
+            try {
+                for (Enumeration e = session.getAttributeNames(); e.hasMoreElements(); ) {
                     String name = (String) e.nextElement();
                     if (name.equals(SESSION_ATTRIBUTE))
                         continue;
                     Object value = session.getAttribute(name);
-                    if (value != null)
-                    {
+                    if (value != null) {
                         flexSession.notifyAttributeUnbound(name, value);
                         flexSession.notifyAttributeRemoved(name, value);
                     }
                 }
-            }
-            catch (IllegalStateException ignore)
-            {
+            } catch (IllegalStateException ignore) {
                 // NOWARN
                 // Old servlet container that dispatches events out of order.
             }
@@ -487,12 +440,10 @@
     /**
      * Binds an attribute to the session under the specified name.
      *
-     * @param name The name to bind the attribute under.
-     *
+     * @param name  The name to bind the attribute under.
      * @param value The attribute value.
      */
-    public void setAttribute(String name, Object value)
-    {
+    public void setAttribute(String name, Object value) {
         httpSession.setAttribute(name, value);
     }
 
@@ -501,10 +452,10 @@
      * This is a no-op.
      * NOTE: This method is not invoked against an HttpFlexSession associated with a request
      * handling thread.
+     *
      * @param event the HttpSessionBindingEvent
      */
-    public void valueBound(HttpSessionBindingEvent event)
-    {
+    public void valueBound(HttpSessionBindingEvent event) {
         // No-op.
     }
 
@@ -515,14 +466,13 @@
      * can't shut down based on the HttpSession being invalidated.
      * NOTE: This method is not invoked against an HttpFlexSession associated with a request
      * handling thread.
+     *
      * @param event the HttpSessionBindingEvent
      */
-    public void valueUnbound(HttpSessionBindingEvent event)
-    {
-        if (!isHttpSessionListener)
-        {
+    public void valueUnbound(HttpSessionBindingEvent event) {
+        if (!isHttpSessionListener) {
             Map httpSessionToFlexSessionMap = getHttpSessionToFlexSessionMap(event.getSession());
-            HttpFlexSession flexSession = (HttpFlexSession)httpSessionToFlexSessionMap.remove(event.getSession().getId());
+            HttpFlexSession flexSession = (HttpFlexSession) httpSessionToFlexSessionMap.remove(event.getSession().getId());
             if (flexSession != null)
                 flexSession.superInvalidate();
         }
@@ -537,8 +487,7 @@
     /**
      * We don't need to do anything here other than log out some info about the session that's shutting down.
      */
-    protected void internalInvalidate()
-    {
+    protected void internalInvalidate() {
         if (Log.isDebug())
             Log.getLogger(FLEX_SESSION_LOG_CATEGORY).debug("FlexSession with id '" + getId() + "' for an Http-based client connection has been invalidated.");
     }
@@ -554,10 +503,8 @@
      *
      * @param httpSession The HttpSession to associate with the FlexSession.
      */
-    /* package-private */ void setHttpSession(HttpSession httpSession)
-    {
-        synchronized (lock)
-        {
+    /* package-private */ void setHttpSession(HttpSession httpSession) {
+        synchronized (lock) {
             this.httpSession = httpSession;
             // Update lookup table for event redispatch.
             Map httpSessionToFlexSessionMap = getHttpSessionToFlexSessionMap(httpSession);
@@ -566,12 +513,10 @@
     }
 
     /**
-     *
      * Invoked by HttpSessionListener or binding listener on HttpSession invalidation to invalidate the wrapping
      * FlexSession.
      */
-    private void superInvalidate()
-    {
+    private void superInvalidate() {
         super.invalidate();
     }
 
@@ -581,21 +526,15 @@
      *
      * @param stream The stream to read instance state from.
      */
-    private void writeObject(ObjectOutputStream stream)
-    {
-        try
-        {
+    private void writeObject(ObjectOutputStream stream) {
+        try {
             Principal principal = super.getUserPrincipal();
             if (principal != null && principal instanceof Serializable)
                 stream.writeObject(principal);
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
             // Principal was Serializable and non-null; if this happens there's nothing we can do.
             // The user will need to reauthenticate if necessary.
-        }
-        catch (LocalizedException ignore)
-        {
+        } catch (LocalizedException ignore) {
             // This catch block added for bug 194144.
             // On BEA WebLogic, writeObject() is sometimes invoked on invalidated session instances
             // and in this case the checkValid() invocation in super.getUserPrincipal() throws.
@@ -609,14 +548,10 @@
      *
      * @param stream The stream to write instance state to.
      */
-    private void readObject(ObjectInputStream stream)
-    {
-        try
-        {
-            setUserPrincipal((Principal)stream.readObject());
-        }
-        catch (Exception e)
-        {
+    private void readObject(ObjectInputStream stream) {
+        try {
+            setUserPrincipal((Principal) stream.readObject());
+        } catch (Exception e) {
             // Principal was not serialized or failed to serialize; ignore.
             // The user will need to reauthenticate if necessary.
         }
@@ -631,33 +566,29 @@
      * has already been unbound... Additionally, we need it to handle attribute removal events that happen
      * during HttpSession destruction because the FlexSession can be unbound from the session before the
      * other attributes we receive notification for.
-     *
+     * <p>
      * Because of this, it's simplest to just maintain this lookup table and use it for all HttpSession
      * related event handling.
-     *
+     * <p>
      * The table is maintained on the servlet context instead of statically in order to prevent collisions
      * across web-apps.
      */
-    private Map getHttpSessionToFlexSessionMap(HttpSession session)
-    {
-        try
-        {
+    private Map getHttpSessionToFlexSessionMap(HttpSession session) {
+        try {
             ServletContext context = session.getServletContext();
-            Map map = (Map)context.getAttribute(SESSION_MAP);
+            Map map = (Map) context.getAttribute(SESSION_MAP);
 
-            if(map==null){
+            if (map == null) {
                 // map should never be null here as it is created during MessageBrokerServlet start-up
                 if (Log.isError())
                     Log.getLogger(FLEX_SESSION_LOG_CATEGORY).error("HttpSession to FlexSession map not created in message broker for "
                             + session.getId());
                 MessageException me = new MessageException();
-                me.setMessage(10032, new Object[] {session.getId()});
+                me.setMessage(10032, new Object[]{session.getId()});
                 throw me;
             }
             return map;
-        }
-        catch(Exception e)
-        {
+        } catch (Exception e) {
             if (Log.isDebug())
                 Log.getLogger(FLEX_SESSION_LOG_CATEGORY).debug("Unable to get HttpSession to FlexSession map for "
                         + session.getId() + " " + e.toString());
diff --git a/core/src/main/java/flex/messaging/HttpFlexSessionProvider.java b/core/src/main/java/flex/messaging/HttpFlexSessionProvider.java
index abdcb4c..4896d54 100644
--- a/core/src/main/java/flex/messaging/HttpFlexSessionProvider.java
+++ b/core/src/main/java/flex/messaging/HttpFlexSessionProvider.java
@@ -25,8 +25,7 @@
  * Provider implementation for <code>HttpFlexSession</code>s.
  * Not intended for public use.
  */
-public class HttpFlexSessionProvider extends AbstractFlexSessionProvider
-{
+public class HttpFlexSessionProvider extends AbstractFlexSessionProvider {
     //--------------------------------------------------------------------------
     //
     // Public Methods
@@ -38,40 +37,33 @@
      * or create and return a new <code>HttpFlexSession</code> if necessary.
      * The <code>HttpFlexSession</code> wraps the underlying J2EE <code>HttpSession</code>.
      * Not intended for public use.
-     * 
+     *
      * @param request The current <tt>HttpServletRequest</tt>.
      * @return A <tt>HttpFlexSession</tt>.
      */
-    public HttpFlexSession getOrCreateSession(HttpServletRequest request)
-    {
+    public HttpFlexSession getOrCreateSession(HttpServletRequest request) {
         HttpFlexSession flexSession;
         HttpSession httpSession = request.getSession(true);
 
-        if (!HttpFlexSession.isHttpSessionListener && !HttpFlexSession.warnedNoEventRedispatch)
-        {
+        if (!HttpFlexSession.isHttpSessionListener && !HttpFlexSession.warnedNoEventRedispatch) {
             HttpFlexSession.warnedNoEventRedispatch = true;
             if (Log.isWarn())
                 Log.getLogger(HttpFlexSession.WARN_LOG_CATEGORY).warn("HttpFlexSession has not been registered as a listener in web.xml for this application so no events will be dispatched to FlexSessionAttributeListeners or FlexSessionBindingListeners. To correct this, register flex.messaging.HttpFlexSession as a listener in web.xml.");
         }
 
         boolean isNew = false;
-        synchronized (httpSession)
-        {
-            flexSession = (HttpFlexSession)httpSession.getAttribute(HttpFlexSession.SESSION_ATTRIBUTE);
-            if (flexSession == null)
-            {
+        synchronized (httpSession) {
+            flexSession = (HttpFlexSession) httpSession.getAttribute(HttpFlexSession.SESSION_ATTRIBUTE);
+            if (flexSession == null) {
                 flexSession = new HttpFlexSession(this);
                 // Correlate this FlexSession to the HttpSession before triggering any listeners.
                 FlexContext.setThreadLocalSession(flexSession);
                 httpSession.setAttribute(HttpFlexSession.SESSION_ATTRIBUTE, flexSession);
                 flexSession.setHttpSession(httpSession);
                 isNew = true;
-            }
-            else
-            {
+            } else {
                 FlexContext.setThreadLocalSession(flexSession);
-                if (flexSession.httpSession == null)
-                {
+                if (flexSession.httpSession == null) {
                     // httpSession is null if the instance is new or is from
                     // serialization.
                     flexSession.setHttpSession(httpSession);
@@ -80,8 +72,7 @@
             }
         }
 
-        if (isNew)
-        {
+        if (isNew) {
             getFlexSessionManager().registerFlexSession(flexSession);
             flexSession.notifyCreated();
 
@@ -91,4 +82,4 @@
 
         return flexSession;
     }
-    }
+}
diff --git a/core/src/main/java/flex/messaging/MessageBroker.java b/core/src/main/java/flex/messaging/MessageBroker.java
index 23b308c..e148f23 100644
--- a/core/src/main/java/flex/messaging/MessageBroker.java
+++ b/core/src/main/java/flex/messaging/MessageBroker.java
@@ -83,8 +83,7 @@
  * The broker also has a means of pushing messages back through
  * endpoints to clients.
  */
-public class MessageBroker extends ManageableComponent
-{
+public class MessageBroker extends ManageableComponent {
     //--------------------------------------------------------------------------
     //
     // Public Static Constants
@@ -126,10 +125,14 @@
     // Package Protected Static Constants
     //
     //--------------------------------------------------------------------------
-    /** The default message broker id when one is not specified in web.xml. */
+    /**
+     * The default message broker id when one is not specified in web.xml.
+     */
     public static final String DEFAULT_BROKER_ID = "__default__";
 
-    /** A map of currently available message brokers indexed by message broker id. */
+    /**
+     * A map of currently available message brokers indexed by message broker id.
+     */
     static final Map<String, MessageBroker> messageBrokers = new HashMap<String, MessageBroker>();
 
     //--------------------------------------------------------------------------
@@ -151,31 +154,26 @@
     //--------------------------------------------------------------------------
 
     /**
-     *
      * Create a MessageBroker. This constructor will
      * establish collections for routers, endpoints,
      * and services.
      */
-    public MessageBroker()
-    {
+    public MessageBroker() {
         this(true, null);
     }
 
 
-    public MessageBroker(boolean enableManagement)
-    {
+    public MessageBroker(boolean enableManagement) {
         this(enableManagement, null);
     }
 
 
-    public MessageBroker(boolean enableManagement, String mbid)
-    {
+    public MessageBroker(boolean enableManagement, String mbid) {
         this(enableManagement, mbid, MessageBroker.class.getClassLoader());
     }
 
 
-    public MessageBroker(boolean enableManagement, String mbid, ClassLoader loader)
-    {
+    public MessageBroker(boolean enableManagement, String mbid, ClassLoader loader) {
         super(enableManagement);
         classLoader = loader;
         attributes = new ConcurrentHashMap<String, Object>();
@@ -199,17 +197,16 @@
         clusterManager = new ClusterManager(this);
         systemSettings = new SystemSettings();
 
-        if (isManaged())
-        {
+        if (isManaged()) {
             controller = new MessageBrokerControl(this);
             controller.register();
             setControl(controller);
 
-           logManager = new LogManager();
-           logManager.setLog(log);
-           logManager.setParent(this);
-           logManager.setupLogControl();
-           logManager.initialize(LOG_MANAGER_ID, null);
+            logManager = new LogManager();
+            logManager.setLog(log);
+            logManager.setParent(this);
+            logManager.setupLogControl();
+            logManager.initialize(LOG_MANAGER_ID, null);
         }
     }
 
@@ -263,11 +260,9 @@
     /**
      * Sets the id of the <code>MessageBroker</code>. If id is null, uses the
      * default broker id.
-     *
-     *
      */
-    @Override public void setId(String id)
-    {
+    @Override
+    public void setId(String id) {
         if (id == null)
             id = DEFAULT_BROKER_ID;
 
@@ -278,21 +273,18 @@
      * Retrieves a message broker with the supplied id.  This is defined via
      * the servlet init parameter messageBrokerId.  If no messageBrokerId is supplied, pass
      * in a null value for the id parameter.
-     *
+     * <p>
      * In case null is passed, the method tries to lookup the broker from current FlexContext.
      * If not available, it uses default ID to lookup the message broker.
      *
      * @param id The id of the message broker to retrieve.
      * @return The <code>MessageBroker</code> for the supplied id.
      */
-    public static MessageBroker getMessageBroker(String id)
-    {
-        if (id == null)
-        {
+    public static MessageBroker getMessageBroker(String id) {
+        if (id == null) {
             // If available, return the broker from FlexContext
             MessageBroker broker = FlexContext.getMessageBroker();
-            if (broker != null)
-            {
+            if (broker != null) {
                 return broker;
             }
 
@@ -304,10 +296,9 @@
 
     /**
      * Start the message broker's endpoints and services.
-     *
      */
-    @Override public void start()
-    {
+    @Override
+    public void start() {
         if (isStarted())
             return;
 
@@ -315,13 +306,11 @@
          * J2EE can be a real pain in terms of getting the right class loader so dump out
          * some detailed info about what is going on.
          */
-        if (Log.isDebug())
-        {
+        if (Log.isDebug()) {
             StringBuffer sb = new StringBuffer(100);
             if (classLoader == MessageBroker.class.getClassLoader())
                 sb.append(" the MessageBroker's class loader");
-            if (classLoader == Thread.currentThread().getContextClassLoader())
-            {
+            if (classLoader == Thread.currentThread().getContextClassLoader()) {
                 if (sb.length() > 0) sb.append(" and");
                 sb.append(" the context class loader");
             }
@@ -329,26 +318,23 @@
                 sb.append(" not the context or the message broker's class loader");
             Log.getLogger(LogCategories.CONFIGURATION).debug(
                     "MessageBroker id: " + getId() + " classLoader is:" +
-                    sb.toString() + " (" + "classLoader " + ClassUtil.classLoaderToString(classLoader));
+                            sb.toString() + " (" + "classLoader " + ClassUtil.classLoaderToString(classLoader));
         }
 
         // Catch any startup errors and log using our log machinery, then rethrow to trigger shutdown.
-        try
-        {
+        try {
             // MessageBroker doesn't call super.start() because it doesn't need the
             // usual validation that other components need
             setStarted(true);
 
             registerMessageBroker();
-            if (flexClientManager == null)
-            {
+            if (flexClientManager == null) {
                 flexClientManager = new FlexClientManager(isManaged(), this);
             }
             flexClientManager.start();
             flexSessionManager = new FlexSessionManager(isManaged(), this);
             flexSessionManager.start();
-            if (systemSettings == null)
-            {
+            if (systemSettings == null) {
                 systemSettings = new SystemSettings();
             }
             startServices();
@@ -356,9 +342,7 @@
             startEndpoints();
             startServers();
             redeployManager.start();
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             if (Log.isError())
                 Log.getLogger(LogCategories.CONFIGURATION).error("MessageBroker failed to start: " + ExceptionUtil.exceptionFollowedByRootCausesToString(e));
 
@@ -369,10 +353,9 @@
 
     /**
      * Stop the broker's endpoints, clusters, and services.
-     *
      */
-    @Override public void stop()
-    {
+    @Override
+    public void stop() {
         if (!isStarted())
             return;
 
@@ -393,13 +376,10 @@
 
         if (loginManager != null)
             loginManager.stop();
-        try
-        {
+        try {
             if (redeployManager != null)
                 redeployManager.stop();
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             t.printStackTrace();
         }
         clusterManager.destroyClusters();
@@ -426,8 +406,7 @@
      *
      * @return An iterator containing the current names of the attributes.
      */
-    public Iterator<String> getAttributeNames()
-    {
+    public Iterator<String> getAttributeNames() {
         return attributes.keySet().iterator();
     }
 
@@ -437,19 +416,17 @@
      * @param name The attribute name.
      * @return Object the attribute object
      */
-    public Object getAttribute(String name)
-    {
+    public Object getAttribute(String name) {
         return attributes.get(name);
     }
 
     /**
      * Binds an attribute value to the <tt>MessageBroker</tt> under the provided name.
      *
-     * @param name The attribute name.
+     * @param name  The attribute name.
      * @param value The attribute value.
      */
-    public void setAttribute(String name, Object value)
-    {
+    public void setAttribute(String name, Object value) {
         if (value == null)
             removeAttribute(name);
         else
@@ -461,8 +438,7 @@
      *
      * @param name The attribute name.
      */
-    public void removeAttribute(String name)
-    {
+    public void removeAttribute(String name) {
         attributes.remove(name);
     }
 
@@ -473,8 +449,7 @@
      * @return The deserialization validator of the <tt>MessageBroker</tt> or null
      * if none exists.
      */
-    public DeserializationValidator getDeserializationValidator()
-    {
+    public DeserializationValidator getDeserializationValidator() {
         return deserializationValidator;
     }
 
@@ -483,65 +458,53 @@
      *
      * @param deserializationValidator The deserialization validator.
      */
-    public void setDeserializationValidator(DeserializationValidator deserializationValidator)
-    {
+    public void setDeserializationValidator(DeserializationValidator deserializationValidator) {
         this.deserializationValidator = deserializationValidator;
     }
 
-    public void setExternalPathResolver(PathResolver externalPathResolver)
-    {
+    public void setExternalPathResolver(PathResolver externalPathResolver) {
         this.externalPathResolver = externalPathResolver;
     }
 
 
-    public void setInternalPathResolver(InternalPathResolver internalPathResolver)
-    {
+    public void setInternalPathResolver(InternalPathResolver internalPathResolver) {
         this.internalPathResolver = internalPathResolver;
     }
 
 
-    public InputStream resolveExternalPath(String filename) throws IOException
-    {
+    public InputStream resolveExternalPath(String filename) throws IOException {
         return externalPathResolver.resolve(filename);
     }
 
 
-    public InputStream resolveInternalPath(String filename) throws IOException
-    {
+    public InputStream resolveInternalPath(String filename) throws IOException {
         return internalPathResolver.resolve(filename);
     }
 
 
-    public interface PathResolver
-    {
+    public interface PathResolver {
         InputStream resolve(String filename) throws IOException;
     }
 
     /**
      * This interface is being kept for backwards compatibility.
-     *
      */
-    public interface InternalPathResolver extends PathResolver
-    {
+    public interface InternalPathResolver extends PathResolver {
         // No-op.
     }
 
 
-    public ClusterManager getClusterManager()
-    {
+    public ClusterManager getClusterManager() {
         return clusterManager;
     }
 
     /**
-     *
      * Add a <code>Server</code> to the broker's collection.
      *
      * @param server <code>Server</code> to be added.
      */
-    public void addServer(Server server)
-    {
-        if (server == null)
-        {
+    public void addServer(Server server) {
+        if (server == null) {
             // Cannot add null ''{0}'' to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT, new Object[]{"Server", MESSAGEBROKER});
@@ -550,8 +513,7 @@
 
         String id = server.getId();
 
-        if (id == null)
-        {
+        if (id == null) {
             // Cannot add ''{0}'' with null id to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT_ID, new Object[]{"Server", MESSAGEBROKER});
@@ -564,8 +526,7 @@
             return;
 
         // Do not allow servers with the same id
-        if (currentServer != null)
-        {
+        if (currentServer != null) {
             // Cannot add a ''{0}'' with the id ''{1}'' that is already registered with the ''{2}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.DUPLICATE_COMPONENT_ID, new Object[]{"Server", id, MESSAGEBROKER});
@@ -576,30 +537,25 @@
     }
 
     /**
-     *
      * Returns the <code>Server</code> with the specified id.
      *
      * @param id The id of the <code>Server</code>/
      * @return The <code>Server</code> with the specified id or null if no
      * <code>Server</code> with the id exists.
      */
-    public Server getServer(String id)
-    {
+    public Server getServer(String id) {
         return servers.get(id);
     }
 
     /**
-     *
      * Stops and removes the <code>Server</code> from the set of shared servers managed by the <code>MessageBroker</code>.
      *
      * @param id The id of the <code>Server</code> to remove.
      * @return <code>Server</code> that has been removed or <code>null</code> if it doesn't exist.
      */
-    public Server removeServer(String id)
-    {
+    public Server removeServer(String id) {
         Server server = servers.get(id);
-        if (server != null)
-        {
+        if (server != null) {
             server.stop();
             servers.remove(id);
         }
@@ -607,23 +563,20 @@
     }
 
     /**
-     *
      * Creates an <code>Endpoint</code> instance, sets its id and url.
      * It further sets the endpoint manageable if the <code>MessageBroker</code>
      * is manageable, and assigns its <code>MessageBroker</code> to the
      * <code>MessageBroker</code> that created it.
      *
-     * @param id The id of the endpoint.
-     * @param url The url of the endpoint.
+     * @param id        The id of the endpoint.
+     * @param url       The url of the endpoint.
      * @param className The class name of the endpoint.
-     *
      * @return The created <code>Endpoint</code> instance.
      */
-    public Endpoint createEndpoint(String id, String url, String className)
-    {
+    public Endpoint createEndpoint(String id, String url, String className) {
         Class endpointClass = ClassUtil.createClass(className, getClassLoader());
 
-        Endpoint endpoint = (Endpoint)ClassUtil.createDefaultInstance(endpointClass, Endpoint.class);
+        Endpoint endpoint = (Endpoint) ClassUtil.createDefaultInstance(endpointClass, Endpoint.class);
         endpoint.setId(id);
         endpoint.setUrl(url);
         endpoint.setManaged(isManaged());
@@ -633,17 +586,14 @@
     }
 
     /**
-     *
      * Add an endpoint to the broker's collection. Broker will accept the endpoint
      * to be added only if the endpoint is not null, it does not have null id or
      * url, and it does not have the same id or url as another endpoint.
      *
      * @param endpoint Endpoint to be added.
      */
-    public void addEndpoint(Endpoint endpoint)
-    {
-        if (endpoint == null)
-        {
+    public void addEndpoint(Endpoint endpoint) {
+        if (endpoint == null) {
             // Cannot add null ''{0}'' to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT, new Object[]{ENDPOINT, MESSAGEBROKER});
@@ -652,8 +602,7 @@
 
         String id = endpoint.getId();
 
-        if (id == null)
-        {
+        if (id == null) {
             // Cannot add ''{0}'' with null id to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT_ID, new Object[]{ENDPOINT, MESSAGEBROKER});
@@ -665,8 +614,7 @@
             return;
 
         // Do not allow endpoints with the same id
-        if (getEndpoint(id) != null)
-        {
+        if (getEndpoint(id) != null) {
             // Cannot add a ''{0}'' with the id ''{1}'' that is already registered with the ''{2}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.DUPLICATE_COMPONENT_ID, new Object[]{ENDPOINT, id, MESSAGEBROKER});
@@ -682,65 +630,54 @@
     }
 
     /**
-     *
      * Returns the <code>Endpoint</code> with the specified id.
      *
      * @param id The id of the <code>Endpoint</code>/
      * @return The <code>Endpoint</code> with the specified id or null if no <code>Endpoint</code> with the id exists.
      */
-    public Endpoint getEndpoint(String id)
-    {
+    public Endpoint getEndpoint(String id) {
         return endpoints.get(id);
     }
 
     /**
-     *
      * Retrieve the map of all endpoints in this broker.
      *
      * @return the map of all endpoints in this broker
      */
-    public Map<String, Endpoint> getEndpoints()
-    {
+    public Map<String, Endpoint> getEndpoints() {
         return endpoints;
     }
 
     /**
-     *
      * Retrieve an endpoint based on a requested URL path. Two endpoints should not be
      * registered to the same path.
      *
-     * @param path the URL path
+     * @param path        the URL path
      * @param contextPath the context path
      * @return endpoint based on a requested URL path
      */
-    public Endpoint getEndpoint(String path, String contextPath)
-    {
-        for (String id : endpoints.keySet())
-        {
+    public Endpoint getEndpoint(String path, String contextPath) {
+        for (String id : endpoints.keySet()) {
             Endpoint e = endpoints.get(id);
 
-            if (matchEndpoint(path, contextPath, e))
-            {
+            if (matchEndpoint(path, contextPath, e)) {
                 return e;
             }
         }
         MessageException lme = new MessageException();
-        lme.setMessage(10003, new Object[] {path});
+        lme.setMessage(10003, new Object[]{path});
         throw lme;
     }
 
     /**
-     *
      * Removes an endpoint from the <code>MessageBroker</code>.
      *
      * @param id The id of the endpoint.
      * @return The removed endpoint.
      */
-    public Endpoint removeEndpoint(String id)
-    {
+    public Endpoint removeEndpoint(String id) {
         Endpoint endpoint = getEndpoint(id);
-        if (endpoint != null)
-        {
+        if (endpoint != null) {
             endpoint.stop();
             endpoints.remove(id);
         }
@@ -754,8 +691,7 @@
      * @return True if the endpoint validation is enforced on the server, regardless
      * of whether client requested endpoint validation or not.
      */
-    public boolean isEnforceEndpointValidation()
-    {
+    public boolean isEnforceEndpointValidation() {
         return enforceEndpointValidation;
     }
 
@@ -765,8 +701,7 @@
      *
      * @param enforceEndpointValidation The endpoint validation flag.
      */
-    public void setEnforceEndpointValidation(boolean enforceEndpointValidation)
-    {
+    public void setEnforceEndpointValidation(boolean enforceEndpointValidation) {
         this.enforceEndpointValidation = enforceEndpointValidation;
     }
 
@@ -777,8 +712,7 @@
      * @return The <code>FlexFactory</code> with the specified id or null if no
      * factory with the id exists.
      */
-    public FlexFactory getFactory(String id)
-    {
+    public FlexFactory getFactory(String id) {
         return factories.get(id);
     }
 
@@ -787,34 +721,29 @@
      *
      * @return The map of <code>FlexFactory</code> instances.
      */
-    public Map<String, FlexFactory> getFactories()
-    {
-       return factories;
+    public Map<String, FlexFactory> getFactories() {
+        return factories;
     }
 
     /**
      * Registers a factory with the <code>MessageBroker</code>.
      *
-     * @param id The id of the factory.
+     * @param id      The id of the factory.
      * @param factory <code>FlexFactory</code> instance.
      */
-    public void addFactory(String id, FlexFactory factory)
-    {
-        if (id == null)
-        {
+    public void addFactory(String id, FlexFactory factory) {
+        if (id == null) {
             // Cannot add ''{0}'' with null id to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT_ID, new Object[]{"FlexFactory", MESSAGEBROKER});
             throw ex;
         }
         // No need to add if factory is already added
-        if (getFactory(id) == factory)
-        {
+        if (getFactory(id) == factory) {
             return;
         }
         // Do not allow multiple factories with the same id
-        if (getFactory(id) != null)
-        {
+        if (getFactory(id) != null) {
             // Cannot add a ''{0}'' with the id ''{1}'' that is already registered with the ''{2}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.DUPLICATE_COMPONENT_ID, new Object[]{"FlexFactory", id, MESSAGEBROKER});
@@ -830,11 +759,9 @@
      * @param id The id of the <code>FlexFactory</code>.
      * @return <code>FlexFactory</code> that has been removed.
      */
-    public FlexFactory removeFactory(String id)
-    {
+    public FlexFactory removeFactory(String id) {
         FlexFactory factory = getFactory(id);
-        if (factory != null)
-        {
+        if (factory != null) {
             factories.remove(id);
         }
         return factory;
@@ -847,8 +774,7 @@
      * @return The <code>Service</code> with the specified id or null if no
      * <code>Service</code> with the id exists.
      */
-    public Service getService(String id)
-    {
+    public Service getService(String id) {
         return services.get(id);
     }
 
@@ -864,12 +790,9 @@
      * @param type the fully qualified class name of the service implementation.
      * @return a service or null if not found.
      */
-    public Service getServiceByType(String type)
-    {
-        for (Service svc : services.values())
-        {
-            if (svc.getClass().getName().equals(type))
-            {
+    public Service getServiceByType(String type) {
+        for (Service svc : services.values()) {
+            if (svc.getClass().getName().equals(type)) {
                 return svc;
             }
         }
@@ -881,8 +804,7 @@
      *
      * @return The Map of <code>Service</code> instances.
      */
-    public Map<String, Service> getServices()
-    {
+    public Map<String, Service> getServices() {
         return services;
     }
 
@@ -891,33 +813,29 @@
      * needs.
      *
      * @param endpoint Endpoint used to filter the destinations of the service;
-     * no filtering is done if the endpoint is null.
+     *                 no filtering is done if the endpoint is null.
      * @return ConfigMap of server properties.
      */
-    public ConfigMap describeServices(Endpoint endpoint)
-    {
-       return describeServices(endpoint, true);
+    public ConfigMap describeServices(Endpoint endpoint) {
+        return describeServices(endpoint, true);
     }
 
     /**
-     *
      * Returns a <tt>ConfigMap</tt> of service and channel properties that the client
      * needs.
      * The <tt>allDestinations</tt> flag controls whether configuration for all
      * destinations or only reliable client destinations is returned.
      *
-     * @param endpoint Endpoint used to filter the destinations of the service.
-     * No filtering is done if the endpoint is null.
+     * @param endpoint     Endpoint used to filter the destinations of the service.
+     *                     No filtering is done if the endpoint is null.
      * @param onlyReliable When false, configuration for all destinations is
-     * returned instead of only reliable destinations.
+     *                     returned instead of only reliable destinations.
      * @return ConfigMap of service properties.
      */
-    public ConfigMap describeServices(Endpoint endpoint, boolean onlyReliable)
-    {
+    public ConfigMap describeServices(Endpoint endpoint, boolean onlyReliable) {
         // Let the service validation listeners know about the configuration change.
-        if (!serviceValidationListeners.isEmpty())
-        {
-            for (Enumeration<ServiceValidationListener> iter = serviceValidationListeners.elements(); iter.hasMoreElements();)
+        if (!serviceValidationListeners.isEmpty()) {
+            for (Enumeration<ServiceValidationListener> iter = serviceValidationListeners.elements(); iter.hasMoreElements(); )
                 iter.nextElement().validateServices();
         }
 
@@ -926,21 +844,16 @@
         // Keep track of channel ids as we encounter them so we can generate
         // the channel properties that might be needed by the client.
         ArrayList<String> channelIds = new ArrayList<String>();
-        if (endpoint == null)
-        {
-            for (Endpoint endpointToAdd: getEndpoints().values())
+        if (endpoint == null) {
+            for (Endpoint endpointToAdd : getEndpoints().values())
                 channelIds.add(endpointToAdd.getId());
-        }
-        else
-        {
+        } else {
             channelIds.add(endpoint.getId());
         }
 
-        if (defaultChannels != null)
-        {
+        if (defaultChannels != null) {
             ConfigMap defaultChannelsMap = new ConfigMap();
-            for (Object defaultChannel : defaultChannels)
-            {
+            for (Object defaultChannel : defaultChannels) {
                 String id = (String) defaultChannel;
                 ConfigMap channelConfig = new ConfigMap();
                 channelConfig.addProperty(ConfigurationConstants.REF_ATTR, id);
@@ -952,10 +865,9 @@
                 servicesConfig.addProperty(ConfigurationConstants.DEFAULT_CHANNELS_ELEMENT, defaultChannelsMap);
         }
 
-        for (Service service : services.values())
-        {
-            ConfigMap serviceConfig = service instanceof AbstractService?
-                    ((AbstractService)service).describeService(endpoint, onlyReliable) : service.describeService(endpoint);
+        for (Service service : services.values()) {
+            ConfigMap serviceConfig = service instanceof AbstractService ?
+                    ((AbstractService) service).describeService(endpoint, onlyReliable) : service.describeService(endpoint);
             if (serviceConfig != null && serviceConfig.size() > 0)
                 servicesConfig.addProperty(ConfigurationConstants.SERVICE_ELEMENT, serviceConfig);
         }
@@ -964,11 +876,9 @@
         // compile in services-config.xml and hence doesn't have channels section
         // of the configuration - but only if channel/endpoint is not tagged as "remote"!
         ConfigMap channels = new ConfigMap();
-        for (String id : channelIds)
-        {
+        for (String id : channelIds) {
             Endpoint currentEndpoint = getEndpoint(id);
-            if (currentEndpoint instanceof AbstractEndpoint && ((AbstractEndpoint)currentEndpoint).isRemote())
-            {
+            if (currentEndpoint instanceof AbstractEndpoint && ((AbstractEndpoint) currentEndpoint).isRemote()) {
                 continue; // Client already has configuration for "remote" endpoint by other means.
             }
 
@@ -982,7 +892,7 @@
         if (Log.isDebug())
             Log.getLogger(ConfigurationManager.LOG_CATEGORY).debug(
                     "Returning service description for endpoint: " +
-                    (endpoint == null? "all" : endpoint.getId()) + " config: " + servicesConfig);
+                            (endpoint == null ? "all" : endpoint.getId()) + " config: " + servicesConfig);
 
         return servicesConfig;
     }
@@ -991,13 +901,11 @@
      * Add a listener for the describeServices callback.  The describeServices listener
      * is called before any execution of the describeServices method.
      *
-     * @param id Identifier of the listener to add
+     * @param id       Identifier of the listener to add
      * @param listener The listener callback
      */
-    public void addServiceValidationListener(String id, ServiceValidationListener listener)
-    {
-        if (listener != null)
-        {
+    public void addServiceValidationListener(String id, ServiceValidationListener listener) {
+        if (listener != null) {
             serviceValidationListeners.putIfAbsent(id, listener);
         }
     }
@@ -1008,8 +916,7 @@
      *
      * @return An <tt>Iterator</tt> for all registered <tt>ServiceValidationListeners</tt>.
      */
-    public Iterator<ServiceValidationListener> getServiceValidationListenerIterator()
-    {
+    public Iterator<ServiceValidationListener> getServiceValidationListenerIterator() {
         return serviceValidationListeners.values().iterator();
     }
 
@@ -1018,10 +925,8 @@
      *
      * @param id Identifier of the listener to remove
      */
-    public void removeServiceValidationListener(String id)
-    {
-        if (serviceValidationListeners.containsKey(id))
-        {
+    public void removeServiceValidationListener(String id) {
+        if (serviceValidationListeners.containsKey(id)) {
             serviceValidationListeners.remove(id);
         }
     }
@@ -1032,16 +937,14 @@
      * and sets its <code>MessageBroker</code> to the <code>MessageBroker</code> that
      * created it.
      *
-     * @param id The id of the <code>Service</code>.
+     * @param id        The id of the <code>Service</code>.
      * @param className The class name of the <code>Service</code>.
-     *
      * @return The <code>Service</code> instanced created.
      */
-    public Service createService(String id, String className)
-    {
+    public Service createService(String id, String className) {
         Class svcClass = ClassUtil.createClass(className, getClassLoader());
 
-        Service service = (Service)ClassUtil.createDefaultInstance(svcClass, Service.class);
+        Service service = (Service) ClassUtil.createDefaultInstance(svcClass, Service.class);
         service.setId(id);
         service.setManaged(isManaged());
         service.setMessageBroker(this);
@@ -1053,7 +956,7 @@
      * Add a message type -to- service mapping to the broker's collection.
      * When the broker attempts to route a message to a service, it finds the first
      * service capable of handling the message type.
-     *
+     * <p>
      * Note that <code>Service</code> cannot be null, it cannot have a null
      * id, and it cannot have the same id or type of a <code>Service</code>
      * already registered with the <code>MessageBroker</code>.
@@ -1062,12 +965,9 @@
      * is already running.
      *
      * @param service The service instance used to handle the messages
-     *
      */
-    public void addService(Service service)
-    {
-        if (service == null)
-        {
+    public void addService(Service service) {
+        if (service == null) {
             // Cannot add null ''{0}'' to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT, new Object[]{SERVICE, MESSAGEBROKER});
@@ -1076,21 +976,18 @@
 
         String id = service.getId();
 
-        if (id == null)
-        {
+        if (id == null) {
             // Cannot add ''{0}'' with null id to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT_ID, new Object[]{SERVICE, MESSAGEBROKER});
             throw ex;
         }
         // No need to add if service is already added
-        if (getService(id) == service)
-        {
+        if (getService(id) == service) {
             return;
         }
         // Do not allow multiple services with the same id
-        if (getService(id) != null)
-        {
+        if (getService(id) != null) {
             // Cannot add a ''{0}'' with the id ''{1}'' that is already registered with the ''{2}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.DUPLICATE_COMPONENT_ID, new Object[]{SERVICE, id, MESSAGEBROKER});
@@ -1106,8 +1003,7 @@
 
         services.put(id, service);
 
-        if (service.getMessageBroker() == null || service.getMessageBroker() != this)
-        {
+        if (service.getMessageBroker() == null || service.getMessageBroker() != this) {
             service.setMessageBroker(this);
         }
     }
@@ -1119,11 +1015,9 @@
      * @param id The id of the <code>Service</code>.
      * @return Previous <code>Service</code> associated with the id.
      */
-    public Service removeService(String id)
-    {
+    public Service removeService(String id) {
         Service service = getService(id);
-        if (service != null)
-        {
+        if (service != null) {
             service.stop();
             services.remove(id);
         }
@@ -1135,26 +1029,22 @@
      *
      * @return Logger of the <code>MessageBroker</code>.
      */
-    public Log getLog()
-    {
+    public Log getLog() {
         return log;
     }
 
 
-    public LogManager getLogManager()
-    {
+    public LogManager getLogManager() {
         return logManager;
     }
 
 
-    public LoginManager getLoginManager()
-    {
+    public LoginManager getLoginManager() {
         return loginManager;
     }
 
 
-    public void setLoginManager(LoginManager loginManager)
-    {
+    public void setLoginManager(LoginManager loginManager) {
         if (this.loginManager != null && this.loginManager.isStarted())
             this.loginManager.stop();
 
@@ -1165,38 +1055,32 @@
     }
 
 
-    public FlexClientManager getFlexClientManager()
-    {
+    public FlexClientManager getFlexClientManager() {
         return flexClientManager;
     }
 
 
-    public void setFlexClientManager(FlexClientManager value)
-    {
+    public void setFlexClientManager(FlexClientManager value) {
         flexClientManager = value;
     }
 
 
-    public FlexSessionManager getFlexSessionManager()
-    {
+    public FlexSessionManager getFlexSessionManager() {
         return flexSessionManager;
     }
 
 
-    public void setFlexSessionManager(FlexSessionManager value)
-    {
+    public void setFlexSessionManager(FlexSessionManager value) {
         flexSessionManager = value;
     }
 
 
-    public RedeployManager getRedeployManager()
-    {
+    public RedeployManager getRedeployManager() {
         return redeployManager;
     }
 
 
-    public void setRedeployManager(RedeployManager redeployManager)
-    {
+    public void setRedeployManager(RedeployManager redeployManager) {
         if (this.redeployManager != null && this.redeployManager.isStarted())
             this.redeployManager.stop();
 
@@ -1207,14 +1091,12 @@
     }
 
 
-    public Class<? extends ThrottleManager> getThrottleManagerClass()
-    {
+    public Class<? extends ThrottleManager> getThrottleManagerClass() {
         return throttleManagerClass;
     }
 
 
-    public void setThrottleManagerClass(Class<? extends ThrottleManager> throttleManagerClass)
-    {
+    public void setThrottleManagerClass(Class<? extends ThrottleManager> throttleManagerClass) {
         this.throttleManagerClass = throttleManagerClass;
     }
 
@@ -1224,20 +1106,18 @@
      *
      * @return String the UUID.
      */
-    public String createUUID()
-    {
-        return uuidGenerator != null? uuidGenerator.createUUID() : UUIDUtils.createUUID();
+    public String createUUID() {
+        return uuidGenerator != null ? uuidGenerator.createUUID() : UUIDUtils.createUUID();
     }
 
     /**
      * Returns the custom <tt>UUIDGenerator</tt> used by the <tt>MessageBroker</tt>
      * for NIO-HTTP session cookie value and <tt>FlexClient</tt> id generation or null if
-     *  the default UUID generator, <tt>UUIDUtils</tt>, is being used.
+     * the default UUID generator, <tt>UUIDUtils</tt>, is being used.
      *
      * @return The custom <tt>UUIDGenerator</tt> used by <tt>MessageBroker</tt> or null.
      */
-    public UUIDGenerator getUUIDGenerator()
-    {
+    public UUIDGenerator getUUIDGenerator() {
         return uuidGenerator;
     }
 
@@ -1248,8 +1128,7 @@
      *
      * @param value The custom <tt>UUIDGenerator</tt>.
      */
-    public void setUUIDGenerator(UUIDGenerator value)
-    {
+    public void setUUIDGenerator(UUIDGenerator value) {
         uuidGenerator = value;
     }
 
@@ -1258,26 +1137,22 @@
      *
      * @return The list of channel ids.
      */
-    public List<String> getChannelIds()
-    {
-        return (endpoints != null && endpoints.size() != 0)? new ArrayList<String>(endpoints.keySet()) : null;
+    public List<String> getChannelIds() {
+        return (endpoints != null && endpoints.size() != 0) ? new ArrayList<String>(endpoints.keySet()) : null;
     }
 
 
-    public ChannelSettings getChannelSettings(String ref)
-    {
+    public ChannelSettings getChannelSettings(String ref) {
         return channelSettings.get(ref);
     }
 
 
-    public Map<String, ChannelSettings> getAllChannelSettings()
-    {
+    public Map<String, ChannelSettings> getAllChannelSettings() {
         return channelSettings;
     }
 
 
-    public void setChannelSettings(Map<String, ChannelSettings> channelSettings)
-    {
+    public void setChannelSettings(Map<String, ChannelSettings> channelSettings) {
         this.channelSettings = channelSettings;
     }
 
@@ -1287,8 +1162,7 @@
      *
      * @return Default channel ids of the MessageBroker.
      */
-    public List<String> getDefaultChannels()
-    {
+    public List<String> getDefaultChannels() {
         return defaultChannels;
     }
 
@@ -1297,21 +1171,18 @@
      *
      * @param id The id of the channel to add to the list of default channel ids.
      */
-    public void addDefaultChannel(String id)
-    {
+    public void addDefaultChannel(String id) {
         if (defaultChannels == null)
             defaultChannels = new ArrayList<String>();
         else if (defaultChannels.contains(id))
             return;
 
         List<String> channelIds = getChannelIds();
-        if (channelIds == null || !channelIds.contains(id))
-        {
+        if (channelIds == null || !channelIds.contains(id)) {
             // No channel with id ''{0}'' is known by the MessageBroker.
-            if (Log.isWarn())
-            {
+            if (Log.isWarn()) {
                 Log.getLogger(LOG_CATEGORY).warn("No channel with id '{0}' is known by the MessageBroker." +
-                        " Not adding the channel.",
+                                " Not adding the channel.",
                         new Object[]{id});
             }
             return;
@@ -1324,21 +1195,16 @@
      *
      * @param ids Default channel ids of the MessageBroker.
      */
-    public void setDefaultChannels(List<String> ids)
-    {
-        if (ids != null)
-        {
+    public void setDefaultChannels(List<String> ids) {
+        if (ids != null) {
             List<String> channelIds = getChannelIds();
-            for (Iterator<String> iter = ids.iterator(); iter.hasNext();)
-            {
+            for (Iterator<String> iter = ids.iterator(); iter.hasNext(); ) {
                 String id = iter.next();
-                if (channelIds == null || !channelIds.contains(id))
-                {
+                if (channelIds == null || !channelIds.contains(id)) {
                     iter.remove();
-                    if (Log.isWarn())
-                    {
+                    if (Log.isWarn()) {
                         Log.getLogger(LOG_CATEGORY).warn("No channel with id '{0}' is known by the MessageBroker." +
-                                " Not adding the channel.",
+                                        " Not adding the channel.",
                                 new Object[]{id});
                     }
                 }
@@ -1353,8 +1219,7 @@
      * @param id The id of the channel to remove from the list of default channel ids.
      * @return <code>true</code> if the list contained the channel id.
      */
-    public boolean removeDefaultChannel(String id)
-    {
+    public boolean removeDefaultChannel(String id) {
         return defaultChannels != null && defaultChannels.remove(id);
     }
 
@@ -1365,56 +1230,47 @@
      * @param ref The reference of the <code>SecurityConstraint</code>
      * @return The <code>SecurityConstraint</code> with the indicated reference id.
      */
-    public SecurityConstraint getSecurityConstraint(String ref)
-    {
+    public SecurityConstraint getSecurityConstraint(String ref) {
         return getSecuritySettings().getConstraint(ref);
     }
 
 
-    public ServletContext getServletContext()
-    {
+    public ServletContext getServletContext() {
         return servletContext;
     }
 
 
-    public SecuritySettings getSecuritySettings()
-    {
+    public SecuritySettings getSecuritySettings() {
         return securitySettings;
     }
 
 
-    public void setSecuritySettings(SecuritySettings securitySettings)
-    {
+    public void setSecuritySettings(SecuritySettings securitySettings) {
         this.securitySettings = securitySettings;
     }
 
 
-    public SystemSettings getSystemSettings()
-    {
+    public SystemSettings getSystemSettings() {
         return systemSettings;
     }
 
 
-    public void setSystemSettings(SystemSettings l)
-    {
+    public void setSystemSettings(SystemSettings l) {
         systemSettings = l;
     }
 
 
-    public FlexClientSettings getFlexClientSettings()
-    {
+    public FlexClientSettings getFlexClientSettings() {
         return flexClientSettings;
     }
 
 
-    public void setFlexClientSettings(FlexClientSettings value)
-    {
+    public void setFlexClientSettings(FlexClientSettings value) {
         flexClientSettings = value;
     }
 
 
-    public void initThreadLocals()
-    {
+    public void initThreadLocals() {
         // No thread-locals anymore, so no-op.
     }
 
@@ -1428,11 +1284,10 @@
      *
      * @param message  The message to be routed to a service
      * @param endpoint This can identify the endpoint that is sending the message
-     * but it is currently not used so you may pass in null.
+     *                 but it is currently not used so you may pass in null.
      * @return <code>AcknowledgeMessage</code> with result.
      */
-    public AcknowledgeMessage routeMessageToService(Message message, Endpoint endpoint)
-    {
+    public AcknowledgeMessage routeMessageToService(Message message, Endpoint endpoint) {
         // Make sure message has a messageId
         checkMessageId(message);
 
@@ -1440,21 +1295,17 @@
         boolean serviced = false;
         Service service = null;
         String destId = message.getDestination();
-        try
-        {
+        try {
             String serviceId = destId != null ? destinationToService.get(destId) : null;
 
-            if ((serviceId == null) && (destId != null) && (!serviceValidationListeners.isEmpty()))
-            {
-                for (Enumeration<ServiceValidationListener> iter = serviceValidationListeners.elements(); iter.hasMoreElements();)
-                {
+            if ((serviceId == null) && (destId != null) && (!serviceValidationListeners.isEmpty())) {
+                for (Enumeration<ServiceValidationListener> iter = serviceValidationListeners.elements(); iter.hasMoreElements(); ) {
                     iter.nextElement().validateDestination(destId);
                 }
                 serviceId = destinationToService.get(destId);
             }
 
-            if (serviceId != null)
-            {
+            if (serviceId != null) {
                 service = services.get(serviceId);
                 serviced = true;
                 Destination destination = service.getDestination(destId);
@@ -1466,37 +1317,32 @@
                 if (Log.isDebug())
                     Log.getLogger(getLogCategory(message)).debug(
                             "Before invoke service: " + service.getId() + StringUtils.NEWLINE +
-                            "  incomingMessage: " + message + StringUtils.NEWLINE);
+                                    "  incomingMessage: " + message + StringUtils.NEWLINE);
 
                 extractRemoteCredentials(service, message);
                 serviceResult = service.serviceMessage(message);
             }
 
-            if (!serviced)
-            {
+            if (!serviced) {
                 MessageException lme = new MessageException();
                 // The supplied destination id is not registered with any service.
                 lme.setMessage(ERR_MSG_NO_SERVICE_FOR_DEST);
                 throw lme;
             }
 
-            if (Log.isDebug())
-            {
+            if (Log.isDebug()) {
                 String debugServiceResult = Log.getPrettyPrinter().prettify(serviceResult);
                 Log.getLogger(getLogCategory(message)).debug(
-                     "After invoke service: " + service.getId() + StringUtils.NEWLINE +
-                     "  reply: " + debugServiceResult + StringUtils.NEWLINE);
+                        "After invoke service: " + service.getId() + StringUtils.NEWLINE +
+                                "  reply: " + debugServiceResult + StringUtils.NEWLINE);
             }
 
             AcknowledgeMessage ack;
-            if (serviceResult instanceof AcknowledgeMessage)
-            {
+            if (serviceResult instanceof AcknowledgeMessage) {
                 // service will return an ack if they need to transform it in some
                 // service-specific way (paging is an example)
-                ack = (AcknowledgeMessage)serviceResult;
-            }
-            else
-            {
+                ack = (AcknowledgeMessage) serviceResult;
+            } else {
                 // most services will return a result of some sort, possibly null,
                 // and expect the broker to compose a message to deliver it
                 ack = new AcknowledgeMessage();
@@ -1505,34 +1351,28 @@
             ack.setCorrelationId(message.getMessageId());
             ack.setClientId(message.getClientId());
             return ack;
-        }
-        catch (MessageException exc)
-        {
+        } catch (MessageException exc) {
             exc.logAtHingePoint(message,
-                                null, /* No outbound error message at this point. */
-                                "Exception when invoking service '" + (service == null ? "(none)" : service.getId()) + "': ");
+                    null, /* No outbound error message at this point. */
+                    "Exception when invoking service '" + (service == null ? "(none)" : service.getId()) + "': ");
 
             throw exc;
-        }
-        catch (RuntimeException exc)
-        {
+        } catch (RuntimeException exc) {
             Log.getLogger(LogCategories.MESSAGE_GENERAL).error(
-                 "Exception when invoking service: " +
-                 (service == null ? "(none)" : service.getId()) +
-                 StringUtils.NEWLINE +
-                 "  with message: " + message + StringUtils.NEWLINE +
-                 ExceptionUtil.exceptionFollowedByRootCausesToString(exc) + StringUtils.NEWLINE);
+                    "Exception when invoking service: " +
+                            (service == null ? "(none)" : service.getId()) +
+                            StringUtils.NEWLINE +
+                            "  with message: " + message + StringUtils.NEWLINE +
+                            ExceptionUtil.exceptionFollowedByRootCausesToString(exc) + StringUtils.NEWLINE);
 
             throw exc;
-        }
-        catch (Error exc)
-        {
+        } catch (Error exc) {
             Log.getLogger(LogCategories.MESSAGE_GENERAL).error(
-                 "Error when invoking service: " +
-                 (service == null ? "(none)" : service.getId()) +
-                 StringUtils.NEWLINE +
-                 "  with message: " + message + StringUtils.NEWLINE +
-                 ExceptionUtil.exceptionFollowedByRootCausesToString(exc) + StringUtils.NEWLINE);
+                    "Error when invoking service: " +
+                            (service == null ? "(none)" : service.getId()) +
+                            StringUtils.NEWLINE +
+                            "  with message: " + message + StringUtils.NEWLINE +
+                            ExceptionUtil.exceptionFollowedByRootCausesToString(exc) + StringUtils.NEWLINE);
 
             throw exc;
         }
@@ -1540,8 +1380,7 @@
     }
 
 
-    public AsyncMessage routeCommandToService(CommandMessage command, Endpoint endpoint)
-    {
+    public AsyncMessage routeCommandToService(CommandMessage command, Endpoint endpoint) {
         // Make sure command has a messageId
         checkMessageId(command);
 
@@ -1556,55 +1395,43 @@
 
         // Forward login and logout commands to AuthenticationService
         int operation = command.getOperation();
-        if (operation == CommandMessage.LOGIN_OPERATION || operation == CommandMessage.LOGOUT_OPERATION)
-        {
+        if (operation == CommandMessage.LOGIN_OPERATION || operation == CommandMessage.LOGOUT_OPERATION) {
             serviceId = AUTHENTICATION_SERVICE_ID;
             recreateHttpFlexSessionAfterLogin = securitySettings.isRecreateHttpSessionAfterLogin()
-                &&  operation == CommandMessage.LOGIN_OPERATION && FlexContext.getFlexSession() instanceof HttpFlexSession;
-        }
-        else
-        {
-            serviceId = destId != null? destinationToService.get(destId) : null;
+                    && operation == CommandMessage.LOGIN_OPERATION && FlexContext.getFlexSession() instanceof HttpFlexSession;
+        } else {
+            serviceId = destId != null ? destinationToService.get(destId) : null;
         }
 
-        service = serviceId != null? services.get(serviceId) : null;
-        if (service != null)
-        {
+        service = serviceId != null ? services.get(serviceId) : null;
+        if (service != null) {
             // Before passing the message to the service, need to check
             // the security constraints.
             Destination destination = service.getDestination(destId);
             if (destination != null)
                 inspectOperation(command, destination);
 
-            try
-            {
+            try {
                 extractRemoteCredentials(service, command);
                 commandResult = service.serviceCommand(command);
                 serviced = true;
-            }
-            catch (UnsupportedOperationException e)
-            {
+            } catch (UnsupportedOperationException e) {
                 ServiceException se = new ServiceException();
-                se.setMessage(ERR_MSG_SERVICE_CMD_NOT_SUPPORTED, new Object[] {service.getClass().getName()});
+                se.setMessage(ERR_MSG_SERVICE_CMD_NOT_SUPPORTED, new Object[]{service.getClass().getName()});
                 throw se;
-            }
-            catch (SecurityException se)
-            {
+            } catch (SecurityException se) {
                 // when a LOGIN message causes a security exception, we want to continue processing here
                 // to allow metadata to be sent to clients communicating with runtime destinations.
                 // The result will be an error message with a login fault message as well as the metadata
-                if (AUTHENTICATION_SERVICE_ID.equals(serviceId))
-                {
+                if (AUTHENTICATION_SERVICE_ID.equals(serviceId)) {
                     commandResult = se.createErrorMessage();
                     if (Log.isDebug())
                         Log.getLogger(LOG_CATEGORY).debug("Security error for message: " +
                                 se.toString() + StringUtils.NEWLINE +
-                             "  incomingMessage: " + command + StringUtils.NEWLINE +
-                             "  errorReply: " + commandResult);
+                                "  incomingMessage: " + command + StringUtils.NEWLINE +
+                                "  errorReply: " + commandResult);
                     serviced = true;
-                }
-                else
-                {
+                } else {
                     throw se;
                 }
             }
@@ -1613,16 +1440,11 @@
         if (recreateHttpFlexSessionAfterLogin)
             recreateHttpFlexSessionAfterLogin();
 
-        if (commandResult == null)
-        {
+        if (commandResult == null) {
             replyMessage = new AcknowledgeMessage();
-        }
-        else if (commandResult instanceof AsyncMessage)
-        {
-            replyMessage = (AsyncMessage)commandResult;
-        }
-        else
-        {
+        } else if (commandResult instanceof AsyncMessage) {
+            replyMessage = (AsyncMessage) commandResult;
+        } else {
             replyMessage = new AcknowledgeMessage();
             replyMessage.setBody(commandResult);
         }
@@ -1630,15 +1452,13 @@
         // Update the replyMessage body with server configuration if the
         // operation is ping or login and make sure to return the FlexClient Id value.
         if (command.getOperation() == CommandMessage.CLIENT_PING_OPERATION
-                || command.getOperation() == CommandMessage.LOGIN_OPERATION)
-        {
+                || command.getOperation() == CommandMessage.LOGIN_OPERATION) {
             boolean needsConfig = false;
             if (command.getHeader(CommandMessage.NEEDS_CONFIG_HEADER) != null)
-                needsConfig = ((Boolean)(command.getHeader(CommandMessage.NEEDS_CONFIG_HEADER)));
+                needsConfig = ((Boolean) (command.getHeader(CommandMessage.NEEDS_CONFIG_HEADER)));
 
             // Send configuration information only if the client requested.
-            if (needsConfig)
-            {
+            if (needsConfig) {
                 ConfigMap serverConfig = describeServices(endpoint);
                 if (serverConfig.size() > 0)
                     replyMessage.setBody(serverConfig);
@@ -1653,9 +1473,7 @@
             FlexClient flexClient = FlexContext.getFlexClient();
             if (flexClient != null)
                 replyMessage.setHeader(Message.FLEX_CLIENT_ID_HEADER, flexClient.getId());
-        }
-        else if (!serviced)
-        {
+        } else if (!serviced) {
             MessageException lme = new MessageException();
             // The supplied destination id is not registered with any service..
             lme.setMessage(ERR_MSG_NO_SERVICE_FOR_DEST);
@@ -1664,18 +1482,17 @@
 
         replyMessage.setCorrelationId(command.getMessageId());
         replyMessage.setClientId(command.getClientId());
-        if (replyMessage.getBody() instanceof java.util.List)
-        {
+        if (replyMessage.getBody() instanceof java.util.List) {
             replyMessage.setBody(((List) replyMessage.getBody()).toArray());
         }
 
         if (Log.isDebug())
             Log.getLogger(getLogCategory(command)).debug(
-                 "Executed command: " +
-                 (service == null ? "(default service)" : "service=" +
-                                                          service.getId()) + StringUtils.NEWLINE +
-                                                                           "  commandMessage: " + command + StringUtils.NEWLINE +
-                                                                           "  replyMessage: " + replyMessage + StringUtils.NEWLINE);
+                    "Executed command: " +
+                            (service == null ? "(default service)" : "service=" +
+                                    service.getId()) + StringUtils.NEWLINE +
+                            "  commandMessage: " + command + StringUtils.NEWLINE +
+                            "  replyMessage: " + replyMessage + StringUtils.NEWLINE);
 
         return replyMessage;
     }
@@ -1684,11 +1501,10 @@
      * Services call this method in order to send a message
      * to a FlexClient.
      *
-     * @param message the message
+     * @param message       the message
      * @param messageClient the message client the message should be sent to
      */
-    public void routeMessageToMessageClient(Message message, MessageClient messageClient)
-    {
+    public void routeMessageToMessageClient(Message message, MessageClient messageClient) {
         // Make sure message has a messageId
         checkMessageId(message);
 
@@ -1702,11 +1518,9 @@
         FlexClient pushFlexClient = messageClient.getFlexClient();
         FlexContext.setThreadLocalFlexClient(pushFlexClient);
         FlexContext.setThreadLocalSession(null); // Null because we don't have a currently active endpoint for the push client.
-        try
-        {
+        try {
             pushFlexClient.push(message, messageClient);
-        }
-        finally // Reset thread locals.
+        } finally // Reset thread locals.
         {
             FlexContext.setThreadLocalFlexClient(requestFlexClient);
             FlexContext.setThreadLocalSession(requestFlexSession);
@@ -1714,30 +1528,26 @@
     }
 
     /**
-     *
      * Check that the destination permits access over the endpoint, the security
      * constraint of the destination permits the operation, and the service and
      * the destination the message is targeting are running,
      *
-     * @param message The incoming message.
+     * @param message     The incoming message.
      * @param destination The destination to check against.
      */
-    public void inspectOperation(Message message, Destination destination)
-    {
+    public void inspectOperation(Message message, Destination destination) {
         inspectChannel(message, destination);
         loginManager.checkConstraint(destination.getSecurityConstraint());
 
         Service service = destination.getService();
-        if (!service.isStarted())
-        {
+        if (!service.isStarted()) {
             // {0} ''{1}'' cannot service message ''{2}'' in stopped state.
             MessageException me = new MessageException();
             me.setMessage(ERR_MSG_CANNOT_SERVICE_STOPPED, new Object[]{SERVICE, service.getId(), message.getMessageId()});
             throw me;
         }
 
-        if (!destination.isStarted())
-        {
+        if (!destination.isStarted()) {
             // {0} ''{1}'' cannot service message ''{2}'' in stopped state.
             MessageException me = new MessageException();
             me.setMessage(ERR_MSG_CANNOT_SERVICE_STOPPED, new Object[]{"Destination", destination.getId(), message.getMessageId()});
@@ -1746,37 +1556,32 @@
     }
 
     /**
-     *
      * Verify that this destination permits access over this endpoint.
      *
-     * @param message The incoming message.
+     * @param message     The incoming message.
      * @param destination The destination to check against.
      */
-    public void inspectChannel(Message message, Destination destination)
-    {
+    public void inspectChannel(Message message, Destination destination) {
         if (!enforceEndpointValidation && message.getHeader(Message.VALIDATE_ENDPOINT_HEADER) == null)
             return;
 
-        String messageChannel = (String)message.getHeader(Message.ENDPOINT_HEADER);
-        for (String channelId : destination.getChannels())
-        {
+        String messageChannel = (String) message.getHeader(Message.ENDPOINT_HEADER);
+        for (String channelId : destination.getChannels()) {
             if (channelId.equals(messageChannel))
                 return;
         }
         MessageException lme = new MessageException();
-        lme.setMessage(ERR_MSG_DESTINATION_UNACCESSIBLE, new Object[] {destination.getId(), messageChannel});
+        lme.setMessage(ERR_MSG_DESTINATION_UNACCESSIBLE, new Object[]{destination.getId(), messageChannel});
         throw lme;
     }
 
     /**
-     *
      * Returns the logging category to use for a given message.
      *
      * @param message the message
      * @return the logging category to use for a given message
      */
-    public String getLogCategory(Message message)
-    {
+    public String getLogCategory(Message message) {
         if (message instanceof AbstractMessage)
             return ((AbstractMessage) message).logCategory();
         return LogCategories.MESSAGE_GENERAL;
@@ -1787,39 +1592,32 @@
      *
      * @return <code>ClassLoader</code> the system should use to load user defined classes.
      */
-    public ClassLoader getClassLoader()
-    {
+    public ClassLoader getClassLoader() {
         return classLoader;
     }
 
     /**
-     *
      * Sets the class loader used by the system to load user defined classes.
      *
      * @param classLoader The class loader used by the system to loader user defiend classes.
      */
-    public void setClassLoader(ClassLoader classLoader)
-    {
+    public void setClassLoader(ClassLoader classLoader) {
         this.classLoader = classLoader;
     }
 
     /**
-     *
      * Used internally by AbstractService to check existence of destination and service id
      * mapping in the destinationToService map.
      *
-     * @param destId the destination id
-     * @param svcId the service id
+     * @param destId         the destination id
+     * @param svcId          the service id
      * @param throwException true if an exception should be thrown if something goes wrong
      * @return True if the destination is already registered.
      */
-    public boolean isDestinationRegistered(String destId, String svcId, boolean throwException)
-    {
+    public boolean isDestinationRegistered(String destId, String svcId, boolean throwException) {
         // Do not allow multiple destinations with the same id across services
-        if (destinationToService.containsKey(destId))
-        {
-            if (throwException)
-            {
+        if (destinationToService.containsKey(destId)) {
+            if (throwException) {
                 // Cannot add destination with id ''{0}'' to service with id ''{1}'' because another service with id ''{2}'' already has a destination with the same id.
                 ConfigurationException ex = new ConfigurationException();
                 ex.setMessage(ConfigurationConstants.DUPLICATE_DEST_ID, new Object[]{destId, svcId, destinationToService.get(destId)});
@@ -1831,18 +1629,15 @@
     }
 
     /**
-     *
      * Used internally by AbstractService to add destination and service id
      * mapping to destinationToService map.
      *
      * @param destId Destination id.
-     * @param svcId Service id.
+     * @param svcId  Service id.
      */
-    public void registerDestination(String destId, String svcId)
-    {
+    public void registerDestination(String destId, String svcId) {
         // Do not allow multiple destinations with the same id across services
-        if (destinationToService.containsKey(destId))
-        {
+        if (destinationToService.containsKey(destId)) {
             // Cannot add destination with id ''{0}'' to service with id ''{1}'' because another service with id ''{2}'' already has a destination with the same id.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.DUPLICATE_DEST_ID, new Object[]{destId, svcId, destinationToService.get(destId)});
@@ -1852,29 +1647,25 @@
     }
 
     /**
-     *
      * Used internally by AbstractService to remove destination and service id
      * mapping from destinationToService map.
      *
      * @param destId Destination id.
      */
-    public void unregisterDestination(String destId)
-    {
+    public void unregisterDestination(String destId) {
         destinationToService.remove(destId);
     }
 
     /**
-     *
      * Looks up and returns a destination by id; removing the need to know which service
      * a destination is registered for.
      *
      * @param destId Destination id.
      * @return the Destination oblect for the given destination id
      */
-    public Destination getRegisteredDestination(String destId)
-    {
-        String serviceId = destId != null? destinationToService.get(destId) : null;
-        return serviceId != null? getService(serviceId).getDestination(destId) : null;
+    public Destination getRegisteredDestination(String destId) {
+        String serviceId = destId != null ? destinationToService.get(destId) : null;
+        return serviceId != null ? getService(serviceId).getDestination(destId) : null;
     }
 
     /**
@@ -1883,10 +1674,8 @@
      *
      * @param attributeId Attribute id for the session or application-scoped object.
      */
-    public void incrementAttributeIdRefCount(String attributeId)
-    {
-        synchronized (attributeIdRefCounts)
-        {
+    public void incrementAttributeIdRefCount(String attributeId) {
+        synchronized (attributeIdRefCounts) {
             Integer currentCount = attributeIdRefCounts.get(attributeId);
             if (currentCount == null)
                 attributeIdRefCounts.put(attributeId, INTEGER_ONE);
@@ -1902,15 +1691,13 @@
      * @param attributeId Attribute id for the session or application-scoped object.
      * @return in the attribute ID ref count after decrement
      */
-    public int decrementAttributeIdRefCount(String attributeId)
-    {
-        synchronized (attributeIdRefCounts)
-        {
+    public int decrementAttributeIdRefCount(String attributeId) {
+        synchronized (attributeIdRefCounts) {
             Integer currentCount = attributeIdRefCounts.get(attributeId);
             if (currentCount == null)
                 return 0;
 
-            int newValue = currentCount -1 ;
+            int newValue = currentCount - 1;
             attributeIdRefCounts.put(attributeId, newValue);
             return newValue;
         }
@@ -1924,15 +1711,12 @@
     //--------------------------------------------------------------------------
 
     /**
-     *
      * Utility method to make sure that message has an assigned messageId.
      *
      * @param message the message that should be checked
      */
-    protected void checkMessageId(Message message)
-    {
-        if (message.getMessageId() == null)
-        {
+    protected void checkMessageId(Message message) {
+        if (message.getMessageId() == null) {
             MessageException lme = new MessageException();
             lme.setMessage(ERR_MSG_NULL_MESSAGE_ID);
             throw lme;
@@ -1940,23 +1724,20 @@
     }
 
     /**
-     *
      * Check the headers for the message for the RemoteCredentials.
      *
      * @param service the service
      * @param message the message
      */
-    protected void extractRemoteCredentials(Service service, Message message)
-    {
+    protected void extractRemoteCredentials(Service service, Message message) {
         if (!message.headerExists(Message.REMOTE_CREDENTIALS_HEADER))
             return;
 
         boolean setting = false;
         String username = null;
         String credentials = null;
-        if (message.getHeader(Message.REMOTE_CREDENTIALS_HEADER) instanceof String)
-        {
-            String encoded = (String)message.getHeader(Message.REMOTE_CREDENTIALS_HEADER);
+        if (message.getHeader(Message.REMOTE_CREDENTIALS_HEADER) instanceof String) {
+            String encoded = (String) message.getHeader(Message.REMOTE_CREDENTIALS_HEADER);
             if (encoded.length() > 0) //empty string is clearing the credentials
             {
                 setting = true;
@@ -1965,79 +1746,62 @@
                 byte[] decodedBytes = decoder.drain();
                 String decoded;
 
-                String charset = (String)message.getHeader(Message.REMOTE_CREDENTIALS_CHARSET_HEADER);
-                if (charset != null)
-                {
-                    try
-                    {
+                String charset = (String) message.getHeader(Message.REMOTE_CREDENTIALS_CHARSET_HEADER);
+                if (charset != null) {
+                    try {
                         decoded = new String(decodedBytes, charset);
-                    }
-                    catch (UnsupportedEncodingException ex)
-                    {
+                    } catch (UnsupportedEncodingException ex) {
                         MessageException lme = new MessageException();
                         lme.setMessage(ERR_MSG_UNKNOWN_REMOTE_CREDENTIALS_FORMAT);
                         throw lme;
                     }
-                }
-                else
-                {
+                } else {
                     decoded = new String(decodedBytes);
                 }
 
                 int colon = decoded.indexOf(':');
-                if (colon > 0 && colon < decoded.length() - 1)
-                {
+                if (colon > 0 && colon < decoded.length() - 1) {
                     username = decoded.substring(0, colon);
                     credentials = decoded.substring(colon + 1);
                 }
             }
-        }
-        else
-        {
+        } else {
             MessageException lme = new MessageException();
             lme.setMessage(ERR_MSG_UNKNOWN_REMOTE_CREDENTIALS_FORMAT);
             throw lme;
         }
 
-        if (setting)
-        {
+        if (setting) {
             FlexContext.getFlexSession().putRemoteCredentials(
                     new FlexRemoteCredentials(service.getId(),
                             message.getDestination(), username, credentials));
-        }
-        else
-        {
+        } else {
             FlexContext.getFlexSession().clearRemoteCredentials(service.getId(),
                     message.getDestination());
         }
     }
 
     @Override
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
 
-    public void setServletContext(ServletContext servletContext)
-    {
+    public void setServletContext(ServletContext servletContext) {
         this.servletContext = servletContext;
     }
 
     /**
-     *
      * This method was added so that Spring-BlazeDS Integration 1.0.2 works with latest BlazeDS binaries
      * Internally, this method simply invokes the setServletContext(...) method
      *
      * @param servletContext ServletContext that should be set.
      */
-    protected void setInitServletContext(ServletContext servletContext)
-    {
+    protected void setInitServletContext(ServletContext servletContext) {
         setServletContext(servletContext);
     }
 
-    protected void recreateHttpFlexSessionAfterLogin()
-    {
+    protected void recreateHttpFlexSessionAfterLogin() {
         FlexSession currentHttpFlexSession = FlexContext.getFlexSession();
         Principal principal = currentHttpFlexSession.getUserPrincipal();
         currentHttpFlexSession.invalidate(); // This will recreate a new session.
@@ -2048,14 +1812,10 @@
 
     /**
      * Start all of the broker's endpoints.
-     *
-     *
      */
-    protected void startEndpoints()
-    {
-        for (Endpoint endpoint : endpoints.values())
-        {
-            if (endpoint instanceof AbstractEndpoint && ((AbstractEndpoint)endpoint).isRemote())
+    protected void startEndpoints() {
+        for (Endpoint endpoint : endpoints.values()) {
+            if (endpoint instanceof AbstractEndpoint && ((AbstractEndpoint) endpoint).isRemote())
                 continue; // Local representation of remote endpoints are not started.
             endpoint.start();
         }
@@ -2064,11 +1824,9 @@
     /**
      * Stop all of the broker's endpoints.
      */
-    protected void stopEndpoints()
-    {
-        for (Endpoint endpoint : endpoints.values())
-        {
-            if (endpoint instanceof AbstractEndpoint && ((AbstractEndpoint)endpoint).isRemote())
+    protected void stopEndpoints() {
+        for (Endpoint endpoint : endpoints.values()) {
+            if (endpoint instanceof AbstractEndpoint && ((AbstractEndpoint) endpoint).isRemote())
                 continue; // Local representation of remote endpoints are not stopped.
             endpoint.stop();
         }
@@ -2083,11 +1841,9 @@
     /**
      *
      */
-    private void checkEndpointUrl(String id, String endpointUrl)
-    {
+    private void checkEndpointUrl(String id, String endpointUrl) {
         // Do not allow endpoints with null url property.
-        if (endpointUrl == null)
-        {
+        if (endpointUrl == null) {
             // Cannot add ''{0}'' with null url to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ERR_MSG_NULL_ENDPOINT_URL, new Object[]{ENDPOINT, MESSAGEBROKER});
@@ -2097,12 +1853,11 @@
         String parsedEndpointURI = ChannelSettings.removeTokens(endpointUrl);
 
         // first check the original URI
-        if (registeredEndpoints.containsKey(parsedEndpointURI))
-        {
-          ConfigurationException ce = new ConfigurationException();
-          ce.setMessage(ERR_MSG_URI_ALREADY_REGISTERED, new Object[] {id, parsedEndpointURI,
-                        registeredEndpoints.get(parsedEndpointURI)});
-          throw ce;
+        if (registeredEndpoints.containsKey(parsedEndpointURI)) {
+            ConfigurationException ce = new ConfigurationException();
+            ce.setMessage(ERR_MSG_URI_ALREADY_REGISTERED, new Object[]{id, parsedEndpointURI,
+                    registeredEndpoints.get(parsedEndpointURI)});
+            throw ce;
         }
 
         // add the original URI to the registered endpoints map
@@ -2110,15 +1865,13 @@
 
         // also need to check the URI without the context root
         int nextSlash = parsedEndpointURI.indexOf('/', 1);
-        if (nextSlash > 0)
-        {
+        if (nextSlash > 0) {
             String parsedEndpointURI2 = parsedEndpointURI.substring(nextSlash);
-            if (registeredEndpoints.containsKey(parsedEndpointURI2))
-            {
+            if (registeredEndpoints.containsKey(parsedEndpointURI2)) {
                 ConfigurationException ce = new ConfigurationException();
-                ce.setMessage(ERR_MSG_URI_ALREADY_REGISTERED, new Object[] {
+                ce.setMessage(ERR_MSG_URI_ALREADY_REGISTERED, new Object[]{
                         parsedEndpointURI2, id,
-                        registeredEndpoints.get(parsedEndpointURI2) });
+                        registeredEndpoints.get(parsedEndpointURI2)});
                 throw ce;
             }
             registeredEndpoints.put(parsedEndpointURI2, id);
@@ -2126,7 +1879,6 @@
     }
 
     /**
-     *
      * Matches the current &quot;servlet + pathinfo&quot; to a list of channels registered
      * in the services configuration file, independent of context root.
      *
@@ -2134,48 +1886,39 @@
      * @param contextPath The web application context root (or empty string for default root)
      * @param endpoint    The endpoint to be matched
      * @return whether the current request matches a registered endpoint URI
-     *
      */
-    private boolean matchEndpoint(String path, String contextPath, Endpoint endpoint)
-    {
+    private boolean matchEndpoint(String path, String contextPath, Endpoint endpoint) {
         boolean match = false;
         String channelEndpoint = endpoint.getParsedUrl(contextPath);
 
-        if (path.endsWith("/"))
-        {
+        if (path.endsWith("/")) {
             path = path.substring(0, path.length() - 1);
         }
 
-        if (path.equalsIgnoreCase(channelEndpoint))
-        {
+        if (path.equalsIgnoreCase(channelEndpoint)) {
             match = true;
         }
 
         return match;
     }
 
-    private void registerMessageBroker()
-    {
+    private void registerMessageBroker() {
         String mbid = getId();
 
-        synchronized (messageBrokers)
-        {
-            if (messageBrokers.get(mbid) != null)
-            {
+        synchronized (messageBrokers) {
+            if (messageBrokers.get(mbid) != null) {
                 ConfigurationException ce = new ConfigurationException();
-                ce.setMessage(10137, new Object[] {getId() == null ? "(no value supplied)" : mbid});
+                ce.setMessage(10137, new Object[]{getId() == null ? "(no value supplied)" : mbid});
                 throw ce;
             }
             messageBrokers.put(mbid, this);
         }
     }
 
-    private void unRegisterMessageBroker()
-    {
+    private void unRegisterMessageBroker() {
         String mbid = getId();
 
-        synchronized (messageBrokers)
-        {
+        synchronized (messageBrokers) {
             messageBrokers.remove(mbid);
         }
     }
@@ -2183,16 +1926,12 @@
     /**
      * Start all of the broker's shared servers.
      */
-    private void startServers()
-    {
-        for (Server server : servers.values())
-        {
+    private void startServers() {
+        for (Server server : servers.values()) {
             // Validate that the server is actually referenced by an endpoint; if not, warn.
             boolean serverIsReferenced = false;
-            for (Endpoint endpoint : endpoints.values())
-            {
-                if (endpoint instanceof Endpoint2 && server.equals(((Endpoint2)endpoint).getServer()))
-                {
+            for (Endpoint endpoint : endpoints.values()) {
+                if (endpoint instanceof Endpoint2 && server.equals(((Endpoint2) endpoint).getServer())) {
                     serverIsReferenced = true;
                     break;
                 }
@@ -2208,24 +1947,18 @@
     /**
      * Stop all the broker's shared servers.
      */
-    private void stopServers()
-    {
+    private void stopServers() {
         for (Server server : servers.values())
             server.stop();
     }
 
     /**
      * Start all of the broker's services.
-     *
-     *
      */
-    private void startServices()
-    {
-        for (Service svc : services.values() )
-        {
+    private void startServices() {
+        for (Service svc : services.values()) {
             long timeBeforeStartup = 0;
-            if (Log.isDebug())
-            {
+            if (Log.isDebug()) {
                 timeBeforeStartup = System.currentTimeMillis();
                 Log.getLogger(LOG_CATEGORY_STARTUP_SERVICE).debug("Service with id '{0}' is starting.",
                         new Object[]{svc.getId()});
@@ -2233,8 +1966,7 @@
 
             svc.start();
 
-            if (Log.isDebug())
-            {
+            if (Log.isDebug()) {
                 long timeAfterStartup = System.currentTimeMillis();
                 Long diffMillis = timeAfterStartup - timeBeforeStartup;
                 Log.getLogger(LOG_CATEGORY_STARTUP_SERVICE).debug("Service with id '{0}' is ready (startup time: '{1}' ms)",
@@ -2245,11 +1977,8 @@
 
     /**
      * Stop all of the broker's services.
-     *
-     *
      */
-    private void stopServices()
-    {
+    private void stopServices() {
         for (Service svc : services.values())
             svc.stop();
     }
diff --git a/core/src/main/java/flex/messaging/MessageBrokerServlet.java b/core/src/main/java/flex/messaging/MessageBrokerServlet.java
index 0e8efb0..d9064e8 100644
--- a/core/src/main/java/flex/messaging/MessageBrokerServlet.java
+++ b/core/src/main/java/flex/messaging/MessageBrokerServlet.java
@@ -58,10 +58,8 @@
  * does not occur for non-http endpoints, such as the rtmp endpoint.
  *
  * @see flex.messaging.MessageBroker
- *
  */
-public class MessageBrokerServlet extends HttpServlet
-{
+public class MessageBrokerServlet extends HttpServlet {
     static final long serialVersionUID = -5293855229461612246L;
 
     public static final String LOG_CATEGORY_STARTUP_BROKER = LogCategories.STARTUP_MESSAGEBROKER;
@@ -78,8 +76,7 @@
      * This servlet may keep a reference to an endpoint if it needs to
      * delegate to it in the <code>service</code> method.
      */
-    public void init(ServletConfig servletConfig) throws ServletException
-    {
+    public void init(ServletConfig servletConfig) throws ServletException {
         super.init(servletConfig);
 
         // allocate thread local variables
@@ -92,8 +89,7 @@
 
         ClassLoader loader = getClassLoader();
 
-        if ("true".equals(servletConfig.getInitParameter("useContextClassLoader")))
-        {
+        if ("true".equals(servletConfig.getInitParameter("useContextClassLoader"))) {
             loader = Thread.currentThread().getContextClassLoader();
         }
 
@@ -101,8 +97,7 @@
         log_errors = HTTPRequestLog.init(getServletContext());
 
         // Start the broker
-        try
-        {
+        try {
             // Get the configuration manager
             ConfigurationManager configManager = loadMessagingConfiguration(servletConfig);
 
@@ -124,8 +119,7 @@
             broker.setServletContext(servletConfig.getServletContext());
 
             Logger logger = Log.getLogger(ConfigurationManager.LOG_CATEGORY);
-            if (Log.isInfo())
-            {
+            if (Log.isInfo()) {
                 logger.info(VersionInfo.buildMessage());
             }
 
@@ -133,24 +127,21 @@
             config.configureBroker(broker);
 
             long timeBeforeStartup = 0;
-            if (Log.isDebug())
-            {
+            if (Log.isDebug()) {
                 timeBeforeStartup = System.currentTimeMillis();
                 Log.getLogger(LOG_CATEGORY_STARTUP_BROKER).debug("MessageBroker with id '{0}' is starting.",
                         new Object[]{broker.getId()});
             }
 
             //initialize the httpSessionToFlexSessionMap
-            synchronized(HttpFlexSession.mapLock)
-            {
+            synchronized (HttpFlexSession.mapLock) {
                 if (servletConfig.getServletContext().getAttribute(HttpFlexSession.SESSION_MAP) == null)
                     servletConfig.getServletContext().setAttribute(HttpFlexSession.SESSION_MAP, new ConcurrentHashMap());
             }
 
             broker.start();
 
-            if (Log.isDebug())
-            {
+            if (Log.isDebug()) {
                 long timeAfterStartup = System.currentTimeMillis();
                 Long diffMillis = timeAfterStartup - timeBeforeStartup;
                 Log.getLogger(LOG_CATEGORY_STARTUP_BROKER).debug("MessageBroker with id '{0}' is ready (startup time: '{1}' ms)",
@@ -169,9 +160,7 @@
 
             // clear the broker and servlet config as this thread is done
             FlexContext.clearThreadLocalObjects();
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             // On any unhandled exception destroy the broker, log it and rethrow.
             String applicationName = servletConfig.getServletContext().getServletContextName();
             if (applicationName == null)
@@ -186,66 +175,52 @@
         }
     }
 
-    private void setupPathResolvers()
-    {
+    private void setupPathResolvers() {
         setupExternalPathResolver();
         setupInternalPathResolver();
     }
 
-    private void setupExternalPathResolver()
-    {
+    private void setupExternalPathResolver() {
         broker.setExternalPathResolver(
-                new MessageBroker.PathResolver()
-                {
-                    public InputStream resolve(String filename) throws FileNotFoundException
-                    {
+                new MessageBroker.PathResolver() {
+                    public InputStream resolve(String filename) throws FileNotFoundException {
                         return new FileInputStream(new File(filename));
                     }
                 }
         );
     }
 
-    private void setupInternalPathResolver()
-    {
+    private void setupInternalPathResolver() {
         broker.setInternalPathResolver(
-                new MessageBroker.InternalPathResolver()
-                {
-                    public InputStream resolve(String filename)
-                    {
+                new MessageBroker.InternalPathResolver() {
+                    public InputStream resolve(String filename) {
                         return getServletContext().getResourceAsStream(FLEXDIR + filename);
                     }
                 }
         );
     }
 
-    private static ConfigurationManager loadMessagingConfiguration(ServletConfig servletConfig)
-    {
+    private static ConfigurationManager loadMessagingConfiguration(ServletConfig servletConfig) {
         ConfigurationManager manager = null;
         Class managerClass;
         String className;
 
         // Check for Custom Configuration Manager Specification
-        if (servletConfig != null)
-        {
+        if (servletConfig != null) {
             String p = servletConfig.getInitParameter("services.configuration.manager");
-            if (p != null)
-            {
+            if (p != null) {
                 className = p.trim();
-                try
-                {
+                try {
                     managerClass = ClassUtil.createClass(className);
-                    manager = (ConfigurationManager)managerClass.newInstance();
-                }
-                catch (Throwable t)
-                {
+                    manager = (ConfigurationManager) managerClass.newInstance();
+                } catch (Throwable t) {
                     if (Trace.config) // Log is not initialized yet.
                         Trace.trace("Could not load configuration manager as: " + className);
                 }
             }
         }
 
-        if (manager == null)
-        {
+        if (manager == null) {
             manager = new FlexConfigurationManager();
         }
 
@@ -256,13 +231,10 @@
      * Stops all endpoints in the MessageBroker, giving them a chance
      * to perform any endpoint-specific clean up.
      */
-    public void destroy()
-    {
-        if (broker != null)
-        {
+    public void destroy() {
+        if (broker != null) {
             broker.stop();
-            if (broker.isManaged())
-            {
+            if (broker.isManaged()) {
                 MBeanLifecycleManager.unregisterRuntimeMBeans(broker);
             }
             // release static thread locals
@@ -276,27 +248,21 @@
      * are not externally configurable, and currently the AmfEndpoint
      * is the only delegate.
      */
-    public void service(HttpServletRequest req, HttpServletResponse res)
-    {
-        if (log_errors)
-        {
+    public void service(HttpServletRequest req, HttpServletResponse res) {
+        if (log_errors) {
             // Create a wrapper for the request object so we can save the body content
             LoggingHttpServletRequestWrapper wrapper = new LoggingHttpServletRequestWrapper(req);
             req = wrapper;
 
-            try
-            {
+            try {
                 // Read the body content
                 wrapper.doReadBody();
-            }
-            catch (IOException ignore)
-            {
+            } catch (IOException ignore) {
                 // ignore, the wrapper will preserve what content we were able to read.
             }
         }
 
-        try
-        {
+        try {
             // Update thread locals
             broker.initThreadLocals();
             // Set this first so it is in place for the session creation event.  The
@@ -307,27 +273,19 @@
 
             HttpFlexSession fs = httpFlexSessionProvider.getOrCreateSession(req);
             Principal principal;
-            if(FlexContext.isPerClientAuthentication())
-            {
+            if (FlexContext.isPerClientAuthentication()) {
                 principal = FlexContext.getUserPrincipal();
-            }
-            else
-            {
+            } else {
                 principal = fs.getUserPrincipal();
             }
 
-            if (principal == null && req.getHeader("Authorization") != null)
-            {
+            if (principal == null && req.getHeader("Authorization") != null) {
                 String encoded = req.getHeader("Authorization");
-                if (encoded.indexOf("Basic") > -1)
-                {
+                if (encoded.indexOf("Basic") > -1) {
                     encoded = encoded.substring(6); //Basic.length()+1
-                    try
-                    {
-                        ((AuthenticationService)broker.getService(AuthenticationService.ID)).decodeAndLogin(encoded, broker.getLoginManager());
-                    }
-                    catch (Exception e)
-                    {
+                    try {
+                        ((AuthenticationService) broker.getService(AuthenticationService.ID)).decodeAndLogin(encoded, broker.getLoginManager());
+                    } catch (Exception e) {
                         if (Log.isDebug())
                             Log.getLogger(LogCategories.SECURITY).info("Authentication service could not decode and login: " + e.getMessage());
                     }
@@ -341,78 +299,55 @@
                 endpointPath = endpointPath + pathInfo;
 
             Endpoint endpoint;
-            try
-            {
+            try {
                 endpoint = broker.getEndpoint(endpointPath, contextPath);
-            }
-            catch (MessageException me)
-            {
+            } catch (MessageException me) {
                 if (Log.isInfo())
-                    Log.getLogger(LogCategories.ENDPOINT_GENERAL).info("Received invalid request for endpoint path '{0}'.", new Object[] {endpointPath});
+                    Log.getLogger(LogCategories.ENDPOINT_GENERAL).info("Received invalid request for endpoint path '{0}'.", new Object[]{endpointPath});
 
-                if (!res.isCommitted())
-                {
-                    try
-                    {
+                if (!res.isCommitted()) {
+                    try {
                         res.sendError(HttpServletResponse.SC_NOT_FOUND);
+                    } catch (IOException ignore) {
                     }
-                    catch (IOException ignore)
-                    {}
                 }
 
                 return;
             }
 
-            try
-            {
-                if (Log.isInfo())
-                {
+            try {
+                if (Log.isInfo()) {
                     Log.getLogger(LogCategories.ENDPOINT_GENERAL).info("Channel endpoint {0} received request.",
-                                                                       new Object[] {endpoint.getId()});
+                            new Object[]{endpoint.getId()});
                 }
                 endpoint.service(req, res);
-            }
-            catch (UnsupportedOperationException ue)
-            {
-                if (Log.isInfo())
-                {
+            } catch (UnsupportedOperationException ue) {
+                if (Log.isInfo()) {
                     Log.getLogger(LogCategories.ENDPOINT_GENERAL).info("Channel endpoint {0} received request for an unsupported operation.",
-                                                                       new Object[] {endpoint.getId()},
-                                                                       ue);
+                            new Object[]{endpoint.getId()},
+                            ue);
                 }
 
-                if (!res.isCommitted())
-                {
-                    try
-                    {
+                if (!res.isCommitted()) {
+                    try {
                         res.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
+                    } catch (IOException ignore) {
                     }
-                    catch (IOException ignore)
-                    {}
                 }
             }
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             // Final resort catch block as recommended by Fortify as a potential System info leak
-            try
-            {
+            try {
                 Log.getLogger(LogCategories.ENDPOINT_GENERAL).error("Unexpected error encountered in Message Broker servlet", t);
                 res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-            }
-            catch (IOException ignore)
-            {
+            } catch (IOException ignore) {
                 // ignore
             }
 
-        }
-        finally
-        {
-            if (log_errors)
-            {
+        } finally {
+            if (log_errors) {
                 String info = (String) req.getAttribute(HTTPRequestLog.HTTP_ERROR_INFO);
-                if (info != null)
-                {
+                if (info != null) {
                     // Log the HttpRequest data
                     System.out.println("Exception occurred while processing HTTP request: " + info + ", request details logged in " + HTTPRequestLog.getFileName());
                     HTTPRequestLog.outputRequest(info, req);
@@ -428,15 +363,13 @@
      *
      * @return the class loader for this class
      */
-    protected ClassLoader getClassLoader()
-    {
+    protected ClassLoader getClassLoader() {
         return this.getClass().getClassLoader();
     }
 
 
     // Call ONLY on servlet startup
-    public static void createThreadLocals()
-    {
+    public static void createThreadLocals() {
         // allocate static thread local objects
         FlexContext.createThreadLocalObjects();
         SerializationContext.createThreadLocalObjects();
@@ -445,8 +378,7 @@
 
 
     // Call ONLY on servlet shutdown
-    protected static void destroyThreadLocals()
-    {
+    protected static void destroyThreadLocals() {
         // clear static member variables
         Log.clear();
         MBeanServerLocatorFactory.clear();
diff --git a/core/src/main/java/flex/messaging/MessageClient.java b/core/src/main/java/flex/messaging/MessageClient.java
index 56768e7..69b4464 100644
--- a/core/src/main/java/flex/messaging/MessageClient.java
+++ b/core/src/main/java/flex/messaging/MessageClient.java
@@ -36,8 +36,6 @@
 import flex.messaging.messages.Message;
 import flex.messaging.services.MessageService;
 import flex.messaging.services.messaging.Subtopic;
-import flex.messaging.services.messaging.selector.JMSSelector;
-import flex.messaging.services.messaging.selector.JMSSelectorException;
 import flex.messaging.util.ExceptionUtil;
 import flex.messaging.util.TimeoutAbstractObject;
 import flex.messaging.util.StringUtils;
@@ -47,19 +45,18 @@
  * Currently a server-side MessageClient is only created if its client-side counterpart has subscribed
  * to a destination for pushed data (e.g. Consumer). Client-side Producers do not result in the creation of
  * corresponding server-side MessageClient instances.
- *
+ * <p>
  * Client-side MessageAgents communicate with the server over a Channel that corresponds to a FlexSession.
  * Server-side MessageClient instances are always created in the context of a FlexSession and when the FlexSession
  * is invalidated any associated MessageClients are invalidated as well.
- *
+ * <p>
  * MessageClients may also be timed out on a per-destination basis and this is based on subscription inactivity.
  * If no messages are pushed to the MessageClient within the destination's subscription timeout period the
  * MessageClient will be shutdown even if the associated FlexSession is still active and connected.
  * Per-destination subscription timeout is an optional configuration setting, and should only be used when inactive
  * subscriptions should be shut down opportunistically to preserve server resources.
  */
-public class MessageClient extends TimeoutAbstractObject implements Serializable
-{
+public class MessageClient extends TimeoutAbstractObject implements Serializable {
     //--------------------------------------------------------------------------
     //
     // Public Static Variables
@@ -103,12 +100,10 @@
     /**
      * Adds a MessageClient created listener.
      *
-     * @see flex.messaging.MessageClientListener
-     *
      * @param listener The listener to add.
+     * @see flex.messaging.MessageClientListener
      */
-    public static void addMessageClientCreatedListener(MessageClientListener listener)
-    {
+    public static void addMessageClientCreatedListener(MessageClientListener listener) {
         if (listener != null)
             createdListeners.addIfAbsent(listener);
     }
@@ -116,12 +111,10 @@
     /**
      * Removes a MessageClient created listener.
      *
-     * @see flex.messaging.MessageClientListener
-     *
      * @param listener The listener to remove.
+     * @see flex.messaging.MessageClientListener
      */
-    public static void removeMessageClientCreatedListener(MessageClientListener listener)
-    {
+    public static void removeMessageClientCreatedListener(MessageClientListener listener) {
         if (listener != null)
             createdListeners.remove(listener);
     }
@@ -135,16 +128,14 @@
     /**
      * Utility method.
      */
-    private static boolean equalStrings(String a, String b)
-    {
+    private static boolean equalStrings(String a, String b) {
         return a == b || (a != null && a.equals(b));
     }
 
     /**
      * Utility method.
      */
-    static int compareStrings(String a, String b)
-    {
+    static int compareStrings(String a, String b) {
         if (a == b)
             return 0;
 
@@ -164,29 +155,25 @@
     //--------------------------------------------------------------------------
 
     /**
-     *
      * Constructs a new MessageClient for local use.
      *
-     * @param clientId The clientId for the MessageClient.
+     * @param clientId    The clientId for the MessageClient.
      * @param destination The destination the MessageClient is subscribed to.
-     * @param endpointId The Id of the endpoint this MessageClient subscription was created over.
+     * @param endpointId  The Id of the endpoint this MessageClient subscription was created over.
      */
-    public MessageClient(Object clientId, Destination destination, String endpointId)
-    {
+    public MessageClient(Object clientId, Destination destination, String endpointId) {
         this(clientId, destination, endpointId, true);
     }
 
     /**
-     *
      * Constructs a new MessageClient.
      *
-     * @param clientId The clientId for the MessageClient.
+     * @param clientId    The clientId for the MessageClient.
      * @param destination The destination the MessageClient is subscribed to.
-     * @param endpointId The Id of the endpoint this MessageClient subscription was created over.
-     * @param useSession RemoteMessageClient instances should not be associated with a FlexSession (pass false).
+     * @param endpointId  The Id of the endpoint this MessageClient subscription was created over.
+     * @param useSession  RemoteMessageClient instances should not be associated with a FlexSession (pass false).
      */
-    public MessageClient(Object clientId, Destination destination, String endpointId, boolean useSession)
-    {
+    public MessageClient(Object clientId, Destination destination, String endpointId, boolean useSession) {
         valid = true;
         this.clientId = clientId;
         this.destination = destination;
@@ -195,8 +182,7 @@
         updateLastUse(); // Initialize last use timestamp to construct time.
 
         /* If this is for a remote server, we do not associate with the session. */
-        if (useSession)
-        {
+        if (useSession) {
             flexSession = FlexContext.getFlexSession();
             flexSession.registerMessageClient(this);
 
@@ -206,9 +192,7 @@
             // SubscriptionManager will notify the created listeners, once
             // subscription state is setup completely.
             // notifyCreatedListeners();
-        }
-        else
-        {
+        } else {
             flexClient = null;
             flexSession = null;
             // Use an instance level lock.
@@ -227,18 +211,18 @@
     //--------------------------------------------------------------------------
 
     /**
-     *  This flag is set to true when the client channel that this subscription was
-     *  established over is disconnected.
-     *  It supports cleaning up per-endpoint outbound queues maintained by the FlexClient.
-     *  If the client notifies the server that its channel is disconnecting, the FlexClient
-     *  does not need to maintain an outbound queue containing a subscription invalidation
-     *  message for this MessageClient to send to the client.
+     * This flag is set to true when the client channel that this subscription was
+     * established over is disconnected.
+     * It supports cleaning up per-endpoint outbound queues maintained by the FlexClient.
+     * If the client notifies the server that its channel is disconnecting, the FlexClient
+     * does not need to maintain an outbound queue containing a subscription invalidation
+     * message for this MessageClient to send to the client.
      */
     private volatile boolean clientChannelDisconnected;
 
     /**
-     *  The clientId for the MessageClient.
-     *  This value is specified by the client directly or is autogenerated on the client.
+     * The clientId for the MessageClient.
+     * This value is specified by the client directly or is autogenerated on the client.
      */
     protected final Object clientId;
 
@@ -248,7 +232,7 @@
     protected final Destination destination;
 
     /**
-     *  The destination the MessageClient is subscribed to.
+     * The destination the MessageClient is subscribed to.
      */
     protected final String destinationId;
 
@@ -333,8 +317,7 @@
      *
      * @return The clientId for the MessageClient.
      */
-    public Object getClientId()
-    {
+    public Object getClientId() {
         return clientId; // Field is final; no need to sync.
     }
 
@@ -343,8 +326,7 @@
      *
      * @return The destination the MessageClient is subscribed to.
      */
-    public Destination getDestination()
-    {
+    public Destination getDestination() {
         return destination; // Field is final; no need to sync.
     }
 
@@ -353,8 +335,7 @@
      *
      * @return The id of the destination the MessageClient is subscribed to.
      */
-    public String getDestinationId()
-    {
+    public String getDestinationId() {
         return destinationId; // Field is final; no need to sync.
     }
 
@@ -363,8 +344,7 @@
      *
      * @return The Id for the endpoint the MessageClient subscription was created over.
      */
-    public String getEndpointId()
-    {
+    public String getEndpointId() {
         return endpointId; // Field is final; no need to sync.
     }
 
@@ -373,8 +353,7 @@
      *
      * @return The FlexClient assocaited with this MessageClient.
      */
-    public FlexClient getFlexClient()
-    {
+    public FlexClient getFlexClient() {
         return flexClient; // Field is final; no need to sync.
     }
 
@@ -383,10 +362,8 @@
      *
      * @return The FlexSession associated with this MessageClient.
      */
-    public FlexSession getFlexSession()
-    {
-        synchronized (lock)
-        {
+    public FlexSession getFlexSession() {
+        synchronized (lock) {
             return flexSession;
         }
     }
@@ -396,20 +373,17 @@
      *
      * @return The number of subscriptions associated with this MessageClient.
      */
-    public int getSubscriptionCount()
-    {
+    public int getSubscriptionCount() {
         int count;
 
-        synchronized (lock)
-        {
-            count = subscriptions != null? subscriptions.size() : 0;
+        synchronized (lock) {
+            count = subscriptions != null ? subscriptions.size() : 0;
         }
 
         return count;
     }
 
     /**
-     *
      * This is used for FlexClient outbound queue management. When a MessageClient is invalidated
      * if it is attempting to notify the client, then we must leave the outbound queue containing
      * the notification in place. Otherwise, any messages queued for the subscription may be
@@ -417,13 +391,11 @@
      *
      * @return true if the MessageClient is currently trying to notify the client about it's invalidation.
      */
-    public boolean isAttemptingInvalidationClientNotification()
-    {
+    public boolean isAttemptingInvalidationClientNotification() {
         return attemptingInvalidationClientNotification;
     }
 
     /**
-     *
      * This is set to true when the MessageClient is invalidated due to the client
      * channel the subscription was established over disconnecting.
      * It allows the FlexClient class to cleanup the outbound queue for the channel's
@@ -432,56 +404,46 @@
      *
      * @param value true if the MessageClient is invalidated due to the client being disconnected
      */
-    public void setClientChannelDisconnected(boolean value)
-    {
+    public void setClientChannelDisconnected(boolean value) {
         clientChannelDisconnected = value;
     }
 
     /**
      * @return true if the MessageClient is invalidated due to the client being disconnected
      */
-    public boolean isClientChannelDisconnected()
-    {
+    public boolean isClientChannelDisconnected() {
         return clientChannelDisconnected;
     }
 
     /**
-     *
      * This is true when some code other than the SubscriptionManager
      * is maintaining subscriptions for this message client.  It ensures
      * that we have this MessageClient kept around until the session
      * expires.
      */
-    public void setRegistered(boolean reg)
-    {
+    public void setRegistered(boolean reg) {
         registered = reg;
     }
 
     /**
      *
      */
-    public boolean isRegistered()
-    {
+    public boolean isRegistered() {
         return registered;
     }
 
     /**
      * Adds a MessageClient destroy listener.
      *
-     * @see flex.messaging.MessageClientListener
-     *
      * @param listener The listener to add.
+     * @see flex.messaging.MessageClientListener
      */
-    public void addMessageClientDestroyedListener(MessageClientListener listener)
-    {
-        if (listener != null)
-        {
+    public void addMessageClientDestroyedListener(MessageClientListener listener) {
+        if (listener != null) {
             checkValid();
 
-            if (destroyedListeners == null)
-            {
-                synchronized (lock)
-                {
+            if (destroyedListeners == null) {
+                synchronized (lock) {
                     if (destroyedListeners == null)
                         destroyedListeners = new CopyOnWriteArrayList();
                 }
@@ -494,30 +456,25 @@
     /**
      * Removes a MessageClient destroyed listener.
      *
-     * @see flex.messaging.MessageClientListener
-     *
      * @param listener The listener to remove.
+     * @see flex.messaging.MessageClientListener
      */
-    public void removeMessageClientDestroyedListener(MessageClientListener listener)
-    {
+    public void removeMessageClientDestroyedListener(MessageClientListener listener) {
         // No need to check validity; removing a listener is always ok.
         if (listener != null && destroyedListeners != null)
             destroyedListeners.remove(listener);
     }
 
     /**
-     *
      * Adds a subscription to the subscription set for this MessageClient.
      *
-     * @param selector The selector expression used for the subscription.
-     * @param subtopic The subtopic used for the subscription.
+     * @param selector     The selector expression used for the subscription.
+     * @param subtopic     The subtopic used for the subscription.
      * @param maxFrequency The maximum number of messages the client wants to
-     * receive per second (0 disables this limit).
+     *                     receive per second (0 disables this limit).
      */
-    public void addSubscription(String selector, String subtopic, int maxFrequency)
-    {
-        synchronized (lock)
-        {
+    public void addSubscription(String selector, String subtopic, int maxFrequency) {
+        synchronized (lock) {
             checkValid();
 
             incrementReferences();
@@ -531,26 +488,22 @@
     }
 
     /**
-     *
      * Registers  the subscription with the outbound queue processor's throttle
      * manager, if one exists.
      *
      * @param si The subscription info object.
      */
-    public void registerSubscriptionWithThrottleManager(SubscriptionInfo si)
-    {
+    public void registerSubscriptionWithThrottleManager(SubscriptionInfo si) {
         // Register the destination that will setup client level outbound throttling.
         ThrottleSettings ts = destination.getNetworkSettings().getThrottleSettings();
-        if (ts.getOutboundPolicy() != Policy.NONE && (ts.isOutboundClientThrottleEnabled() || si.maxFrequency > 0))
-        {
+        if (ts.getOutboundPolicy() != Policy.NONE && (ts.isOutboundClientThrottleEnabled() || si.maxFrequency > 0)) {
             // Setup the client level outbound throttling, and register the destination
             // only if the policy is not NONE, and a throttling limit is specified
             // either at the destination or by consumer.
             OutboundQueueThrottleManager throttleManager = getThrottleManager(true);
             if (throttleManager != null)
                 throttleManager.registerDestination(destinationId, ts.getOutgoingClientFrequency(), ts.getOutboundPolicy());
-        }
-        else if (si.maxFrequency > 0) // Let the client know that maxFrequency will be ignored.
+        } else if (si.maxFrequency > 0) // Let the client know that maxFrequency will be ignored.
         {
             if (Log.isWarn())
                 Log.getLogger(MESSAGE_CLIENT_LOG_CATEGORY).warn("MessageClient with clientId '"
@@ -566,25 +519,19 @@
     }
 
     /**
-     *
      * Removes a subscription from the subscription set for this MessageClient.
      *
      * @param selector The selector expression for the subscription.
      * @param subtopic The subtopic for the subscription.
      * @return true if no subscriptions remain for this MessageClient; otherwise false.
      */
-    public boolean removeSubscription(String selector, String subtopic)
-    {
-        synchronized (lock)
-        {
+    public boolean removeSubscription(String selector, String subtopic) {
+        synchronized (lock) {
             SubscriptionInfo si = new SubscriptionInfo(selector, subtopic);
-            if (subscriptions.remove(si))
-            {
+            if (subscriptions.remove(si)) {
                 unregisterSubscriptionWithThrottleManager(si);
                 return decrementReferences();
-            }
-            else if (Log.isError())
-            {
+            } else if (Log.isError()) {
                 Log.getLogger(MessageService.LOG_CATEGORY).error("Error - unable to find subscription to remove for MessageClient: "
                         + clientId + " selector: " + selector + " subtopic: " + subtopic);
             }
@@ -593,33 +540,25 @@
     }
 
     /**
-     *
      * We use the same MessageClient for more than one subscription with different
      * selection criteria.  This tracks the number of subscriptions that are active
      * so that we know when we are finished.
      */
-    public void incrementReferences()
-    {
-        synchronized (lock)
-        {
+    public void incrementReferences() {
+        synchronized (lock) {
             numReferences++;
         }
     }
 
     /**
-     *
      * Decrements the numReferences variable and returns true if this was the last reference.
      */
-    public boolean decrementReferences()
-    {
-        synchronized (lock)
-        {
-            if (--numReferences == 0)
-            {
+    public boolean decrementReferences() {
+        synchronized (lock) {
+            if (--numReferences == 0) {
                 cancelTimeout();
-                if (destination instanceof MessageDestination)
-                {
-                    MessageDestination msgDestination = (MessageDestination)destination;
+                if (destination instanceof MessageDestination) {
+                    MessageDestination msgDestination = (MessageDestination) destination;
                     if (msgDestination.getThrottleManager() != null)
                         msgDestination.getThrottleManager().removeClientThrottleMark(clientId);
                 }
@@ -630,36 +569,30 @@
     }
 
     /**
-     *
      * Invoked by SubscriptionManager once the subscription state is setup completely
      * for the MessageClient..
      */
-    public void notifyCreatedListeners()
-    {
+    public void notifyCreatedListeners() {
         // Notify MessageClient created listeners.
-        if (!createdListeners.isEmpty())
-        {
+        if (!createdListeners.isEmpty()) {
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
-            for (Iterator iter = createdListeners.iterator(); iter.hasNext();)
-                ((MessageClientListener)iter.next()).messageClientCreated(this);
+            for (Iterator iter = createdListeners.iterator(); iter.hasNext(); )
+                ((MessageClientListener) iter.next()).messageClientCreated(this);
         }
     }
 
     /**
-     *
      * Invoked by SubscriptionManager while handling a subscribe request.
      * If the request is updating an existing subscription the 'push' state in the associated FlexClient
      * may need to be updated to ensure that the correct endpoint is used for this subscription.
      *
      * @param newEndpointId The id for the new endpoint that the subscription may have failed over to.
      */
-    public void resetEndpoint(String newEndpointId)
-    {
+    public void resetEndpoint(String newEndpointId) {
         String oldEndpointId = null;
         FlexSession oldSession = null;
         FlexSession newSession = FlexContext.getFlexSession();
-        synchronized (lock)
-        {
+        synchronized (lock) {
             // If anything is null, or nothing has changed, no need for a reset.
             if (endpointId == null || newEndpointId == null || flexSession == null || newSession == null || (endpointId.equals(newEndpointId) && flexSession.equals(newSession)))
                 return;
@@ -687,8 +620,7 @@
         if (flexClient != null)
             flexClient.registerMessageClient(this);
 
-        if (Log.isDebug())
-        {
+        if (Log.isDebug()) {
             String msg = "MessageClient with clientId '" + clientId + "' for destination '" + destinationId + "' has been reset as a result of a resubscribe.";
             if (oldEndpointId != null && !oldEndpointId.equals(newEndpointId))
                 msg += " Endpoint change [" + oldEndpointId + " -> " + newEndpointId + "]";
@@ -700,7 +632,6 @@
     }
 
     /**
-     *
      * Used to test whether this client should receive this message
      * based on the list of subscriptions we have recorded for it.
      * It must match both the subtopic and the selector expression.
@@ -711,14 +642,11 @@
      *
      * @param message The message to test.
      */
-    public boolean testMessage(Message message, MessageDestination destination)
-    {
+    public boolean testMessage(Message message, MessageDestination destination) {
         String subtopic = (String) message.getHeader(AsyncMessage.SUBTOPIC_HEADER_NAME);
         String subtopicSeparator = destination.getServerSettings().getSubtopicSeparator();
-        synchronized (lock)
-        {
-            for (SubscriptionInfo si : subscriptions)
-            {
+        synchronized (lock) {
+            for (SubscriptionInfo si : subscriptions) {
                 if (si.matches(message, subtopic, subtopicSeparator))
                     return true;
             }
@@ -731,19 +659,16 @@
      *
      * @return true if the MessageClient is valid; otherwise false.
      */
-    public boolean isValid()
-    {
-        synchronized (lock)
-        {
+    public boolean isValid() {
+        synchronized (lock) {
             return valid;
         }
     }
-    
+
     /**
      * Invalidates the MessageClient.
      */
-    public void invalidate()
-    {
+    public void invalidate() {
         invalidate(false /* don't attempt to notify the client */);
     }
 
@@ -757,10 +682,8 @@
      * @param notifyClient <code>true</code> to notify the client that its subscription has been
      *                     invalidated.
      */
-    public void invalidate(boolean notifyClient)
-    {
-        synchronized (lock)
-        {
+    public void invalidate(boolean notifyClient) {
+        synchronized (lock) {
             if (!valid || invalidating)
                 return; // Already shutting down.
 
@@ -772,31 +695,26 @@
         attemptingInvalidationClientNotification = notifyClient;
 
         // Build a subscription invalidation message and push to the client if it is still valid.
-        if (notifyClient && flexClient != null && flexClient.isValid())
-        {
+        if (notifyClient && flexClient != null && flexClient.isValid()) {
             CommandMessage msg = new CommandMessage();
             msg.setDestination(destination.getId());
             msg.setClientId(clientId);
             msg.setOperation(CommandMessage.SUBSCRIPTION_INVALIDATE_OPERATION);
             Set subscriberIds = new TreeSet();
             subscriberIds.add(clientId);
-            try
-            {
-                if (destination instanceof MessageDestination)
-                {
-                    MessageDestination msgDestination = (MessageDestination)destination;
-                    ((MessageService)msgDestination.getService()).pushMessageToClients(msgDestination, subscriberIds, msg, false /* don't eval selector */);
+            try {
+                if (destination instanceof MessageDestination) {
+                    MessageDestination msgDestination = (MessageDestination) destination;
+                    ((MessageService) msgDestination.getService()).pushMessageToClients(msgDestination, subscriberIds, msg, false /* don't eval selector */);
                 }
+            } catch (MessageException ignore) {
             }
-            catch (MessageException ignore) {}
         }
 
         // Notify messageClientDestroyed listeners that we're being invalidated.
-        if (destroyedListeners != null && !destroyedListeners.isEmpty())
-        {
-            for (Iterator iter = destroyedListeners.iterator(); iter.hasNext();)
-            {
-                ((MessageClientListener)iter.next()).messageClientDestroyed(this);
+        if (destroyedListeners != null && !destroyedListeners.isEmpty()) {
+            for (Iterator iter = destroyedListeners.iterator(); iter.hasNext(); ) {
+                ((MessageClientListener) iter.next()).messageClientDestroyed(this);
             }
             destroyedListeners.clear();
         }
@@ -807,10 +725,8 @@
         // is that some adapters manage their own subscription state (i.e. JMS) in addition to us keeping track of
         // things with our SubscriptionManager.
         ArrayList<CommandMessage> unsubMessages = new ArrayList<CommandMessage>();
-        synchronized (lock)
-        {
-            for (SubscriptionInfo subInfo : subscriptions)
-            {
+        synchronized (lock) {
+            for (SubscriptionInfo subInfo : subscriptions) {
                 CommandMessage unsubMessage = new CommandMessage();
                 unsubMessage.setDestination(destination.getId());
                 unsubMessage.setClientId(clientId);
@@ -822,21 +738,16 @@
             }
         }
         // Release the lock and send the unsub messages.
-        for (CommandMessage unsubMessage : unsubMessages)
-        {
-            try
-            {
+        for (CommandMessage unsubMessage : unsubMessages) {
+            try {
                 destination.getService().serviceCommand(unsubMessage);
-            }
-            catch (MessageException me)
-            {
+            } catch (MessageException me) {
                 if (Log.isDebug())
                     Log.getLogger(MESSAGE_CLIENT_LOG_CATEGORY).debug("MessageClient: " + getClientId() + " issued an unsubscribe message during invalidation that was not processed but will continue with invalidation. Reason: " + ExceptionUtil.toString(me));
             }
         }
 
-        synchronized (lock)
-        {
+        synchronized (lock) {
             // If we didn't clean up all subscriptions log an error and continue with shutdown.
             int remainingSubscriptionCount = subscriptions.size();
             if (remainingSubscriptionCount > 0 && Log.isError())
@@ -846,10 +757,9 @@
         // If someone registered this message client, invalidating it will free
         // their reference which will typically also remove this message client.
         if (registered && destination instanceof MessageDestination)
-            ((MessageDestination)destination).getSubscriptionManager().releaseMessageClient(this);
+            ((MessageDestination) destination).getSubscriptionManager().releaseMessageClient(this);
 
-        synchronized (lock)
-        {
+        synchronized (lock) {
             valid = false;
             invalidating = false;
         }
@@ -862,37 +772,30 @@
      * Pushes the supplied message and then invalidates the MessageClient.
      *
      * @param message The message to push to the client before invalidating.
-     * When message is null, MessageClient is invalidated silently.
+     *                When message is null, MessageClient is invalidated silently.
      */
-    public void invalidate(Message message)
-    {
-        if (message != null)
-        {
+    public void invalidate(Message message) {
+        if (message != null) {
             message.setDestination(destination.getId());
             message.setClientId(clientId);
 
             Set subscriberIds = new TreeSet();
             subscriberIds.add(clientId);
-            try
-            {
-                if (destination instanceof MessageDestination)
-                {
-                    MessageDestination msgDestination = (MessageDestination)destination;
-                    ((MessageService)msgDestination.getService()).pushMessageToClients(msgDestination, subscriberIds, message, false /* don't eval selector */);
+            try {
+                if (destination instanceof MessageDestination) {
+                    MessageDestination msgDestination = (MessageDestination) destination;
+                    ((MessageService) msgDestination.getService()).pushMessageToClients(msgDestination, subscriberIds, message, false /* don't eval selector */);
                 }
+            } catch (MessageException ignore) {
             }
-            catch (MessageException ignore) {}
 
             invalidate(true /* attempt to notify remote client */);
-        }
-        else
-        {
+        } else {
             invalidate();
         }
     }
 
     /**
-     *
      * Compares this MessageClient to the specified object. The result is true if
      * the argument is not null and is a MessageClient instance with a matching
      * clientId value.
@@ -900,10 +803,8 @@
      * @param o The object to compare this MessageClient to.
      * @return true if the MessageClient is equal; otherwise false.
      */
-    public boolean equals(Object o)
-    {
-        if (o instanceof MessageClient)
-        {
+    public boolean equals(Object o) {
+        if (o instanceof MessageClient) {
             MessageClient c = (MessageClient) o;
             if (c != null && c.getClientId().equals(clientId))
                 return true;
@@ -912,27 +813,23 @@
     }
 
     /**
-     *
      * Returns the hash code for this MessageClient. The returned value is
      * the hash code for the MessageClient's clientId property.
      *
      * @return The hash code value for this MessageClient.
      */
     @Override
-    public int hashCode()
-    {
+    public int hashCode() {
         return getClientId().hashCode();
     }
 
     /**
-     *
      * The String representation of this MessageClient is returned (its clientId value).
      *
      * @return The clientId value for this MessageClient.
      */
     @Override
-    public String toString()
-    {
+    public String toString() {
         return String.valueOf(clientId);
     }
 
@@ -941,43 +838,35 @@
     //----------------------------------
 
     /**
-     *
      * Implements TimeoutCapable.
      * This method returns the timeout value configured for the MessageClient's destination.
      */
     @Override
-    public long getTimeoutPeriod()
-    {
-        return (destination instanceof MessageDestination) ? 
-                ((MessageDestination)destination).getSubscriptionManager().getSubscriptionTimeoutMillis() : 0;
+    public long getTimeoutPeriod() {
+        return (destination instanceof MessageDestination) ?
+                ((MessageDestination) destination).getSubscriptionManager().getSubscriptionTimeoutMillis() : 0;
     }
 
     /**
-     *
      * Implements TimeoutCapable.
      * This method is invoked when the MessageClient has timed out and it
      * invalidates the MessageClient.
      */
-    public void timeout()
-    {
+    public void timeout() {
         invalidate(true /* notify client */);
     }
 
     /**
-     *
      * Returns true if a timeout task is running for this MessageClient.
      */
-    public boolean isTimingOut()
-    {
+    public boolean isTimingOut() {
         return willTimeout;
     }
 
     /**
-     *
      * Records whether a timeout task is running for this MessageClient.
      */
-    public void setTimingOut(boolean value)
-    {
+    public void setTimingOut(boolean value) {
         willTimeout = value;
     }
 
@@ -991,30 +880,24 @@
      * Utility method that tests validity and throws an exception if the instance
      * has been invalidated.
      */
-    private void checkValid()
-    {
-        synchronized (lock)
-        {
-            if (!valid)
-            {
+    private void checkValid() {
+        synchronized (lock) {
+            if (!valid) {
                 throw new RuntimeException("MessageClient has been invalidated."); // TODO - localize
             }
         }
     }
 
-    private OutboundQueueThrottleManager getThrottleManager(boolean create)
-    {
-        if (flexClient != null)
-        {
+    private OutboundQueueThrottleManager getThrottleManager(boolean create) {
+        if (flexClient != null) {
             FlexClientOutboundQueueProcessor processor = flexClient.getOutboundQueueProcessor(endpointId);
             if (processor != null)
-                return create? processor.getOrCreateOutboundQueueThrottleManager() : processor.getOutboundQueueThrottleManager();
+                return create ? processor.getOrCreateOutboundQueueThrottleManager() : processor.getOutboundQueueThrottleManager();
         }
         return null;
     }
 
-    private void unregisterSubscriptionWithThrottleManager(SubscriptionInfo si)
-    {
+    private void unregisterSubscriptionWithThrottleManager(SubscriptionInfo si) {
         OutboundQueueThrottleManager throttleManager = getThrottleManager(false);
         if (throttleManager != null)
             throttleManager.unregisterSubscription(destinationId, si);
@@ -1031,51 +914,45 @@
      * It captures the optional selector expression and subtopic for the
      * subscription.
      */
-    public static class SubscriptionInfo implements Comparable
-    {
+    public static class SubscriptionInfo implements Comparable {
         public String selector, subtopic;
         public int maxFrequency; // maxFrequency per subscription. Not used in BlazeDS.
 
-        public SubscriptionInfo(String sel, String sub)
-        {
+        public SubscriptionInfo(String sel, String sub) {
             this(sel, sub, 0);
         }
 
-        public SubscriptionInfo(String sel, String sub, int maxFrequency)
-        {
+        public SubscriptionInfo(String sel, String sub, int maxFrequency) {
             this.selector = sel;
             this.subtopic = sub;
             this.maxFrequency = maxFrequency;
         }
 
         @Override
-        public boolean equals(Object o)
-        {
-            if (o instanceof SubscriptionInfo)
-            {
+        public boolean equals(Object o) {
+            if (o instanceof SubscriptionInfo) {
                 SubscriptionInfo other = (SubscriptionInfo) o;
                 return equalStrings(other.selector, selector) &&
-                       equalStrings(other.subtopic, subtopic);
+                        equalStrings(other.subtopic, subtopic);
             }
             return false;
         }
 
         @Override
-        public int hashCode()
-        {
+        public int hashCode() {
             return (selector == null ? 0 : selector.hashCode()) +
-                   (subtopic == null ? 1 : subtopic.hashCode());
+                    (subtopic == null ? 1 : subtopic.hashCode());
         }
 
         /**
          * Compares the two subscription infos (being careful to
          * ensure we compare in a consistent way if the arguments
          * are switched).
+         *
          * @param o the object to compare
          * @return int the compare result
          */
-        public int compareTo(Object o)
-        {
+        public int compareTo(Object o) {
             SubscriptionInfo other = (SubscriptionInfo) o;
             int result;
 
@@ -1089,19 +966,18 @@
 
         /**
          * Check whether the message matches with selected subtopic.
-         * @param message current message
-         * @param subtopicToMatch subtopc string
-         * @param subtopicSeparator suptopic separator 
+         *
+         * @param message           current message
+         * @param subtopicToMatch   subtopc string
+         * @param subtopicSeparator suptopic separator
          * @return true if the message matches the subtopic
          */
-        public boolean matches(Message message, String subtopicToMatch, String subtopicSeparator)
-        {
+        public boolean matches(Message message, String subtopicToMatch, String subtopicSeparator) {
             if ((subtopicToMatch == null && subtopic != null) || (subtopicToMatch != null && subtopic == null))
                 return false; // If either defines a subtopic, they both must define one.
 
             // If both define a subtopic, they must match.
-            if (subtopicToMatch != null && subtopic != null)
-            {
+            if (subtopicToMatch != null && subtopic != null) {
                 Subtopic consumerSubtopic = new Subtopic(subtopic, subtopicSeparator);
                 Subtopic messageSubtopic = new Subtopic(subtopicToMatch, subtopicSeparator);
                 if (!consumerSubtopic.matches(messageSubtopic))
@@ -1111,7 +987,7 @@
             if (selector == null)
                 return true;
 
-            JMSSelector jmsSelector = new JMSSelector(selector);
+            /*JMSSelector jmsSelector = new JMSSelector(selector);
             try
             {
                 if (jmsSelector.match(message))
@@ -1127,16 +1003,16 @@
                          "  incomingMessage: " + message + StringUtils.NEWLINE +
                          "  selector: " + selector + StringUtils.NEWLINE);
                 }
-            }
+            }*/
             return false;
         }
 
         /**
          * Returns a String representation of the subscription info.
+         *
          * @return String the string representation of the subscription info
          */
-        public String toString()
-        {
+        public String toString() {
             StringBuffer sb = new StringBuffer();
             sb.append("Subtopic: " + subtopic + StringUtils.NEWLINE);
             sb.append("Selector: " + selector + StringUtils.NEWLINE);
diff --git a/core/src/main/java/flex/messaging/MessageClientListener.java b/core/src/main/java/flex/messaging/MessageClientListener.java
index 7cfdb90..a7e6390 100644
--- a/core/src/main/java/flex/messaging/MessageClientListener.java
+++ b/core/src/main/java/flex/messaging/MessageClientListener.java
@@ -22,18 +22,17 @@
  * To listen for MessageClient destruction, the implementation class instance must add itself as a listener to
  * a specific MessageClient instance via the <code>addMessageClientDestroyedListener()</code> method.
  */
-public interface MessageClientListener 
-{
+public interface MessageClientListener {
     /**
      * Notification that a MessageClient was created.
-     * 
+     *
      * @param messageClient The MessageClient that was created.
      */
     void messageClientCreated(MessageClient messageClient);
-    
+
     /**
      * Notification that a MessageClient is about to be destroyed.
-     * 
+     *
      * @param messageClient The MessageClient that will be destroyed.
      */
     void messageClientDestroyed(MessageClient messageClient);
diff --git a/core/src/main/java/flex/messaging/MessageDestination.java b/core/src/main/java/flex/messaging/MessageDestination.java
index 141ac8a..e2a4a91 100644
--- a/core/src/main/java/flex/messaging/MessageDestination.java
+++ b/core/src/main/java/flex/messaging/MessageDestination.java
@@ -39,11 +39,12 @@
 /**
  * A logical reference to a MessageDestination.
  */
-public class MessageDestination extends FactoryDestination
-{
+public class MessageDestination extends FactoryDestination {
     static final long serialVersionUID = -2016911808141319012L;
 
-    /** Log category for <code>MessageDestination</code>.*/
+    /**
+     * Log category for <code>MessageDestination</code>.
+     */
     public static final String LOG_CATEGORY = LogCategories.SERVICE_MESSAGE;
 
     // Errors
@@ -68,8 +69,7 @@
     /**
      * Constructs an unmanaged <code>MessageDestination</code> instance.
      */
-    public MessageDestination()
-    {
+    public MessageDestination() {
         this(false);
     }
 
@@ -77,10 +77,9 @@
      * Constructs a <code>MessageDestination</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>MessageDestination</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public MessageDestination(boolean enableManagement)
-    {
+    public MessageDestination(boolean enableManagement) {
         super(enableManagement);
 
         serverSettings = new ServerSettings();
@@ -100,12 +99,11 @@
      * Initializes the <code>MessageDestination</code> with the properties.
      * If subclasses override, they must call <code>super.initialize()</code>.
      *
-     * @param id The id of the destination.
+     * @param id         The id of the destination.
      * @param properties Properties for the <code>MessageDestination</code>.
      */
     @Override
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
         if (properties == null || properties.size() == 0)
@@ -122,14 +120,11 @@
      * Sets up the throttle manager before it starts.
      */
     @Override
-    public void start()
-    {
+    public void start() {
         // Create the throttle manager, only if needed.
-        if (networkSettings.getThrottleSettings() != null)
-        {
+        if (networkSettings.getThrottleSettings() != null) {
             ThrottleSettings settings = networkSettings.getThrottleSettings();
-            if (settings.isClientThrottleEnabled() || settings.isDestinationThrottleEnabled())
-            {
+            if (settings.isClientThrottleEnabled() || settings.isDestinationThrottleEnabled()) {
                 settings.setDestinationName(getId());
                 throttleManager = createThrottleManager();
                 throttleManager.setThrottleSettings(settings);
@@ -144,10 +139,8 @@
      * then calls super class's stop.
      */
     @Override
-    public void stop()
-    {
-        if (isStarted())
-        {
+    public void stop() {
+        if (isStarted()) {
             subscriptionManager.stop();
             remoteSubscriptionManager.stop();
             if (throttleManager != null)
@@ -168,13 +161,11 @@
      * @param networkSettings The <code>NetworkSettings</code> of the <code>MessageDestination</code>
      */
     @Override
-    public void setNetworkSettings(NetworkSettings networkSettings)
-    {
+    public void setNetworkSettings(NetworkSettings networkSettings) {
         super.setNetworkSettings(networkSettings);
 
         // Set the subscription manager settings if needed.
-        if (networkSettings.getSubscriptionTimeoutMinutes() > 0)
-        {
+        if (networkSettings.getSubscriptionTimeoutMinutes() > 0) {
             long subscriptionTimeoutMillis = networkSettings.getSubscriptionTimeoutMinutes() * 60L * 1000L; // Convert to millis.
             subscriptionManager.setSubscriptionTimeoutMillis(subscriptionTimeoutMillis);
         }
@@ -185,8 +176,7 @@
      *
      * @return The <code>ServerSettings</code> of the <code>MessageDestination</code>.
      */
-    public ServerSettings getServerSettings()
-    {
+    public ServerSettings getServerSettings() {
         return serverSettings;
     }
 
@@ -195,8 +185,7 @@
      *
      * @param serverSettings The <code>ServerSettings</code> of the <code>MessageDestination</code>
      */
-    public void setServerSettings(ServerSettings serverSettings)
-    {
+    public void setServerSettings(ServerSettings serverSettings) {
         this.serverSettings = serverSettings;
     }
 
@@ -207,9 +196,8 @@
      * @param service The <code>Service</code> managing this <code>Destination</code>.
      */
     @Override
-    public void setService(Service service)
-    {
-        MessageService messageService = (MessageService)service;
+    public void setService(Service service) {
+        MessageService messageService = (MessageService) service;
         super.setService(messageService);
     }
 
@@ -220,7 +208,6 @@
     //--------------------------------------------------------------------------
 
     /**
-     *
      * Returns a <tt>ConfigMap</tt> of destination properties that the client
      * needs. This includes properties from <code>super{@link #describeDestination(boolean)}</code>
      * and it also includes outbound throttling policy that the edge server might need.
@@ -229,8 +216,7 @@
      * @return A <tt>ConfigMap</tt> of destination properties that the client needs.
      */
     @Override
-    public ConfigMap describeDestination(boolean onlyReliable)
-    {
+    public ConfigMap describeDestination(boolean onlyReliable) {
         ConfigMap destinationConfig = super.describeDestination(onlyReliable);
         if (destinationConfig == null)
             return null;
@@ -244,15 +230,13 @@
 
         // Add the outbound throttle policy to network properties section as appropriate.
         ConfigMap properties = destinationConfig.getPropertyAsMap(ConfigurationConstants.PROPERTIES_ELEMENT, null);
-        if (properties == null)
-        {
+        if (properties == null) {
             properties = new ConfigMap();
             destinationConfig.addProperty(ConfigurationConstants.PROPERTIES_ELEMENT, properties);
         }
 
         ConfigMap network = properties.getPropertyAsMap(NetworkSettings.NETWORK_ELEMENT, null);
-        if (network == null)
-        {
+        if (network == null) {
             network = new ConfigMap();
             properties.addProperty(NetworkSettings.NETWORK_ELEMENT, network);
         }
@@ -265,34 +249,28 @@
     }
 
 
-    public SubscriptionManager getSubscriptionManager()
-    {
+    public SubscriptionManager getSubscriptionManager() {
         return subscriptionManager;
     }
 
 
-    public RemoteSubscriptionManager getRemoteSubscriptionManager()
-    {
+    public RemoteSubscriptionManager getRemoteSubscriptionManager() {
         return remoteSubscriptionManager;
     }
 
 
-    public ThrottleManager getThrottleManager()
-    {
+    public ThrottleManager getThrottleManager() {
         return throttleManager;
     }
 
 
     @Override
-    public boolean equals(Object o)
-    {
-        if (o instanceof Destination)
-        {
-            Destination d = (Destination)o;
+    public boolean equals(Object o) {
+        if (o instanceof Destination) {
+            Destination d = (Destination) o;
             String serviceType1 = d.getServiceType();
             String serviceType2 = getServiceType();
-            if ((serviceType1 == null && serviceType2 == null) || (serviceType1 != null && serviceType1.equals(serviceType2)))
-            {
+            if ((serviceType1 == null && serviceType2 == null) || (serviceType1 != null && serviceType1.equals(serviceType2))) {
                 String id1 = d.getId();
                 String id2 = getId();
                 if ((id1 == null && id2 == null) || (id1 != null && id1.equals(id2)))
@@ -304,16 +282,14 @@
 
 
     @Override
-    public int hashCode()
-    {
+    public int hashCode() {
         return (getServiceType() == null ? 0 : getServiceType().hashCode()) * 100003 +
-            (getId() == null ? 0 : getId().hashCode());
+                (getId() == null ? 0 : getId().hashCode());
     }
 
 
     @Override
-    public String toString()
-    {
+    public String toString() {
         return getServiceType() + "#" + getId();
     }
 
@@ -323,29 +299,24 @@
     //
     //--------------------------------------------------------------------------
 
-    protected ThrottleManager createThrottleManager()
-    {
+    protected ThrottleManager createThrottleManager() {
         Service service = getService();
         if (service == null || service.getMessageBroker() == null)
             return new ThrottleManager(); // Return the default.
 
-        try
-        {
+        try {
             Class<? extends ThrottleManager> throttleManagerClass = service.getMessageBroker().getThrottleManagerClass();
             Object instance = ClassUtil.createDefaultInstance(throttleManagerClass, null);
             if (instance instanceof ThrottleManager)
-                return (ThrottleManager)instance;
-        }
-        catch (Throwable t)
-        {
+                return (ThrottleManager) instance;
+        } catch (Throwable t) {
             // NOWARN
         }
 
         return new ThrottleManager(); // Return the default.
     }
 
-    protected void network(ConfigMap properties)
-    {
+    protected void network(ConfigMap properties) {
         ConfigMap network = properties.getPropertyAsMap(NetworkSettings.NETWORK_ELEMENT, null);
         if (network == null)
             return;
@@ -368,11 +339,9 @@
         setNetworkSettings(ns);
     }
 
-    protected void throttle(ThrottleSettings ts, ConfigMap network)
-    {
+    protected void throttle(ThrottleSettings ts, ConfigMap network) {
         ConfigMap inbound = network.getPropertyAsMap(ThrottleSettings.ELEMENT_INBOUND, null);
-        if (inbound != null)
-        {
+        if (inbound != null) {
             ThrottleSettings.Policy policy = getPolicyFromThrottleSettings(inbound);
             ts.setInboundPolicy(policy);
             int destFreq = inbound.getPropertyAsInt(ThrottleSettings.ELEMENT_DEST_FREQ, 0);
@@ -382,8 +351,7 @@
         }
 
         ConfigMap outbound = network.getPropertyAsMap(ThrottleSettings.ELEMENT_OUTBOUND, null);
-        if (outbound != null)
-        {
+        if (outbound != null) {
             ThrottleSettings.Policy policy = getPolicyFromThrottleSettings(outbound);
             ts.setOutboundPolicy(policy);
             int destFreq = outbound.getPropertyAsInt(ThrottleSettings.ELEMENT_DEST_FREQ, 0);
@@ -393,27 +361,22 @@
         }
     }
 
-    private ThrottleSettings.Policy getPolicyFromThrottleSettings(ConfigMap settings)
-    {
+    private ThrottleSettings.Policy getPolicyFromThrottleSettings(ConfigMap settings) {
         String policyString = settings.getPropertyAsString(ThrottleSettings.ELEMENT_POLICY, null);
         ThrottleSettings.Policy policy = ThrottleSettings.Policy.NONE;
         if (policyString == null)
             return policy;
-        try
-        {
+        try {
             policy = ThrottleSettings.parsePolicy(policyString);
-        }
-        catch (ConfigurationException exception)
-        {
+        } catch (ConfigurationException exception) {
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(UNSUPPORTED_POLICY, new Object[] {getId(), policyString});
+            ce.setMessage(UNSUPPORTED_POLICY, new Object[]{getId(), policyString});
             throw ce;
         }
         return policy;
     }
 
-    protected void server(ConfigMap properties)
-    {
+    protected void server(ConfigMap properties) {
         ConfigMap server = properties.getPropertyAsMap(DestinationSettings.SERVER_ELEMENT, null);
         if (server == null)
             return;
@@ -447,8 +410,7 @@
      * @return The log category of the component.
      */
     @Override
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -459,8 +421,7 @@
      * @param service The <code>Service</code> that manages this <code>MessageDestination</code>.
      */
     @Override
-    protected void setupDestinationControl(Service service)
-    {
+    protected void setupDestinationControl(Service service) {
         controller = new MessageDestinationControl(this, service.getControl());
         controller.register();
         setControl(controller);
@@ -468,10 +429,8 @@
         setupSubscriptionManagerControl(controller);
     }
 
-    protected void setupThrottleManagerControl(MessageDestinationControl destinationControl)
-    {
-        if (throttleManager != null)
-        {
+    protected void setupThrottleManagerControl(MessageDestinationControl destinationControl) {
+        if (throttleManager != null) {
             ThrottleManagerControl throttleManagerControl = new ThrottleManagerControl(throttleManager, destinationControl);
             throttleManagerControl.register();
             throttleManager.setControl(throttleManagerControl);
@@ -480,8 +439,7 @@
         }
     }
 
-    private void setupSubscriptionManagerControl(MessageDestinationControl destinationControl)
-    {
+    private void setupSubscriptionManagerControl(MessageDestinationControl destinationControl) {
         SubscriptionManagerControl subscriptionManagerControl = new SubscriptionManagerControl(getSubscriptionManager(), destinationControl);
         subscriptionManagerControl.register();
         getSubscriptionManager().setControl(subscriptionManagerControl);
diff --git a/core/src/main/java/flex/messaging/MessageException.java b/core/src/main/java/flex/messaging/MessageException.java
index f3b565a..27e37bf 100644
--- a/core/src/main/java/flex/messaging/MessageException.java
+++ b/core/src/main/java/flex/messaging/MessageException.java
@@ -32,8 +32,7 @@
  * The MessageException class is the basic exception type used throughout
  * the server.  This class is extended to support more specific exception types.
  */
-public class MessageException extends LocalizedException
-{
+public class MessageException extends LocalizedException {
     //--------------------------------------------------------------------------
     //
     // Static Constants
@@ -55,8 +54,7 @@
     /**
      * Default constructor.
      */
-    public MessageException()
-    {
+    public MessageException() {
     }
 
     /**
@@ -64,8 +62,7 @@
      *
      * @param loader
      */
-    public MessageException(ResourceLoader loader)
-    {
+    public MessageException(ResourceLoader loader) {
         super(loader);
     }
 
@@ -74,8 +71,7 @@
      *
      * @param message The detailed message for the exception.
      */
-    public MessageException(String message)
-    {
+    public MessageException(String message) {
         setMessage(message);
     }
 
@@ -83,10 +79,9 @@
      * Constructs a new exception with the specified message and the <code>Throwable</code> as the root cause.
      *
      * @param message The detailed message for the exception.
-     * @param t The root cause of the exception.
+     * @param t       The root cause of the exception.
      */
-    public MessageException(String message, Throwable t)
-    {
+    public MessageException(String message, Throwable t) {
         setMessage(message);
         setRootCause(t);
     }
@@ -96,8 +91,7 @@
      *
      * @param t The root cause of the exception.
      */
-    public MessageException(Throwable t)
-    {
+    public MessageException(Throwable t) {
         String rootMessage = t.getMessage();
         if (rootMessage == null)
             rootMessage = t.toString();
@@ -123,8 +117,7 @@
      *
      * @return Code of the exception.
      */
-    public String getCode()
-    {
+    public String getCode() {
         return code;
     }
 
@@ -133,8 +126,7 @@
      *
      * @param code Code of the exception.
      */
-    public void setCode(String code)
-    {
+    public void setCode(String code) {
         this.code = code;
     }
 
@@ -147,8 +139,7 @@
      *
      * @return the default initial text for use in the log output generated by <code>logAtHingePoint()</code>.
      */
-    public String getDefaultLogMessageIntro()
-    {
+    public String getDefaultLogMessageIntro() {
         return "Error handling message: ";
     }
 
@@ -164,8 +155,7 @@
      *
      * @return The extended data of the exception.
      */
-    public Map getExtendedData()
-    {
+    public Map getExtendedData() {
         return extendedData;
     }
 
@@ -174,8 +164,7 @@
      *
      * @param extendedData The extended data of the exception.
      */
-    public void setExtendedData(Map extendedData)
-    {
+    public void setExtendedData(Map extendedData) {
         this.extendedData = extendedData;
     }
 
@@ -191,10 +180,8 @@
      *
      * @return The error message of the exception.
      */
-    public ErrorMessage getErrorMessage()
-    {
-        if (errorMessage == null)
-        {
+    public ErrorMessage getErrorMessage() {
+        if (errorMessage == null) {
             errorMessage = createErrorMessage();
         }
         return errorMessage;
@@ -205,8 +192,7 @@
      *
      * @param errorMessage The error message of the exception.
      */
-    public void setErrorMessage(ErrorMessage errorMessage)
-    {
+    public void setErrorMessage(ErrorMessage errorMessage) {
         this.errorMessage = errorMessage;
     }
 
@@ -218,11 +204,10 @@
      * Indicates whether logging of this exception should include a full stack trace or not.
      * Default is true.
      *
-     * @see #logAtHingePoint(Message, ErrorMessage, String)
      * @return true if the logging stack traces is enabled.
+     * @see #logAtHingePoint(Message, ErrorMessage, String)
      */
-    public boolean isLogStackTraceEnabled()
-    {
+    public boolean isLogStackTraceEnabled() {
         return true;
     }
 
@@ -240,8 +225,7 @@
      *
      * @return true if the exception has been logged; otherwise false.
      */
-    public boolean isLogged()
-    {
+    public boolean isLogged() {
         return logged;
     }
 
@@ -250,8 +234,7 @@
      *
      * @param value true if the exception has been logged; otherwise false.
      */
-    public void setLogged(boolean value)
-    {
+    public void setLogged(boolean value) {
         logged = value;
     }
 
@@ -263,11 +246,10 @@
      * Returns the preferred log level for this exception instance.
      * The default value is <code>LogEvent.ERROR</code>.
      *
-     * @see #logAtHingePoint(Message, ErrorMessage, String)
      * @return the preffered log level.
+     * @see #logAtHingePoint(Message, ErrorMessage, String)
      */
-    public short getPreferredLogLevel()
-    {
+    public short getPreferredLogLevel() {
         return LogEvent.ERROR;
     }
 
@@ -280,17 +262,14 @@
      *
      * @return The <code>ResourceLoader</code> used to load localized strings.
      */
-    @Override protected ResourceLoader getResourceLoader()
-    {
-        if (resourceLoader == null)
-        {
-            try
-            {
+    @Override
+    protected ResourceLoader getResourceLoader() {
+        if (resourceLoader == null) {
+            try {
                 MessageBroker broker = FlexContext.getMessageBroker();
-                resourceLoader = broker != null? broker.getSystemSettings().getResourceLoader()
+                resourceLoader = broker != null ? broker.getSystemSettings().getResourceLoader()
                         : new PropertyStringResourceLoader();
-            }
-            catch (NoClassDefFoundError exception) // Could happen in client mode.
+            } catch (NoClassDefFoundError exception) // Could happen in client mode.
             {
                 return new PropertyStringResourceLoader();
             }
@@ -304,14 +283,13 @@
     //----------------------------------
 
 
-    public Object getRootCauseErrorMessage()
-    {
+    public Object getRootCauseErrorMessage() {
         if (rootCause == null)
             return null;
 
         // FIXME: serialize number field.
-        return rootCause instanceof MessageException?
-                ((MessageException)rootCause).createErrorMessage() : rootCause;
+        return rootCause instanceof MessageException ?
+                ((MessageException) rootCause).createErrorMessage() : rootCause;
     }
 
     //----------------------------------
@@ -325,8 +303,7 @@
      *
      * @return The HTTP status code of the exception.
      */
-    public int getStatusCode()
-    {
+    public int getStatusCode() {
         return statusCode;
     }
 
@@ -335,8 +312,7 @@
      *
      * @param statusCode The HTTP status code of the exception.
      */
-    public void setStatusCode(int statusCode)
-    {
+    public void setStatusCode(int statusCode) {
         this.statusCode = statusCode;
     }
 
@@ -351,10 +327,9 @@
      *
      * @return The error message.
      */
-    public ErrorMessage createErrorMessage()
-    {
+    public ErrorMessage createErrorMessage() {
         ErrorMessage msg = new ErrorMessage();
-        msg.faultCode = code != null? code : "Server.Processing";
+        msg.faultCode = code != null ? code : "Server.Processing";
         msg.faultString = message;
         msg.faultDetail = details;
         msg.rootCause = getRootCauseErrorMessage();
@@ -373,15 +348,13 @@
      * The underlying exception stack traces are also conditionally included in log output
      * if the exception class allows it and this is determined by invoking <code>isLogStackTraceEnabled()</code>
      *
-     * @param inboundMessage The inbound message that triggered an exception during processing.
+     * @param inboundMessage  The inbound message that triggered an exception during processing.
      * @param outboundMessage The outbound <code>ErrorMessage</code>, which may be null depending on whether it has been generated
      *                        or not at the point this method is invoked.
      * @param logMessageIntro The beginning text for the log message, which may be null; default value is returned by <code>getDefaultLogMessageIntro()</code>.
      */
-    public void logAtHingePoint(Message inboundMessage, ErrorMessage outboundMessage, String logMessageIntro)
-    {
-        if (!isLogged())
-        {
+    public void logAtHingePoint(Message inboundMessage, ErrorMessage outboundMessage, String logMessageIntro) {
+        if (!isLogged()) {
             setLogged(true);
 
             short preferredLevel = getPreferredLogLevel();
@@ -397,47 +370,38 @@
             output.append("  incomingMessage: ");
             output.append(inboundMessage);
             output.append(StringUtils.NEWLINE);
-            if (outboundMessage != null)
-            {
+            if (outboundMessage != null) {
                 output.append("  errorReply: ");
                 output.append(outboundMessage);
                 output.append(StringUtils.NEWLINE);
             }
-            if (isLogStackTraceEnabled())
-            {
+            if (isLogStackTraceEnabled()) {
                 output.append(ExceptionUtil.exceptionFollowedByRootCausesToString(this));
                 output.append(StringUtils.NEWLINE);
             }
 
-            switch (preferredLevel)
-            {
-                case LogEvent.FATAL:
-                {
+            switch (preferredLevel) {
+                case LogEvent.FATAL: {
                     Log.getLogger(LogCategories.MESSAGE_GENERAL).fatal(output.toString());
                     break;
                 }
-                case LogEvent.ERROR:
-                {
+                case LogEvent.ERROR: {
                     Log.getLogger(LogCategories.MESSAGE_GENERAL).error(output.toString());
                     break;
                 }
-                case LogEvent.WARN:
-                {
+                case LogEvent.WARN: {
                     Log.getLogger(LogCategories.MESSAGE_GENERAL).warn(output.toString());
                     break;
                 }
-                case LogEvent.INFO:
-                {
+                case LogEvent.INFO: {
                     Log.getLogger(LogCategories.MESSAGE_GENERAL).info(output.toString());
                     break;
                 }
-                case LogEvent.DEBUG:
-                {
+                case LogEvent.DEBUG: {
                     Log.getLogger(LogCategories.MESSAGE_GENERAL).debug(output.toString());
                     break;
                 }
-                default:
-                {
+                default: {
                     Log.getLogger(LogCategories.MESSAGE_GENERAL).fatal("Failed to log exception for handling message due to an invalid preferred log level: " + preferredLevel);
                     break;
                 }
diff --git a/core/src/main/java/flex/messaging/MessageRoutedEvent.java b/core/src/main/java/flex/messaging/MessageRoutedEvent.java
index 397b261..51f47cd 100644
--- a/core/src/main/java/flex/messaging/MessageRoutedEvent.java
+++ b/core/src/main/java/flex/messaging/MessageRoutedEvent.java
@@ -21,14 +21,12 @@
 import java.util.EventObject;
 
 /**
- *
  * This event indicates that the source message has been routed to the outbound message queues
  * for all target clients.
- * This can be used as the trigger for performing optimized IO to flush these queued messages to 
+ * This can be used as the trigger for performing optimized IO to flush these queued messages to
  * remote hosts over the network.
  */
-public class MessageRoutedEvent extends EventObject
-{
+public class MessageRoutedEvent extends EventObject {
     /**
      *
      */
@@ -36,19 +34,17 @@
 
     /**
      * Constructs a new <tt>MessageRoutedEvent</tt> using the supplied source <tt>Message</tt>.
-     * 
+     *
      * @param message The message that has been routed.
      */
-    public MessageRoutedEvent(Message message)
-    {
+    public MessageRoutedEvent(Message message) {
         super(message);
     }
-    
+
     /**
      * Returns the message that has been routed.
      */
-    public Message getMessage()
-    {
-        return (Message)getSource();
+    public Message getMessage() {
+        return (Message) getSource();
     }
 }
diff --git a/core/src/main/java/flex/messaging/MessageRoutedListener.java b/core/src/main/java/flex/messaging/MessageRoutedListener.java
index bf9a171..9e932d2 100644
--- a/core/src/main/java/flex/messaging/MessageRoutedListener.java
+++ b/core/src/main/java/flex/messaging/MessageRoutedListener.java
@@ -19,16 +19,14 @@
 import java.util.EventListener;
 
 /**
- *
  * Provides notification for multicast message routing events to support optimized
  * asynchronous IO to the target remote hosts.
  */
-public interface MessageRoutedListener extends EventListener
-{    
+public interface MessageRoutedListener extends EventListener {
     /**
      * Invoked when a message has been routed to the outbound queues for all target
      * clients.
-     * 
+     *
      * @param event The event containing the source message.
      */
     void messageRouted(MessageRoutedEvent event);
diff --git a/core/src/main/java/flex/messaging/MessageRoutedNotifier.java b/core/src/main/java/flex/messaging/MessageRoutedNotifier.java
index f9aca87..e5d2923 100644
--- a/core/src/main/java/flex/messaging/MessageRoutedNotifier.java
+++ b/core/src/main/java/flex/messaging/MessageRoutedNotifier.java
@@ -21,7 +21,6 @@
 import java.util.ArrayList;
 
 /**
- *
  * Supports registration and notification of <tt>MessageRoutedListener</tt>s.
  * An instance of this class is exposed by <tt>FlexContext</tt> while a message is
  * being routed, and once routing of the message to the outbound messages queues for
@@ -29,35 +28,33 @@
  * This class performs no synchronization because it is only used within the context
  * of a single Thread, and only during the routing of a single message.
  */
-public class MessageRoutedNotifier
-{
+public class MessageRoutedNotifier {
     //--------------------------------------------------------------------------
     //
     // Constructor
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Constructs a <tt>MessageRoutedNotifier</tt> for the supplied source message.
-     * 
+     *
      * @param The source message being routed.
      */
-    public MessageRoutedNotifier(Message message)
-    {
+    public MessageRoutedNotifier(Message message) {
         this.message = message;
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Variables
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * The source message being routed.
      */
     private final Message message;
-    
+
     //--------------------------------------------------------------------------
     //
     // Properties
@@ -67,35 +64,32 @@
     //----------------------------------
     //  messageRoutedListeners
     //----------------------------------
-    
+
     private ArrayList listeners;
-    
+
     /**
      * Adds a <tt>MessageRoutedListener</tt>.
      */
-    public void addMessageRoutedListener(MessageRoutedListener listener)
-    {
-        if (listener != null)
-        {
+    public void addMessageRoutedListener(MessageRoutedListener listener) {
+        if (listener != null) {
             // Lazy-init only if necessary.
             if (listeners == null)
                 listeners = new ArrayList();
-            
+
             // Add if absent.
             if (!listeners.contains(listener))
                 listeners.add(listener);
         }
     }
-    
+
     /**
      * Removes a <tt>MessageRoutedListener</tt>.
      */
-    public void removeMessageRoutedListener(MessageRoutedListener listener)
-    {
+    public void removeMessageRoutedListener(MessageRoutedListener listener) {
         if ((listener != null) && (listeners != null))
             listeners.remove(listener);
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Public Methods
@@ -104,17 +98,15 @@
 
     /**
      * Notifies registered listeners of a routed message.
-     * 
+     *
      * @param message The message that has been routed.
      */
-    public void notifyMessageRouted()
-    {
-        if ((listeners != null) && !listeners.isEmpty())
-        {
+    public void notifyMessageRouted() {
+        if ((listeners != null) && !listeners.isEmpty()) {
             MessageRoutedEvent event = new MessageRoutedEvent(message);
             int n = listeners.size();
             for (int i = 0; i < n; ++i)
-                ((MessageRoutedListener)listeners.get(i)).messageRouted(event);
-        }        
+                ((MessageRoutedListener) listeners.get(i)).messageRouted(event);
+        }
     }
 }
diff --git a/core/src/main/java/flex/messaging/Server.java b/core/src/main/java/flex/messaging/Server.java
index dd6bf25..95003fb 100644
--- a/core/src/main/java/flex/messaging/Server.java
+++ b/core/src/main/java/flex/messaging/Server.java
@@ -20,8 +20,7 @@
  * The interface for a shared server instance that may be associated with a
  * <tt>MessageBroker</tt> and used by endpoints.
  */
-public interface Server extends FlexComponent
-{
+public interface Server extends FlexComponent {
     /**
      * Returns the id for the server.
      * Endpoints can lookup server instances that have been associated with a <tt>MessageBroker</tt> using {@link MessageBroker#getServer(String)}.
diff --git a/core/src/main/java/flex/messaging/ServiceValidationListener.java b/core/src/main/java/flex/messaging/ServiceValidationListener.java
index d7f24f8..595da0b 100644
--- a/core/src/main/java/flex/messaging/ServiceValidationListener.java
+++ b/core/src/main/java/flex/messaging/ServiceValidationListener.java
@@ -19,12 +19,12 @@
 /**
  *
  */
-public interface ServiceValidationListener
-{
+public interface ServiceValidationListener {
     /**
      * This method gets called before any other processing of the describeServices method.
      * It allows a hook for external systems that need to update the service destinations at runtime.
      */
     void validateServices();
+
     void validateDestination(String destination);
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/VersionInfo.java b/core/src/main/java/flex/messaging/VersionInfo.java
index 0d60e4d..5db5c2c 100644
--- a/core/src/main/java/flex/messaging/VersionInfo.java
+++ b/core/src/main/java/flex/messaging/VersionInfo.java
@@ -22,57 +22,42 @@
 /**
  * Class representing the build version of Data Services.
  */
-public class VersionInfo
-{
+public class VersionInfo {
     //Cache this info as it should not change during the time class is loaded
     public static String BUILD_MESSAGE;
     public static String BUILD_NUMBER_STRING;
     public static String BUILD_TITLE;
     public static long BUILD_NUMBER;
-    
+
     private static final String LCDS_CLASS = "flex.data.DataService";
 
-    public static String buildMessage()
-    {
-        if (BUILD_MESSAGE == null)
-        {
-            try
-            {
+    public static String buildMessage() {
+        if (BUILD_MESSAGE == null) {
+            try {
                 //Ensure we've parsed build info
                 getBuild();
 
-                if (StringUtils.isEmpty(BUILD_NUMBER_STRING))
-                {
+                if (StringUtils.isEmpty(BUILD_NUMBER_STRING)) {
                     BUILD_MESSAGE = BUILD_TITLE;
-                }
-                else
-                {
+                } else {
                     BUILD_MESSAGE = BUILD_TITLE + ": " + BUILD_NUMBER_STRING;
                 }
-            }
-            catch (Throwable t)
-            {
-                BUILD_MESSAGE = BUILD_TITLE +": information unavailable";
+            } catch (Throwable t) {
+                BUILD_MESSAGE = BUILD_TITLE + ": information unavailable";
             }
         }
 
         return BUILD_MESSAGE;
     }
 
-    public static long getBuildAsLong()
-    {
-        if (BUILD_NUMBER == 0)
-        {
+    public static long getBuildAsLong() {
+        if (BUILD_NUMBER == 0) {
             getBuild();
 
-            if (BUILD_NUMBER_STRING != null && !BUILD_NUMBER_STRING.equals(""))
-            {
-                try
-                {
+            if (BUILD_NUMBER_STRING != null && !BUILD_NUMBER_STRING.equals("")) {
+                try {
                     BUILD_NUMBER = Long.parseLong(BUILD_NUMBER_STRING);
-                }
-                catch (NumberFormatException nfe)
-                {
+                } catch (NumberFormatException nfe) {
                     // ignore, just return 0
                 }
             }
@@ -81,30 +66,22 @@
         return BUILD_NUMBER;
     }
 
-    public static String getBuild()
-    {
-        if (BUILD_NUMBER_STRING == null)
-        {
-            Class classToUseForManifest;  
-            
-            try
-            {
+    public static String getBuild() {
+        if (BUILD_NUMBER_STRING == null) {
+            Class classToUseForManifest;
+
+            try {
                 classToUseForManifest = Class.forName(LCDS_CLASS);
-            }
-            catch (ClassNotFoundException e)
-            {
+            } catch (ClassNotFoundException e) {
                 classToUseForManifest = VersionInfo.class;
             }
-            
-            try
-            {
+
+            try {
                 BUILD_NUMBER_STRING = "";
                 Package pack = classToUseForManifest.getPackage();
                 BUILD_NUMBER_STRING = pack.getImplementationVersion();
                 BUILD_TITLE = pack.getImplementationTitle();
-            }
-            catch (Throwable t)
-            {
+            } catch (Throwable t) {
                 // ignore, just return empty string
             }
         }
diff --git a/core/src/main/java/flex/messaging/client/AsyncPollHandler.java b/core/src/main/java/flex/messaging/client/AsyncPollHandler.java
index 2817419..ef010d0 100644
--- a/core/src/main/java/flex/messaging/client/AsyncPollHandler.java
+++ b/core/src/main/java/flex/messaging/client/AsyncPollHandler.java
@@ -19,13 +19,12 @@
 /**
  * Defines the interface to handle asynchronous poll results.
  */
-public interface AsyncPollHandler
-{
+public interface AsyncPollHandler {
     /**
      * Invoked by the <tt>FlexClient</tt> when an asynchronous poll result is available.
-     * 
+     *
      * @param flushResult The flush result containing messages to return in the poll response and
-     *         an optional wait time before the client should issue its next poll.
+     *                    an optional wait time before the client should issue its next poll.
      */
     void asyncPollComplete(FlushResult flushResult);
 }
diff --git a/core/src/main/java/flex/messaging/client/EndpointPushHandler.java b/core/src/main/java/flex/messaging/client/EndpointPushHandler.java
index 8e9c19e..e5b0c95 100644
--- a/core/src/main/java/flex/messaging/client/EndpointPushHandler.java
+++ b/core/src/main/java/flex/messaging/client/EndpointPushHandler.java
@@ -25,54 +25,53 @@
  * Defines the interface for a handler that may be registered by an endpoint with a <tt>FlexClient</tt> in order
  * to push messages to a connected client.
  */
-public interface EndpointPushHandler
-{
+public interface EndpointPushHandler {
     /**
      * Invoked to shut down the handler.
      * It may be invoked by the endpoint when the underlying connection it manages to the client closes,
      * or by the <tt>FlexClient</tt> if it is invalidated.
      * The implementation of this method should release any resources, and should not attempt to notify the
      * client of an explicit disconnect.
-     * 
+     *
      * @see #close(boolean)
      */
     void close();
-    
+
     /**
      * Invoked to shut down the handler.
      * It may be invoked by the endpoint when the underlying connection it manages to the client closes,
      * or by the <tt>FlexClient</tt> if it is invalidated.
      * The implementation of this method should release any resources, and may attempt to notify the client
      * Channel that it has been disconnected in order to suppress automatic reconnect behavior.
-     * 
+     *
      * @param disconnectChannel True to attempt to notify the client of an explicit disconnect in order to
      *                          suppress automatic reconnect behavior.
      */
     void close(boolean disconnectChannel);
-    
+
     /**
-     * Invoked by the <tt>FlexClient</tt> when it has messages to push to 
+     * Invoked by the <tt>FlexClient</tt> when it has messages to push to
      * the client.
-     * 
+     *
      * @param messagesToPush The list of messages to push.
      */
     void pushMessages(List<Message> messagesToPush);
-    
+
     /**
      * Invoked to notify the handler that the <tt>MessageClient</tt> subscription is using this handler.
      * If subscriptions should be invalidated if the handler is closed, it should retain references to
      * all registered <tt>MessageClient</tt> instances and invalidate them when it closes.
-     * 
+     *
      * @param messageClient The <tt>MessageClient</tt> subscription using this handler.
      */
     void registerMessageClient(MessageClient messageClient);
-    
+
     /**
      * Invoked to notify the handler that a <tt>MessageClient</tt> subscription that was using it has
      * been invalidated.
      * If the handler is tracking the set of <tt>MessageClient</tt> instances that are using it, the handler should
      * remove the instance from its set.
-     * 
+     *
      * @param messageClient The <tt>MessageClient</tt> subscription no longer using this handler.
      */
     void unregisterMessageClient(MessageClient messageClient);
diff --git a/core/src/main/java/flex/messaging/client/EndpointPushNotifier.java b/core/src/main/java/flex/messaging/client/EndpointPushNotifier.java
index cd6db61..81f9616 100644
--- a/core/src/main/java/flex/messaging/client/EndpointPushNotifier.java
+++ b/core/src/main/java/flex/messaging/client/EndpointPushNotifier.java
@@ -36,7 +36,6 @@
 import flex.messaging.util.UUIDUtils;
 
 /**
- *
  * Instances of this class are used by endpoints that support streaming
  * outbound data to connected clients when the client is not polling and
  * the FlexSession representing the connection does not support push directly.
@@ -57,8 +56,7 @@
  * non-blocking implementation.
  * </p>
  */
-public class EndpointPushNotifier extends TimeoutAbstractObject implements EndpointPushHandler, FlexSessionListener, MessageClientListener
-{
+public class EndpointPushNotifier extends TimeoutAbstractObject implements EndpointPushHandler, FlexSessionListener, MessageClientListener {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -68,11 +66,10 @@
     /**
      * Constructs a PushNotifier instance.
      *
-     * @param endpoint The endpoint that will use this notifier.
+     * @param endpoint   The endpoint that will use this notifier.
      * @param flexClient The FlexClient that will use this notifier.
      */
-    public EndpointPushNotifier(Endpoint endpoint, FlexClient flexClient)
-    {
+    public EndpointPushNotifier(Endpoint endpoint, FlexClient flexClient) {
         notifierId = UUIDUtils.createUUID(false /* doesn't need to be secure */);
         this.endpoint = endpoint;
         this.flexClient = flexClient;
@@ -80,8 +77,8 @@
         flexSession = FlexContext.getFlexSession();
         if (flexSession != null)
             flexSession.addSessionDestroyedListener(this);
-        invalidateMessageClientOnStreamingClose = (endpoint instanceof BaseStreamingHTTPEndpoint)?
-                ((BaseStreamingHTTPEndpoint)endpoint).isInvalidateMessageClientOnStreamingClose() : false;
+        invalidateMessageClientOnStreamingClose = (endpoint instanceof BaseStreamingHTTPEndpoint) ?
+                ((BaseStreamingHTTPEndpoint) endpoint).isInvalidateMessageClientOnStreamingClose() : false;
         updateLastUse(); // Initialize last use timestamp to construct time.
     }
 
@@ -184,8 +181,7 @@
      * Does not attempt to notify the client Channel of the disconnect thereby allowing
      * automatic reconnect processing to run.
      */
-    public void close()
-    {
+    public void close() {
         close(false);
     }
 
@@ -198,10 +194,8 @@
      * @param disconnectChannel True to attempt to notify the client Channel of the disconnect
      *                          and suppress automatic reconnect processing.
      */
-    public void close(boolean disconnectChannel)
-    {
-        synchronized (lock)
-        {
+    public void close(boolean disconnectChannel) {
+        synchronized (lock) {
             if (closed || closing)
                 return;
 
@@ -217,8 +211,7 @@
         flexClient.unregisterEndpointPushHandler(this, endpoint.getId());
 
         // Push a disconnect command down to the client to suppress automatic reconnect.
-        if (disconnectChannel)
-        {
+        if (disconnectChannel) {
             ArrayList<AsyncMessage> list = new ArrayList<AsyncMessage>(1);
             CommandMessage disconnect = new CommandMessage(CommandMessage.DISCONNECT_OPERATION);
             list.add(disconnect);
@@ -228,22 +221,19 @@
         // Invalidate associated subscriptions; this doesn't attempt to notify the client.
         // Any client subscriptions made over this endpoint will be automatically invalidated
         // on the client when it receives its channel disconnect event.
-        if (invalidateMessageClientOnStreamingClose)
-        {
-            for (Iterator<MessageClient> iter = messageClients.iterator() ; iter.hasNext();)
+        if (invalidateMessageClientOnStreamingClose) {
+            for (Iterator<MessageClient> iter = messageClients.iterator(); iter.hasNext(); )
                 iter.next().invalidate();
         }
 
         // Move to final closed state; after this we need to notify one last time to stream
         // any final messages to the client and allow the endpoint to shut down its streaming
         // connection.
-        synchronized (lock)
-        {
+        synchronized (lock) {
             closed = true;
             closing = false;
         }
-        synchronized (pushNeeded)
-        {
+        synchronized (pushNeeded) {
             pushNeeded.notifyAll();
         }
     }
@@ -257,10 +247,8 @@
      *
      * @return The messages to push to the client.
      */
-    public List<AsyncMessage> drainMessages()
-    {
-        synchronized (pushNeeded)
-        {
+    public List<AsyncMessage> drainMessages() {
+        synchronized (pushNeeded) {
             List<AsyncMessage> messagesToPush = messages;
             messages = null;
             return messagesToPush;
@@ -272,8 +260,7 @@
      *
      * @return True if the notifier has closed; otherwise false.
      */
-    public boolean isClosed()
-    {
+    public boolean isClosed() {
         return closed;
     }
 
@@ -282,8 +269,7 @@
      *
      * @return The endpoint using this notifier.
      */
-    public Endpoint getEndpoint()
-    {
+    public Endpoint getEndpoint() {
         return endpoint;
     }
 
@@ -292,8 +278,7 @@
      *
      * @return The idle timeout minutes used by the notifier.
      */
-    public int getIdleTimeoutMinutes()
-    {
+    public int getIdleTimeoutMinutes() {
         return idleTimeoutMinutes;
     }
 
@@ -302,8 +287,7 @@
      *
      * @param idleTimeoutMinutes The idle timeout minutes used by the notifier.
      */
-    public void setIdleTimeoutMinutes(int idleTimeoutMinutes)
-    {
+    public void setIdleTimeoutMinutes(int idleTimeoutMinutes) {
         this.idleTimeoutMinutes = idleTimeoutMinutes;
     }
 
@@ -312,8 +296,7 @@
      *
      * @return The log category used by this notifier.
      */
-    public String getLogCategory()
-    {
+    public String getLogCategory() {
         return logCategory;
     }
 
@@ -323,8 +306,7 @@
      *
      * @param logCategory The log category for the notifier to use.
      */
-    public void setLogCategory(String logCategory)
-    {
+    public void setLogCategory(String logCategory) {
         this.logCategory = logCategory;
     }
 
@@ -333,35 +315,30 @@
      *
      * @return The unique id for this notifier.
      */
-    public String getNotifierId()
-    {
+    public String getNotifierId() {
         return notifierId;
     }
 
     /**
-     *
      * Implements TimeoutCapable.
      * Determine the time, in milliseconds, that this object is allowed to idle
      * before having its timeout method invoked.
      */
-    public long getTimeoutPeriod()
-    {
+    public long getTimeoutPeriod() {
         return (idleTimeoutMinutes * 60 * 1000);
     }
 
     /**
      *
      */
-    public void messageClientCreated(MessageClient messageClient)
-    {
+    public void messageClientCreated(MessageClient messageClient) {
         // No-op.
     }
 
     /**
      *
      */
-    public void messageClientDestroyed(MessageClient messageClient)
-    {
+    public void messageClientDestroyed(MessageClient messageClient) {
         unregisterMessageClient(messageClient);
     }
 
@@ -372,12 +349,9 @@
      *
      * @param messages The messages to push to the client.
      */
-    public void pushMessages(List messagesToPush)
-    {
-        if (!messagesToPush.isEmpty())
-        {
-            synchronized (pushNeeded)
-            {
+    public void pushMessages(List messagesToPush) {
+        if (!messagesToPush.isEmpty()) {
+            synchronized (pushNeeded) {
                 // Push these straight on through; notify immediately.
                 if (messages == null)
                     messages = messagesToPush;
@@ -397,10 +371,8 @@
      *
      * @param messageClient A MessageClient that depends on this notifier.
      */
-    public void registerMessageClient(MessageClient messageClient)
-    {
-        if (messageClient != null)
-        {
+    public void registerMessageClient(MessageClient messageClient) {
+        if (messageClient != null) {
             if (messageClients.addIfAbsent(messageClient))
                 messageClient.addMessageClientDestroyedListener(this);
         }
@@ -412,8 +384,7 @@
      *
      * @param flexSession The newly created FlexSession.
      */
-    public void sessionCreated(FlexSession flexSession)
-    {
+    public void sessionCreated(FlexSession flexSession) {
         // No-op.
     }
 
@@ -423,8 +394,7 @@
      *
      * @param flexSession The FlexSession being invalidated.
      */
-    public void sessionDestroyed(FlexSession flexSession)
-    {
+    public void sessionDestroyed(FlexSession flexSession) {
         if (Log.isInfo())
             Log.getLogger(logCategory).info("Endpoint with id '" + endpoint.getId() + "' is closing"
                     + " a streaming connection for the FlexClient with id '" + flexClient.getId() + "'"
@@ -433,12 +403,10 @@
     }
 
     /**
-     *
      * Implements TimeoutCapable.
      * Inform the object that it has timed out.
      */
-    public void timeout()
-    {
+    public void timeout() {
         if (Log.isInfo())
             Log.getLogger(logCategory).info("Endpoint with id '" + endpoint.getId() + "' is timing out"
                     + " a streaming connection for the FlexClient with id '" + flexClient.getId() + "'");
@@ -450,10 +418,8 @@
      *
      * @param messageClient A MessageClient that depended on this notifier.
      */
-    public void unregisterMessageClient(MessageClient messageClient)
-    {
-        if (messageClient != null)
-        {
+    public void unregisterMessageClient(MessageClient messageClient) {
+        if (messageClient != null) {
             messageClient.removeMessageClientDestroyedListener(this);
             messageClients.remove(messageClient);
         }
diff --git a/core/src/main/java/flex/messaging/client/FlexClient.java b/core/src/main/java/flex/messaging/client/FlexClient.java
index e212986..acb40d2 100644
--- a/core/src/main/java/flex/messaging/client/FlexClient.java
+++ b/core/src/main/java/flex/messaging/client/FlexClient.java
@@ -49,8 +49,7 @@
 /**
  * Represents a Flex client application instance on the server.
  */
-public class FlexClient extends TimeoutAbstractObject implements FlexSessionListener, MessageClientListener
-{
+public class FlexClient extends TimeoutAbstractObject implements FlexSessionListener, MessageClientListener {
     //--------------------------------------------------------------------------
     //
     // Public Static Constants
@@ -65,7 +64,6 @@
     /**
      * This value is passed to the server in an initial client connect to
      * indicate that the client needs a server-assigned FlexClient Id.
-     *
      */
     public static final String NULL_FLEXCLIENT_ID = "nil";
 
@@ -104,12 +102,10 @@
      * Adds a create listener that will be notified when new FlexClients
      * are created.
      *
-     * @see flex.messaging.client.FlexClientListener
-     *
      * @param listener The listener to add.
+     * @see flex.messaging.client.FlexClientListener
      */
-    public static void addClientCreatedListener(FlexClientListener listener)
-    {
+    public static void addClientCreatedListener(FlexClientListener listener) {
         if (listener != null)
             createdListeners.addIfAbsent(listener);
     }
@@ -117,12 +113,10 @@
     /**
      * Removes a FlexClient created listener.
      *
-     * @see flex.messaging.client.FlexClientListener
-     *
      * @param listener The listener to remove.
+     * @see flex.messaging.client.FlexClientListener
      */
-    public static void removeClientCreatedListener(FlexClientListener listener)
-    {
+    public static void removeClientCreatedListener(FlexClientListener listener) {
         if (listener != null)
             createdListeners.remove(listener);
     }
@@ -134,25 +128,21 @@
     //--------------------------------------------------------------------------
 
     /**
-     *
      * Constructs a new FlexClient instance.
      *
      * @param manager The FlexClientManager managing this instance.
      */
-    public FlexClient(FlexClientManager manager)
-    {
+    public FlexClient(FlexClientManager manager) {
         this(manager, FlexContext.getMessageBroker().createUUID());
     }
 
     /**
-     *
      * Constructs a new FlexClient instance having the specified Id.
      *
      * @param manager The FlexClientManager managing this instance.
-     * @param id The Id for this instance.
+     * @param id      The Id for this instance.
      */
-    public FlexClient(FlexClientManager manager, String id)
-    {
+    public FlexClient(FlexClientManager manager, String id) {
         this.id = id;
         flexClientManager = manager;
         updateLastUse();
@@ -254,14 +244,11 @@
      *
      * @param listener The listener to add.
      */
-    public void addClientAttributeListener(FlexClientAttributeListener listener)
-    {
-        if (listener != null)
-        {
+    public void addClientAttributeListener(FlexClientAttributeListener listener) {
+        if (listener != null) {
             checkValid();
 
-            synchronized (lock)
-            {
+            synchronized (lock) {
                 if (attributeListeners == null)
                     attributeListeners = new CopyOnWriteArrayList<FlexClientAttributeListener>();
             }
@@ -276,18 +263,14 @@
      * have been unbound from the FlexClient and any FlexClientBindingListeners
      * and FlexClientAttributeListeners have been notified.
      *
-     * @see flex.messaging.client.FlexClientListener
-     *
      * @param listener The listener to add.
+     * @see flex.messaging.client.FlexClientListener
      */
-    public void addClientDestroyedListener(FlexClientListener listener)
-    {
-        if (listener != null)
-        {
+    public void addClientDestroyedListener(FlexClientListener listener) {
+        if (listener != null) {
             checkValid();
 
-            synchronized (lock)
-            {
+            synchronized (lock) {
                 if (destroyedListeners == null)
                     destroyedListeners = new CopyOnWriteArrayList<FlexClientListener>();
             }
@@ -303,10 +286,8 @@
      * @param name The name the attribute is bound to.
      * @return The attribute bound to the specified name.
      */
-    public Object getAttribute(String name)
-    {
-        synchronized (lock)
-        {
+    public Object getAttribute(String name) {
+        synchronized (lock) {
             checkValid();
 
             updateLastUse();
@@ -320,10 +301,8 @@
      *
      * @return A snapshot of the names of all attributes bound to the FlexClient.
      */
-    public Enumeration<String> getAttributeNames()
-    {
-        synchronized (lock)
-        {
+    public Enumeration<String> getAttributeNames() {
+        synchronized (lock) {
             checkValid();
 
             updateLastUse();
@@ -338,7 +317,6 @@
     }
 
     /**
-     *
      * Returns the push handler registered with the FlexClient with the supplied
      * endpoint id, or null if no push handler was registered with the FlexClient
      * for that endpoint.
@@ -347,10 +325,8 @@
      * endpoint id, or null if no push handler was registered with the FlexClient
      * for that endpoint.
      */
-    public EndpointPushHandler getEndpointPushHandler(String endpointId)
-    {
-        synchronized (lock)
-        {
+    public EndpointPushHandler getEndpointPushHandler(String endpointId) {
+        synchronized (lock) {
             if (endpointPushHandlers != null && endpointPushHandlers.containsKey(endpointId))
                 return endpointPushHandlers.get(endpointId);
             return null;
@@ -358,7 +334,6 @@
     }
 
     /**
-     *
      * Returns the queue processor registered with the FlexClient with the supplied
      * endpoint id, or null if no queue processor was registered with the FlexClient
      * for that endpoint.
@@ -366,14 +341,12 @@
      * @param endpointId The endpoint id.
      * @return The queue processor registered with the FlexClient.
      */
-    public FlexClientOutboundQueueProcessor getOutboundQueueProcessor(String endpointId)
-    {
+    public FlexClientOutboundQueueProcessor getOutboundQueueProcessor(String endpointId) {
         EndpointQueue queue = outboundQueues.get(endpointId);
-        return (queue != null)? queue.processor : null;
+        return (queue != null) ? queue.processor : null;
     }
-    
+
     /**
-     *
      * Returns the endpoint queue registered with the FlexClient with the supplied
      * endpoint id, or null if no endpoint queue was registered with the FlexClient
      * for that endpoint.
@@ -381,8 +354,7 @@
      * @param endpointId The endpoint id.
      * @return The endpoint queue registered with the FlexClient.
      */
-    public EndpointQueue getEndpointQueue(String endpointId)
-    {
+    public EndpointQueue getEndpointQueue(String endpointId) {
         return outboundQueues.get(endpointId);
     }
 
@@ -393,23 +365,19 @@
      * an active, open connection to the server).
      *
      * @return The 'last use' timestamp for the FlexClient, which may be the current system time if the FlexClient
-     *         has been idle but an open connection from the client to the server exists.
+     * has been idle but an open connection from the client to the server exists.
      */
     @Override
-    public long getLastUse()
-    {
-        synchronized (lock)
-        {
+    public long getLastUse() {
+        synchronized (lock) {
             long currentLastUse = super.getLastUse();
             long idleTime = System.currentTimeMillis() - currentLastUse;
             if (idleTime < flexClientManager.getFlexClientTimeoutMillis())
                 return currentLastUse; // Not timed out; this will trigger the timeout to be rescheduled.
 
             // Check for async long-polls or endpoint streaming connections, if found, keep alive.
-            if (!outboundQueues.isEmpty())
-            {
-                for (EndpointQueue queue : outboundQueues.values())
-                {
+            if (!outboundQueues.isEmpty()) {
+                for (EndpointQueue queue : outboundQueues.values()) {
                     if (queue.asyncPoll != null)
                         return System.currentTimeMillis();
 
@@ -419,18 +387,14 @@
             }
 
             // Check for connected sessions, or a session holding a (non-async) long poll and if found, keep alive.
-            for (FlexSession session : sessions)
-            {
-                if (session instanceof ConnectionAwareSession)
-                {
-                    if (((ConnectionAwareSession)session).isConnected())
+            for (FlexSession session : sessions) {
+                if (session instanceof ConnectionAwareSession) {
+                    if (((ConnectionAwareSession) session).isConnected())
                         return System.currentTimeMillis();
                 }
                 // Otherwise, check for a long-poll.
-                if (session.waitMonitor != null)
-                {
-                    for (EndpointQueue queue : session.waitMonitor.values())
-                    {
+                if (session.waitMonitor != null) {
+                    for (EndpointQueue queue : session.waitMonitor.values()) {
                         if (queue.flexClient.equals(this))
                             return System.currentTimeMillis();
                     }
@@ -443,15 +407,14 @@
     /**
      * Returns the attribute bound to the specified name for the current FlexSession
      * associated with the FlexClient. If the attribute does not exist in the current
-     * FlexSession, this method iterates through all the other FlexSessions associated with 
-     * the FlexClient and either returns the attribute bound, or null if no attribute is bound 
+     * FlexSession, this method iterates through all the other FlexSessions associated with
+     * the FlexClient and either returns the attribute bound, or null if no attribute is bound
      * under the name.
      *
      * @param name The name the attribute is bound to.
      * @return The attribute bound to the specified name.
      */
-    public Object getSessionAttribute(String name)
-    {
+    public Object getSessionAttribute(String name) {
         Object attributeValue = getSessionAttributeInCurrentSession(name);
         if (attributeValue != null)
             return attributeValue;
@@ -466,8 +429,7 @@
      * @return A snapshot of the names of all attributes bound to all the FlexSessions
      * associated with the FlexClient.
      */
-    public Enumeration<String> getSessionAttributeNames()
-    {
+    public Enumeration<String> getSessionAttributeNames() {
         Set<String> attributeNames = new HashSet<String>();
         for (FlexSession session : sessions)
             attributeNames.addAll(getSessionAttributeNames(session));
@@ -475,35 +437,27 @@
     }
 
     /**
-     *
-     *
      * Returns the principal associated with this client.  If the client has not
      * authenticated the principal will be null.  Should only be called from FlexContext
      * and only if perClientAuthentication is used.  Not available to users.
      *
      * @return The principal associated with the session.
      */
-    public Principal getUserPrincipal()
-    {
-        synchronized (lock)
-        {
+    public Principal getUserPrincipal() {
+        synchronized (lock) {
             checkValid();
             return userPrincipal;
         }
     }
 
     /**
-     *
-     *
      * Should only be called from FlexContext and only if perClientAuthentication is used.
      * Not available to users.
      *
      * @param userPrincipal The principal to associate with the session.
      */
-    public void setUserPrincipal(Principal userPrincipal)
-    {
-        synchronized (lock)
-        {
+    public void setUserPrincipal(Principal userPrincipal) {
+        synchronized (lock) {
             checkValid();
             this.userPrincipal = userPrincipal;
         }
@@ -512,10 +466,8 @@
     /**
      * Invalidates the FlexClient.
      */
-    public void invalidate()
-    {
-        synchronized (lock)
-        {
+    public void invalidate() {
+        synchronized (lock) {
             if (!valid || invalidating)
                 return; // Already shutting down.
 
@@ -525,17 +477,14 @@
         }
 
         // Unregister from all FlexSessions.
-        if (!sessions.isEmpty())
-        {
+        if (!sessions.isEmpty()) {
             for (FlexSession session : sessions)
                 unregisterFlexSession(session);
         }
 
         // Invalidate associated MessageClient subscriptions.
-        if (messageClients != null && !messageClients.isEmpty())
-        {
-            for (MessageClient messageClient : messageClients)
-            {
+        if (messageClients != null && !messageClients.isEmpty()) {
+            for (MessageClient messageClient : messageClients) {
                 messageClient.removeMessageClientDestroyedListener(this);
                 messageClient.invalidate();
             }
@@ -543,18 +492,15 @@
         }
 
         // Notify destroy listeners that we're shutting the FlexClient down.
-        if (destroyedListeners != null && !destroyedListeners.isEmpty())
-        {
-            for (FlexClientListener destroyListener : destroyedListeners)
-            {
+        if (destroyedListeners != null && !destroyedListeners.isEmpty()) {
+            for (FlexClientListener destroyListener : destroyedListeners) {
                 destroyListener.clientDestroyed(this);
             }
             destroyedListeners.clear();
         }
 
         // Unbind all attributes.
-        if (attributes != null && !attributes.isEmpty())
-        {
+        if (attributes != null && !attributes.isEmpty()) {
             Set<String> keySet = attributes.keySet();
             String[] keys = keySet.toArray(new String[keySet.size()]);
             for (String key : keys)
@@ -562,17 +508,14 @@
         }
 
         // Close any registered push handlers.
-        if (endpointPushHandlers != null && !endpointPushHandlers.isEmpty())
-        {
-            for (EndpointPushHandler handler : endpointPushHandlers.values())
-            {
+        if (endpointPushHandlers != null && !endpointPushHandlers.isEmpty()) {
+            for (EndpointPushHandler handler : endpointPushHandlers.values()) {
                 handler.close(true /* notify Channel of disconnect */);
             }
             endpointPushHandlers = null;
         }
 
-        synchronized (lock)
-        {
+        synchronized (lock) {
             valid = false;
             invalidating = false;
         }
@@ -586,10 +529,8 @@
      *
      * @return true if the FlexClient is valid; otherwise false.
      */
-    public boolean isValid()
-    {
-        synchronized (lock)
-        {
+    public boolean isValid() {
+        synchronized (lock) {
             return valid;
         }
     }
@@ -602,11 +543,9 @@
      *
      * @return A snapshot of the current list of FlexSessions associated with the FlexClient.
      */
-    public List<FlexSession> getFlexSessions()
-    {
+    public List<FlexSession> getFlexSessions() {
         List<FlexSession> currentSessions;
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid();
 
             updateLastUse();
@@ -621,11 +560,9 @@
      *
      * @return The number of sessions associated with this FlexClient.
      */
-    public int getSessionCount()
-    {
+    public int getSessionCount() {
         int sessionCount;
-        synchronized (lock)
-        {
+        synchronized (lock) {
             sessionCount = (sessions != null) ? sessions.size() : 0; // Make a copy of the current list to return.
         }
         return sessionCount;
@@ -636,14 +573,11 @@
      *
      * @return The number of subscriptions associated with this FlexClient.
      */
-    public int getSubscriptionCount()
-    {
+    public int getSubscriptionCount() {
         int count = 0;
-        synchronized (lock)
-        {
+        synchronized (lock) {
 
-            if (messageClients != null && !messageClients.isEmpty())
-            {
+            if (messageClients != null && !messageClients.isEmpty()) {
                 for (MessageClient messageClient : messageClients)
                     count += messageClient.getSubscriptionCount();
             }
@@ -660,14 +594,10 @@
      * @param clientId The client id.
      * @return The message client registered with the FlexClient.
      */
-    public MessageClient getMessageClient(String clientId)
-    {
-        synchronized (lock)
-        {
-            if (messageClients != null && !messageClients.isEmpty())
-            {
-                for (MessageClient messageClient : messageClients)
-                {
+    public MessageClient getMessageClient(String clientId) {
+        synchronized (lock) {
+            if (messageClients != null && !messageClients.isEmpty()) {
+                for (MessageClient messageClient : messageClients) {
                     if (messageClient.getClientId().equals(clientId))
                         return messageClient;
                 }
@@ -684,17 +614,15 @@
      *
      * @return A snapshot of the current list of MessageClients associated with the FlexClient.
      */
-    public List<MessageClient> getMessageClients()
-    {
+    public List<MessageClient> getMessageClients() {
         List<MessageClient> currentMessageClients;
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid();
 
             updateLastUse();
 
             currentMessageClients = (messageClients != null) ? new ArrayList<MessageClient>(messageClients) // Make a copy of the current list to return.
-                                                             : Collections.<MessageClient>emptyList(); // Return an empty list.
+                    : Collections.<MessageClient>emptyList(); // Return an empty list.
         }
         return currentMessageClients;
     }
@@ -704,46 +632,40 @@
      *
      * @return The unique Id for the FlexClient.
      */
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
     /**
-     *
      * Implements TimeoutCapable.
      * Determine the time, in milliseconds, that this object is allowed to idle
      * before having its timeout method invoked.
      */
     @Override
-    public long getTimeoutPeriod()
-    {
+    public long getTimeoutPeriod() {
         return flexClientManager.getFlexClientTimeoutMillis();
     }
 
     /**
-     *
      * Implements MessageClientListener.
      * Handling created events is a no-op.
      *
      * @param messageClient The new MessageClient.
      */
-    public void messageClientCreated(MessageClient messageClient) {}
+    public void messageClientCreated(MessageClient messageClient) {
+    }
 
     /**
-     *
      * Implements MessageClientListener.
      * Notification that an associated FlexSession was destroyed.
      *
      * @param messageClient The MessageClient that was destroyed.
      */
-    public void messageClientDestroyed(MessageClient messageClient)
-    {
+    public void messageClientDestroyed(MessageClient messageClient) {
         unregisterMessageClient(messageClient);
     }
 
     /**
-     *
      * Poll for outbound messages for the FlexClient.
      * This method is only invoked by internal code while processing a client poll request; it
      * is not intended for general public use.
@@ -753,13 +675,11 @@
      *
      * @param endpointId The Id of the endpoint that received the poll request.
      * @return The flush result including messages to return in the poll response and
-     *         an optional wait time for the next poll/flush.
+     * an optional wait time for the next poll/flush.
      */
-    public FlushResult poll(String endpointId)
-    {
+    public FlushResult poll(String endpointId) {
         EndpointQueue queue = null;
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid();
 
             queue = outboundQueues.get(endpointId);
@@ -768,65 +688,52 @@
                 return internalPoll(queue);
         }
 
-        if (queue == null)
-        {
+        if (queue == null) {
             // Otherwise, the client is not subscribed.
             throwNotSubscribedException(endpointId);
         }
-        
+
         return null;
     }
 
     /**
-     *
      * Poll for outbound messages for the FlexClient and if no messages are available
      * immediately, store a reference to the passed async handler and call back when messages arrive.
      *
-     * @param endpointId The Id of the endpoint that received the poll request.
-     * @param handler The handler to callback when messages arrive.
+     * @param endpointId         The Id of the endpoint that received the poll request.
+     * @param handler            The handler to callback when messages arrive.
      * @param waitIntervalMillis The wait interval in milliseconds for the poll to wait for data to arrive
-     *        before returning an empty poll response.
-     *
+     *                           before returning an empty poll response.
      * @return A <tt>TimeoutAbstractObject</tt> representing the asynchronous poll, or <code>null</code>
-     *         if the poll request was handled immediately because data was available to return.
+     * if the poll request was handled immediately because data was available to return.
      */
-    public TimeoutAbstractObject pollAsync(String endpointId, AsyncPollHandler handler, long waitIntervalMillis)
-    {
+    public TimeoutAbstractObject pollAsync(String endpointId, AsyncPollHandler handler, long waitIntervalMillis) {
         EndpointQueue queue;
         TimeoutAbstractObject asyncPollTask = null;
-        
-        synchronized (lock)
-        {
+
+        synchronized (lock) {
             checkValid();
 
             queue = outboundQueues.get(endpointId);
 
             // If the queue exists and is not empty, flush immediately.
-            if (queue != null)
-            {
-                if (!queue.messages.isEmpty())
-                {
+            if (queue != null) {
+                if (!queue.messages.isEmpty()) {
                     handler.asyncPollComplete(internalFlush(queue));
-                }
-                else // Set up an async long-poll.
+                } else // Set up an async long-poll.
                 {
                     // Avoid monopolizing user agent connections.
                     FlexSession session = FlexContext.getFlexSession();
-                    synchronized (session)
-                    {
-                        if (session.asyncPollMap != null)
-                        {
+                    synchronized (session) {
+                        if (session.asyncPollMap != null) {
                             AsyncPollWithTimeout parkedPoll = session.asyncPollMap.get(endpointId);
-                            if (parkedPoll != null)
-                            {
+                            if (parkedPoll != null) {
                                 // If the poll is from the same client for this endpoint, treat it as a no-op.
-                                if (parkedPoll.getFlexClient().equals(this))
-                                {
+                                if (parkedPoll.getFlexClient().equals(this)) {
                                     PollFlushResult result = new PollFlushResult();
                                     result.setClientProcessingSuppressed(true);
                                     handler.asyncPollComplete(result);
-                                }
-                                else // If the poll is for a different client on the same session, swap their waits.
+                                } else // If the poll is for a different client on the same session, swap their waits.
                                 {
                                     PollFlushResult result = new PollFlushResult();
                                     result.setAvoidBusyPolling(true);
@@ -835,8 +742,7 @@
                             }
                         }
                         AsyncPollWithTimeout asyncPoll = new AsyncPollWithTimeout(this, session, queue, handler, waitIntervalMillis, endpointId);
-                        synchronized (session)
-                        {
+                        synchronized (session) {
                             if (session.asyncPollMap == null)
                                 session.asyncPollMap = new HashMap<String, AsyncPollWithTimeout>();
                             session.asyncPollMap.put(endpointId, asyncPoll);
@@ -847,8 +753,7 @@
                 }
             }
         }
-        if (queue == null)
-        {
+        if (queue == null) {
             // The queue was null; let the client know that there are no active subscriptions.
             throwNotSubscribedException(endpointId);
         }
@@ -856,7 +761,6 @@
     }
 
     /**
-     *
      * Poll for outbound messages for the FlexClient and if no messages are available
      * immediately, put processing into a wait state until messages arrive.
      * This method is only invoked by internal code while processing a client poll request; it
@@ -865,25 +769,22 @@
      * is not specific to a single Consumer/MessageClient instance so process any queued messages for
      * the specified endpoint across all subscriptions.
      *
-     * @param endpointId The Id of the endpoint that received the poll request.
-     * @param session The FlexSession associated with this waitable poll request.
-     * @param listener The listener to notify before a wait begins and as soon as one completes.
+     * @param endpointId         The Id of the endpoint that received the poll request.
+     * @param session            The FlexSession associated with this waitable poll request.
+     * @param listener           The listener to notify before a wait begins and as soon as one completes.
      * @param waitIntervalMillis The maximum amount of time to wait for messages in milliseconds.
      * @return The flush result including messages to return in the poll response and
-     *         an optional wait time for the next poll/flush.
+     * an optional wait time for the next poll/flush.
      */
-    public FlushResult pollWithWait(String endpointId, FlexSession session, PollWaitListener listener, long waitIntervalMillis)
-    {
+    public FlushResult pollWithWait(String endpointId, FlexSession session, PollWaitListener listener, long waitIntervalMillis) {
         EndpointQueue queue;
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid();
 
             queue = outboundQueues.get(endpointId);
 
             // If the queue exists and is not empty there's no reason to wait; flush immediately.
-            if (queue != null)
-            {
+            if (queue != null) {
                 FlushResult flushResult = internalPoll(queue);
                 if (flushResult != null)
                     return flushResult;
@@ -891,27 +792,21 @@
         }
 
         // The queue exists but it was empty; we can try to wait for messages.
-        if (queue != null)
-        {
-            synchronized (session)
-            {
+        if (queue != null) {
+            synchronized (session) {
                 // Set up the waitMonitor on the session; this is a reference to the queue that the
                 // current poll request targets and we use it as a wait/notify monitor.
                 // This also lets us prevent busy polling cycles from a single client. If we already have a waited
                 // poll request a subsequent poll request is treated as a no-op.
-                if (session.waitMonitor != null)
-                {
+                if (session.waitMonitor != null) {
                     final EndpointQueue waitingQueue = session.waitMonitor.get(endpointId);
                     // If the poll is from the same client swf, and the same endpoint, treat it as a no-op poll.
-                    if (waitingQueue != null && waitingQueue.flexClient.equals(this))
-                    {
+                    if (waitingQueue != null && waitingQueue.flexClient.equals(this)) {
                         PollFlushResult result = new PollFlushResult();
                         result.setClientProcessingSuppressed(true);
                         return result;
                     }
-                }
-                else
-                {
+                } else {
                     session.waitMonitor = new HashMap<String, EndpointQueue>();
                 }
 
@@ -925,15 +820,12 @@
             // -1 wait-interval actually means wait until notified.
             waitIntervalMillis = (waitIntervalMillis == -1) ? 0 : waitIntervalMillis;
             String threadName = Thread.currentThread().getName();
-            try
-            {
+            try {
                 boolean didWait = false;
                 boolean avoidBusyPolling = false;
-                synchronized (queue)
-                {
+                synchronized (queue) {
                     // If the message queue is still empty, wait for a message to be added before invoking flush.
-                    if (queue.messages.isEmpty())
-                    {
+                    if (queue.messages.isEmpty()) {
                         reportStatusIfDebug("waiting for new messages to arrive");
 
                         didWait = true;
@@ -944,11 +836,11 @@
 
                         if (listener != null)
                             listener.waitStart(queue);
- 
+
                         queue.waitPoll = true; // Mark the queue as waiting.
 
                         queue.wait(waitIntervalMillis);
-                        
+
                         queue.waitPoll = false; // Unmark the queue as waiting.
 
                         // Reset thread name now that the wait is over.
@@ -957,24 +849,20 @@
                         if (listener != null)
                             listener.waitEnd(queue);
 
-                        if (queue.avoidBusyPolling)
-                        {
+                        if (queue.avoidBusyPolling) {
                             avoidBusyPolling = true;
                             queue.avoidBusyPolling = false;
                         }
                     }
                 }
 
-                synchronized (session)
-                {
-                    if (session.waitMonitor != null)
-                    {
+                synchronized (session) {
+                    if (session.waitMonitor != null) {
                         session.waitMonitor.remove(endpointId);
                     }
                 }
 
-                if (Log.isDebug())
-                {
+                if (Log.isDebug()) {
                     if (didWait)
                         reportStatusIfDebug("done waiting for new messages to arrive and is flushing the outbound queue");
                     else
@@ -983,15 +871,12 @@
 
                 // We need to hold the FlexClient lock to invoke flush.
                 FlushResult result;
-                synchronized (lock)
-                {
+                synchronized (lock) {
                     result = internalFlush(queue);
                 }
-                if (avoidBusyPolling)
-                {
+                if (avoidBusyPolling) {
                     PollFlushResult swappedPollResult = new PollFlushResult();
-                    if (result != null)
-                    {
+                    if (result != null) {
                         swappedPollResult.setMessages(result.getMessages());
                         swappedPollResult.setNextFlushWaitTimeMillis(result.getNextFlushWaitTimeMillis());
                     }
@@ -999,58 +884,46 @@
                     result = swappedPollResult;
                 }
                 return result;
-            }
-            catch (InterruptedException e)
-            {
+            } catch (InterruptedException e) {
                 if (Log.isWarn())
                     Log.getLogger(FLEX_CLIENT_LOG_CATEGORY).warn("Poll wait thread '" + threadName + "' for FlexClient with id '" + this.id +
                             "' could not finish waiting for new messages to arrive " +
                             "because it was interrupted: " + e.toString());
             }
-        }
-        else
-        {
+        } else {
             // The queue was null; let the client know that there are no active subscriptions.
             throwNotSubscribedException(endpointId);
         }
         return null;
     }
 
-    private void reportStatusIfDebug(String message)
-    {
+    private void reportStatusIfDebug(String message) {
         String threadName = Thread.currentThread().getName();
         if (Log.isDebug())
             Log.getLogger(FLEX_CLIENT_LOG_CATEGORY).debug("Poll wait thread '" + threadName + "' for FlexClient with id '" + this.id + "' is " + message);
     }
 
     /**
-     *
      * Poll for outbound messages for a specific MessageClient/Consumer.
      * This overload of poll() is only invoked when handling a Consumer.receive() request.
      *
      * @param client The specific MessageClient instance to poll for messages for.
      * @return The flush result including messages to return in the poll response.
-     *         The nextFlushWaitTimeMillis value is always forced to a value of 0 because
-     *         Consumer.receive() calls are driven by client code and this setting has no meaning.
+     * The nextFlushWaitTimeMillis value is always forced to a value of 0 because
+     * Consumer.receive() calls are driven by client code and this setting has no meaning.
      */
-    public FlushResult poll(MessageClient client)
-    {
+    public FlushResult poll(MessageClient client) {
         FlushResult flushResult = null;
         String endpointId = client.getEndpointId();
         EndpointQueue queue = null;
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid();
 
             queue = outboundQueues.get(endpointId);
-            if (queue != null)
-            {
-                try
-                {
+            if (queue != null) {
+                try {
                     flushResult = internalFlush(queue, client);
-                }
-                catch (RuntimeException e)
-                {
+                } catch (RuntimeException e) {
                     if (Log.isError())
                         Log.getLogger(FLEX_CLIENT_LOG_CATEGORY).error("Failed to flush an outbound queue for MessageClient '" + client.getClientId() + "' for FlexClient '" + getId() + "'.", e);
                     throw e;
@@ -1059,24 +932,21 @@
                     flushResult.setNextFlushWaitTimeMillis(0); // Force to 0.
             }
         }
-        if (queue == null)
-        {
+        if (queue == null) {
             throwNotSubscribedException(endpointId);
         }
         return flushResult;
     }
 
     /**
-     *
      * Push a message to the FlexClient.
      * The message is added to the outbound queue of messages for the client and
      * will be pushed if possible or retrieved via a client poll request.
      *
-     * @param message The Message to push.
+     * @param message       The Message to push.
      * @param messageClient The MessageClient subscription that this message targets.
      */
-    public void push(Message message, MessageClient messageClient)
-    {
+    public void push(Message message, MessageClient messageClient) {
         // We should check the message client is valid or not
         if (!isValid())
             return;
@@ -1089,41 +959,36 @@
             return;
 
         boolean empty;
-        
+
         // We need to obtain the lock here
         // Maintain the pattern of using the FlexClient.lock and ensure that order of locks should always start with the FlexClient.lock
         // This is critical to prevent deadlock cases, see Watson bug 2724938 
-        synchronized (lock)
-        {
+        synchronized (lock) {
             synchronized (queue) // To protect the list during the add and allow for notification.
             {
                 // Let the processor add the message to the queue.
-                try
-                {
+                try {
                     queue.processor.add(queue.messages, message);
                     empty = queue.messages.isEmpty();
 
                     if (Log.isDebug())
                         Log.getLogger(LogCategories.MESSAGE_GENERAL).debug(
                                 "Queuing message: " + message.getMessageId() +
-                                StringUtils.NEWLINE +
-                                "  to send to MessageClient: " + messageClient.getClientId() +
-                                StringUtils.NEWLINE +
-                                "  for FlexClient: " + messageClient.getFlexClient().getId() +
-                                StringUtils.NEWLINE +
-                                "  via endpoint: " + queue.endpointId +
-                                StringUtils.NEWLINE +
-                                "  client outbound queue size: " + queue.messages.size());
-                }
-                catch (RuntimeException e)
-                {
+                                        StringUtils.NEWLINE +
+                                        "  to send to MessageClient: " + messageClient.getClientId() +
+                                        StringUtils.NEWLINE +
+                                        "  for FlexClient: " + messageClient.getFlexClient().getId() +
+                                        StringUtils.NEWLINE +
+                                        "  via endpoint: " + queue.endpointId +
+                                        StringUtils.NEWLINE +
+                                        "  client outbound queue size: " + queue.messages.size());
+                } catch (RuntimeException e) {
                     if (Log.isError())
                         Log.getLogger(FLEX_CLIENT_LOG_CATEGORY).error("Failed to add a message to an outbound queue for FlexClient '" + getId() + "'.", e);
                     throw e;
                 }
                 // And notify any threads that may be in a poll wait state.
-                if (!empty && queue.waitPoll)
-                {
+                if (!empty && queue.waitPoll) {
                     // TODO This updateLastUse call is added here because there used to be a call 
                     // at the beginning of the push method but not convinced that it is needed. 
                     updateLastUse();
@@ -1131,21 +996,16 @@
                 }
             }
 
-            if (!empty)
-            {
-                if (queue.asyncPoll != null)
-                {
+            if (!empty) {
+                if (queue.asyncPoll != null) {
                     completeAsyncPoll(queue.asyncPoll, internalFlush(queue));
-                }
-                else if (!empty && queue.flushTask == null &&
-                        (queue.pushSession != null || (endpointPushHandlers != null && endpointPushHandlers.containsKey(queue.endpointId))))
-                {
+                } else if (!empty && queue.flushTask == null &&
+                        (queue.pushSession != null || (endpointPushHandlers != null && endpointPushHandlers.containsKey(queue.endpointId)))) {
                     // If a delayed flush is not scheduled and we have a push-enabled session associated with the queue
                     // or a push-enabled endpoint, try a direct push to the client.
                     // Once again we should acquire the lock for queue, otherwise a potential dead lock could happen, see Watson bug 2724936
                     // By acquiring the queue lock again, we break the cycle by acquiring the queue before holding FlexClient.lock object 
-                    synchronized (queue) 
-                    {
+                    synchronized (queue) {
                         directFlush(queue);
                     }
                 }
@@ -1154,24 +1014,20 @@
     }
 
     /**
-     *
      * Registers an <tt>EndpointPushHandler</tt> for the specified endpoint to handle pushing messages
      * to remote clients.
      *
-     * @param handler The <tt>EndpointPushHandler</tt> to register.
+     * @param handler    The <tt>EndpointPushHandler</tt> to register.
      * @param endpointId The endpoint to register for.
      */
-    public void registerEndpointPushHandler(EndpointPushHandler handler, String endpointId)
-    {
-        synchronized (lock)
-        {
+    public void registerEndpointPushHandler(EndpointPushHandler handler, String endpointId) {
+        synchronized (lock) {
             if (endpointPushHandlers == null)
                 endpointPushHandlers = new HashMap<String, EndpointPushHandler>(1);
 
-            if (endpointPushHandlers.containsKey(endpointId))
-            {
+            if (endpointPushHandlers.containsKey(endpointId)) {
                 MessageException me = new MessageException();
-                me.setMessage(ENDPOINT_PUSH_HANDLER_ALREADY_REGISTERED, new Object[] {getId(), endpointId});
+                me.setMessage(ENDPOINT_PUSH_HANDLER_ALREADY_REGISTERED, new Object[]{getId(), endpointId});
                 throw me;
             }
 
@@ -1180,47 +1036,38 @@
     }
 
     /**
-     *
      * Used internally to associate a FlexSession with this FlexClient.
      *
      * @param session The FlexSession to associate with this FlexClient.
      */
-    public void registerFlexSession(FlexSession session)
-    {
-        if (sessions.addIfAbsent(session))
-        {
+    public void registerFlexSession(FlexSession session) {
+        if (sessions.addIfAbsent(session)) {
             session.addSessionDestroyedListener(this);
             session.registerFlexClient(this);
         }
     }
 
     /**
-     *
      * Used internally to associate a MessageClient with this FlexClient.
      *
      * @param messageClient The MessageClient to associate with this FlexClient.
      */
-    public void registerMessageClient(MessageClient messageClient)
-    {
-        synchronized (lock)
-        {
+    public void registerMessageClient(MessageClient messageClient) {
+        synchronized (lock) {
             if (messageClients == null)
                 messageClients = new CopyOnWriteArrayList<MessageClient>();
         }
 
-        if (messageClients.addIfAbsent(messageClient))
-        {
+        if (messageClients.addIfAbsent(messageClient)) {
             messageClient.addMessageClientDestroyedListener(this);
             String endpointId = messageClient.getEndpointId();
             // Manage the outbound queue this MessageClient's subscription(s) will use
             // and associate the MessageClient with an EndpointPushHandler if one exists for the
             // endpoint the subscription was made over; this allows the shut-down of a
             // push connection to invalidate any subscriptions that are using it.
-            synchronized (lock)
-            {
+            synchronized (lock) {
                 getOrCreateEndpointQueueAndRegisterSubscription(messageClient, endpointId);
-                if (endpointPushHandlers != null)
-                {
+                if (endpointPushHandlers != null) {
                     EndpointPushHandler handler = endpointPushHandlers.get(endpointId);
                     if (handler != null)
                         handler.registerMessageClient(messageClient);
@@ -1234,12 +1081,10 @@
      *
      * @param name The name of the attribute to remove.
      */
-    public void removeAttribute(String name)
-    {
+    public void removeAttribute(String name) {
         Object value; // Used for event dispatch after the attribute is removed.
 
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid();
 
             updateLastUse();
@@ -1260,8 +1105,7 @@
      *
      * @param listener The listener to remove.
      */
-    public void removeClientAttributeListener(FlexClientAttributeListener listener)
-    {
+    public void removeClientAttributeListener(FlexClientAttributeListener listener) {
         // No need to check validity; removing a listener is always ok.
         if (listener != null && attributeListeners != null)
             attributeListeners.remove(listener);
@@ -1270,12 +1114,10 @@
     /**
      * Removes a FlexClient destroyed listener.
      *
-     * @see flex.messaging.client.FlexClientListener
-     *
      * @param listener The listener to remove.
+     * @see flex.messaging.client.FlexClientListener
      */
-    public void removeClientDestroyedListener(FlexClientListener listener)
-    {
+    public void removeClientDestroyedListener(FlexClientListener listener) {
         // No need to check validity; removing a listener is always ok.
         if (listener != null && destroyedListeners != null)
             destroyedListeners.remove(listener);
@@ -1283,18 +1125,16 @@
 
     /**
      * Removes the attribute bound to the specified name for all the FlexSessions
-     * associated with the FlexClient. 
+     * associated with the FlexClient.
      *
      * @param name The name of the attribute to remove.
      */
-    public void removeSessionAttribute(String name)
-    {
+    public void removeSessionAttribute(String name) {
         for (FlexSession session : sessions)
             session.removeAttribute(name);
     }
 
     /**
-     *
      * Implements FlexSessionListener interface.
      * Notification that a FlexSession was created.
      * This is a no-op because the FlexClient is never added as a static FlexSession created listener
@@ -1303,31 +1143,28 @@
      *
      * @param session The FlexSession that was created.
      */
-    public void sessionCreated(FlexSession session) {}
+    public void sessionCreated(FlexSession session) {
+    }
 
     /**
-     *
      * Implements FlexSessionListener interface.
      * Notification that an associated FlexSession was destroyed.
      *
      * @param session The FlexSession that was destroyed.
      */
-    public void sessionDestroyed(FlexSession session)
-    {
+    public void sessionDestroyed(FlexSession session) {
         unregisterFlexSession(session);
     }
 
     /**
      * Binds an attribute value for the FlexClient under the specified name.
      *
-     * @param name The name to bind the attribute under.
+     * @param name  The name to bind the attribute under.
      * @param value The value of the attribute.
      */
-    public void setAttribute(String name, Object value)
-    {
+    public void setAttribute(String name, Object value) {
         // Null value set is the same as removeAttribute().
-        if (value == null)
-        {
+        if (value == null) {
             removeAttribute(name);
             return;
         }
@@ -1335,8 +1172,7 @@
         Object oldValue; // Used to determine which events to dispatch after the set is performed.
 
         // Only synchronize for the attribute mutation; event dispatch doesn't require it.
-        synchronized (lock)
-        {
+        synchronized (lock) {
             checkValid();
 
             updateLastUse();
@@ -1347,13 +1183,10 @@
             oldValue = attributes.put(name, value);
         }
 
-        if (oldValue == null)
-        {
+        if (oldValue == null) {
             notifyAttributeBound(name, value);
             notifyAttributeAdded(name, value);
-        }
-        else
-        {
+        } else {
             notifyAttributeUnbound(name, oldValue);
             notifyAttributeReplaced(name, oldValue);
             notifyAttributeBound(name, value);
@@ -1361,43 +1194,37 @@
     }
 
     /**
-     * Binds an attribute value for the current FlexSession associated with the 
+     * Binds an attribute value for the current FlexSession associated with the
      * FlexClient under the specified name. If the current FlexSession is NIO-based
-     * (NIOHTTPFlexSession or RTMPFlexSession), and if the FlexClient is associated 
-     * with a Servlet-based session (HttpFlexSession) as well, the attribute is bound 
+     * (NIOHTTPFlexSession or RTMPFlexSession), and if the FlexClient is associated
+     * with a Servlet-based session (HttpFlexSession) as well, the attribute is bound
      * on the Servlet-based session too to make it available to the underlying J2EE HttpSession.
-     * 
-     * @param name The name to bind the attribute under.
+     *
+     * @param name  The name to bind the attribute under.
      * @param value The value of the attribute.
      */
-    public void setSessionAttribute(String name, Object value)
-    {
+    public void setSessionAttribute(String name, Object value) {
         setSessionAttributeInCurrentSession(name, value);
         if (!isCurrentSessionServletBased())
             setSessionAttributeInServletBasedSession(name, value);
     }
 
     /**
-     *
      * Implements TimeoutCapable.
      * Inform the object that it has timed out.
      */
-    public void timeout()
-    {
+    public void timeout() {
         invalidate();
     }
 
     /**
-     *
      * Unregisters an <tt>EndpointPushHandler</tt> from the specified endpoint.
      *
-     * @param handler The <tt>EndpointPushHandler</tt> to unregister.
+     * @param handler    The <tt>EndpointPushHandler</tt> to unregister.
      * @param endpointId The endpoint to unregister from.
      */
-    public void unregisterEndpointPushHandler(EndpointPushHandler handler, String endpointId)
-    {
-        synchronized (lock)
-        {
+    public void unregisterEndpointPushHandler(EndpointPushHandler handler, String endpointId) {
+        synchronized (lock) {
             if (endpointPushHandlers == null)
                 return; // No-op.
 
@@ -1407,15 +1234,12 @@
     }
 
     /**
-     *
      * Used internally to disassociate a FlexSession from this FlexClient.
      *
      * @param session The FlexSession to disassociate from this FlexClient.
      */
-    public void unregisterFlexSession(FlexSession session)
-    {
-        if (sessions.remove(session))
-        {
+    public void unregisterFlexSession(FlexSession session) {
+        if (sessions.remove(session)) {
             session.removeSessionDestroyedListener(this);
             session.unregisterFlexClient(this);
             // Once all client sessions/connections terminate; shut down.
@@ -1425,23 +1249,18 @@
     }
 
     /**
-     *
      * Used internally to disassociate a MessageClient (subscription) from a FlexClient.
      *
      * @param messageClient The MessageClient to disassociate from the FlexClient.
      */
-    public void unregisterMessageClient(MessageClient messageClient)
-    {
-        if (messageClients != null && messageClients.remove(messageClient))
-        {
+    public void unregisterMessageClient(MessageClient messageClient) {
+        if (messageClients != null && messageClients.remove(messageClient)) {
             messageClient.removeMessageClientDestroyedListener(this);
             String endpointId = messageClient.getEndpointId();
             // Manage the outbound queue that this subscription uses.
-            synchronized (lock)
-            {
+            synchronized (lock) {
                 EndpointQueue queue = outboundQueues.get(endpointId);
-                if (queue != null)
-                {
+                if (queue != null) {
                     // Decrement the ref count of MessageClients using this queue.
                     queue.messageClientRefCount--;
 
@@ -1453,11 +1272,9 @@
 
                     // If we're not attempting to notify the remote client that this MessageClient has
                     // been invalidated, remove any associated messages from the queue.
-                    if (!messageClient.isAttemptingInvalidationClientNotification())
-                    {
+                    if (!messageClient.isAttemptingInvalidationClientNotification()) {
                         Object messageClientId = messageClient.getClientId();
-                        for (Iterator<Message> iter = queue.messages.iterator(); iter.hasNext(); )
-                        {
+                        for (Iterator<Message> iter = queue.messages.iterator(); iter.hasNext(); ) {
                             Message message = iter.next();
                             if (message.getClientId().equals(messageClientId))
                                 iter.remove();
@@ -1465,18 +1282,15 @@
                     }
 
                     // If no active subscriptions require the queue, clean it up if possible.
-                    if (queue.messageClientRefCount == 0)
-                    {
-                        if (queue.messages.isEmpty() || messageClient.isClientChannelDisconnected())
-                        {
+                    if (queue.messageClientRefCount == 0) {
+                        if (queue.messages.isEmpty() || messageClient.isClientChannelDisconnected()) {
                             if (queue.asyncPoll != null) // Close out async long-poll if one is registered.
                             {
                                 FlushResult flushResult = internalFlush(queue);
                                 // If the MessageClient isn't attempting client notification, override
                                 // and do so in this case to suppress the next poll request from the remote client
                                 // which will fail triggering an unnecessary channel disconnect on the client.
-                                if (!messageClient.isAttemptingInvalidationClientNotification())
-                                {
+                                if (!messageClient.isAttemptingInvalidationClientNotification()) {
                                     CommandMessage msg = new CommandMessage();
                                     msg.setClientId(messageClient.getClientId());
                                     msg.setOperation(CommandMessage.SUBSCRIPTION_INVALIDATE_OPERATION);
@@ -1499,14 +1313,12 @@
 
                     // Make sure to notify any threads waiting on this queue that may be associated
                     // with the subscription that's gone away.
-                    synchronized (queue)
-                    {
+                    synchronized (queue) {
                         queue.notifyAll();
                     }
                 }
                 // And if this subscription was associated with an endpoint push handler, unregister it.
-                if (endpointPushHandlers != null)
-                {
+                if (endpointPushHandlers != null) {
                     EndpointPushHandler handler = endpointPushHandlers.get(endpointId);
                     if (handler != null)
                         handler.unregisterMessageClient(messageClient);
@@ -1525,36 +1337,30 @@
      * Utility method that tests validity and throws an exception if the instance
      * has been invalidated.
      */
-    protected void checkValid()
-    {
-        synchronized (lock)
-        {
-            if (!valid)
-            {
+    protected void checkValid() {
+        synchronized (lock) {
+            if (!valid) {
                 MessageException e = new MessageException();
                 e.setMessage(FLEX_CLIENT_INVALIDATED);
                 throw e;
             }
         }
     }
-    
+
     /**
      * Invoked to clean up a timed out or closed async poll.
      *
      * @param asyncPoll The async poll to complete.
-     * @param result The FlushResult for the poll response.
+     * @param result    The FlushResult for the poll response.
      */
-    protected void completeAsyncPoll(AsyncPollWithTimeout asyncPoll, FlushResult result)
-    {
-        synchronized (lock)
-        {
+    protected void completeAsyncPoll(AsyncPollWithTimeout asyncPoll, FlushResult result) {
+        synchronized (lock) {
             asyncPoll.cancelTimeout();
             EndpointQueue queue = asyncPoll.getEndpointQueue();
             if (queue.asyncPoll.equals(asyncPoll))
                 queue.asyncPoll = null;
             FlexSession session = asyncPoll.getFlexSession();
-            synchronized (session)
-            {
+            synchronized (session) {
                 if (session.asyncPollMap != null)
                     session.asyncPollMap.remove(asyncPoll.getEndpointId());
             }
@@ -1567,10 +1373,8 @@
      * that supports real-time push.
      * Called by push() or delayed flush tasks for push-enabled sessions/connections.
      */
-    protected void directFlush(EndpointQueue queue)
-    {
-        synchronized (lock)
-        {
+    protected void directFlush(EndpointQueue queue) {
+        synchronized (lock) {
             // No need to invoke flush if the FlexClient has been invalidated.
             if (!valid)
                 return;
@@ -1586,21 +1390,16 @@
 
             // Pass any messages that are ready to flush off to the network layer.
             List<Message> messages = flushResult.getMessages();
-            if (messages != null && !messages.isEmpty())
-            {
-                if (queue.pushSession != null)
-                {
-                    if (queue.pushSession instanceof ConnectionAwareSession)
-                    {
+            if (messages != null && !messages.isEmpty()) {
+                if (queue.pushSession != null) {
+                    if (queue.pushSession instanceof ConnectionAwareSession) {
                         // Update last use only if we're actually writing back to the client.
-                        if ( ((ConnectionAwareSession)queue.pushSession).isConnected() )
+                        if (((ConnectionAwareSession) queue.pushSession).isConnected())
                             updateLastUse();
                     }
                     for (Message msg : messages)
                         queue.pushSession.push(msg);
-                }
-                else if (endpointPushHandlers != null)
-                {
+                } else if (endpointPushHandlers != null) {
                     updateLastUse();
                     EndpointPushHandler handler = endpointPushHandlers.get(queue.endpointId);
                     handler.pushMessages(messages);
@@ -1613,15 +1412,13 @@
                 queue.flushTask = new FlexClientScheduledFlushForPush(queue, flushWaitTime);
         }
     }
-    
+
     /**
      * Utility method to initialize an EndpointQueue (if necessary) and associate a subscription (MessageClient) with it.
      */
-    protected EndpointQueue getOrCreateEndpointQueueAndRegisterSubscription(MessageClient messageClient, String endpointId)
-    {
+    protected EndpointQueue getOrCreateEndpointQueueAndRegisterSubscription(MessageClient messageClient, String endpointId) {
         EndpointQueue newQueue;
-        if (!outboundQueues.containsKey(endpointId))
-        {
+        if (!outboundQueues.containsKey(endpointId)) {
             newQueue = new EndpointQueue();
             newQueue.flexClient = this;
             newQueue.endpointId = endpointId;
@@ -1634,9 +1431,7 @@
             newQueue.messageClientRefCount = 1;
 
             outboundQueues.put(endpointId, newQueue);
-        }
-        else
-        {
+        } else {
             newQueue = outboundQueues.get(endpointId);
             newQueue.messageClientRefCount++;
             // Resubscribes as a result of network connectivity issues may arrive over the same
@@ -1646,30 +1441,28 @@
                 newQueue.pushSession = session;
         }
         return newQueue;
-    }    
+    }
 
     /**
      * Utility method to flush the outbound queue and log any problems.
      * Any exceptions are logged and then rethrown.
-     * 
+     *
      * @param queue The outbound queue to flush.
      */
-    protected FlushResult internalFlush(EndpointQueue queue)
-    {
+    protected FlushResult internalFlush(EndpointQueue queue) {
         return internalFlush(queue, null);
     }
-    
+
     /**
      * Utility method to flush the outbound queue and log any problems.
      * If a specific client is passed, we need to invoke a client-specific flush.
      * If the passed client is null, we do a general flush of the queue.
      * Any exceptions are logged and then rethrown.
-     * 
-     * @param queue The outbound queue to flush.
+     *
+     * @param queue  The outbound queue to flush.
      * @param client The client to flush for.
      */
-    protected FlushResult internalFlush(EndpointQueue queue, MessageClient client)
-    {
+    protected FlushResult internalFlush(EndpointQueue queue, MessageClient client) {
         return internalFlush(queue, null, true);
     }
 
@@ -1678,50 +1471,43 @@
      * If a specific client is passed, we need to invoke a client-specific flush.
      * If the passed client is null, we do a general flush of the queue.
      * Any exceptions are logged and then rethrown.
-     * 
-     * @param queue The outbound queue to flush.
-     * @param client The client to flush for.
+     *
+     * @param queue         The outbound queue to flush.
+     * @param client        The client to flush for.
      * @param updateLastUse Whether the last-use timestamp of the FlexClient should
-     * be updated.
+     *                      be updated.
      */
-    protected FlushResult internalFlush(EndpointQueue queue, MessageClient client, 
-            boolean updateLastUse)
-    {
+    protected FlushResult internalFlush(EndpointQueue queue, MessageClient client,
+                                        boolean updateLastUse) {
         FlushResult flushResult;
-        try
-        {
-            synchronized (queue)
-            {
+        try {
+            synchronized (queue) {
                 flushResult = queue.processor.flush(client, queue.messages);
                 shutdownQueue(queue);
             }
 
             if (updateLastUse)
                 updateLastUseIfNecessary(flushResult);
-        }
-        catch (RuntimeException e)
-        {
+        } catch (RuntimeException e) {
             if (Log.isError())
                 Log.getLogger(FLEX_CLIENT_LOG_CATEGORY).error("Failed to flush an outbound queue for FlexClient '" + getId() + "'.", e);
             throw e;
         }
         return flushResult;
-    }    
+    }
 
     /**
-     * Utility method to flush messages in response to a poll request with 
+     * Utility method to flush messages in response to a poll request with
      * regular and wait poll.
-     * 
+     *
      * @param queue The endpoint queue to flush messages for.
      * @return The flush result with messages, or null if there are no messages.
      */
-    protected FlushResult internalPoll(EndpointQueue queue)
-    {
+    protected FlushResult internalPoll(EndpointQueue queue) {
         List<Message> allMessages = new ArrayList<Message>();
 
         // First, add the previously flushed messages.
-        if (queue.flushedMessagesBetweenPolls != null && queue.flushedMessagesBetweenPolls.size() > 0)
-        {
+        if (queue.flushedMessagesBetweenPolls != null && queue.flushedMessagesBetweenPolls.size() > 0) {
             allMessages.addAll(queue.flushedMessagesBetweenPolls);
             queue.flushedMessagesBetweenPolls.clear();
         }
@@ -1751,14 +1537,11 @@
     /**
      * Notify attribute listeners that an attribute has been added.
      *
-     * @param name The name of the attribute.
-     *
+     * @param name  The name of the attribute.
      * @param value The new value of the attribute.
      */
-    protected void notifyAttributeAdded(String name, Object value)
-    {
-        if (attributeListeners != null && !attributeListeners.isEmpty())
-        {
+    protected void notifyAttributeAdded(String name, Object value) {
+        if (attributeListeners != null && !attributeListeners.isEmpty()) {
             FlexClientBindingEvent event = new FlexClientBindingEvent(this, name, value);
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
             for (FlexClientAttributeListener attribListener : attributeListeners)
@@ -1769,30 +1552,24 @@
     /**
      * Notify binding listener that it has been bound to the FlexClient.
      *
-     * @param name The attribute name.
-     *
+     * @param name  The attribute name.
      * @param value The attribute that has been bound.
      */
-    protected void notifyAttributeBound(String name, Object value)
-    {
-        if ((value != null) && (value instanceof FlexClientBindingListener))
-        {
+    protected void notifyAttributeBound(String name, Object value) {
+        if ((value != null) && (value instanceof FlexClientBindingListener)) {
             FlexClientBindingEvent bindingEvent = new FlexClientBindingEvent(this, name);
-            ((FlexClientBindingListener)value).valueBound(bindingEvent);
+            ((FlexClientBindingListener) value).valueBound(bindingEvent);
         }
     }
 
     /**
      * Notify attribute listeners that an attribute has been removed.
      *
-     * @param name The name of the attribute.
-     *
+     * @param name  The name of the attribute.
      * @param value The previous value of the attribute.
      */
-    protected void notifyAttributeRemoved(String name, Object value)
-    {
-        if (attributeListeners != null && !attributeListeners.isEmpty())
-        {
+    protected void notifyAttributeRemoved(String name, Object value) {
+        if (attributeListeners != null && !attributeListeners.isEmpty()) {
             FlexClientBindingEvent event = new FlexClientBindingEvent(this, name, value);
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
             for (FlexClientAttributeListener attribListener : attributeListeners)
@@ -1803,14 +1580,11 @@
     /**
      * Notify attribute listeners that an attribute has been replaced.
      *
-     * @param name The name of the attribute.
-     *
+     * @param name  The name of the attribute.
      * @param value The previous value of the attribute.
      */
-    protected void notifyAttributeReplaced(String name, Object value)
-    {
-        if (attributeListeners != null && !attributeListeners.isEmpty())
-        {
+    protected void notifyAttributeReplaced(String name, Object value) {
+        if (attributeListeners != null && !attributeListeners.isEmpty()) {
             FlexClientBindingEvent event = new FlexClientBindingEvent(this, name, value);
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
             for (FlexClientAttributeListener attribListener : attributeListeners)
@@ -1821,33 +1595,28 @@
     /**
      * Notify binding listener that it has been unbound from the FlexClient.
      *
-     * @param name The attribute name.
-     *
+     * @param name  The attribute name.
      * @param value The attribute that has been unbound.
      */
-    protected void notifyAttributeUnbound(String name, Object value)
-    {
-        if ((value != null) && (value instanceof FlexClientBindingListener))
-        {
+    protected void notifyAttributeUnbound(String name, Object value) {
+        if ((value != null) && (value instanceof FlexClientBindingListener)) {
             FlexClientBindingEvent bindingEvent = new FlexClientBindingEvent(this, name);
-            ((FlexClientBindingListener)value).valueUnbound(bindingEvent);
+            ((FlexClientBindingListener) value).valueUnbound(bindingEvent);
         }
-    }    
-    
+    }
+
     /**
      * Invoked by FlexClientManager after this new FlexClient has been constructed and
      * is fully configured.
      */
-    protected void notifyCreated()
-    {
-        if (!createdListeners.isEmpty())
-        {
+    protected void notifyCreated() {
+        if (!createdListeners.isEmpty()) {
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
             for (FlexClientListener createListener : createdListeners)
                 createListener.clientCreated(this);
         }
     }
-    
+
     /**
      * Utility method used to shutdown endpoint queues accessed via polling channels
      * that have no more active subscriptions and no more pending outbound messages.
@@ -1855,34 +1624,30 @@
      * @param queue The queue to potentially shutdown.
      * @return true if the queue was cleaned up/removed; otherwise false.
      */
-    protected boolean shutdownQueue(EndpointQueue queue)
-    {
+    protected boolean shutdownQueue(EndpointQueue queue) {
         // If no more subscriptions are using the queue and it is empty, shut it down.
-        if (queue.messageClientRefCount == 0 && queue.messages.isEmpty())
-        {
+        if (queue.messageClientRefCount == 0 && queue.messages.isEmpty()) {
             outboundQueues.remove(queue.endpointId);
             // Notify any threads waiting on this queue.
-            synchronized (queue)
-            {
+            synchronized (queue) {
                 queue.notifyAll();
             }
             return true;
         }
         return false;
     }
-    
+
     /**
      * Utility method to throw a not subscribed exception back to the client
      * if they issue a poll request to an endpoint that they haven't subscribed over.
-     *
+     * <p>
      * This method should not be called when you hold an internal thread lock. It iterates
-     * over all the FlexClients in the current session and will not work if two or more 
+     * over all the FlexClients in the current session and will not work if two or more
      * FlexClients in the same session call it simultaneously.
      *
      * @param endpointId The endpoint Id.
      */
-    protected void throwNotSubscribedException(String endpointId)
-    {
+    protected void throwNotSubscribedException(String endpointId) {
         // Pre-3.1 versions of the client library did not handle URL session tokens properly
         // and may incorrectly issue a poll, after subscribing, that does not contain the proper
         // FlexClient id.
@@ -1891,15 +1656,11 @@
         // We determine this by checking for an (orphaned) FlexClient instance associated with the
         // current session that has a subscription established through the target endpoint.
         List<FlexClient> flexClients = FlexContext.getFlexSession().getFlexClients();
-        for (FlexClient otherClient : flexClients)
-        {
-            if (!otherClient.equals(this))
-            {
+        for (FlexClient otherClient : flexClients) {
+            if (!otherClient.equals(this)) {
                 List<MessageClient> otherSubs = otherClient.getMessageClients();
-                for (MessageClient otherSub : otherSubs)
-                {
-                    if (otherSub.getEndpointId().equals(endpointId))
-                    {
+                for (MessageClient otherSub : otherSubs) {
+                    if (otherSub.getEndpointId().equals(endpointId)) {
                         // Throw not-subscribed exception with extra guidance.
                         FlexClientNotSubscribedException e = new FlexClientNotSubscribedException();
                         e.setMessage(10036, new Object[]{endpointId});
@@ -1919,11 +1680,10 @@
 
     /**
      * Updates the last-use timestamp if there are messages in the flush result.
-     * 
+     *
      * @param flushResult The flush result.
      */
-    protected void updateLastUseIfNecessary(FlushResult flushResult)
-    {
+    protected void updateLastUseIfNecessary(FlushResult flushResult) {
         List<Message> messages = flushResult != null ? flushResult.getMessages() : null;
         if (messages != null && !messages.isEmpty())
             updateLastUse();
@@ -1935,8 +1695,7 @@
     //
     //--------------------------------------------------------------------------
 
-    private Set<String> getSessionAttributeNames(FlexSession session)
-    {
+    private Set<String> getSessionAttributeNames(FlexSession session) {
         Set<String> attributeNames = new HashSet<String>();
         Enumeration<String> currentAttributeNames = session.getAttributeNames();
         while (currentAttributeNames.hasMoreElements())
@@ -1944,16 +1703,13 @@
         return attributeNames;
     }
 
-    private Object getSessionAttributeInCurrentSession(String name)
-    {
+    private Object getSessionAttributeInCurrentSession(String name) {
         return FlexContext.getFlexSession().getAttribute(name);
     }
 
-    private Object getSessionAttributeInOtherSessions(String name)
-    {
+    private Object getSessionAttributeInOtherSessions(String name) {
         FlexSession currentSession = FlexContext.getFlexSession();
-        for (FlexSession session : sessions)
-        {
+        for (FlexSession session : sessions) {
             if (session == currentSession)
                 continue;
 
@@ -1964,30 +1720,24 @@
         return null;
     }
 
-    private void setSessionAttributeInCurrentSession(String name, Object value)
-    {
+    private void setSessionAttributeInCurrentSession(String name, Object value) {
         FlexContext.getFlexSession().setAttribute(name, value);
     }
 
-    private void setSessionAttributeInServletBasedSession(String name, Object value)
-    {
-        for (FlexSession session : sessions)
-        {
-            if (isServletBasedSession(session))
-            {
+    private void setSessionAttributeInServletBasedSession(String name, Object value) {
+        for (FlexSession session : sessions) {
+            if (isServletBasedSession(session)) {
                 session.setAttribute(name, value);
                 return;
             }
         }
     }
 
-    private boolean isCurrentSessionServletBased()
-    {
+    private boolean isCurrentSessionServletBased() {
         return isServletBasedSession(FlexContext.getFlexSession());
     }
 
-    private boolean isServletBasedSession(FlexSession session)
-    {
+    private boolean isServletBasedSession(FlexSession session) {
         return session instanceof HttpFlexSession;
     }
 
@@ -2005,20 +1755,18 @@
      * locally or statically isn't a good option because they lack a useful shutdown hook that's necessary
      * in order to close down the timeout manager cleanly.
      */
-    public class AsyncPollWithTimeout extends TimeoutAbstractObject
-    {
+    public class AsyncPollWithTimeout extends TimeoutAbstractObject {
         /**
          * Constructor.
          *
-         * @param flexClient flex client
-         * @param session flex session
-         * @param queue endpoint queue
-         * @param handler poll handler
+         * @param flexClient         flex client
+         * @param session            flex session
+         * @param queue              endpoint queue
+         * @param handler            poll handler
          * @param waitIntervalMillis wait interval
-         * @param endpointId endpoint
+         * @param endpointId         endpoint
          */
-        public AsyncPollWithTimeout(FlexClient flexClient, FlexSession session, EndpointQueue queue, AsyncPollHandler handler, long waitIntervalMillis, String endpointId)
-        {
+        public AsyncPollWithTimeout(FlexClient flexClient, FlexSession session, EndpointQueue queue, AsyncPollHandler handler, long waitIntervalMillis, String endpointId) {
             this.flexClient = flexClient;
             this.session = session;
             this.queue = queue;
@@ -2035,8 +1783,7 @@
          *
          * @return flex client
          */
-        public FlexClient getFlexClient()
-        {
+        public FlexClient getFlexClient() {
             return flexClient;
         }
 
@@ -2044,10 +1791,10 @@
 
         /**
          * Return session.
+         *
          * @return flex session
          */
-        public FlexSession getFlexSession()
-        {
+        public FlexSession getFlexSession() {
             return session;
         }
 
@@ -2055,10 +1802,10 @@
 
         /**
          * Return endpoint queue.
+         *
          * @return the queue
          */
-        public EndpointQueue getEndpointQueue()
-        {
+        public EndpointQueue getEndpointQueue() {
             return queue;
         }
 
@@ -2066,10 +1813,10 @@
 
         /**
          * Return handler.
+         *
          * @return the handler
          */
-        public AsyncPollHandler getHandler()
-        {
+        public AsyncPollHandler getHandler() {
             return handler;
         }
 
@@ -2077,18 +1824,17 @@
 
         /**
          * Return endpoint ID.
+         *
          * @return the id
          */
-        public String getEndpointId()
-        {
+        public String getEndpointId() {
             return endpointId;
         }
 
         /**
          * Trigger a timeout.
          */
-        public void timeout()
-        {
+        public void timeout() {
             completeAsyncPoll(this, null /* nothing to return */);
         }
     }
@@ -2098,12 +1844,10 @@
      * Delayed flushes are handled by the <tt>FlexClientManager</tt>
      * using <tt>TimeoutManager</tt>.
      */
-    abstract class FlexClientScheduledFlush extends TimeoutAbstractObject
-    {
+    abstract class FlexClientScheduledFlush extends TimeoutAbstractObject {
         final EndpointQueue queue;
 
-        public FlexClientScheduledFlush(EndpointQueue queue, long waitIntervalMillis)
-        {
+        public FlexClientScheduledFlush(EndpointQueue queue, long waitIntervalMillis) {
             this.queue = queue;
             setTimeoutPeriod(waitIntervalMillis);
             flexClientManager.monitorScheduledFlush(this);
@@ -2111,8 +1855,7 @@
 
         abstract void performFlushTask();
 
-        public void timeout()
-        {
+        public void timeout() {
             FlexContext.setThreadLocalFlexClient(FlexClient.this);
             performFlushTask();
             FlexContext.setThreadLocalFlexClient(null);
@@ -2123,20 +1866,15 @@
      * Helper class for push channels to directly flush a FlexClient's outbound
      * queue after a specified delay.
      */
-    class FlexClientScheduledFlushForPush extends FlexClientScheduledFlush
-    {
-        public FlexClientScheduledFlushForPush(EndpointQueue queue, long waitIntervalMillis)
-        {
+    class FlexClientScheduledFlushForPush extends FlexClientScheduledFlush {
+        public FlexClientScheduledFlushForPush(EndpointQueue queue, long waitIntervalMillis) {
             super(queue, waitIntervalMillis);
         }
 
         @Override
-        void performFlushTask()
-        {
-            synchronized (lock)
-            {   
-                synchronized (queue)
-                {
+        void performFlushTask() {
+            synchronized (lock) {
+                synchronized (queue) {
                     directFlush(queue);
                 }
             }
@@ -2150,18 +1888,14 @@
      * When the next poll happens, the flushedMessagesBetweenPolls will be
      * drained first.
      */
-    class FlexClientScheduledFlushForPoll extends FlexClientScheduledFlush
-    {
-        public FlexClientScheduledFlushForPoll(EndpointQueue queue, long waitIntervalMillis)
-        {
+    class FlexClientScheduledFlushForPoll extends FlexClientScheduledFlush {
+        public FlexClientScheduledFlushForPoll(EndpointQueue queue, long waitIntervalMillis) {
             super(queue, waitIntervalMillis);
         }
 
         @Override
-        void performFlushTask()
-        {
-            synchronized (lock)
-            {
+        void performFlushTask() {
+            synchronized (lock) {
                 // No need to invoke flush if the FlexClient has been invalidated.
                 if (!valid)
                     return;
@@ -2176,14 +1910,10 @@
                     return;
 
                 List<Message> messages = flushResult.getMessages();
-                if (messages != null && messages.size() > 0)
-                {
-                    if (queue.asyncPoll != null)
-                    {
+                if (messages != null && messages.size() > 0) {
+                    if (queue.asyncPoll != null) {
                         completeAsyncPoll(queue.asyncPoll, flushResult);
-                    }
-                    else
-                    {
+                    } else {
                         if (queue.flushedMessagesBetweenPolls == null)
                             queue.flushedMessagesBetweenPolls = new ArrayList<Message>();
                         queue.flushedMessagesBetweenPolls.addAll(messages);
@@ -2199,7 +1929,6 @@
     }
 
     /**
-     *
      * Helper class that stores per-endpoint outbound queue state including:
      * <ul>
      *   <li>flexClient - The <tt>FlexClient</tt> the queue is used by.</li>
@@ -2214,7 +1943,7 @@
      *       (null if the endpoint or session supports direct push).</li>
      *   <li>pushSession - A reference to a pushSession to use for direct writes to the
      *       client (null if the endpoint uses polling or handles push directly).</li>
-     *  
+     *
      *   <li>flushTask - A reference to a pending flush task that will perform a delayed flush of the queue;
      *       null if no delayed flush has been scheduled.</li>
      *   <li>messageClientRefCount - A reference count of MessageClients subcribed over this endpoint.
@@ -2222,8 +1951,7 @@
      *   <li>avoidBusyPolling - Used to signal poll result generation for the queue to avoid busy polling.</li>
      * </ul>
      */
-    public static class EndpointQueue
-    {
+    public static class EndpointQueue {
         public FlexClient flexClient;
         public String endpointId;
         public Endpoint endpoint;
diff --git a/core/src/main/java/flex/messaging/client/FlexClientAttributeListener.java b/core/src/main/java/flex/messaging/client/FlexClientAttributeListener.java
index 2d83d0b..cd71e4b 100644
--- a/core/src/main/java/flex/messaging/client/FlexClientAttributeListener.java
+++ b/core/src/main/java/flex/messaging/client/FlexClientAttributeListener.java
@@ -19,27 +19,26 @@
 /**
  * Interface for FlexClient attribute listeners.
  */
-public interface FlexClientAttributeListener 
-{
+public interface FlexClientAttributeListener {
     /**
      * Callback invoked after an attribute is added to the FlexClient.
-     * 
+     *
      * @param event The event containing the associated FlexClient and attribute
      *              information.
      */
     void attributeAdded(FlexClientBindingEvent event);
-    
+
     /**
      * Callback invoked after an attribute is removed from the FlexClient.
-     * 
+     *
      * @param event The event containing the associated FlexClient and attribute
      *              information.
      */
     void attributeReplaced(FlexClientBindingEvent event);
-    
+
     /**
      * Callback invoked after an attribute has been replaced with a new value.
-     * 
+     *
      * @param event The event containing the associated FlexClient and attribute
      *              information.
      */
diff --git a/core/src/main/java/flex/messaging/client/FlexClientBindingEvent.java b/core/src/main/java/flex/messaging/client/FlexClientBindingEvent.java
index 3fa20de..5427642 100644
--- a/core/src/main/java/flex/messaging/client/FlexClientBindingEvent.java
+++ b/core/src/main/java/flex/messaging/client/FlexClientBindingEvent.java
@@ -20,8 +20,7 @@
  * Event used to notify FlexClientAttributeListeners of changes to FlexClient
  * attributes.
  */
-public class FlexClientBindingEvent 
-{
+public class FlexClientBindingEvent {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -30,27 +29,25 @@
 
     /**
      * Constructs an event for an attribute that is bound or unbound from a FlexClient.
-     * 
+     *
      * @param client The FlexClient.
-     * @param name The attribute name.
+     * @param name   The attribute name.
      */
-    public FlexClientBindingEvent(FlexClient client, String name)
-    {
+    public FlexClientBindingEvent(FlexClient client, String name) {
         this.client = client;
         this.name = name;
-    }    
+    }
 
-    
+
     /**
-     * Constructs an event for an attribute that is added to a FlexClient or 
+     * Constructs an event for an attribute that is added to a FlexClient or
      * replaced by a new value.
-     * 
+     *
      * @param client The FlexClient.
-     * @param name The attribute name.
-     * @param value The attribute value.
+     * @param name   The attribute name.
+     * @param value  The attribute value.
      */
-    public FlexClientBindingEvent(FlexClient client, String name, Object value)
-    {
+    public FlexClientBindingEvent(FlexClient client, String name, Object value) {
         this.client = client;
         this.name = name;
         this.value = value;
@@ -66,50 +63,47 @@
      * The FlexClient that generated the event.
      */
     private FlexClient client;
-    
+
     /**
      * The name of the attribute associated with the event.
      */
     private String name;
-    
+
     /**
      * The value of the attribute associated with the event.
      */
     private Object value;
-    
+
     //--------------------------------------------------------------------------
     //
     // Methods
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Returns the FlexClient that generated the event.
-     * 
+     *
      * @return The FlexClient that generated the event.
      */
-    public FlexClient getClient()
-    {
+    public FlexClient getClient() {
         return client;
     }
-    
+
     /**
      * Returns the name of the attribute associated with the event.
-     * 
+     *
      * @return The name of the attribute associated with the event.
      */
-    public String getName()
-    {
+    public String getName() {
         return name;
     }
-    
+
     /**
      * Returns the value of the attribute associated with the event.
-     * 
+     *
      * @return The value of the attribute associated with the event.
      */
-    public Object getValue()
-    {
+    public Object getValue() {
         return value;
     }
 }
diff --git a/core/src/main/java/flex/messaging/client/FlexClientBindingListener.java b/core/src/main/java/flex/messaging/client/FlexClientBindingListener.java
index 50c319f..43ae9f0 100644
--- a/core/src/main/java/flex/messaging/client/FlexClientBindingListener.java
+++ b/core/src/main/java/flex/messaging/client/FlexClientBindingListener.java
@@ -19,19 +19,18 @@
 /**
  * Interface to be notified when the implementing object is bound or unbound from the FlexClient.
  */
-public interface FlexClientBindingListener 
-{
+public interface FlexClientBindingListener {
     /**
      * Callback invoked when the object is bound to a FlexClient.
-     * 
+     *
      * @param event The event containing the FlexClient and attribute
      *              information.
      */
     void valueBound(FlexClientBindingEvent event);
-    
+
     /**
      * Callback invoked when the object is unbound from a FlexClient.
-     * 
+     *
      * @param event The event containing the FlexClient and attribute
      *              information.
      */
diff --git a/core/src/main/java/flex/messaging/client/FlexClientListener.java b/core/src/main/java/flex/messaging/client/FlexClientListener.java
index 7c8cd3d..342c60a 100644
--- a/core/src/main/java/flex/messaging/client/FlexClientListener.java
+++ b/core/src/main/java/flex/messaging/client/FlexClientListener.java
@@ -22,18 +22,17 @@
  * To listen for FlexClient destruction, the implementation instance must add itself as a listener to
  * a specific FlexClient instance via the <code>addClientDestroyedListener()</code> method.
  */
-public interface FlexClientListener 
-{
+public interface FlexClientListener {
     /**
      * Notification that a FlexClient was created.
-     * 
+     *
      * @param client The FlexClient that was created.
      */
     void clientCreated(FlexClient client);
-    
+
     /**
      * Notification that a FlexClient is about to be destroyed.
-     * 
+     *
      * @param client The FlexClient that will be destroyed.
      */
     void clientDestroyed(FlexClient client);
diff --git a/core/src/main/java/flex/messaging/client/FlexClientManager.java b/core/src/main/java/flex/messaging/client/FlexClientManager.java
index 943956d..d872f59 100644
--- a/core/src/main/java/flex/messaging/client/FlexClientManager.java
+++ b/core/src/main/java/flex/messaging/client/FlexClientManager.java
@@ -36,11 +36,9 @@
 import flex.messaging.util.TimeoutManager;
 
 /**
- *
  * Manages FlexClient instances for a MessageBroker.
  */
-public class FlexClientManager extends ManageableComponent
-{
+public class FlexClientManager extends ManageableComponent {
     public static final String TYPE = "FlexClientManager";
 
     //--------------------------------------------------------------------------
@@ -52,25 +50,23 @@
     /**
      *
      */
-    public FlexClientManager()
-    {
+    public FlexClientManager() {
         this(MessageBroker.getMessageBroker(null));
     }
+
     /**
      * Constructs a FlexClientManager for the passed MessageBroker.
      *
      * @param broker The MessageBroker that the Flex client manager is associated with.
      */
-    public FlexClientManager(MessageBroker broker)
-    {
+    public FlexClientManager(MessageBroker broker) {
         this(broker.isManaged(), broker);
     }
 
     /**
      *
      */
-    public FlexClientManager(boolean enableManagement, MessageBroker mbroker)
-    {
+    public FlexClientManager(boolean enableManagement, MessageBroker mbroker) {
         super(enableManagement);
 
         super.setId(TYPE);
@@ -79,10 +75,9 @@
         broker = (mbroker != null) ? mbroker : MessageBroker.getMessageBroker(null);
 
         FlexClientSettings flexClientSettings = broker.getFlexClientSettings();
-        if (flexClientSettings != null && flexClientSettings.getTimeoutMinutes() != -1)
-        {
+        if (flexClientSettings != null && flexClientSettings.getTimeoutMinutes() != -1) {
             // Convert from minutes to millis.
-            setFlexClientTimeoutMillis(flexClientSettings.getTimeoutMinutes()*60*1000);
+            setFlexClientTimeoutMillis(flexClientSettings.getTimeoutMinutes() * 60 * 1000);
         }
 
         this.setParent(broker);
@@ -107,7 +102,7 @@
     /**
      * Table to store FlexClients by id.
      */
-    private final Map<String,FlexClient> flexClients = new ConcurrentHashMap<String,FlexClient>();
+    private final Map<String, FlexClient> flexClients = new ConcurrentHashMap<String, FlexClient>();
 
 
     /**
@@ -132,8 +127,7 @@
      *
      * @return A string array of the client IDs.
      */
-    public String[] getClientIds()
-    {
+    public String[] getClientIds() {
         String[] ids = new String[flexClients.size()];
         ArrayList<String> idList = new ArrayList<String>(flexClients.keySet());
 
@@ -152,8 +146,7 @@
      *
      * @return The number of FlexClients in use.
      */
-    public int getFlexClientCount()
-    {
+    public int getFlexClientCount() {
         return flexClients.size();
     }
 
@@ -168,8 +161,7 @@
      *
      * @return The idle timeout in milliseconds to apply to new FlexClient instances.
      */
-    public long getFlexClientTimeoutMillis()
-    {
+    public long getFlexClientTimeoutMillis() {
         return flexClientTimeoutMillis;
     }
 
@@ -178,13 +170,11 @@
      *
      * @param value The idle timeout in milliseconds to apply to new FlexClient instances.
      */
-    public void setFlexClientTimeoutMillis(long value)
-    {
+    public void setFlexClientTimeoutMillis(long value) {
         if (value < 1)
             value = 0;
 
-        synchronized (this)
-        {
+        synchronized (this) {
             flexClientTimeoutMillis = value;
         }
     }
@@ -198,8 +188,7 @@
      *
      * @return The parent MessageBroker instance.
      */
-    public MessageBroker getMessageBroker()
-    {
+    public MessageBroker getMessageBroker() {
         return broker;
     }
 
@@ -211,34 +200,30 @@
 
     /**
      * Get FlexClient with the specified id or a new one will be created.
-     * This method will return a valid existing FlexClient for the specific Id, 
-     * or a new FlexClient will created  
+     * This method will return a valid existing FlexClient for the specific Id,
+     * or a new FlexClient will created
+     *
      * @param id The id of the Flex client.
      * @return FlexClient the FlexClient with the specified id
      */
-    public FlexClient getFlexClient(String id)
-    {
+    public FlexClient getFlexClient(String id) {
         return getFlexClient(id, true);
     }
-    
+
     /**
      * Get the FlexClient with the specified id.
      *
-     * @param id The id of the Flex client.
+     * @param id                  The id of the Flex client.
      * @param createNewIfNotExist if true, a new FlexClient will be created if not exist
      * @return FlexClient the FlexClient with the specified id
      */
-    public FlexClient getFlexClient(String id, boolean createNewIfNotExist)
-    {
+    public FlexClient getFlexClient(String id, boolean createNewIfNotExist) {
         FlexClient flexClient = null;
         // Try to lookup an existing instance if we receive an id.
-        if (id != null)
-        {
+        if (id != null) {
             flexClient = flexClients.get(id);
-            if (flexClient != null)
-            {
-                if (flexClient.isValid() && !flexClient.invalidating)
-                {
+            if (flexClient != null) {
+                if (flexClient.isValid() && !flexClient.invalidating) {
                     flexClient.updateLastUse();
                     return flexClient;
                 }
@@ -247,25 +232,19 @@
             }
         }
         // Use a manager-level lock (this) when creating/recreating a new FlexClient.
-        synchronized (this)
-        {
-            if (id != null)
-            {
+        synchronized (this) {
+            if (id != null) {
                 flexClient = flexClients.get(id);
-                if (flexClient != null)
-                {
+                if (flexClient != null) {
                     flexClient.updateLastUse();
                     return flexClient;
-                }
-                else
-                {
-                    if (!createNewIfNotExist)
-                    {
+                } else {
+                    if (!createNewIfNotExist) {
                         return null;
                     }
                 }
             }
-            
+
             flexClient = createFlexClient(id);
             checkForNullAndDuplicateId(flexClient.getId());
             flexClients.put(flexClient.getId(), flexClient);
@@ -284,8 +263,7 @@
      * @param endpointId The Id of the endpoint the queue processor is used for.
      * @return The FlexClient with a configured queue processor.
      */
-    public FlexClientOutboundQueueProcessor createOutboundQueueProcessor(FlexClient flexClient, String endpointId)
-    {
+    public FlexClientOutboundQueueProcessor createOutboundQueueProcessor(FlexClient flexClient, String endpointId) {
         // First, try to create a custom outbound queue processor, if one exists.
         FlexClientOutboundQueueProcessor processor = createCustomOutboundQueueProcessor(flexClient, endpointId);
 
@@ -294,8 +272,7 @@
             processor = createDefaultOutboundQueueProcessor(flexClient, endpointId);
 
         // If MessageBroker's default queue processor fails, use the default processor.
-        if (processor == null)
-        {
+        if (processor == null) {
             processor = new FlexClientOutboundQueueProcessor();
             processor.setFlexClient(flexClient);
             processor.setEndpointId(endpointId);
@@ -305,24 +282,20 @@
     }
 
     /**
-     *
      * Monitors an async poll for a FlexClient for timeout.
      *
      * @param asyncPollTimeout The async poll task to monitor for timeout.
      */
-    public void monitorAsyncPollTimeout(TimeoutAbstractObject asyncPollTimeout)
-    {
+    public void monitorAsyncPollTimeout(TimeoutAbstractObject asyncPollTimeout) {
         flexClientTimeoutManager.scheduleTimeout(asyncPollTimeout);
     }
 
     /**
-     *
      * Monitors a scheduled flush for a FlexClient for timeout.
      *
      * @param scheduledFlushTimeout The schedule flush task to monitor for timeout.
      */
-    public void monitorScheduledFlush(TimeoutAbstractObject scheduledFlushTimeout)
-    {
+    public void monitorScheduledFlush(TimeoutAbstractObject scheduledFlushTimeout) {
         flexClientTimeoutManager.scheduleTimeout(scheduledFlushTimeout);
     }
 
@@ -332,35 +305,30 @@
      * @see flex.management.ManageableComponent#start()
      */
     @Override
-    public void start()
-    {
-        if (isManaged())
-        {
+    public void start() {
+        if (isManaged()) {
             controller = new FlexClientManagerControl(getParent().getControl(), this);
             setControl(controller);
             controller.register();
         }
 
         final String baseId = getId();
-        flexClientTimeoutManager = new TimeoutManager(new ThreadFactory()
-                                                        {
-                                                            int counter = 1;
-                                                            public synchronized Thread newThread(Runnable runnable)
-                                                            {
-                                                                Thread t = new Thread(runnable);
-                                                                t.setName(baseId + "-FlexClientTimeoutThread-" + counter++);
-                                                                return t;
-                                                            }
-                                                        });
+        flexClientTimeoutManager = new TimeoutManager(new ThreadFactory() {
+            int counter = 1;
+
+            public synchronized Thread newThread(Runnable runnable) {
+                Thread t = new Thread(runnable);
+                t.setName(baseId + "-FlexClientTimeoutThread-" + counter++);
+                return t;
+            }
+        });
     }
 
     /**
      * @see flex.management.ManageableComponent#stop()
      */
-    public void stop()
-    {
-        if (controller != null)
-        {
+    public void stop() {
+        if (controller != null) {
             controller.unregister();
         }
 
@@ -376,38 +344,32 @@
 
     /**
      * Hook method invoked when a new <tt>FlexClient</tt> instance is created.
-     * 
-     * @param id The id the client provided, which was previously assigned by this server, 
+     *
+     * @param id The id the client provided, which was previously assigned by this server,
      *           or another server in a cluster. New clients will pass a <code>null</code>
      *           value in which case this server must generate a unique id.
      */
-    protected FlexClient createFlexClient(String id)
-    {
+    protected FlexClient createFlexClient(String id) {
         return (id == null) ? new FlexClient(this) : new FlexClient(this, id);
     }
-    
+
     /* (non-Javadoc)
      * @see flex.management.ManageableComponent#getLogCategory()
      */
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LogCategories.CLIENT_FLEXCLIENT;
     }
 
     /**
-     *
      * Removes a FlexClient from being managed by this manager.
      * This method is invoked by FlexClients when they are invalidated.
      *
      * @param flexClient The id of the FlexClient being invalidated.
      */
-    protected void removeFlexClient(FlexClient flexClient)
-    {
-        if (flexClient != null)
-        {
+    protected void removeFlexClient(FlexClient flexClient) {
+        if (flexClient != null) {
             String id = flexClient.getId();
-            synchronized (id)
-            {
+            synchronized (id) {
                 FlexClient storedClient = flexClients.get(id);
                 // If the stored instance is the same as the invalidating instance based upon identity,
                 // remove it.
@@ -423,10 +385,8 @@
     //
     //--------------------------------------------------------------------------
 
-    private void checkForNullAndDuplicateId(String id)
-    {
-        if (id == null)
-        {
+    private void checkForNullAndDuplicateId(String id) {
+        if (id == null) {
             // Cannot create ''{0}'' with null id.
             MessageException me = new MessageException();
             me.setMessage(10039, new Object[]{"FlexClient"});
@@ -434,8 +394,7 @@
             throw me;
         }
 
-        if (flexClients.containsKey(id))
-        {
+        if (flexClients.containsKey(id)) {
             // Cannot create ''{0}'' with id ''{1}''; another ''{0}'' is already registered with the same id.
             MessageException me = new MessageException();
             me.setMessage(10040, new Object[]{"FlexClient", id});
@@ -445,8 +404,7 @@
     }
 
     private FlexClientOutboundQueueProcessor createDefaultOutboundQueueProcessor(
-            FlexClient flexClient, String endpointId)
-    {
+            FlexClient flexClient, String endpointId) {
         FlexClientSettings flexClientSettings = broker.getFlexClientSettings();
         if (flexClientSettings == null)
             return null;
@@ -456,17 +414,14 @@
             return null;
 
         FlexClientOutboundQueueProcessor processor = null;
-        try
-        {
+        try {
             Class queueProcessorClass = createClass(queueProcessorClassName);
             Object instance = ClassUtil.createDefaultInstance(queueProcessorClass, null);
-            processor = (FlexClientOutboundQueueProcessor)instance;
+            processor = (FlexClientOutboundQueueProcessor) instance;
             processor.setFlexClient(flexClient);
             processor.setEndpointId(endpointId);
             processor.initialize(flexClientSettings.getFlexClientOutboundQueueProcessorProperties());
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             String message = "Failed to create MessageBroker's outbound queue processor for FlexClient with id '" + flexClient.getId() + "'.";
             if (Log.isWarn())
                 Log.getLogger(FlexClient.FLEX_CLIENT_LOG_CATEGORY).warn(message, t);
@@ -479,28 +434,21 @@
     }
 
     private FlexClientOutboundQueueProcessor createCustomOutboundQueueProcessor(
-            FlexClient flexClient, String endpointId)
-    {
+            FlexClient flexClient, String endpointId) {
         FlexClientOutboundQueueProcessor processor = null;
         Endpoint endpoint = broker.getEndpoint(endpointId);
-        if (endpoint instanceof AbstractEndpoint)
-        {
-            Class processorClass = ((AbstractEndpoint)endpoint).getFlexClientOutboundQueueProcessorClass();
-            if (processorClass != null)
-            {
-                try
-                {
+        if (endpoint instanceof AbstractEndpoint) {
+            Class processorClass = ((AbstractEndpoint) endpoint).getFlexClientOutboundQueueProcessorClass();
+            if (processorClass != null) {
+                try {
                     Object instance = ClassUtil.createDefaultInstance(processorClass, null);
-                    if (instance instanceof FlexClientOutboundQueueProcessor)
-                    {
-                        processor = (FlexClientOutboundQueueProcessor)instance;
+                    if (instance instanceof FlexClientOutboundQueueProcessor) {
+                        processor = (FlexClientOutboundQueueProcessor) instance;
                         processor.setFlexClient(flexClient);
                         processor.setEndpointId(endpointId);
-                        processor.initialize(((AbstractEndpoint)endpoint).getFlexClientOutboundQueueProcessorConfig());
+                        processor.initialize(((AbstractEndpoint) endpoint).getFlexClientOutboundQueueProcessorConfig());
                     }
-                }
-                catch (Throwable t)
-                {
+                } catch (Throwable t) {
                     if (Log.isWarn())
                         Log.getLogger(FlexClient.FLEX_CLIENT_LOG_CATEGORY).warn("Failed to create custom outbound queue processor for FlexClient with id '" + flexClient.getId() + "'. Using MessageBroker's default queue processor.", t);
                 }
@@ -509,10 +457,9 @@
         return processor;
     }
 
-    private Class createClass(String className)
-    {
+    private Class createClass(String className) {
         Class c = ClassUtil.createClass(className, FlexContext.getMessageBroker() == null ? null :
-                    FlexContext.getMessageBroker().getClassLoader());
+                FlexContext.getMessageBroker().getClassLoader());
 
         return c;
     }
diff --git a/core/src/main/java/flex/messaging/client/FlexClientNotSubscribedException.java b/core/src/main/java/flex/messaging/client/FlexClientNotSubscribedException.java
index f5ffe18..27dd18a 100644
--- a/core/src/main/java/flex/messaging/client/FlexClientNotSubscribedException.java
+++ b/core/src/main/java/flex/messaging/client/FlexClientNotSubscribedException.java
@@ -22,8 +22,7 @@
 /**
  *
  */
-public class FlexClientNotSubscribedException extends MessageException
-{
+public class FlexClientNotSubscribedException extends MessageException {
     /**
      *
      */
@@ -34,40 +33,37 @@
     // Properties
     //
     //--------------------------------------------------------------------------        
-    
+
     //----------------------------------
     //  defaultLogMessageIntro
     //----------------------------------            
 
     /**
-     * Overrides the intro text for the log message. 
+     * Overrides the intro text for the log message.
      */
-    public String getDefaultLogMessageIntro()
-    {
-        return "FlexClient not subscribed: ";        
+    public String getDefaultLogMessageIntro() {
+        return "FlexClient not subscribed: ";
     }
-    
+
     //----------------------------------
     //  logStackTraceEnabled
     //----------------------------------            
-    
+
     /**
      * Override to disable stack trace logging.
      */
-    public boolean isLogStackTraceEnabled()
-    {
-        return false;        
-    }    
-    
+    public boolean isLogStackTraceEnabled() {
+        return false;
+    }
+
     //----------------------------------
     //  peferredLogLevel
     //----------------------------------            
-    
+
     /**
-     * Override to lower the preferred log level to debug. 
+     * Override to lower the preferred log level to debug.
      */
-    public short getPreferredLogLevel()
-    {
-        return LogEvent.DEBUG;        
+    public short getPreferredLogLevel() {
+        return LogEvent.DEBUG;
     }
 }
diff --git a/core/src/main/java/flex/messaging/client/FlexClientOutboundQueueProcessor.java b/core/src/main/java/flex/messaging/client/FlexClientOutboundQueueProcessor.java
index 71a5c7e..2c12cc3 100644
--- a/core/src/main/java/flex/messaging/client/FlexClientOutboundQueueProcessor.java
+++ b/core/src/main/java/flex/messaging/client/FlexClientOutboundQueueProcessor.java
@@ -35,8 +35,7 @@
  * of the outbound queue and flushes all queued messages to the network as quickly as possible.
  * It also handles the outbound client-level throttling specified at the destination level.
  */
-public class FlexClientOutboundQueueProcessor
-{
+public class FlexClientOutboundQueueProcessor {
     //--------------------------------------------------------------------------
     //
     // Variables
@@ -71,13 +70,11 @@
     //--------------------------------------------------------------------------
 
     /**
-     *
      * Stores the Id for the outbound queue's endpoint.
      *
      * @param value The Id for the outbound queue's endpoint.
      */
-    public void setEndpointId(String value)
-    {
+    public void setEndpointId(String value) {
         endpointId = value;
     }
 
@@ -86,19 +83,16 @@
      *
      * @return The Id for the outbound queue's endpoint.
      */
-    public String getEndpointId()
-    {
+    public String getEndpointId() {
         return endpointId;
     }
 
     /**
-     *
      * Sets the associated FlexClient.
      *
      * @param value The associated FlexClient.
      */
-    public void setFlexClient(FlexClient value)
-    {
+    public void setFlexClient(FlexClient value) {
         client = value;
     }
 
@@ -107,8 +101,7 @@
      *
      * @return The associated FlexClient.
      */
-    public FlexClient getFlexClient()
-    {
+    public FlexClient getFlexClient() {
         return client;
     }
 
@@ -117,9 +110,8 @@
      *
      * @return The outbound queue throttle manager.
      */
-    public OutboundQueueThrottleManager getOutboundQueueThrottleManager()
-    {
-       return outboundQueueThrottleManager;
+    public OutboundQueueThrottleManager getOutboundQueueThrottleManager() {
+        return outboundQueueThrottleManager;
     }
 
     /**
@@ -128,8 +120,7 @@
      *
      * @return The outbound queue throttle manager.
      */
-    public OutboundQueueThrottleManager getOrCreateOutboundQueueThrottleManager()
-    {
+    public OutboundQueueThrottleManager getOrCreateOutboundQueueThrottleManager() {
         if (outboundQueueThrottleManager == null)
             outboundQueueThrottleManager = new OutboundQueueThrottleManager(this);
         return outboundQueueThrottleManager;
@@ -142,16 +133,16 @@
      *
      * @param properties A ConfigMap containing any custom initialization properties.
      */
-    public void initialize(ConfigMap properties) {}
+    public void initialize(ConfigMap properties) {
+    }
 
     /**
      * Always adds a new message to the tail of the queue.
      *
      * @param outboundQueue The queue of outbound messages.
-     * @param message The new message to add to the queue.
+     * @param message       The new message to add to the queue.
      */
-    public void add(List<Message> outboundQueue, Message message)
-    {
+    public void add(List<Message> outboundQueue, Message message) {
         outboundQueue.add(message);
     }
 
@@ -160,11 +151,10 @@
      *
      * @param outboundQueue The queue of outbound messages.
      * @return A FlushResult containing the messages that have been removed from the outbound queue
-     *         to be written to the network and a wait time for the next flush of the outbound queue
-     *         that is the default for the underlying Channel/Endpoint.
+     * to be written to the network and a wait time for the next flush of the outbound queue
+     * that is the default for the underlying Channel/Endpoint.
      */
-    public FlushResult flush(List<Message> outboundQueue)
-    {
+    public FlushResult flush(List<Message> outboundQueue) {
         return flush(null /* no client distinction */, outboundQueue);
     }
 
@@ -176,18 +166,15 @@
      * @param messageClient The specific MessageClient to return messages for.
      * @param outboundQueue The queue of outbound messages.
      * @return A FlushResult containing the messages that have been removed from the outbound queue
-     *         to be written to the network for this MessageClient.
+     * to be written to the network for this MessageClient.
      */
-    public FlushResult flush(MessageClient messageClient, List<Message> outboundQueue)
-    {
+    public FlushResult flush(MessageClient messageClient, List<Message> outboundQueue) {
         FlushResult flushResult = new FlushResult();
         List<Message> messagesToFlush = null;
 
-        for (Iterator<Message> iter = outboundQueue.iterator(); iter.hasNext();)
-        {
+        for (Iterator<Message> iter = outboundQueue.iterator(); iter.hasNext(); ) {
             Message message = iter.next();
-            if (messageClient == null || (message.getClientId().equals(messageClient.getClientId())))
-            {
+            if (messageClient == null || (message.getClientId().equals(messageClient.getClientId()))) {
                 if (isMessageExpired(message)) // Don't flush expired messages.
                 {
                     iter.remove();
@@ -205,13 +192,11 @@
                 Result result = throttleResult.getResult();
 
                 // No destination level throttling; check destination-client level throttling.
-                if (Result.OK == result)
-                {
+                if (Result.OK == result) {
                     throttleResult = throttleOutgoingClientLevel(messageClientForCurrentMessage, message, false);
                     result = throttleResult.getResult();
                     // If no throttling, simply add the message to the list.
-                    if (Result.OK == result)
-                    {
+                    if (Result.OK == result) {
                         updateMessageFrequencyOutgoing(messageClientForCurrentMessage, message);
                         if (messagesToFlush == null)
                             messagesToFlush = new ArrayList<Message>();
@@ -237,11 +222,9 @@
      * not yet expired.
      *
      * @param message The message to test for expiration.
-     *
      * @return true if the message has a timeToLive value that has expired; otherwise false.
      */
-    public boolean isMessageExpired(Message message)
-    {
+    public boolean isMessageExpired(Message message) {
         return (message.getTimeToLive() > 0 &&
                 (System.currentTimeMillis() - message.getTimestamp()) >= message.getTimeToLive());
     }
@@ -250,17 +233,15 @@
      * Attempts to throttle the outgoing message at the destination level.
      *
      * @param msgClient The client the message is intended for.
-     * @param message The message to consider to throttle.
-     * @param buffered Whether the message has already been buffered. In that case,
-     * parts of regular throttling code is skipped.
+     * @param message   The message to consider to throttle.
+     * @param buffered  Whether the message has already been buffered. In that case,
+     *                  parts of regular throttling code is skipped.
      * @return The result of throttling attempt.
      */
     protected ThrottleResult throttleOutgoingDestinationLevel(
-            MessageClient msgClient, Message message, boolean buffered)
-    {
+            MessageClient msgClient, Message message, boolean buffered) {
         ThrottleManager throttleManager = getThrottleManager(msgClient);
-        if (throttleManager != null)
-        {
+        if (throttleManager != null) {
             // In already buffered messages, don't use ThrottleManager#throttleOutgoingMessage
             // to avoid regular throttling handling as the message has already been buffered.
             if (buffered)
@@ -276,18 +257,16 @@
      * Attempts to throttle the outgoing message at the destination-client level.
      *
      * @param msgClient The client the message is intended for.
-     * @param message The message to consider to throttle.
-     * @param buffered Whether the message has already been buffered. In that case,
-     * parts of regular throttling code is skipped.
+     * @param message   The message to consider to throttle.
+     * @param buffered  Whether the message has already been buffered. In that case,
+     *                  parts of regular throttling code is skipped.
      * @return The result of throttling attempt.
      */
-    protected ThrottleResult throttleOutgoingClientLevel(MessageClient msgClient, Message message, boolean buffered)
-    {
+    protected ThrottleResult throttleOutgoingClientLevel(MessageClient msgClient, Message message, boolean buffered) {
         if (outboundQueueThrottleManager != null) // Means client level throttling enabled.
         {
             ThrottleResult throttleResult = outboundQueueThrottleManager.throttleOutgoingClientLevel(message);
-            if (!buffered)
-            {
+            if (!buffered) {
                 ThrottleManager throttleManager = getThrottleManager(msgClient);
                 if (throttleManager != null)
                     throttleManager.handleOutgoingThrottleResult(message, throttleResult, true /*isClientLevel*/);
@@ -303,18 +282,15 @@
      * @param message The message.
      * @return The message client that the message is intended to.
      */
-    protected MessageClient getMessageClient(Message message)
-    {
+    protected MessageClient getMessageClient(Message message) {
         // First try using the cached message client.
-        if (lastMessageClient != null && message.getClientId().equals(lastMessageClient.getClientId()))
+        if (lastMessageClient != null && message.getClientId().equals(lastMessageClient.getClientId())) {
+            return lastMessageClient;
+        } else // Go ahead with the lookup.
         {
+            lastMessageClient = client.getMessageClient((String) message.getClientId());
             return lastMessageClient;
         }
-        else // Go ahead with the lookup.
-        {
-            lastMessageClient = client.getMessageClient((String)message.getClientId());
-            return lastMessageClient;
-        } 
     }
 
     /**
@@ -324,21 +300,19 @@
      * @param msgClient The message client; it can be null.
      * @return The throttle manager.
      */
-    protected ThrottleManager getThrottleManager(MessageClient msgClient)
-    {
-        Destination destination = msgClient != null? msgClient.getDestination() : null;
-        return (destination != null && destination instanceof MessageDestination)? 
-                ((MessageDestination)destination).getThrottleManager() : null;
+    protected ThrottleManager getThrottleManager(MessageClient msgClient) {
+        Destination destination = msgClient != null ? msgClient.getDestination() : null;
+        return (destination != null && destination instanceof MessageDestination) ?
+                ((MessageDestination) destination).getThrottleManager() : null;
     }
 
     /**
      * Updates the outgoing message's message frequency.
      *
      * @param msgClient The MessageClient that might have been passed to the flush; it can be null.
-     * @param message The message.
+     * @param message   The message.
      */
-    protected void updateMessageFrequencyOutgoing(MessageClient msgClient, Message message)
-    {
+    protected void updateMessageFrequencyOutgoing(MessageClient msgClient, Message message) {
         // Update the destination level message frequency.
         ThrottleManager throttleManager = getThrottleManager(msgClient);
         if (throttleManager != null)
diff --git a/core/src/main/java/flex/messaging/client/FlushResult.java b/core/src/main/java/flex/messaging/client/FlushResult.java
index ab400fa..f7b4ece 100644
--- a/core/src/main/java/flex/messaging/client/FlushResult.java
+++ b/core/src/main/java/flex/messaging/client/FlushResult.java
@@ -24,8 +24,7 @@
  * Stores the messages that should be written to the network as a result of a flush
  * invocation on a FlexClient's outbound queue.
  */
-public class FlushResult
-{
+public class FlushResult {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -39,7 +38,8 @@
      * the client as well as an optional wait time in milliseconds for when the
      * next flush should be invoked.
      */
-    public FlushResult() {}
+    public FlushResult() {
+    }
 
     //--------------------------------------------------------------------------
     //
@@ -59,8 +59,7 @@
      *
      * @return The messages to write to the network for this flush invocation.
      */
-    public List<Message> getMessages()
-    {
+    public List<Message> getMessages() {
         return messages;
     }
 
@@ -69,8 +68,7 @@
      *
      * @param value The messages to write to the network for this flush invocation.
      */
-    public void setMessages(List<Message> value)
-    {
+    public void setMessages(List<Message> value) {
         messages = value;
     }
 
@@ -90,11 +88,10 @@
      * when the next message is added to the outbound queue.
      *
      * @return The wait time in milliseconds before flush is next invoked. A value of 0, the default,
-     *         indicates that the default flush behavior for the underlying Channel/Endpoint should be
-     *         used.
+     * indicates that the default flush behavior for the underlying Channel/Endpoint should be
+     * used.
      */
-    public int getNextFlushWaitTimeMillis()
-    {
+    public int getNextFlushWaitTimeMillis() {
         return nextFlushWaitTimeMillis;
     }
 
@@ -110,8 +107,7 @@
      *
      * @param value The wait time in milliseconds before flush will be invoked.
      */
-    public void setNextFlushWaitTimeMillis(int value)
-    {
+    public void setNextFlushWaitTimeMillis(int value) {
         nextFlushWaitTimeMillis = (value < 1) ? 0 : value;
     }
 }
diff --git a/core/src/main/java/flex/messaging/client/OutboundQueueThrottleManager.java b/core/src/main/java/flex/messaging/client/OutboundQueueThrottleManager.java
index 24a66d0..6191a2c 100644
--- a/core/src/main/java/flex/messaging/client/OutboundQueueThrottleManager.java
+++ b/core/src/main/java/flex/messaging/client/OutboundQueueThrottleManager.java
@@ -35,8 +35,7 @@
  * subscriptions (for each subtopic/selector) across the same destination for
  * the same MessageClient.
  */
-public class OutboundQueueThrottleManager
-{
+public class OutboundQueueThrottleManager {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -48,8 +47,7 @@
      *
      * @param processor The outbound queue processor that is using this throttle manager.
      */
-    public OutboundQueueThrottleManager(FlexClientOutboundQueueProcessor processor)
-    {
+    public OutboundQueueThrottleManager(FlexClientOutboundQueueProcessor processor) {
         destinationFrequencies = new ConcurrentHashMap<String, DestinationFrequency>();
         this.processor = processor;
     }
@@ -79,16 +77,14 @@
     /**
      * Registers the destination with the outbound throttle manager.
      *
-     * @param destinationId The id of the destination.
+     * @param destinationId              The id of the destination.
      * @param outboundMaxClientFrequency The outbound max-client-frequency specified
-     * at the destination.
-     * @param outboundPolicy The outbound throttle policy specified at the destination.
+     *                                   at the destination.
+     * @param outboundPolicy             The outbound throttle policy specified at the destination.
      */
-    public void registerDestination(String destinationId, int outboundMaxClientFrequency, Policy outboundPolicy)
-    {
+    public void registerDestination(String destinationId, int outboundMaxClientFrequency, Policy outboundPolicy) {
         DestinationFrequency frequency = destinationFrequencies.get(destinationId);
-        if (frequency == null)
-        {
+        if (frequency == null) {
             frequency = new DestinationFrequency(outboundMaxClientFrequency, outboundPolicy);
             destinationFrequencies.putIfAbsent(destinationId, frequency);
         }
@@ -99,10 +95,9 @@
      * specified subscription info.
      *
      * @param destinationId The destination id.
-     * @param si The subscription information.
+     * @param si            The subscription information.
      */
-    public void registerSubscription(String destinationId, SubscriptionInfo si)
-    {
+    public void registerSubscription(String destinationId, SubscriptionInfo si) {
         DestinationFrequency frequency = destinationFrequencies.get(destinationId);
         frequency.logMaxFrequencyDuringRegistration(frequency.outboundMaxClientFrequency, si);
     }
@@ -111,10 +106,9 @@
      * Unregisters the subscription.
      *
      * @param destinationId The destination id.
-     * @param si The subscription information.
+     * @param si            The subscription information.
      */
-    public void unregisterSubscription(String destinationId, SubscriptionInfo si)
-    {
+    public void unregisterSubscription(String destinationId, SubscriptionInfo si) {
         unregisterDestination(destinationId);
     }
 
@@ -123,8 +117,7 @@
      *
      * @param destinationId The destination id.
      */
-    public void unregisterAllSubscriptions(String destinationId)
-    {
+    public void unregisterAllSubscriptions(String destinationId) {
         unregisterDestination(destinationId);
     }
 
@@ -134,16 +127,13 @@
      * @param message The message to consider to throttle.
      * @return True if the message was throttled; otherwise false.
      */
-    public ThrottleResult throttleOutgoingClientLevel(Message message)
-    {
+    public ThrottleResult throttleOutgoingClientLevel(Message message) {
         String destinationId = message.getDestination();
-        if (isDestinationRegistered(destinationId))
-        {
+        if (isDestinationRegistered(destinationId)) {
             DestinationFrequency frequency = destinationFrequencies.get(message.getDestination());
             int maxFrequency = frequency.getMaxFrequency(message); // Limit to check against.
             MessageFrequency messageFrequency = frequency.getMessageFrequency(message); // Message rate of the client.
-            if (messageFrequency != null)
-            {
+            if (messageFrequency != null) {
                 ThrottleResult result = messageFrequency.checkLimit(maxFrequency, frequency.outboundPolicy);
                 return result;
             }
@@ -156,11 +146,9 @@
      *
      * @param message The message.
      */
-    public void updateMessageFrequencyOutgoingClientLevel(Message message)
-    {
+    public void updateMessageFrequencyOutgoingClientLevel(Message message) {
         String destinationId = message.getDestination();
-        if (isDestinationRegistered(destinationId))
-        {
+        if (isDestinationRegistered(destinationId)) {
             DestinationFrequency frequency = destinationFrequencies.get(message.getDestination());
             MessageFrequency messageFrequency = frequency.getMessageFrequency(message);
             if (messageFrequency != null)
@@ -180,8 +168,7 @@
      * @param destinationId The destination id.
      * @return True if the destination with the specified id has been registered.
      */
-    protected boolean isDestinationRegistered(String destinationId)
-    {
+    protected boolean isDestinationRegistered(String destinationId) {
         return destinationFrequencies.containsKey(destinationId);
     }
 
@@ -190,8 +177,7 @@
      *
      * @param destinationId The id of the destination.
      */
-    protected void unregisterDestination(String destinationId)
-    {
+    protected void unregisterDestination(String destinationId) {
         if (isDestinationRegistered(destinationId))
             destinationFrequencies.remove(destinationId);
     }
@@ -207,8 +193,7 @@
      * specified at the destination. It also keeps track of outbound message
      * rates of all MessageClient subscriptions across the destination.
      */
-    class DestinationFrequency
-    {
+    class DestinationFrequency {
         protected final int outboundMaxClientFrequency; // destination specified client limit.
         protected final MessageFrequency outboundClientFrequency;
         protected final Policy outboundPolicy; // destination specified policy.
@@ -217,10 +202,9 @@
          * Default constructor.
          *
          * @param outboundMaxClientFrequency The outbound throttling max-client-frequency of the destination.
-         * @param outboundPolicy The outbound throttling policy of the destination.
+         * @param outboundPolicy             The outbound throttling policy of the destination.
          */
-        DestinationFrequency(int outboundMaxClientFrequency, Policy outboundPolicy)
-        {
+        DestinationFrequency(int outboundMaxClientFrequency, Policy outboundPolicy) {
             this.outboundMaxClientFrequency = outboundMaxClientFrequency;
             this.outboundPolicy = outboundPolicy;
             outboundClientFrequency = new MessageFrequency(outboundMaxClientFrequency);
@@ -228,15 +212,13 @@
 
         /**
          * Returns the max-client-frequency for the subscription the message is
-         * intended for (which is simply the max-client-frequency specified at 
+         * intended for (which is simply the max-client-frequency specified at
          * the destination).
          *
          * @param message The message.
-         *
          * @return The max-frequency for the subscription.
          */
-        int getMaxFrequency(Message message)
-        {
+        int getMaxFrequency(Message message) {
             return outboundMaxClientFrequency;
         }
 
@@ -247,8 +229,7 @@
          * @param message The message.
          * @return The message frequency for the subscription, if it exists; otherwise null.
          */
-        MessageFrequency getMessageFrequency(Message message)
-        {
+        MessageFrequency getMessageFrequency(Message message) {
             return outboundClientFrequency;
         }
 
@@ -257,13 +238,12 @@
          *
          * @param maxFrequency The maxFrequency to log.
          */
-        void logMaxFrequencyDuringRegistration(int maxFrequency, SubscriptionInfo si)
-        {
+        void logMaxFrequencyDuringRegistration(int maxFrequency, SubscriptionInfo si) {
             if (Log.isDebug())
                 Log.getLogger(ThrottleManager.LOG_CATEGORY).debug("Outbound queue throttle manager for FlexClient '"
                         + processor.getFlexClient().getId() + "' is using '" + maxFrequency
                         + "' as the throttling limit for its subscription: "
-                        +  StringUtils.NEWLINE + si);
+                        + StringUtils.NEWLINE + si);
         }
     }
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/client/PollFlushResult.java b/core/src/main/java/flex/messaging/client/PollFlushResult.java
index dc8e33b..4ea7078 100644
--- a/core/src/main/java/flex/messaging/client/PollFlushResult.java
+++ b/core/src/main/java/flex/messaging/client/PollFlushResult.java
@@ -17,11 +17,10 @@
 package flex.messaging.client;
 
 /**
- * Extends <tt>FlushResult</tt> and adds additional properties for controlling 
+ * Extends <tt>FlushResult</tt> and adds additional properties for controlling
  * client polling behavior.
  */
-public class PollFlushResult extends FlushResult
-{
+public class PollFlushResult extends FlushResult {
     //--------------------------------------------------------------------------
     //
     // Properties
@@ -33,65 +32,61 @@
     //----------------------------------
 
     private boolean avoidBusyPolling;
-    
+
     /**
      * Indicates whether the handling of this result should attempt to avoid
      * potential busy-polling cycles.
      * This will be set to <code>true</code> in the case of two clients that are both
      * long-polling the server over the same session.
-     * 
+     *
      * @return <code>true</code> if the handling of this result should attempt to avoid potential
-     *         busy-polling cycles.
+     * busy-polling cycles.
      */
-    public boolean isAvoidBusyPolling()
-    {
+    public boolean isAvoidBusyPolling() {
         return avoidBusyPolling;
     }
-    
+
     /**
      * Set to <code>true</code> to signal that handling for this result should attempt to avoid
      * potential busy-polling cycles.
-     * 
-     * @param value <code>true</code> to signal that handling for this result should attempt to 
-     *        avoid potential busy-polling cycles.
+     *
+     * @param value <code>true</code> to signal that handling for this result should attempt to
+     *              avoid potential busy-polling cycles.
      */
-    public void setAvoidBusyPolling(boolean value)
-    {
+    public void setAvoidBusyPolling(boolean value) {
         avoidBusyPolling = value;
     }
-    
+
     //----------------------------------
     //  clientProcessingSuppressed
     //----------------------------------
 
     private boolean clientProcessingSuppressed;
-    
+
     /**
      * Indicates whether client processing of this result should be
      * suppressed.
      * This should be <code>true</code> for results generated for poll requests
      * that arrive while a long-poll request from the same client is being serviced
      * to avoid a busy polling cycle.
-     * 
+     *
      * @return <code>true</code> if client processing of this result should be suppressed;
-     *         otherwise <code>false</code>.
+     * otherwise <code>false</code>.
      */
-    public boolean isClientProcessingSuppressed()
-    {
+    public boolean isClientProcessingSuppressed() {
         return clientProcessingSuppressed;
     }
-    
+
     /**
      * Set to <code>true</code> to suppress client processing of this result.
      * Default is <code>false</code>.
      * This should be set to <code>true</code> for results generated for poll requests
      * that arrive while a long-poll request from the same client is being serviced
      * to avoid a busy polling cycle.
-     * 
+     *
      * @param value <code>true</code> to suppress client processing of the result.
      */
-    public void setClientProcessingSuppressed(boolean value)
-    {
+    public void setClientProcessingSuppressed(boolean value) {
         clientProcessingSuppressed = value;
     }
 }
diff --git a/core/src/main/java/flex/messaging/client/PollWaitListener.java b/core/src/main/java/flex/messaging/client/PollWaitListener.java
index 7978e6f..cb6cc45 100644
--- a/core/src/main/java/flex/messaging/client/PollWaitListener.java
+++ b/core/src/main/java/flex/messaging/client/PollWaitListener.java
@@ -22,18 +22,17 @@
  * state. This can be used to break the threads out of their wait state separately from the
  * internal waited poll handling within <code>FlexClient</code>.
  */
-public interface PollWaitListener
-{
+public interface PollWaitListener {
     /**
      * Hook method invoked directly before a wait begins.
-     * 
+     *
      * @param notifier The <tt>Object</tt> being used to <code>wait()/notify()</code>.
      */
     void waitStart(Object notifier);
-    
+
     /**
      * Hook method invoked directly after a wait completes.
-     * 
+     *
      * @param notifier The <tt>Object</tt> being used to <code>wait()/notify()</code>.
      */
     void waitEnd(Object notifier);
diff --git a/core/src/main/java/flex/messaging/client/UserAgentSettings.java b/core/src/main/java/flex/messaging/client/UserAgentSettings.java
index 217f2c7..87c6b43 100644
--- a/core/src/main/java/flex/messaging/client/UserAgentSettings.java
+++ b/core/src/main/java/flex/messaging/client/UserAgentSettings.java
@@ -23,8 +23,7 @@
  * Similarly, the number of simultaneous connections a session can have is user
  * agent specific.
  */
-public class UserAgentSettings
-{
+public class UserAgentSettings {
     /**
      * The prefixes of the version token used by various browsers.
      */
@@ -40,7 +39,7 @@
     public static final String USER_AGENT_OPERA = "Opera";
     public static final String USER_AGENT_OPERA_8 = "Opera 8";
     // Opera 10,11 ship as User Agent Opera/9.8.
-    public static final String USER_AGENT_OPERA_10 = "Opera/9.8"; 
+    public static final String USER_AGENT_OPERA_10 = "Opera/9.8";
     public static final String USER_AGENT_SAFARI = "Safari";
 
     /**
@@ -59,7 +58,7 @@
     /**
      * The default number of persistent connections per session for various browsers.
      */
-    private static final int MAX_PERSISTENT_CONNECTIONS_LEGACY =  1;
+    private static final int MAX_PERSISTENT_CONNECTIONS_LEGACY = 1;
     public static final int MAX_PERSISTENT_CONNECTIONS_DEFAULT = 5;
     private static final int MAX_PERSISTENT_CONNECTIONS_OPERA_LEGACY = 3;
     private static final int MAX_PERSISTENT_CONNECTIONS_CHROME = MAX_PERSISTENT_CONNECTIONS_DEFAULT;
@@ -73,97 +72,72 @@
     private int maxPersistentConnectionsPerSession = MAX_PERSISTENT_CONNECTIONS_DEFAULT;
 
     /**
-     *  Static method to retrieve pre-initialized user agents which are as follows:
-     *
-     *  In Chrome 0, 1, 2, the limit is 6:
-     *      match-on="Chrome" max-persistent-connections-per-session="5"
-     *
-     *  In Firefox 1, 2, the limit is 2:
-     *      match-on="Firefox" max-persistent-connections-per-session="1"
-     *
-     *  In Firefox 3, the limit is 6:
-     *      match-on="Firefox/3" max-persistent-connections-per-session="5"
-     *
-     *  In MSIE 5, 6, 7, the limit is 2 with kickstart bytes of 2K:
-     *      match-on="MSIE" max-persistent-connections-per-session="1" kickstart-bytes="2048"
-     *
-     *  In MSIE 8, the limit is 6 with kickstart bytes of 2K:
-     *      match-on="MSIE 8" max-persistent-connections-per-session="5" kickstart-bytes="2048"
-     *
-     *  In Opera 7, 9, the limit is 4:
-     *      match-on="Opera" max-persistent-connections-per-session="3"
-     *
-     *  In Opera 8, the limit is 8:
-     *      match-on="Opera 8" max-persistent-connections-per-session="7"
-     *
-     *  In Opera 10, the limit is 8.
-     *      match-on="Opera 10" max-persistent-connections-per-session="7"
-     *
-     *  In Safari 3, 4, the limit is 4.
-     *      match-on="Safari" max-persistent-connections-per-session="3"
+     * Static method to retrieve pre-initialized user agents which are as follows:
+     * <p>
+     * In Chrome 0, 1, 2, the limit is 6:
+     * match-on="Chrome" max-persistent-connections-per-session="5"
+     * <p>
+     * In Firefox 1, 2, the limit is 2:
+     * match-on="Firefox" max-persistent-connections-per-session="1"
+     * <p>
+     * In Firefox 3, the limit is 6:
+     * match-on="Firefox/3" max-persistent-connections-per-session="5"
+     * <p>
+     * In MSIE 5, 6, 7, the limit is 2 with kickstart bytes of 2K:
+     * match-on="MSIE" max-persistent-connections-per-session="1" kickstart-bytes="2048"
+     * <p>
+     * In MSIE 8, the limit is 6 with kickstart bytes of 2K:
+     * match-on="MSIE 8" max-persistent-connections-per-session="5" kickstart-bytes="2048"
+     * <p>
+     * In Opera 7, 9, the limit is 4:
+     * match-on="Opera" max-persistent-connections-per-session="3"
+     * <p>
+     * In Opera 8, the limit is 8:
+     * match-on="Opera 8" max-persistent-connections-per-session="7"
+     * <p>
+     * In Opera 10, the limit is 8.
+     * match-on="Opera 10" max-persistent-connections-per-session="7"
+     * <p>
+     * In Safari 3, 4, the limit is 4.
+     * match-on="Safari" max-persistent-connections-per-session="3"
      *
      * @param matchOn String to use match the agent.
      */
-    public static UserAgentSettings getAgent(String matchOn)
-    {
+    public static UserAgentSettings getAgent(String matchOn) {
         UserAgentSettings userAgent = new UserAgentSettings();
         userAgent.setMatchOn(matchOn);
 
-        if (USER_AGENT_ANDROID.equals(matchOn))
-        {
+        if (USER_AGENT_ANDROID.equals(matchOn)) {
             userAgent.setKickstartBytes(KICKSTART_BYTES_ANDROID);
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_SAFARI);
         }
-        if (USER_AGENT_CHROME.equals(matchOn))
-        {
+        if (USER_AGENT_CHROME.equals(matchOn)) {
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_CHROME);
-        }
-        else if (USER_AGENT_FIREFOX.equals(matchOn))
-        {
+        } else if (USER_AGENT_FIREFOX.equals(matchOn)) {
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_FIREFOX);
-        }
-        else if (USER_AGENT_FIREFOX_1.equals(matchOn))
-        {
+        } else if (USER_AGENT_FIREFOX_1.equals(matchOn)) {
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_LEGACY);
-        }
-        else if (USER_AGENT_FIREFOX_2.equals(matchOn))
-        {
+        } else if (USER_AGENT_FIREFOX_2.equals(matchOn)) {
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_LEGACY);
-        }
-        else if (USER_AGENT_MSIE.equals(matchOn))
-        {
+        } else if (USER_AGENT_MSIE.equals(matchOn)) {
             userAgent.setKickstartBytes(KICKSTART_BYTES_MSIE);
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_MSIE);
-        }
-        else if (USER_AGENT_MSIE_5.equals(matchOn))
-        {
+        } else if (USER_AGENT_MSIE_5.equals(matchOn)) {
             userAgent.setKickstartBytes(KICKSTART_BYTES_MSIE);
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_LEGACY);
-        }
-        else if (USER_AGENT_MSIE_6.equals(matchOn))
-        {
+        } else if (USER_AGENT_MSIE_6.equals(matchOn)) {
             userAgent.setKickstartBytes(KICKSTART_BYTES_MSIE);
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_LEGACY);
-        }
-        else if (USER_AGENT_MSIE_7.equals(matchOn))
-        {
+        } else if (USER_AGENT_MSIE_7.equals(matchOn)) {
             userAgent.setKickstartBytes(KICKSTART_BYTES_MSIE);
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_LEGACY);
-        }
-        else if (USER_AGENT_OPERA.equals(matchOn))
-        {
+        } else if (USER_AGENT_OPERA.equals(matchOn)) {
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_OPERA_LEGACY);
-        }
-        else if (USER_AGENT_OPERA_8.equals(matchOn))
-        {
+        } else if (USER_AGENT_OPERA_8.equals(matchOn)) {
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_OPERA);
-        }
-        else if (USER_AGENT_OPERA_10.equals(matchOn))
-        {
+        } else if (USER_AGENT_OPERA_10.equals(matchOn)) {
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_OPERA);
-        }
-        else if (USER_AGENT_SAFARI.equals(matchOn))
-        {
+        } else if (USER_AGENT_SAFARI.equals(matchOn)) {
             userAgent.setKickstartBytes(KICKSTART_BYTES_SAFARI);
             userAgent.setMaxPersistentConnectionsPerSession(MAX_PERSISTENT_CONNECTIONS_SAFARI);
         }
@@ -175,8 +149,7 @@
      *
      * @return The String to use to match the agent.
      */
-    public String getMatchOn()
-    {
+    public String getMatchOn() {
         return matchOn;
     }
 
@@ -185,8 +158,7 @@
      *
      * @param matchOn The String to use to match the agent.
      */
-    public void setMatchOn(String matchOn)
-    {
+    public void setMatchOn(String matchOn) {
         this.matchOn = matchOn;
     }
 
@@ -197,8 +169,7 @@
      * @return The number of bytes needed to kickstart the streaming connections
      * for the user agent.
      */
-    public int getKickstartBytes()
-    {
+    public int getKickstartBytes() {
         return kickstartBytes;
     }
 
@@ -207,10 +178,9 @@
      * for the user agent.
      *
      * @param kickstartBytes The number of bytes needed to kickstart the streaming
-     * connections for the user agent.
+     *                       connections for the user agent.
      */
-    public void setKickstartBytes(int kickstartBytes)
-    {
+    public void setKickstartBytes(int kickstartBytes) {
         if (kickstartBytes < 0)
             kickstartBytes = 0;
         this.kickstartBytes = kickstartBytes;
@@ -219,16 +189,14 @@
     /**
      * @deprecated Use {@link UserAgentSettings#getMaxPersistentConnectionsPerSession()} instead.
      */
-    public int getMaxStreamingConnectionsPerSession()
-    {
+    public int getMaxStreamingConnectionsPerSession() {
         return getMaxPersistentConnectionsPerSession();
     }
 
     /**
      * @deprecated Use {@link UserAgentSettings#setMaxPersistentConnectionsPerSession(int)} instead.
      */
-    public void setMaxStreamingConnectionsPerSession(int maxStreamingConnectionsPerSession)
-    {
+    public void setMaxStreamingConnectionsPerSession(int maxStreamingConnectionsPerSession) {
         setMaxPersistentConnectionsPerSession(maxStreamingConnectionsPerSession);
     }
 
@@ -238,8 +206,7 @@
      *
      * @return The number of streaming connections per session the user agent supports.
      */
-    public int getMaxPersistentConnectionsPerSession()
-    {
+    public int getMaxPersistentConnectionsPerSession() {
         return maxPersistentConnectionsPerSession;
     }
 
@@ -248,10 +215,9 @@
      * the user agent supports.
      *
      * @param maxStreamingConnectionsPerSession The number of simultaneous
-     * streaming connections per session the user agent supports.
+     *                                          streaming connections per session the user agent supports.
      */
-    public void setMaxPersistentConnectionsPerSession(int maxStreamingConnectionsPerSession)
-    {
+    public void setMaxPersistentConnectionsPerSession(int maxStreamingConnectionsPerSession) {
         this.maxPersistentConnectionsPerSession = maxStreamingConnectionsPerSession;
     }
 
diff --git a/core/src/main/java/flex/messaging/cluster/BroadcastHandler.java b/core/src/main/java/flex/messaging/cluster/BroadcastHandler.java
index f036622..62273f7 100644
--- a/core/src/main/java/flex/messaging/cluster/BroadcastHandler.java
+++ b/core/src/main/java/flex/messaging/cluster/BroadcastHandler.java
@@ -19,14 +19,12 @@
 import java.util.List;
 
 /**
- *
  * This interface represents a handler for a message broadcast by a Cluster.
  * Clusters broadcast messages across their physical nodes, and when they
  * receive those messages they locate a BroadcastHandler capable of handling
  * the broadcast.
  */
-public interface BroadcastHandler
-{
+public interface BroadcastHandler {
     /**
      * Handle the broadcast message.
      *
@@ -38,8 +36,8 @@
     /**
      * Determine whether this Handler supports a particular operation by name.
      *
-     * @return whether or not this handler supports the named operation
      * @param name name of the operation
+     * @return whether or not this handler supports the named operation
      */
     boolean isSupportedOperation(String name);
 }
diff --git a/core/src/main/java/flex/messaging/cluster/Cluster.java b/core/src/main/java/flex/messaging/cluster/Cluster.java
index 0339c55..35a312b 100644
--- a/core/src/main/java/flex/messaging/cluster/Cluster.java
+++ b/core/src/main/java/flex/messaging/cluster/Cluster.java
@@ -26,11 +26,9 @@
 import flex.messaging.log.LogCategories;
 
 /**
- *
  * Base interface for cluster implementations.
  */
-public abstract class Cluster
-{
+public abstract class Cluster {
     /**
      * Default log category for clustering.
      */
@@ -61,12 +59,11 @@
      * are identified by a unique name composed in the format
      * "serviceType:destinationId".
      *
-     * @return The unique name for the clustered destination.
-     * @param serviceType The name of the service for this destination.
+     * @param serviceType     The name of the service for this destination.
      * @param destinationName The original name of the destination.
+     * @return The unique name for the clustered destination.
      */
-    static String getClusterDestinationKey(String serviceType, String destinationName)
-    {
+    static String getClusterDestinationKey(String serviceType, String destinationName) {
         StringBuffer sb = new StringBuffer();
         sb.append(serviceType);
         sb.append(':');
@@ -79,8 +76,7 @@
      *
      * @param listener the RemoveNodeListener to add
      */
-    public void addRemoveNodeListener(RemoveNodeListener listener)
-    {
+    public void addRemoveNodeListener(RemoveNodeListener listener) {
         removeNodeListeners.add(listener);
     }
 
@@ -90,44 +86,39 @@
      *
      * @param address The node that was removed from the cluster.
      */
-    protected void sendRemoveNodeListener(Object address)
-    {
-        synchronized (removeNodeListeners)
-        {
+    protected void sendRemoveNodeListener(Object address) {
+        synchronized (removeNodeListeners) {
             for (int i = 0; i < removeNodeListeners.size(); i++)
-                ((RemoveNodeListener)removeNodeListeners.get(i)).removeClusterNode(address);
+                ((RemoveNodeListener) removeNodeListeners.get(i)).removeClusterNode(address);
         }
     }
 
     /**
      * Initializes the Cluster with id and the map of properties. The default
      * implementation is no-op.
-     * 
-     * @param id The cluster id.
+     *
+     * @param id         The cluster id.
      * @param properties The map of properties.
      */
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         // No-op.
     }
 
     /**
      * Returns the cluster properties file.
-     * 
+     *
      * @return The cluster properties file.
      */
-    public Element clusterPropertiesFile()
-    {
+    public Element clusterPropertiesFile() {
         return clusterPropertiesFile;
     }
 
     /**
      * Sets the cluster properties file.
-     * 
+     *
      * @param value The cluster properties file.
      */
-    public void setClusterPropertiesFile(Element value)
-    {
+    public void setClusterPropertiesFile(Element value) {
         this.clusterPropertiesFile = value;
     }
 
@@ -137,8 +128,7 @@
      *
      * @return Returns true if this is the default cluster.
      */
-    public boolean isDefault()
-    {
+    public boolean isDefault() {
         return def;
     }
 
@@ -148,8 +138,7 @@
      *
      * @param d true if this is the default cluster
      */
-    public void setDefault(boolean d)
-    {
+    public void setDefault(boolean d) {
         this.def = d;
     }
 
@@ -158,8 +147,7 @@
      *
      * @return true if this cluster enabled for load balancing.
      */
-    public boolean getURLLoadBalancing()
-    {
+    public boolean getURLLoadBalancing() {
         return urlLoadBalancing;
     }
 
@@ -168,8 +156,7 @@
      *
      * @param u the flag to enable the URL load balancing
      */
-    public void setURLLoadBalancing(boolean u)
-    {
+    public void setURLLoadBalancing(boolean u) {
         urlLoadBalancing = u;
     }
 
@@ -184,21 +171,24 @@
      * There is exactly one endpoint URL for each
      * channel id. This List represents all of the known endpoint URLs
      * for all of the channels in the Cluster.
-     * @param serviceType the service type 
-     * @param destName the destination name
+     *
+     * @param serviceType the service type
+     * @param destName    the destination name
      * @return List of maps of channel ids to endpoint URLs for each node in
-     *         the cluster.
+     * the cluster.
      */
     public abstract List getAllEndpoints(String serviceType, String destName);
 
     /**
      * Returns a list of all of the nodes of this cluster.
+     *
      * @return List a list of member IP addresses in the cluster
      */
     public abstract List getMemberAddresses();
 
     /**
      * Returns the local cluster node.
+     *
      * @return Object the Local Address object
      */
     public abstract Object getLocalAddress();
@@ -209,7 +199,7 @@
      * so that they may perform the same processing.
      *
      * @param serviceOperation The operation to broadcast.
-     * @param params Parameters for the operation.
+     * @param params           Parameters for the operation.
      */
     public abstract void broadcastServiceOperation(String serviceOperation, Object[] params);
 
@@ -219,8 +209,8 @@
      * node among the cluster members that does not have the local node's address.
      *
      * @param serviceOperation The operation to send.
-     * @param params Parameters for the operation.
-     * @param targetAddress the target address of a remote node in the cluster
+     * @param params           Parameters for the operation.
+     * @param targetAddress    the target address of a remote node in the cluster
      */
     public abstract void sendPointToPointServiceOperation(String serviceOperation, Object[] params, Object targetAddress);
 
@@ -228,12 +218,12 @@
      * Add a local endpoint URL for a local channel. After doing so, broadcast the information to
      * peers so that they will be aware of the URL.
      *
-     * @param serviceType the service type of the endpoint
-     * @param destName the destination name
-     * @param channelId the Channel ID
-     * @param endpointUrl the endpoint URL
+     * @param serviceType  the service type of the endpoint
+     * @param destName     the destination name
+     * @param channelId    the Channel ID
+     * @param endpointUrl  the endpoint URL
      * @param endpointPort the endpoint port
      */
     public abstract void addLocalEndpointForChannel(String serviceType, String destName,
-                                             String channelId, String endpointUrl, int endpointPort);
+                                                    String channelId, String endpointUrl, int endpointPort);
 }
diff --git a/core/src/main/java/flex/messaging/cluster/ClusterException.java b/core/src/main/java/flex/messaging/cluster/ClusterException.java
index c0dc41d..0099fda 100644
--- a/core/src/main/java/flex/messaging/cluster/ClusterException.java
+++ b/core/src/main/java/flex/messaging/cluster/ClusterException.java
@@ -19,11 +19,9 @@
 import flex.messaging.MessageException;
 
 /**
- *
  * Exception type for cluster errors.
  */
-public class ClusterException extends MessageException
-{
+public class ClusterException extends MessageException {
     /**
      * Serializable version uid.
      */
diff --git a/core/src/main/java/flex/messaging/cluster/ClusterManager.java b/core/src/main/java/flex/messaging/cluster/ClusterManager.java
index 07ef180..9b1cdef 100644
--- a/core/src/main/java/flex/messaging/cluster/ClusterManager.java
+++ b/core/src/main/java/flex/messaging/cluster/ClusterManager.java
@@ -31,6 +31,7 @@
 
 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
+
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -42,12 +43,10 @@
 import flex.messaging.util.ClassUtil;
 
 /**
- *
  * The manager of all clusters defined in services-config.xml, and the broker
  * for the clusters created for clustered destinations.
  */
-public class ClusterManager
-{
+public class ClusterManager {
     /**
      * Supported operations.
      */
@@ -74,7 +73,7 @@
      * A mapping between the cluster ids and the Cluster instances.
      * name=clusterId value=clusterInstance
      */
-    private LinkedHashMap<String,Cluster> clusters;
+    private LinkedHashMap<String, Cluster> clusters;
 
     /**
      * A mapping between destinations and the Cluster instances.
@@ -91,7 +90,7 @@
      * A mapping between cluster ids and ClusterSettings instances.
      * name=clusterId value=ClusterSettings
      */
-    private Map<String, ClusterSettings> clusterSettings;    
+    private Map<String, ClusterSettings> clusterSettings;
 
     /**
      * A mapped between destinations and a boolean representing
@@ -115,15 +114,15 @@
      * for the clusters created for clustered destinations.  This class provides
      * an entry point and abstraction to the logical cluster implementation as
      * well as the specific cluster implementation.
+     *
      * @param broker the message broker which uses the cluster manager
      */
-    public ClusterManager(MessageBroker broker)
-    {
+    public ClusterManager(MessageBroker broker) {
         this.broker = broker;
-        clusters = new LinkedHashMap<String,Cluster>();
+        clusters = new LinkedHashMap<String, Cluster>();
         clusterConfig = new HashMap<String, Element>();
         clusterSettings = new HashMap<String, ClusterSettings>();
-        clustersForDestination = new HashMap<String,Cluster>();
+        clustersForDestination = new HashMap<String, Cluster>();
         backendSharedForDestination = new HashMap<String, Boolean>();
     }
 
@@ -132,27 +131,26 @@
      *
      * @return The defined MessageBroker.
      */
-    public MessageBroker getMessageBroker()
-    {
+    public MessageBroker getMessageBroker() {
         return broker;
     }
 
     /**
      * The default cluster when the cluster id for the destination
      * is unspecified.
+     *
      * @return Cluster the default Cluster to use
      */
-    public Cluster getDefaultCluster()
-    {
+    public Cluster getDefaultCluster() {
         return defaultCluster;
     }
 
     /**
      * The id of the default cluster.
+     *
      * @return String the default cluster ID
      */
-    public String getDefaultClusterId()
-    {
+    public String getDefaultClusterId() {
         return defaultClusterId;
     }
 
@@ -163,12 +161,11 @@
      * If no default cluster is defined the operation is broadcast over all defined clusters.
      * </p>
      *
-     * @param endpointId The id of the remote endpoint across the cluster to invoke an operation on.
+     * @param endpointId    The id of the remote endpoint across the cluster to invoke an operation on.
      * @param operationName The name of the operation to invoke.
-     * @param params The arguments to use for operation invocation.
+     * @param params        The arguments to use for operation invocation.
      */
-    public void invokeEndpointOperation(String endpointId, String operationName, Object[] params)
-    {
+    public void invokeEndpointOperation(String endpointId, String operationName, Object[] params) {
         Object[] arguments = new Object[2 + params.length];
         arguments[0] = endpointId;
         arguments[1] = operationName;
@@ -176,12 +173,9 @@
         for (int i = 2, j = 0; j < n; ++i, ++j)
             arguments[i] = params[j];
 
-        if (defaultCluster != null)
-        {
+        if (defaultCluster != null) {
             defaultCluster.broadcastServiceOperation(operationName, arguments);
-        }
-        else
-        {
+        } else {
             for (Cluster cluster : clusters.values())
                 cluster.broadcastServiceOperation(operationName, arguments);
         }
@@ -194,13 +188,12 @@
      * If no default cluster is defined the operation is broadcast over all defined clusters.
      * </p>
      *
-     * @param endpointId The id of the remote endpoint across the cluster to invoke an operation on.
+     * @param endpointId    The id of the remote endpoint across the cluster to invoke an operation on.
      * @param operationName The name of the operation to invoke.
-     * @param params The arguments to use for operation invocation.
+     * @param params        The arguments to use for operation invocation.
      * @param targetAddress The peer node that the operation should be invoked on.
      */
-    public void invokePeerToPeerEndpointOperation(String endpointId, String operationName, Object[] params, Object targetAddress)
-    {
+    public void invokePeerToPeerEndpointOperation(String endpointId, String operationName, Object[] params, Object targetAddress) {
         Object[] arguments = new Object[2 + params.length];
         arguments[0] = endpointId;
         arguments[1] = operationName;
@@ -208,14 +201,10 @@
         for (int i = 2, j = 0; j < n; ++i, ++j)
             arguments[i] = params[j];
 
-        if (defaultCluster != null)
-        {
+        if (defaultCluster != null) {
             defaultCluster.sendPointToPointServiceOperation(operationName, arguments, targetAddress);
-        }
-        else
-        {
-            for (Cluster cluster : clusters.values())
-            {
+        } else {
+            for (Cluster cluster : clusters.values()) {
                 cluster.sendPointToPointServiceOperation(operationName, arguments, targetAddress);
             }
         }
@@ -227,15 +216,14 @@
      * so that they may perform the same processing. Invoke the service operation for the cluster, identified by
      * serviceType and destinationName.
      *
-     * @param serviceType The name for the service for this destination.
+     * @param serviceType     The name for the service for this destination.
      * @param destinationName The name of the destination.
-     * @param operationName The name of the service operation to invoke.
-     * @param params Parameters needed for the service operation.
+     * @param operationName   The name of the service operation to invoke.
+     * @param params          Parameters needed for the service operation.
      */
     public void invokeServiceOperation(String serviceType, String destinationName,
-                                       String operationName, Object[] params)
-    {
-        Cluster c = getCluster(serviceType,destinationName);
+                                       String operationName, Object[] params) {
+        Cluster c = getCluster(serviceType, destinationName);
         ArrayList newParams = new ArrayList(Arrays.asList(params));
         newParams.add(0, serviceType);
         newParams.add(1, destinationName);
@@ -247,16 +235,15 @@
      * This is similar to the invokeServiceOperation except that this invocation is sent to the node,
      * identified by targetAddress.
      *
-     * @param serviceType The name for the service for this destination.
+     * @param serviceType     The name for the service for this destination.
      * @param destinationName The name of the destination.
-     * @param operationName The name of the service operation to invoke.
-     * @param params Parameters needed for the service operation.
-     * @param targetAddress The node that the operation should be passed to.
+     * @param operationName   The name of the service operation to invoke.
+     * @param params          Parameters needed for the service operation.
+     * @param targetAddress   The node that the operation should be passed to.
      */
     public void invokePeerToPeerOperation(String serviceType, String destinationName,
-                                          String operationName, Object[] params, Object targetAddress)
-    {
-        Cluster c = getCluster(serviceType,destinationName);
+                                          String operationName, Object[] params, Object targetAddress) {
+        Cluster c = getCluster(serviceType, destinationName);
         ArrayList newParams = new ArrayList(Arrays.asList(params));
         newParams.add(0, serviceType);
         newParams.add(1, destinationName);
@@ -266,40 +253,37 @@
     /**
      * Determines whether the given destination is clustered.
      *
-     * @param serviceType The name for the service for this destination.
+     * @param serviceType     The name for the service for this destination.
      * @param destinationName The name of the destination.
      * @return Whether the destination is a clustered destination.
      */
-    public boolean isDestinationClustered(String serviceType, String destinationName)
-    {
+    public boolean isDestinationClustered(String serviceType, String destinationName) {
         return getCluster(serviceType, destinationName) != null;
     }
 
     /**
      * Checks whether the give destination is configured for a shared backend.
      *
-     * @param serviceType The name of the service for this destination.
+     * @param serviceType     The name of the service for this destination.
      * @param destinationName The name of the destination.
      * @return Whether the destination is configured for shared backend.
      */
-    public boolean isBackendShared(String serviceType, String destinationName)
-    {
+    public boolean isBackendShared(String serviceType, String destinationName) {
         String destKey = Cluster.getClusterDestinationKey(serviceType, destinationName);
         Boolean shared = backendSharedForDestination.get(destKey);
-        return shared != null? shared.booleanValue() : false;
+        return shared != null ? shared.booleanValue() : false;
     }
 
     /**
      * Retrieves a list of cluster nodes for the given cluster.
      *
-     * @param serviceType The name of the service for the clustered destination.
+     * @param serviceType     The name of the service for the clustered destination.
      * @param destinationName The name of the destination.
      * @return List of cluster nodes for the given cluster.
      */
-    public List getClusterMemberAddresses(String serviceType, String destinationName)
-    {
-        Cluster c= getCluster(serviceType, destinationName);
-        return c != null? c.getMemberAddresses() :  Collections.EMPTY_LIST;
+    public List getClusterMemberAddresses(String serviceType, String destinationName) {
+        Cluster c = getCluster(serviceType, destinationName);
+        return c != null ? c.getMemberAddresses() : Collections.EMPTY_LIST;
     }
 
     /**
@@ -309,8 +293,7 @@
      *
      * @return The list of cluster nodes that endpoint operation invocations can be issued against.
      */
-    public List getClusterMemberAddresses()
-    {
+    public List getClusterMemberAddresses() {
         if (defaultCluster != null)
             return defaultCluster.getMemberAddresses();
 
@@ -328,22 +311,20 @@
      *
      * @param settings The cluster settings for a specific cluster.
      */
-    public void prepareCluster(ClusterSettings settings)
-    {
+    public void prepareCluster(ClusterSettings settings) {
         String propsFileName = settings.getPropsFileName();
 
         checkForNullPropertiesFile(settings.getClusterName(), propsFileName);
 
         InputStream propsFile = resolveInternalPath(propsFileName);
 
-        if( propsFile == null )
+        if (propsFile == null)
             propsFile = resolveExternalPath(propsFileName);
 
         if (propsFile == null)
-            throwClusterException(10208, new Object[] {propsFileName}, null);
+            throwClusterException(10208, new Object[]{propsFileName}, null);
 
-        try
-        {
+        try {
             DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
             factory.setNamespaceAware(false);
             factory.setValidating(false);
@@ -353,24 +334,21 @@
                 defaultClusterId = settings.getClusterName();
             clusterConfig.put(settings.getClusterName(), doc.getDocumentElement());
             clusterSettings.put(settings.getClusterName(), settings);
-        }
-        catch (Exception ex)
-        {
-            throwClusterException(10213, new Object[] {propsFileName}, ex);
+        } catch (Exception ex) {
+            throwClusterException(10213, new Object[]{propsFileName}, ex);
         }
     }
 
     /**
      * Retrieve the local address for the specified clustered destination.
      *
-     * @param serviceType The service type of the clustered destination.
+     * @param serviceType     The service type of the clustered destination.
      * @param destinationName The name of the clustered destination.
      * @return The local address of the clustered destination.
      */
-    public Object getLocalAddress(String serviceType, String destinationName)
-    {
+    public Object getLocalAddress(String serviceType, String destinationName) {
         Cluster c = getCluster(serviceType, destinationName);
-        return c != null? c.getLocalAddress() : null;
+        return c != null ? c.getLocalAddress() : null;
     }
 
     /**
@@ -378,15 +356,14 @@
      * return the local address derived from the first cluster of any defined.
      *
      * @return The local address for this cluster node, or <code>null</code> if this node
-     *         is not a member of any cluster.
+     * is not a member of any cluster.
      */
-    public Object getLocalAddress()
-    {
+    public Object getLocalAddress() {
         if (defaultCluster != null)
             return defaultCluster.getLocalAddress();
 
         // Else, use first defined cluster.
-        for (Entry<String,Cluster> entry : clusters.entrySet())
+        for (Entry<String, Cluster> entry : clusters.entrySet())
             return entry.getValue().getLocalAddress();
 
         return null; // No cluster defined.
@@ -398,34 +375,29 @@
      * @param clusterId the cluster ID
      * @return The cluster identified by the given id.
      */
-    public Cluster getClusterById(String clusterId)
-    {
+    public Cluster getClusterById(String clusterId) {
         return clusters.get(clusterId);
     }
 
     /**
      * Find the cluster identified by the service type and destination name.
      *
-     * @param serviceType The service type of the clustered destination.
+     * @param serviceType     The service type of the clustered destination.
      * @param destinationName The name of the clustered destination.
      * @return The cluster identified by the serviec type and destination naem.
      */
-    public Cluster getCluster(String serviceType, String destinationName)
-    {
+    public Cluster getCluster(String serviceType, String destinationName) {
         Cluster cluster = null;
-        try
-        {
+        try {
             String destKey = Cluster.getClusterDestinationKey(serviceType, destinationName);
 
             cluster = clustersForDestination.get(destKey);
 
             if (cluster == null)
                 cluster = defaultCluster;
-        }
-        catch (NoClassDefFoundError nex)
-        {
+        } catch (NoClassDefFoundError nex) {
             ClusterException cx = new ClusterException();
-            cx.setMessage(10202, new Object[] { destinationName });
+            cx.setMessage(10202, new Object[]{destinationName});
             cx.setRootCause(nex);
             throw cx;
         }
@@ -435,10 +407,8 @@
     /**
      * Call destroy on each of the managed clusters.
      */
-    public void destroyClusters()
-    {
-        for (Iterator<Cluster> iter=clusters.values().iterator(); iter.hasNext(); )
-        {
+    public void destroyClusters() {
+        for (Iterator<Cluster> iter = clusters.values().iterator(); iter.hasNext(); ) {
             Cluster cluster = iter.next();
             cluster.destroy();
             iter.remove();
@@ -450,38 +420,33 @@
      * is not currently defined, create the cluster.  Also, setup the load balancing urls and shared
      * backend information for this clustered destination and endpoint.
      *
-     * @param clusterId The cluster id that this destination wants to be associated with.
-     * @param serviceType The service type for the clustered destination.
+     * @param clusterId       The cluster id that this destination wants to be associated with.
+     * @param serviceType     The service type for the clustered destination.
      * @param destinationName The name of the clustered destination.
-     * @param channelId The channel id that should be added to the cluster load balancing.
-     * @param endpointUrl The endpoint url that should be added to the cluster load balancing.
-     * @param endpointPort The endpoint port that should be added to the cluster load balancing.
-     * @param sharedBackend Whether the destination has shared backend set to true or not.
+     * @param channelId       The channel id that should be added to the cluster load balancing.
+     * @param endpointUrl     The endpoint url that should be added to the cluster load balancing.
+     * @param endpointPort    The endpoint port that should be added to the cluster load balancing.
+     * @param sharedBackend   Whether the destination has shared backend set to true or not.
      */
     public void clusterDestinationChannel(String clusterId, String serviceType, String destinationName,
-                                          String channelId, String endpointUrl, int endpointPort, boolean sharedBackend)
-    {
+                                          String channelId, String endpointUrl, int endpointPort, boolean sharedBackend) {
         Cluster cluster = getClusterById(clusterId);
         String destKey = Cluster.getClusterDestinationKey(serviceType, destinationName);
-        if (cluster == null)
-        {
-            if (!clusterConfig.containsKey(clusterId))
-            {
+        if (cluster == null) {
+            if (!clusterConfig.containsKey(clusterId)) {
                 ClusterException cx = new ClusterException();
-                cx.setMessage(10207, new Object[] { destinationName, clusterId });
+                cx.setMessage(10207, new Object[]{destinationName, clusterId});
                 throw cx;
             }
             cluster = createCluster(clusterId, serviceType, destinationName);
-        }
-        else
-        {
+        } else {
             clustersForDestination.put(destKey, cluster);
         }
         backendSharedForDestination.put(destKey, sharedBackend ? Boolean.TRUE : Boolean.FALSE);
 
         if (cluster.getURLLoadBalancing())
             cluster.addLocalEndpointForChannel(serviceType, destinationName,
-                                               channelId, endpointUrl, endpointPort);
+                    channelId, endpointUrl, endpointPort);
     }
 
     /**
@@ -490,22 +455,19 @@
      *
      * @param destination The destination to be clustered.
      */
-    public void clusterDestination(Destination destination)
-    {
+    public void clusterDestination(Destination destination) {
         String clusterId = destination.getNetworkSettings().getClusterId();
         if (clusterId == null)
             clusterId = getDefaultClusterId();
 
         ClusterSettings cls = clusterSettings.get(clusterId);
-        if (cls == null)
-        {
+        if (cls == null) {
             ClusterException ce = new ClusterException();
-            ce.setMessage(10217, new Object[] {destination.getId(), clusterId});
+            ce.setMessage(10217, new Object[]{destination.getId(), clusterId});
             throw ce;
         }
 
-        for (String channelId : destination.getChannels())
-        {
+        for (String channelId : destination.getChannels()) {
             Endpoint endpoint = broker.getEndpoint(channelId);
             String endpointUrl = endpoint.getUrl();
             int endpointPort = endpoint.getPort();
@@ -514,12 +476,10 @@
             // there is a HW load balancer, then we can assume the server.name served up by the
             // SWF can be used to access the cluster members.  With client side load balancing,
             // the clients need the direct URLs of all of the servers.
-            if (cls.getURLLoadBalancing())
-            {
+            if (cls.getURLLoadBalancing()) {
                 // Ensure that the endpoint URI does not contain any replacement tokens.
                 int tokenStart = endpointUrl.indexOf('{');
-                if (tokenStart != -1)
-                {
+                if (tokenStart != -1) {
                     int tokenEnd = endpointUrl.indexOf('}', tokenStart);
                     if (tokenEnd == -1)
                         tokenEnd = endpointUrl.length();
@@ -527,33 +487,32 @@
                         tokenEnd++;
 
                     ClusterException ce = new ClusterException();
-                    ce.setMessage(10209, new Object[] {destination.getId(), channelId, endpointUrl.substring(tokenStart, tokenEnd)});
+                    ce.setMessage(10209, new Object[]{destination.getId(), channelId, endpointUrl.substring(tokenStart, tokenEnd)});
                     throw ce;
                 }
             }
 
-            clusterDestinationChannel(clusterId, destination.getServiceType(), 
+            clusterDestinationChannel(clusterId, destination.getServiceType(),
                     destination.getId(), channelId, endpointUrl, endpointPort, destination.getNetworkSettings().isSharedBackend());
-      }
+        }
     }
 
     /**
      * Get a list of endpoints for the destination.
-     * @param serviceType the service type
+     *
+     * @param serviceType     the service type
      * @param destinationName destination name
      * @return List the list endpoints that the destination can use
      */
-    public List getEndpointsForDestination(String serviceType, String destinationName)
-    {
+    public List getEndpointsForDestination(String serviceType, String destinationName) {
         Cluster c = getCluster(serviceType, destinationName);
-        return c != null? c.getAllEndpoints(serviceType, destinationName) : null;
+        return c != null ? c.getAllEndpoints(serviceType, destinationName) : null;
     }
 
 
-    private void checkForNullPropertiesFile(String clusterName, String propsFileName)
-    {
+    private void checkForNullPropertiesFile(String clusterName, String propsFileName) {
         if (propsFileName == null)
-            throwClusterException(10201, new Object[] {clusterName, propsFileName}, null);
+            throwClusterException(10201, new Object[]{clusterName, propsFileName}, null);
     }
 
     /**
@@ -563,39 +522,32 @@
      * name.  The cluster id is unique across all clusters managed by this cluster
      * manager.  The cluster may be associated with more than one cluster destination.
      *
-     * @param clusterId The cluster id.
-     * @param serviceType The service type of the clustered destination.
+     * @param clusterId       The cluster id.
+     * @param serviceType     The service type of the clustered destination.
      * @param destinationName The destination name for the clustered destination.
      * @return The new cluster.
      */
-    private Cluster createCluster(String clusterId, String serviceType, String destinationName)
-    {
+    private Cluster createCluster(String clusterId, String serviceType, String destinationName) {
         String destKey = Cluster.getClusterDestinationKey(serviceType, destinationName);
         Element propsFile = clusterConfig.get(clusterId);
         ClusterSettings cls = clusterSettings.get(clusterId);
         Cluster cluster = null;
         Class clusterClass = ClassUtil.createClass(cls.getImplementationClass());
         Constructor clusterConstructor = null;
-        try
-        {
+        try {
             clusterConstructor = clusterClass.getConstructor(ClusterManager.class);
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             ClusterException cx = new ClusterException();
             cx.setMessage(10210);
             cx.setRootCause(e);
             throw cx;
         }
-        try
-        {
-            cluster = (Cluster)clusterConstructor.newInstance(this);
+        try {
+            cluster = (Cluster) clusterConstructor.newInstance(this);
             cluster.setClusterPropertiesFile(propsFile);
             cluster.setURLLoadBalancing(cls.getURLLoadBalancing());
             cluster.initialize(clusterId, cls.getProperties());
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             ClusterException cx = new ClusterException();
             cx.setMessage(10211);
             cx.setRootCause(e);
@@ -610,62 +562,50 @@
         return cluster;
     }
 
-    private InputStream resolveExternalPath(String propsFileName)
-    {
-        try
-        {
+    private InputStream resolveExternalPath(String propsFileName) {
+        try {
             return broker.resolveExternalPath(propsFileName);
-        }
-        catch (Throwable t)
-        {
-            throwClusterException(10208, new Object[] {propsFileName}, t);
+        } catch (Throwable t) {
+            throwClusterException(10208, new Object[]{propsFileName}, t);
         }
         return null;
     }
 
-    private InputStream resolveInternalPath(String propsFileName)
-    {
-        try
-        {
-           return broker.resolveInternalPath(propsFileName);
-        }
-        catch (Throwable t)
-        {
-            throwClusterException(10208, new Object[] {propsFileName}, t);
+    private InputStream resolveInternalPath(String propsFileName) {
+        try {
+            return broker.resolveInternalPath(propsFileName);
+        } catch (Throwable t) {
+            throwClusterException(10208, new Object[]{propsFileName}, t);
         }
         return null;
     }
 
-    private void throwClusterException(int number, Object[] args, Throwable t)
-    {
+    private void throwClusterException(int number, Object[] args, Throwable t) {
         ClusterException cx = new ClusterException();
         cx.setMessage(number, args);
         if (t != null)
             cx.setRootCause(t);
         throw cx;
     }
-    
+
     /**
      * Return a {@link ConfigMap} describing the clusters that have been added to the cluster manager
-     * 
+     *
      * @return a ConfigMap of the clusters
      */
-    public ConfigMap describeClusters()
-    {
+    public ConfigMap describeClusters() {
         ConfigMap result = new ConfigMap();
-        for (Entry<String, Cluster> entry: clusters.entrySet())
-        {
+        for (Entry<String, Cluster> entry : clusters.entrySet()) {
             Cluster cluster = entry.getValue();
             ConfigMap clusterMap = new ConfigMap();
             clusterMap.put("id", entry.getKey());
             ClusterSettings settings = clusterSettings.get(entry.getKey());
             clusterMap.put("properties", settings.getPropsFileName());
-            if (settings.isDefault())
-            {
+            if (settings.isDefault()) {
                 clusterMap.put("default", "true");
             }
             clusterMap.put("class", cluster.getClass().getCanonicalName());
-            
+
             result.addProperty("cluster", clusterMap);
         }
         return result;
diff --git a/core/src/main/java/flex/messaging/cluster/ClusterMembershipListener.java b/core/src/main/java/flex/messaging/cluster/ClusterMembershipListener.java
index 302163e..2c90dc7 100644
--- a/core/src/main/java/flex/messaging/cluster/ClusterMembershipListener.java
+++ b/core/src/main/java/flex/messaging/cluster/ClusterMembershipListener.java
@@ -25,17 +25,15 @@
 import org.jgroups.View;
 
 /**
- *
  * Clusters employ this Listener in order to respond to nodes which
  * join and abandon it. This class bridges the low-level protocol layer
  * to the more abstract logical cluster.
  */
-class ClusterMembershipListener implements MembershipListener
-{
+class ClusterMembershipListener implements MembershipListener {
     /**
      * The cluster implementation that owns this listener.
      */
-   // TODO: The missing class JGroupsCluster seems to extend Cluster, but is missing from the repository.
+    // TODO: The missing class JGroupsCluster seems to extend Cluster, but is missing from the repository.
 //    private JGroupsCluster cluster;
 
     /**
@@ -53,8 +51,7 @@
      *
      * @param cluster The logical cluster implementation.
      */
-    public ClusterMembershipListener(Cluster cluster)
-    {
+    public ClusterMembershipListener(Cluster cluster) {
 //        this.cluster = (JGroupsCluster)cluster;
         this.members = new ArrayList<Address>();
         this.zombies = new ArrayList<Address>();
@@ -66,11 +63,9 @@
      *
      * @param membershipView Snapshot of members of the cluster.
      */
-    public void viewAccepted(View membershipView)
-    {
-        synchronized(this)
-        {
-            Vector<Address> currentMemberList = membershipView.getMembers();
+    public void viewAccepted(View membershipView) {
+        synchronized (this) {
+            List<Address> currentMemberList = membershipView.getMembers();
             handleArrivingMembers(currentMemberList);
             handleDepartedMembers(membershipView, currentMemberList);
         }
@@ -85,10 +80,8 @@
      *
      * @param zombieAddress The address of the suspect node.
      */
-    public void suspect(Address zombieAddress)
-    {
-        synchronized(this)
-        {
+    public void suspect(Address zombieAddress) {
+        synchronized (this) {
             zombies.add(zombieAddress);
         }
     }
@@ -97,8 +90,7 @@
      * This method from the core MembershipListener is a no-op for
      * the Flex destination Cluster.
      */
-    public void block()
-    {
+    public void block() {
         // No-op.
     }
 
@@ -109,17 +101,13 @@
      * @param address The node to check.
      * @return True, if the given address is a zombie.
      */
-    public boolean isZombie(Address address)
-    {
+    public boolean isZombie(Address address) {
         return zombies.contains(address);
     }
 
-    private void handleDepartedMembers(View membershipView, Vector<Address> currentMemberList)
-    {
-        for (Address member : members)
-        {
-            if (!membershipView.containsMember(member))
-            {
+    private void handleDepartedMembers(View membershipView, List<Address> currentMemberList) {
+        for (Address member : members) {
+            if (!membershipView.containsMember(member)) {
 //                cluster.removeClusterNode(member);
                 zombies.remove(member);
             }
@@ -127,10 +115,8 @@
         members = currentMemberList;
     }
 
-    private void handleArrivingMembers(Vector<Address> currentMemberList)
-    {
-        for (Address member : currentMemberList) 
-        {
+    private void handleArrivingMembers(List<Address> currentMemberList) {
+        for (Address member : currentMemberList) {
 /*            if (!cluster.getLocalAddress().equals(member) && !members.contains(member))
                 cluster.addClusterNode(member);*/
         }
diff --git a/core/src/main/java/flex/messaging/cluster/ClusterNode.java b/core/src/main/java/flex/messaging/cluster/ClusterNode.java
index 6a0b64c..827926b 100644
--- a/core/src/main/java/flex/messaging/cluster/ClusterNode.java
+++ b/core/src/main/java/flex/messaging/cluster/ClusterNode.java
@@ -21,16 +21,14 @@
 import java.util.Map;
 
 /**
- *
  * ClusterNode is an encapsulation for pairing a physical host and a logical
  * software group, which is in effect a mapping between a physical address used
  * by the cluster infrastructure and a service destination used by the message
  * infrastructure.
- *
+ * <p>
  * This class is specific to the <code>JGroupsCluster</code> implementation.
  */
-public class ClusterNode
-{
+public class ClusterNode {
     /**
      * The name of the host for this cluster node.
      */
@@ -42,15 +40,14 @@
      * key = destination key (String)
      * value = Map of channel-id to endpoint-url mappings.
      */
-    private final Map<String,Map<String,String>> destKeyToChannelMap;
+    private final Map<String, Map<String, String>> destKeyToChannelMap;
 
     /**
      * Constructor.
      */
-    ClusterNode(String host)
-    {
+    ClusterNode(String host) {
         this.host = host;
-        destKeyToChannelMap = new HashMap<String,Map<String,String>>();
+        destKeyToChannelMap = new HashMap<String, Map<String, String>>();
     }
 
     /**
@@ -58,8 +55,7 @@
      *
      * @return The name of the host.
      */
-    String getHost()
-    {
+    String getHost() {
         return host;
     }
 
@@ -68,10 +64,9 @@
      * endpoint mappings.
      *
      * @return Map of clustered destination to clustered
-    *  endpoint mappings.
+     * endpoint mappings.
      */
-    Map<String,Map<String,String>> getDestKeyToChannelMap()
-    {
+    Map<String, Map<String, String>> getDestKeyToChannelMap() {
         return destKeyToChannelMap;
     }
 
@@ -80,23 +75,20 @@
      * clustered destination. If there is not currently a
      * map for the destination, an empty mapping is created
      * and returned.
-     *
+     * <p>
      * The endpoint map is indexed by channel id.
      * The endpoint map contains endpoint urls.
      *
      * @param serviceType The service type of the clustered destination.
-     * @param destName The destination name of the clustered destination.
+     * @param destName    The destination name of the clustered destination.
      * @return Map of clustered endpoints.
      */
-    Map<String,String> getEndpoints(String serviceType, String destName)
-    {
+    Map<String, String> getEndpoints(String serviceType, String destName) {
         String destKey = serviceType + ":" + destName;
-        synchronized (destKeyToChannelMap)
-        {
-            Map<String,String> channelEndpoints = destKeyToChannelMap.get(destKey);
-            if (channelEndpoints == null)
-            {
-                channelEndpoints = new HashMap<String,String>();
+        synchronized (destKeyToChannelMap) {
+            Map<String, String> channelEndpoints = destKeyToChannelMap.get(destKey);
+            if (channelEndpoints == null) {
+                channelEndpoints = new HashMap<String, String>();
                 destKeyToChannelMap.put(destKey, channelEndpoints);
             }
             return channelEndpoints;
@@ -108,15 +100,13 @@
      * destination, identified by service type and destination name.
      *
      * @param serviceType The service type of the clustered destination.
-     * @param destName The destination name of the clustered destination.
-     * @param channelId The channel id to be added to the channel endpoint mapping.
+     * @param destName    The destination name of the clustered destination.
+     * @param channelId   The channel id to be added to the channel endpoint mapping.
      * @param endpointUrl The endpoint url to be added to the endpoint url mapping.
      */
-    void addEndpoint(String serviceType, String destName, String channelId, String endpointUrl)
-    {
-        synchronized (destKeyToChannelMap)
-        {
-            Map<String,String> channelEndpoints = getEndpoints(serviceType, destName);
+    void addEndpoint(String serviceType, String destName, String channelId, String endpointUrl) {
+        synchronized (destKeyToChannelMap) {
+            Map<String, String> channelEndpoints = getEndpoints(serviceType, destName);
             channelEndpoints.put(channelId, endpointUrl);
         }
     }
@@ -126,14 +116,13 @@
      * is included in the list of endpoints in the clustered destination.
      *
      * @param serviceType The service type of the clustered destination.
-     * @param destName The destination name of the clustered destination.
-     * @param channelId The channel id to find in the list of endpoints.
+     * @param destName    The destination name of the clustered destination.
+     * @param channelId   The channel id to find in the list of endpoints.
      * @param endpointUrl The endpoint url to find in the list of endpoints.
      * @return Whether the endpoint is included in the list for the clustered destination.
      */
-    boolean containsEndpoint(String serviceType, String destName, String channelId, String endpointUrl)
-    {
-        Map<String,String> channelEndpoints = getEndpoints(serviceType, destName);
+    boolean containsEndpoint(String serviceType, String destName, String channelId, String endpointUrl) {
+        Map<String, String> channelEndpoints = getEndpoints(serviceType, destName);
         return channelEndpoints.containsKey(channelId) && channelEndpoints.get(channelId).equals(endpointUrl);
     }
 
@@ -144,19 +133,15 @@
      *
      * @return Description of the clustered node.
      */
-    public String toString()
-    {
+    public String toString() {
         StringBuffer sb = new StringBuffer("ClusterNode[");
-        synchronized (destKeyToChannelMap)
-        {
-            for (Map.Entry<String,Map<String,String>> entry : destKeyToChannelMap.entrySet())
-            {
+        synchronized (destKeyToChannelMap) {
+            for (Map.Entry<String, Map<String, String>> entry : destKeyToChannelMap.entrySet()) {
                 sb.append(" channels for ");
                 sb.append(entry.getKey());
                 sb.append('(');
-                for (Iterator<Map.Entry<String,String>> iter = entry.getValue().entrySet().iterator(); iter.hasNext();)
-                {
-                    Map.Entry<String,String> channelMapEntry = iter.next();
+                for (Iterator<Map.Entry<String, String>> iter = entry.getValue().entrySet().iterator(); iter.hasNext(); ) {
+                    Map.Entry<String, String> channelMapEntry = iter.next();
                     sb.append(channelMapEntry.getKey());
                     sb.append('=');
                     sb.append(channelMapEntry.getValue());
diff --git a/core/src/main/java/flex/messaging/cluster/RemoveNodeListener.java b/core/src/main/java/flex/messaging/cluster/RemoveNodeListener.java
index 05583c3..711d7b1 100644
--- a/core/src/main/java/flex/messaging/cluster/RemoveNodeListener.java
+++ b/core/src/main/java/flex/messaging/cluster/RemoveNodeListener.java
@@ -18,13 +18,11 @@
 
 
 /**
- *
  * Called when a node leaves the cluster.  Note that for JGroups at least, this
  * callback should not execute any "long running" operations.  This is indirectly
  * called from the MembershipListener interface in JGroups.
  */
-public interface RemoveNodeListener
-{
+public interface RemoveNodeListener {
     /**
      * Callback that the clustering subsystem uses to notify that a
      * node has been removed from the cluster.
diff --git a/core/src/main/java/flex/messaging/config/ApacheXPathServerConfigurationParser.java b/core/src/main/java/flex/messaging/config/ApacheXPathServerConfigurationParser.java
index 29dd222..5150725 100644
--- a/core/src/main/java/flex/messaging/config/ApacheXPathServerConfigurationParser.java
+++ b/core/src/main/java/flex/messaging/config/ApacheXPathServerConfigurationParser.java
@@ -19,6 +19,7 @@
 import org.apache.xpath.CachedXPathAPI;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
+
 import javax.xml.transform.TransformerException;
 
 /**
@@ -28,60 +29,43 @@
  * Note: Since reference ids are used between elements, certain
  * sections of the document need to be parsed first.
  * </p>
- *
- *
  */
-public class ApacheXPathServerConfigurationParser extends ServerConfigurationParser
-{
+public class ApacheXPathServerConfigurationParser extends ServerConfigurationParser {
     private CachedXPathAPI xpath;
 
-    protected void initializeExpressionQuery()
-    {
+    protected void initializeExpressionQuery() {
         this.xpath = new CachedXPathAPI();
     }
 
-    protected Node selectSingleNode(Node source, String expression)
-    {
-        try
-        {
+    protected Node selectSingleNode(Node source, String expression) {
+        try {
             return xpath.selectSingleNode(source, expression);
-        }
-        catch (TransformerException transformerException)
-        {
+        } catch (TransformerException transformerException) {
             throw wrapException(transformerException);
         }
     }
 
-    protected NodeList selectNodeList(Node source, String expression)
-    {
-        try
-        {
+    protected NodeList selectNodeList(Node source, String expression) {
+        try {
             return xpath.selectNodeList(source, expression);
-        }
-        catch (TransformerException transformerException)
-        {
+        } catch (TransformerException transformerException) {
             throw wrapException(transformerException);
         }
     }
 
-    protected Object evaluateExpression(Node source, String expression)
-    {
-        try
-        {
+    protected Object evaluateExpression(Node source, String expression) {
+        try {
             return xpath.eval(source, expression);
-        }
-        catch (TransformerException transformerException)
-        {
+        } catch (TransformerException transformerException) {
             throw wrapException(transformerException);
         }
     }
 
-    private ConfigurationException wrapException(TransformerException exception)
-    {
-       ConfigurationException result = new ConfigurationException();
-       result.setDetails(PARSER_INTERNAL_ERROR);
-       result.setRootCause(exception);
-       return result;
+    private ConfigurationException wrapException(TransformerException exception) {
+        ConfigurationException result = new ConfigurationException();
+        result.setDetails(PARSER_INTERNAL_ERROR);
+        result.setRootCause(exception);
+        return result;
     }
 
 
diff --git a/core/src/main/java/flex/messaging/config/ConfigurationManager.java b/core/src/main/java/flex/messaging/config/ConfigurationManager.java
index 8f3f463..5dc6b1e 100644
--- a/core/src/main/java/flex/messaging/config/ConfigurationManager.java
+++ b/core/src/main/java/flex/messaging/config/ConfigurationManager.java
@@ -22,16 +22,13 @@
 
 /**
  * ConfigurationManager interface
- *
+ * <p>
  * The default implementation of the configuration manager is
  * FlexConfigurationManager.  However, this value be specified in
  * a servlet init-param &quot;services.configuration.manager&quot;
  * to the MessageBrokerServlet.
- *
- *
  */
-public interface ConfigurationManager
-{
+public interface ConfigurationManager {
     String LOG_CATEGORY = LogCategories.CONFIGURATION;
 
     MessagingConfiguration getMessagingConfiguration(ServletConfig servletConfig);
diff --git a/core/src/main/java/flex/messaging/config/FactorySettings.java b/core/src/main/java/flex/messaging/config/FactorySettings.java
index aec365e..843ae9f 100644
--- a/core/src/main/java/flex/messaging/config/FactorySettings.java
+++ b/core/src/main/java/flex/messaging/config/FactorySettings.java
@@ -22,58 +22,44 @@
 /**
  * The factory configuration defines a single factory in the flex
  * configuration file.
- *
- *
  */
-public class FactorySettings extends PropertiesSettings
-{
+public class FactorySettings extends PropertiesSettings {
     protected String id;
     protected String className;
 
-    public FactorySettings(String id, String className)
-    {
+    public FactorySettings(String id, String className) {
         this.id = id;
         this.className = className;
     }
 
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
-    public String getClassName()
-    {
+    public String getClassName() {
         return className;
     }
 
-    public FlexFactory createFactory()
-    {
+    public FlexFactory createFactory() {
         return createFactory(null);
     }
 
-    public FlexFactory createFactory(ClassLoader cl)
-    {
-        try
-        {
+    public FlexFactory createFactory(ClassLoader cl) {
+        try {
             Class c = ClassUtil.createClass(className, cl);
             Object f = ClassUtil.createDefaultInstance(c, FlexFactory.class);
-            if (f instanceof FlexFactory)
-            {
+            if (f instanceof FlexFactory) {
                 FlexFactory ff = (FlexFactory) f;
                 ff.initialize(getId(), getProperties());
                 return ff;
-            }
-            else
-            {
+            } else {
                 ConfigurationException cx = new ConfigurationException();
-                cx.setMessage(11101, new Object[] { className });
+                cx.setMessage(11101, new Object[]{className});
                 throw cx;
             }
-        }
-        catch (Throwable th)
-        {
+        } catch (Throwable th) {
             ConfigurationException cx = new ConfigurationException();
-            cx.setMessage(11102, new Object[] { className, th.toString() });
+            cx.setMessage(11102, new Object[]{className, th.toString()});
             cx.setRootCause(th);
             throw cx;
         }
diff --git a/core/src/main/java/flex/messaging/config/MessageFilterSettings.java b/core/src/main/java/flex/messaging/config/MessageFilterSettings.java
index 34ed523..d80df09 100644
--- a/core/src/main/java/flex/messaging/config/MessageFilterSettings.java
+++ b/core/src/main/java/flex/messaging/config/MessageFilterSettings.java
@@ -18,16 +18,13 @@
 
 /**
  * Settings class for message filters.
- * 
- *
  */
-public class MessageFilterSettings extends PropertiesSettings
-{
+public class MessageFilterSettings extends PropertiesSettings {
     /**
      * Filters belong to one of two types; those that filter messages
      * asynchronously and those that filter messages synchronously.
      */
-    public enum FilterType { ASYNC, SYNC }
+    public enum FilterType {ASYNC, SYNC}
 
     private String id;
 
@@ -36,8 +33,7 @@
      *
      * @return The id.
      */
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
@@ -46,11 +42,10 @@
      *
      * @param value The id.
      */
-    public void setId(String value)
-    {
+    public void setId(String value) {
         id = value;
-    }    
-    
+    }
+
     private String className;
 
     /**
@@ -58,8 +53,7 @@
      *
      * @return The class name.
      */
-    public String getClassName()
-    {
+    public String getClassName() {
         return className;
     }
 
@@ -68,32 +62,29 @@
      *
      * @param value The class name.
      */
-    public void setClassName(String value)
-    {
+    public void setClassName(String value) {
         className = value;
     }
-    
+
     private FilterType filterType;
-    
+
     /**
      * Returns the filter type.
-     * @see FilterType
-     * 
+     *
      * @return The filter type.
+     * @see FilterType
      */
-    public FilterType getFilterType()
-    {
+    public FilterType getFilterType() {
         return filterType;
     }
-    
+
     /**
      * Sets the filter type.
-     * @see FilterType
-     * 
+     *
      * @param value The filter type.
+     * @see FilterType
      */
-    public void setFilterType(FilterType value)
-    {
+    public void setFilterType(FilterType value) {
         filterType = value;
     }
 }
diff --git a/core/src/main/java/flex/messaging/config/MessagingConfiguration.java b/core/src/main/java/flex/messaging/config/MessagingConfiguration.java
index b73222b..5465ff5 100644
--- a/core/src/main/java/flex/messaging/config/MessagingConfiguration.java
+++ b/core/src/main/java/flex/messaging/config/MessagingConfiguration.java
@@ -57,14 +57,11 @@
  * The MessageBroker itself has no knowledge of configuration specifics;
  * instead, this object sets the relevant values on the broker using
  * information which a ConfigurationParser has provided for it.
- *
- *
  */
-public class MessagingConfiguration implements ServicesConfiguration
-{
+public class MessagingConfiguration implements ServicesConfiguration {
     private final String asyncMessageBrokerType = "flex.messaging.AsyncMessageBroker";
     private final String asyncFlexClientManagerType = "flex.messaging.client.AsyncFlexClientManager";
-    
+
     private final Map<String, ChannelSettings> channelSettings;
     private final List<String> defaultChannels;
     private final SecuritySettings securitySettings;
@@ -81,10 +78,8 @@
     /**
      * Constructor.
      * Construct a MessagingConfiguration object
-     *
      */
-    public MessagingConfiguration()
-    {
+    public MessagingConfiguration() {
         channelSettings = new HashMap<String, ChannelSettings>();
         defaultChannels = new ArrayList<String>(4);
         clusterSettings = new HashMap<String, ClusterSettings>();
@@ -101,10 +96,9 @@
      *
      * @param broker current MessageBroker object
      */
-    public void configureBroker(MessageBroker broker)
-    {
+    public void configureBroker(MessageBroker broker) {
         boolean async = (broker.getClass().getName().equals(asyncMessageBrokerType));
-        
+
         broker.setChannelSettings(channelSettings);
         broker.setSecuritySettings(securitySettings);
         broker.setSystemSettings(systemSettings);
@@ -117,16 +111,16 @@
         createFlexClientManager(broker);
         createRedeployManager(broker);
         createFactories(broker);
-        
+
         if (async)
             createSharedServers(broker);
-        
+
         createEndpoints(broker);
         // Default channels have to be set after endpoints are created.
         broker.setDefaultChannels(defaultChannels);
         prepareClusters(broker);
         createServices(broker);
-        
+
         if (async)
             createMessageFilters(broker);
 
@@ -136,12 +130,11 @@
     /**
      * Create a MessageBroker object with the Id.
      *
-     * @param id String the MessageBroker Id
+     * @param id     String the MessageBroker Id
      * @param loader the ClassLoader used to load the MessageBroker class
      * @return the created MessageBroker object
      */
-    public MessageBroker createBroker(String id, ClassLoader loader)
-    {
+    public MessageBroker createBroker(String id, ClassLoader loader) {
         // Construct MessageBroker with manageable constructor to avoid loading
         // any JMX classes in case manageable is set to false. 
         MessageBroker broker;
@@ -150,9 +143,8 @@
             @SuppressWarnings("unchecked")
             Class<? extends MessageBroker> messageBrokerClass = ClassUtil.createClass(asyncMessageBrokerType, loader);
             Constructor constructor = messageBrokerClass.getConstructor(boolean.class);
-            broker = (MessageBroker)constructor.newInstance(systemSettings.isManageable());
-        }
-        catch (Throwable t) // Otherwise, use the default MessageBroker.
+            broker = (MessageBroker) constructor.newInstance(systemSettings.isManageable());
+        } catch (Throwable t) // Otherwise, use the default MessageBroker.
         {
             broker = new MessageBroker(systemSettings.isManageable());
         }
@@ -166,36 +158,31 @@
         return broker;
     }
 
-    private void createFactories(MessageBroker broker)
-    {
-        for (Iterator<Map.Entry<String,FactorySettings>> iter=factorySettings.entrySet().iterator(); iter.hasNext(); )
-        {
-            Map.Entry<String,FactorySettings> entry = iter.next();
+    private void createFactories(MessageBroker broker) {
+        for (Iterator<Map.Entry<String, FactorySettings>> iter = factorySettings.entrySet().iterator(); iter.hasNext(); ) {
+            Map.Entry<String, FactorySettings> entry = iter.next();
             String id = entry.getKey();
             FactorySettings factorySetting = entry.getValue();
             broker.addFactory(id, factorySetting.createFactory(broker.getClassLoader()));
         }
     }
 
-    private void createFlexClientManager(MessageBroker broker)
-    {
+    private void createFlexClientManager(MessageBroker broker) {
         FlexClientManager flexClientManager = null;
         try // Use the async version, if possible.
-        {            
+        {
             @SuppressWarnings("unchecked")
             Class<? extends FlexClientManager> flexClientManagerClass = ClassUtil.createClass(asyncFlexClientManagerType, broker.getClassLoader());
             Constructor ctor = flexClientManagerClass.getConstructor(broker.getClass());
-            flexClientManager = (FlexClientManager)ctor.newInstance(broker);
-        }
-        catch (Throwable t) // Otherwise, use the default FlexClientManager.
+            flexClientManager = (FlexClientManager) ctor.newInstance(broker);
+        } catch (Throwable t) // Otherwise, use the default FlexClientManager.
         {
             flexClientManager = new FlexClientManager(broker.isManaged(), broker);
-        }        
+        }
         broker.setFlexClientManager(flexClientManager);
     }
 
-    private void createRedeployManager(MessageBroker broker)
-    {
+    private void createRedeployManager(MessageBroker broker) {
         RedeployManager redeployManager = new RedeployManager();
         redeployManager.setEnabled(systemSettings.getRedeployEnabled());
         redeployManager.setWatchInterval(systemSettings.getWatchInterval());
@@ -204,8 +191,7 @@
         broker.setRedeployManager(redeployManager);
     }
 
-    private void createAuthorizationManager(MessageBroker broker)
-    {
+    private void createAuthorizationManager(MessageBroker broker) {
         LoginManager loginManager = new LoginManager();
 
         // Create a Login Command for the LoginManager.
@@ -214,32 +200,25 @@
         Map loginCommands = securitySettings.getLoginCommands();
 
         // If default Login Command is enabled, use it.
-        LoginCommandSettings loginCommandSettings = (LoginCommandSettings)loginCommands.get(LoginCommandSettings.SERVER_MATCH_OVERRIDE);
-        if (loginCommandSettings != null)
-        {
+        LoginCommandSettings loginCommandSettings = (LoginCommandSettings) loginCommands.get(LoginCommandSettings.SERVER_MATCH_OVERRIDE);
+        if (loginCommandSettings != null) {
             loginCommand = initLoginCommand(loginCommandSettings);
         }
         // Otherwise, try a server specific Login Command.
-        else
-        {
+        else {
             String serverInfo = securitySettings.getServerInfo();
-            loginCommandSettings = (LoginCommandSettings)loginCommands.get(serverInfo);
+            loginCommandSettings = (LoginCommandSettings) loginCommands.get(serverInfo);
 
-            if (loginCommandSettings != null)
-            {
+            if (loginCommandSettings != null) {
                 loginCommand = initLoginCommand(loginCommandSettings);
-            }
-            else
-            {
+            } else {
                 // Try a partial match of serverInfo
                 serverInfo = serverInfo.toLowerCase();
-                for (Iterator iterator = loginCommands.keySet().iterator(); iterator.hasNext();)
-                {
-                    String serverMatch = (String)iterator.next();
-                    loginCommandSettings = (LoginCommandSettings)loginCommands.get(serverMatch);
+                for (Iterator iterator = loginCommands.keySet().iterator(); iterator.hasNext(); ) {
+                    String serverMatch = (String) iterator.next();
+                    loginCommandSettings = (LoginCommandSettings) loginCommands.get(serverMatch);
 
-                    if (serverInfo.indexOf(serverMatch.toLowerCase()) != -1)
-                    {
+                    if (serverInfo.indexOf(serverMatch.toLowerCase()) != -1) {
                         // add this match for easier lookup next time around
                         loginCommands.put(serverInfo, loginCommandSettings);
                         loginCommand = initLoginCommand(loginCommandSettings);
@@ -249,16 +228,13 @@
             }
         }
 
-        if (loginCommand == null)
-        {
+        if (loginCommand == null) {
             if (Log.isWarn())
                 Log.getLogger(ConfigurationManager.LOG_CATEGORY).warn
-                ("No login command was found for '" + securitySettings.getServerInfo()
-                        + "'. Please ensure that the login-command tag has the correct server attribute value"
-                        + ", or use 'all' to use the login command regardless of the server.");
-        }
-        else
-        {
+                        ("No login command was found for '" + securitySettings.getServerInfo()
+                                + "'. Please ensure that the login-command tag has the correct server attribute value"
+                                + ", or use 'all' to use the login command regardless of the server.");
+        } else {
             loginManager.setLoginCommand(loginCommand);
         }
 
@@ -268,48 +244,41 @@
         broker.setLoginManager(loginManager);
     }
 
-    private LoginCommand initLoginCommand(LoginCommandSettings loginCommandSettings)
-    {
+    private LoginCommand initLoginCommand(LoginCommandSettings loginCommandSettings) {
         String loginClass = loginCommandSettings.getClassName();
         Class c = ClassUtil.createClass(loginClass,
                 FlexContext.getMessageBroker() == null ? null :
-                FlexContext.getMessageBroker().getClassLoader());
-        LoginCommand loginCommand = (LoginCommand)ClassUtil.createDefaultInstance(c, LoginCommand.class);
+                        FlexContext.getMessageBroker().getClassLoader());
+        LoginCommand loginCommand = (LoginCommand) ClassUtil.createDefaultInstance(c, LoginCommand.class);
 
         return loginCommand;
     }
 
-    private void createSharedServers(MessageBroker broker)
-    {
-        for (SharedServerSettings settings : sharedServerSettings)
-        {
+    private void createSharedServers(MessageBroker broker) {
+        for (SharedServerSettings settings : sharedServerSettings) {
             String id = settings.getId();
             String className = settings.getClassName();
             Class serverClass = ClassUtil.createClass(className, broker.getClassLoader());
-            FlexComponent server = (FlexComponent)ClassUtil.createDefaultInstance(serverClass, serverClass);
+            FlexComponent server = (FlexComponent) ClassUtil.createDefaultInstance(serverClass, serverClass);
             server.initialize(id, settings.getProperties());
-            if (broker.isManaged() && (server instanceof ManageableComponent))
-            {
-                ManageableComponent manageableServer = (ManageableComponent)server;
+            if (broker.isManaged() && (server instanceof ManageableComponent)) {
+                ManageableComponent manageableServer = (ManageableComponent) server;
                 manageableServer.setManaged(true);
                 manageableServer.setParent(broker);
             }
-            
+
             // TODO: move this to only AsyncMessageBroker.
-            broker.addServer((Server)server);
-            
-            if (Log.isInfo())
-            {
+            broker.addServer((Server) server);
+
+            if (Log.isInfo()) {
                 Log.getLogger(ConfigurationManager.LOG_CATEGORY).info
-                ("Server '" + id + "' of type '" + className + "' created.");
+                        ("Server '" + id + "' of type '" + className + "' created.");
             }
         }
     }
 
-    private void createEndpoints(MessageBroker broker)
-    {
-        for (Iterator<String> iter = channelSettings.keySet().iterator(); iter.hasNext();)
-        {
+    private void createEndpoints(MessageBroker broker) {
+        for (Iterator<String> iter = channelSettings.keySet().iterator(); iter.hasNext(); ) {
             String id = iter.next();
             ChannelSettings chanSettings = channelSettings.get(id);
             String url = chanSettings.getUri();
@@ -317,57 +286,51 @@
 
             // Create the Endpoint
             Endpoint endpoint = broker.createEndpoint(id, url, endpointClassName);
-            
+
             // Cast to AbstractEndpoint - these are newer properties that post-date the locked Endpoint interface.
-            if (endpoint instanceof AbstractEndpoint)
-            {   
-                AbstractEndpoint abstractEndpoint = (AbstractEndpoint)endpoint;
+            if (endpoint instanceof AbstractEndpoint) {
+                AbstractEndpoint abstractEndpoint = (AbstractEndpoint) endpoint;
                 abstractEndpoint.setRemote(chanSettings.isRemote());
                 abstractEndpoint.setServerOnly(chanSettings.getServerOnly());
             }
-                        
+
             endpoint.setSecurityConstraint(chanSettings.getConstraint());
             endpoint.setClientType(chanSettings.getClientType());
 
             // Assign referenced server
             String referencedServerId = chanSettings.getServerId();
-            if ((referencedServerId != null) && (endpoint instanceof Endpoint2))
-            {
+            if ((referencedServerId != null) && (endpoint instanceof Endpoint2)) {
                 Server server = broker.getServer(referencedServerId);
-                if (server == null)
-                {
+                if (server == null) {
                     ConfigurationException ce = new ConfigurationException();
-                    ce.setMessage(11128, new Object[] {chanSettings.getId(), referencedServerId});
+                    ce.setMessage(11128, new Object[]{chanSettings.getId(), referencedServerId});
                     throw ce;
                 }
-                ((Endpoint2)endpoint).setServer(broker.getServer(referencedServerId));
+                ((Endpoint2) endpoint).setServer(broker.getServer(referencedServerId));
             }
 
             // Initialize with endpoint properties
             endpoint.initialize(id, chanSettings.getProperties());
 
-            if (Log.isInfo())
-            {
+            if (Log.isInfo()) {
                 String endpointURL = endpoint.getUrl();
                 String endpointSecurity = EndpointControl.getSecurityConstraintOf(endpoint);
                 if (StringUtils.isEmpty(endpointSecurity))
                     endpointSecurity = "None";
                 Log.getLogger(ConfigurationManager.LOG_CATEGORY).info
-                ("Endpoint '" + id + "' created with security: " +
-                        endpointSecurity + StringUtils.NEWLINE +
-                        "at URL: " + endpointURL);
+                        ("Endpoint '" + id + "' created with security: " +
+                                endpointSecurity + StringUtils.NEWLINE +
+                                "at URL: " + endpointURL);
             }
         }
     }
 
-    private void createServices(MessageBroker broker)
-    {
+    private void createServices(MessageBroker broker) {
         //the broker needs its AuthenticationService always
         AuthenticationService authService = new AuthenticationService();
         authService.setMessageBroker(broker);
 
-        for (Iterator<ServiceSettings> iter = serviceSettings.iterator(); iter.hasNext();)
-        {
+        for (Iterator<ServiceSettings> iter = serviceSettings.iterator(); iter.hasNext(); ) {
             ServiceSettings svcSettings = iter.next();
             String svcId = svcSettings.getId();
             String svcClassName = svcSettings.getClassName();
@@ -381,47 +344,41 @@
             service.initialize(svcId, svcSettings.getProperties());
 
             // Default Channels
-            for (Iterator chanIter = svcSettings.getDefaultChannels().iterator(); chanIter.hasNext();)
-            {
-                ChannelSettings chanSettings = (ChannelSettings)chanIter.next();
+            for (Iterator chanIter = svcSettings.getDefaultChannels().iterator(); chanIter.hasNext(); ) {
+                ChannelSettings chanSettings = (ChannelSettings) chanIter.next();
                 service.addDefaultChannel(chanSettings.getId());
             }
 
             // Adapter Definitions
             Map svcAdapterSettings = svcSettings.getAllAdapterSettings();
-            for (Iterator asIter = svcAdapterSettings.values().iterator(); asIter.hasNext();)
-            {
+            for (Iterator asIter = svcAdapterSettings.values().iterator(); asIter.hasNext(); ) {
                 AdapterSettings as = (AdapterSettings) asIter.next();
                 service.registerAdapter(as.getId(), as.getClassName());
-                if (as.isDefault())
-                {
+                if (as.isDefault()) {
                     service.setDefaultAdapter(as.getId());
                 }
             }
 
             // Destinations
             Map destinationSettings = svcSettings.getDestinationSettings();
-            for (Iterator destSettingsIter = destinationSettings.keySet().iterator(); destSettingsIter.hasNext();)
-            {
-                String destName = (String)destSettingsIter.next();
-                DestinationSettings destSettings = (DestinationSettings)destinationSettings.get(destName);
+            for (Iterator destSettingsIter = destinationSettings.keySet().iterator(); destSettingsIter.hasNext(); ) {
+                String destName = (String) destSettingsIter.next();
+                DestinationSettings destSettings = (DestinationSettings) destinationSettings.get(destName);
 
                 createDestination(destSettings, service, svcSettings);
             }
         }
     }
 
-    private void createDestination(DestinationSettings destSettings, Service service, ServiceSettings svcSettings)
-    {
+    private void createDestination(DestinationSettings destSettings, Service service, ServiceSettings svcSettings) {
         String destId = destSettings.getId();
         Destination destination = service.createDestination(destId);
 
         // Channels
         List chanSettings = destSettings.getChannelSettings();
-        if (chanSettings.size() > 0)
-        {
+        if (chanSettings.size() > 0) {
             List<String> channelIds = new ArrayList<String>(2);
-            for (Iterator iter = chanSettings.iterator(); iter.hasNext();) {
+            for (Iterator iter = chanSettings.iterator(); iter.hasNext(); ) {
                 ChannelSettings cs = (ChannelSettings) iter.next();
                 channelIds.add(cs.getId());
             }
@@ -441,8 +398,7 @@
         createAdapter(destination, destSettings, svcSettings);
     }
 
-    private void createAdapter(Destination destination, DestinationSettings destSettings, ServiceSettings svcSettings)
-    {
+    private void createAdapter(Destination destination, DestinationSettings destSettings, ServiceSettings svcSettings) {
         AdapterSettings adapterSettings = destSettings.getAdapterSettings();
         String adapterId = adapterSettings.getId();
 
@@ -456,17 +412,14 @@
     }
 
     /**
-     *
      * Used by the MessageBrokerServlet to set up the singleton Log instance
      * and add any targets defined in the logging configuration.
      * This needs to be invoked ahead of creating and bootstrapping a MessageBroker
      * instance so we're sure to have the logging system running in case the bootstrap
      * process needs to log anything out.
      */
-    public void createLogAndTargets()
-    {
-        if (loggingSettings == null)
-        {
+    public void createLogAndTargets() {
+        if (loggingSettings == null) {
             Log.setPrettyPrinterClass(ToStringPrettyPrinter.class.getName());
             return;
         }
@@ -476,8 +429,7 @@
         ConfigMap properties = loggingSettings.getProperties();
 
         // Override default pretty printer for FDS to traverse deep Object graphs
-        if (properties.getPropertyAsString("pretty-printer", null) == null)
-        {
+        if (properties.getPropertyAsString("pretty-printer", null) == null) {
             Log.setPrettyPrinterClass(ToStringPrettyPrinter.class.getName());
         }
 
@@ -486,24 +438,20 @@
         // Targets
         List targets = loggingSettings.getTargets();
         Iterator it = targets.iterator();
-        while (it.hasNext())
-        {
-            TargetSettings targetSettings = (TargetSettings)it.next();
+        while (it.hasNext()) {
+            TargetSettings targetSettings = (TargetSettings) it.next();
             String className = targetSettings.getClassName();
 
             Class c = ClassUtil.createClass(className,
-                        FlexContext.getMessageBroker() == null ? null :
-                        FlexContext.getMessageBroker().getClassLoader());
-            try
-            {
-                Target target = (Target)c.newInstance();
+                    FlexContext.getMessageBroker() == null ? null :
+                            FlexContext.getMessageBroker().getClassLoader());
+            try {
+                Target target = (Target) c.newInstance();
                 target.setLevel(Log.readLevel(targetSettings.getLevel()));
                 target.setFilters(targetSettings.getFilters());
                 target.initialize(null, targetSettings.getProperties());
                 Log.addTarget(target);
-            }
-            catch (Throwable t)
-            {
+            } catch (Throwable t) {
                 // Unwrap to get to the interesting exception
                 if (t instanceof InvocationTargetException)
                     t = t.getCause();
@@ -512,76 +460,66 @@
                 t.printStackTrace();
 
                 ConfigurationException cx = new ConfigurationException();
-                cx.setMessage(10126, new Object[] { className });
+                cx.setMessage(10126, new Object[]{className});
                 cx.setRootCause(t);
                 throw cx;
             }
         }
     }
 
-    private void createMessageFilters(MessageBroker broker)
-    {
+    private void createMessageFilters(MessageBroker broker) {
         Class asyncFilterClass = ClassUtil.createClass("flex.messaging.filters.BaseAsyncMessageFilter");
         Class syncFilterClass = ClassUtil.createClass("flex.messaging.filters.BaseSyncMessageFilter");
-        
-        for (MessageFilterSettings settings : messageFilterSettings)
-        {
+
+        for (MessageFilterSettings settings : messageFilterSettings) {
             String id = settings.getId();
             String className = settings.getClassName();
             Class filterClass = ClassUtil.createClass(className, broker.getClassLoader());
-            FlexComponent filter = (FlexComponent)ClassUtil.createDefaultInstance(filterClass, null);
+            FlexComponent filter = (FlexComponent) ClassUtil.createDefaultInstance(filterClass, null);
             MessageFilterSettings.FilterType filterType = settings.getFilterType();
             boolean filterIsAsync = filterType == MessageFilterSettings.FilterType.ASYNC;
             // Validate filter is assignable to proper base class.
             if ((filterIsAsync && !asyncFilterClass.isAssignableFrom(filterClass)) ||
-                (!filterIsAsync && !syncFilterClass.isAssignableFrom(filterClass)))
-            {
+                    (!filterIsAsync && !syncFilterClass.isAssignableFrom(filterClass))) {
                 // Filter class is not a valid subclass of either supported base filter type.
                 ConfigurationException cx = new ConfigurationException();
                 int errorCode = filterIsAsync ? 11144 : 11145;
-                cx.setMessage(errorCode, new Object[] {settings.getId()});
+                cx.setMessage(errorCode, new Object[]{settings.getId()});
                 throw cx;
             }
-                        
+
             filter.initialize(id, settings.getProperties());
-            if (broker.isManaged() && (filter instanceof ManageableComponent))
-            {
-                ManageableComponent manageableFilter = (ManageableComponent)filter;
+            if (broker.isManaged() && (filter instanceof ManageableComponent)) {
+                ManageableComponent manageableFilter = (ManageableComponent) filter;
                 manageableFilter.setManaged(true);
                 manageableFilter.setParent(broker);
             }
-            
-            try
-            {
+
+            try {
                 String methodName = filterIsAsync ? "getAsyncMessageFilterChain" : "getSyncMessageFilterChain";
                 Method getMessageFilterChain = broker.getClass().getDeclaredMethod(methodName);
-                Object filterChain = getMessageFilterChain.invoke(broker, (Object[])null);
-                Class arg = filterIsAsync ? asyncFilterClass : syncFilterClass; 
+                Object filterChain = getMessageFilterChain.invoke(broker, (Object[]) null);
+                Class arg = filterIsAsync ? asyncFilterClass : syncFilterClass;
                 Method addFilter = filterChain.getClass().getDeclaredMethod("add", arg);
                 addFilter.invoke(filterChain, filter);
-            }
-            catch (Exception e)
-            {
+            } catch (Exception e) {
                 // Hit an unexpected problem adding the filter instance to the broker's async or sync chain.
                 ConfigurationException cx = new ConfigurationException();
                 int errorCode = filterType == MessageFilterSettings.FilterType.ASYNC ? 11138 : 11143;
-                cx.setMessage(errorCode, new Object[] {settings.getId()});
+                cx.setMessage(errorCode, new Object[]{settings.getId()});
                 cx.setRootCause(e);
                 throw cx;
             }
 
-            if (Log.isInfo())
-            {
+            if (Log.isInfo()) {
                 Log.getLogger(ConfigurationManager.LOG_CATEGORY).info
-                ("MessageFilter '" + id + "' of type '" + className + "' created.");
+                        ("MessageFilter '" + id + "' of type '" + className + "' created.");
             }
         }
     }
 
-    private void createValidators(MessageBroker broker)
-    {
-        for (Iterator<ValidatorSettings> iter = validatorSettings.values().iterator(); iter.hasNext(); )
-        {
+    private void createValidators(MessageBroker broker) {
+        for (Iterator<ValidatorSettings> iter = validatorSettings.values().iterator(); iter.hasNext(); ) {
             ValidatorSettings settings = iter.next();
             String className = settings.getClassName();
             String type = settings.getType();
@@ -589,44 +527,38 @@
             Class<?> expectedClass = ClassUtil.createClass(type, broker.getClassLoader());
             Object validator = ClassUtil.createDefaultInstance(validatorClass, expectedClass);
             // Only set the DeserializationValidator types for now.
-            if (validator instanceof DeserializationValidator)
-            {
-                DeserializationValidator deserializationValidator = (DeserializationValidator)validator;
+            if (validator instanceof DeserializationValidator) {
+                DeserializationValidator deserializationValidator = (DeserializationValidator) validator;
                 deserializationValidator.initialize(null, settings.getProperties());
                 broker.setDeserializationValidator(deserializationValidator);
-                if (Log.isInfo())
-                {
+                if (Log.isInfo()) {
                     Log.getLogger(ConfigurationManager.LOG_CATEGORY).info
-                    ("DeserializationValidator of type '" + className + "' created.");
+                            ("DeserializationValidator of type '" + className + "' created.");
                 }
             }
         }
     }
 
-    private void createUUIDGenerator(MessageBroker broker)
-    {
+    private void createUUIDGenerator(MessageBroker broker) {
         String className = systemSettings.getUUIDGeneratorClassName();
         if (className == null || className.length() == 0)
             return;
 
         Class uuidGeneratorClass = ClassUtil.createClass(className, broker.getClassLoader());
-        if (!UUIDGenerator.class.isAssignableFrom(uuidGeneratorClass))
-        {
+        if (!UUIDGenerator.class.isAssignableFrom(uuidGeneratorClass)) {
             // UUID Generator class is not a valid subclass of ''{0}''
             ConfigurationException cx = new ConfigurationException();
-            cx.setMessage(11148, new Object[] {UUIDGenerator.class.getName()});
+            cx.setMessage(11148, new Object[]{UUIDGenerator.class.getName()});
             throw cx;
         }
 
         Object uuidGenerator = ClassUtil.createDefaultInstance(uuidGeneratorClass, UUIDGenerator.class);
-        broker.setUUIDGenerator((UUIDGenerator)uuidGenerator);
+        broker.setUUIDGenerator((UUIDGenerator) uuidGenerator);
     }
 
-    private void prepareClusters(MessageBroker broker)
-    {
+    private void prepareClusters(MessageBroker broker) {
         ClusterManager clusterManager = broker.getClusterManager();
-        for (Iterator<String> iter=clusterSettings.keySet().iterator(); iter.hasNext(); )
-        {
+        for (Iterator<String> iter = clusterSettings.keySet().iterator(); iter.hasNext(); ) {
             String clusterId = iter.next();
             ClusterSettings cs = clusterSettings.get(clusterId);
             clusterManager.prepareCluster(cs);
@@ -638,39 +570,36 @@
      *
      * @param settings the SharedServerSettings object
      **/
-    public void addSharedServerSettings(SharedServerSettings settings)
-    {
+    public void addSharedServerSettings(SharedServerSettings settings) {
         sharedServerSettings.add(settings);
     }
 
     /**
      * Add the Channel configurations.
      *
-     * @param id the ChannelSetting Id
+     * @param id       the ChannelSetting Id
      * @param settings the ChannelSettings
      **/
-    public void addChannelSettings(String id, ChannelSettings settings)
-    {
+    public void addChannelSettings(String id, ChannelSettings settings) {
         channelSettings.put(id, settings);
     }
 
     /**
      * Get the ChannelSettings by Id.
      *
-     * @param id the ChannelSettings Id 
+     * @param id the ChannelSettings Id
      * @return ChannelSettings the Channel settings
      **/
-    public ChannelSettings getChannelSettings(String id)
-    {
+    public ChannelSettings getChannelSettings(String id) {
         return channelSettings.get(id);
     }
 
     /**
      * Get all the ChannelSettings.
+     *
      * @return Map the Map of all the ChannelSettings, maped by Id
      **/
-    public Map getAllChannelSettings()
-    {
+    public Map getAllChannelSettings() {
         return channelSettings;
     }
 
@@ -679,8 +608,7 @@
      *
      * @param id the Channel Id
      **/
-    public void addDefaultChannel(String id)
-    {
+    public void addDefaultChannel(String id) {
         defaultChannels.add(id);
     }
 
@@ -689,8 +617,7 @@
      *
      * @return List, the list of default Channels
      **/
-    public List getDefaultChannels()
-    {
+    public List getDefaultChannels() {
         return defaultChannels;
     }
 
@@ -699,8 +626,7 @@
      *
      * @return SecuritySettings current SecuritySettings
      **/
-    public SecuritySettings getSecuritySettings()
-    {
+    public SecuritySettings getSecuritySettings() {
         return securitySettings;
     }
 
@@ -709,8 +635,7 @@
      *
      * @param settings the ServiceSettings object
      **/
-    public void addServiceSettings(ServiceSettings settings)
-    {
+    public void addServiceSettings(ServiceSettings settings) {
         serviceSettings.add(settings);
     }
 
@@ -720,10 +645,8 @@
      * @param id the ServiceSettings Id
      * @return ServiceSettings the ServiceSettings object
      **/
-    public ServiceSettings getServiceSettings(String id)
-    {
-        for (Iterator<ServiceSettings> iter = serviceSettings.iterator(); iter.hasNext();)
-        {
+    public ServiceSettings getServiceSettings(String id) {
+        for (Iterator<ServiceSettings> iter = serviceSettings.iterator(); iter.hasNext(); ) {
             ServiceSettings serviceSettings = iter.next();
             if (serviceSettings.getId().equals(id))
                 return serviceSettings;
@@ -736,8 +659,7 @@
      *
      * @return List all the service settings
      **/
-    public List getAllServiceSettings()
-    {
+    public List getAllServiceSettings() {
         return serviceSettings;
     }
 
@@ -746,8 +668,7 @@
      *
      * @return LoggingSettings the LoggingSettings object
      **/
-    public LoggingSettings getLoggingSettings()
-    {
+    public LoggingSettings getLoggingSettings() {
         return loggingSettings;
     }
 
@@ -756,8 +677,7 @@
      *
      * @param loggingSettings the LoggingSettings object
      **/
-    public void setLoggingSettings(LoggingSettings loggingSettings)
-    {
+    public void setLoggingSettings(LoggingSettings loggingSettings) {
         this.loggingSettings = loggingSettings;
     }
 
@@ -766,8 +686,7 @@
      *
      * @param ss the SystemSettings object
      **/
-    public void setSystemSettings(SystemSettings ss)
-    {
+    public void setSystemSettings(SystemSettings ss) {
         systemSettings = ss;
     }
 
@@ -776,8 +695,7 @@
      *
      * @return SystemSettings the LoggingSettings object
      **/
-    public SystemSettings getSystemSettings()
-    {
+    public SystemSettings getSystemSettings() {
         return systemSettings;
     }
 
@@ -786,8 +704,7 @@
      *
      * @param value the FlexClientSettings object
      **/
-    public void setFlexClientSettings(FlexClientSettings value)
-    {
+    public void setFlexClientSettings(FlexClientSettings value) {
         flexClientSettings = value;
     }
 
@@ -796,8 +713,7 @@
      *
      * @return FlexClientSettings the FlexClientSettings object
      **/
-    public FlexClientSettings getFlexClientSettings()
-    {
+    public FlexClientSettings getFlexClientSettings() {
         return flexClientSettings;
     }
 
@@ -806,26 +722,21 @@
      *
      * @param settings the ClusterSettings object
      **/
-    public void addClusterSettings(ClusterSettings settings)
-    {
-        if (settings.isDefault())
-        {
-            for (Iterator<ClusterSettings> it = clusterSettings.values().iterator(); it.hasNext(); )
-            {
+    public void addClusterSettings(ClusterSettings settings) {
+        if (settings.isDefault()) {
+            for (Iterator<ClusterSettings> it = clusterSettings.values().iterator(); it.hasNext(); ) {
                 ClusterSettings cs = it.next();
 
-                if (cs.isDefault())
-                {
+                if (cs.isDefault()) {
                     ConfigurationException cx = new ConfigurationException();
-                    cx.setMessage(10214, new Object[] { settings.getClusterName(), cs.getClusterName() });
+                    cx.setMessage(10214, new Object[]{settings.getClusterName(), cs.getClusterName()});
                     throw cx;
                 }
             }
         }
-        if (clusterSettings.containsKey(settings.getClusterName()))
-        {
+        if (clusterSettings.containsKey(settings.getClusterName())) {
             ConfigurationException cx = new ConfigurationException();
-            cx.setMessage(10206, new Object[] { settings.getClusterName() });
+            cx.setMessage(10206, new Object[]{settings.getClusterName()});
             throw cx;
         }
         clusterSettings.put(settings.getClusterName(), settings);
@@ -837,10 +748,8 @@
      * @param clusterId the ClusterSettings Id
      * @return ClusterSettings the ClusterSettings object
      **/
-    public ClusterSettings getClusterSettings(String clusterId)
-    {
-        for (Iterator<ClusterSettings> it = clusterSettings.values().iterator(); it.hasNext(); )
-        {
+    public ClusterSettings getClusterSettings(String clusterId) {
+        for (Iterator<ClusterSettings> it = clusterSettings.values().iterator(); it.hasNext(); ) {
             ClusterSettings cs = it.next();
             if (cs.getClusterName() == clusterId)
                 return cs; // handle null case
@@ -855,10 +764,8 @@
      *
      * @return ClusterSettings the default ClusterSetting object
      **/
-    public ClusterSettings getDefaultCluster()
-    {
-        for (Iterator<ClusterSettings> it = clusterSettings.values().iterator(); it.hasNext(); )
-        {
+    public ClusterSettings getDefaultCluster() {
+        for (Iterator<ClusterSettings> it = clusterSettings.values().iterator(); it.hasNext(); ) {
             ClusterSettings cs = it.next();
             if (cs.isDefault())
                 return cs;
@@ -869,11 +776,10 @@
     /**
      * Add FactorySettings by Id.
      *
-     * @param id the FactorySettings Id
+     * @param id       the FactorySettings Id
      * @param settings the FactorySettings object
      **/
-    public void addFactorySettings(String id, FactorySettings settings)
-    {
+    public void addFactorySettings(String id, FactorySettings settings) {
         factorySettings.put(id, settings);
     }
 
@@ -882,8 +788,7 @@
      *
      * @param settings the MessageFilterSettings object
      **/
-    public void addMessageFilterSettings(MessageFilterSettings settings)
-    {
+    public void addMessageFilterSettings(MessageFilterSettings settings) {
         messageFilterSettings.add(settings);
     }
 
@@ -892,14 +797,12 @@
      *
      * @param settings the ValidatorSettings object
      **/
-    public void addValidatorSettings(ValidatorSettings settings)
-    {
+    public void addValidatorSettings(ValidatorSettings settings) {
         String type = settings.getType();
-        if (validatorSettings.containsKey(type))
-        {
+        if (validatorSettings.containsKey(type)) {
             // Cannot add multiple validators with the same type ''{0}''
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(11136, new Object[] {type});
+            ce.setMessage(11136, new Object[]{type});
             throw ce;
         }
         validatorSettings.put(type, settings);
@@ -907,86 +810,74 @@
 
     /**
      * Report unused properties.
-     *
      **/
-    public void reportUnusedProperties()
-    {
+    public void reportUnusedProperties() {
         ArrayList<Object[]> findings = new ArrayList<Object[]>();
 
         Iterator<ServiceSettings> serviceItr = serviceSettings.iterator();
-        while (serviceItr.hasNext())
-        {
+        while (serviceItr.hasNext()) {
             ServiceSettings serviceSettings = serviceItr.next();
             gatherUnusedProperties(serviceSettings.getId(), serviceSettings.getSourceFile(),
                     ConfigurationConstants.SERVICE_ELEMENT, serviceSettings, findings);
             Iterator destinationItr = serviceSettings.getDestinationSettings().values().iterator();
-            while (destinationItr.hasNext())
-            {
+            while (destinationItr.hasNext()) {
                 DestinationSettings destinationSettings = (DestinationSettings) destinationItr.next();
                 gatherUnusedProperties(destinationSettings.getId(), destinationSettings.getSourceFile(),
-                     ConfigurationConstants.DESTINATION_ELEMENT,
-                     destinationSettings, findings);
+                        ConfigurationConstants.DESTINATION_ELEMENT,
+                        destinationSettings, findings);
 
                 AdapterSettings adapterSettings = destinationSettings.getAdapterSettings();
-                if (adapterSettings != null)
-                {
+                if (adapterSettings != null) {
                     gatherUnusedProperties(adapterSettings.getId(), adapterSettings.getSourceFile(),
-                         ConfigurationConstants.ADAPTER_ELEMENT,
-                         adapterSettings, findings);
+                            ConfigurationConstants.ADAPTER_ELEMENT,
+                            adapterSettings, findings);
                 }
             }
         }
 
         Iterator<ChannelSettings> channelItr = channelSettings.values().iterator();
-        while (channelItr.hasNext())
-        {
+        while (channelItr.hasNext()) {
             ChannelSettings channelSettings = channelItr.next();
             // Skip property validation for remote channel-definitions
             if (channelSettings.isRemote())
                 continue;
 
             gatherUnusedProperties(channelSettings.getId(), channelSettings.getSourceFile(),
-            ConfigurationConstants.CHANNEL_ELEMENT, channelSettings, findings);
+                    ConfigurationConstants.CHANNEL_ELEMENT, channelSettings, findings);
         }
 
         Iterator<SharedServerSettings> serverItr = sharedServerSettings.iterator();
-        while (serverItr.hasNext())
-        {
+        while (serverItr.hasNext()) {
             SharedServerSettings serverSettings = serverItr.next();
             gatherUnusedProperties(serverSettings.getId(), serverSettings.getSourceFile(),
                     ConfigurationConstants.SERVER_ELEMENT, serverSettings, findings);
         }
 
-        if (!findings.isEmpty())
-        {
+        if (!findings.isEmpty()) {
             int errorNumber = 10149;
             ConfigurationException exception = new ConfigurationException();
             StringBuffer allDetails = new StringBuffer();
-            for (int i = 0; i < findings.size(); i++)
-            {
+            for (int i = 0; i < findings.size(); i++) {
                 allDetails.append(StringUtils.NEWLINE);
                 allDetails.append("  ");
                 exception.setDetails(errorNumber, "pattern", findings.get(i));
                 allDetails.append(exception.getDetails());
                 exception.setDetails(null);
             }
-            exception.setMessage(errorNumber, new Object[] {allDetails});
+            exception.setMessage(errorNumber, new Object[]{allDetails});
             throw exception;
         }
     }
 
     private void gatherUnusedProperties
-        (String settingsId, String settingsSource, String settingsType,
-         PropertiesSettings settings, Collection<Object[]> result)
-    {
+            (String settingsId, String settingsSource, String settingsType,
+             PropertiesSettings settings, Collection<Object[]> result) {
         List unusedProperties = settings.getProperties().findAllUnusedProperties();
         int size = unusedProperties.size();
-        if (size > 0)
-        {
-            for (int i = 0; i < size; i++)
-            {
+        if (size > 0) {
+            for (int i = 0; i < size; i++) {
                 String path = (String) unusedProperties.get(i);
-                result.add(new Object[] {path, settingsType, settingsId, settingsSource});
+                result.add(new Object[]{path, settingsType, settingsId, settingsSource});
             }
         }
     }
diff --git a/core/src/main/java/flex/messaging/config/NetworkSettings.java b/core/src/main/java/flex/messaging/config/NetworkSettings.java
index 753015c..640f70d 100644
--- a/core/src/main/java/flex/messaging/config/NetworkSettings.java
+++ b/core/src/main/java/flex/messaging/config/NetworkSettings.java
@@ -19,8 +19,7 @@
 /**
  * Network policy settings for a MessageDestination.
  */
-public class NetworkSettings
-{
+public class NetworkSettings {
     protected String clusterId;
     protected ThrottleSettings throttleSettings;
     protected int subscriptionTimeoutMinutes;
@@ -39,8 +38,7 @@
      * Constructs a default <code>NetworkSettings</code> instance with
      * default session timeout.
      */
-    public NetworkSettings()
-    {
+    public NetworkSettings() {
         throttleSettings = new ThrottleSettings();
         subscriptionTimeoutMinutes = DEFAULT_TIMEOUT;
     }
@@ -50,8 +48,7 @@
      *
      * @return The cluster id.
      */
-    public String getClusterId()
-    {
+    public String getClusterId() {
         return clusterId;
     }
 
@@ -60,28 +57,25 @@
      *
      * @param id The cluster id.
      */
-    public void setClusterId(String id)
-    {
+    public void setClusterId(String id) {
         this.clusterId = id;
     }
-    
+
     /**
      * Returns the <code>reliable</code> setting.
-     * 
+     *
      * @return The <code>reliable</code> setting.
      */
-    public boolean isReliable()
-    {
+    public boolean isReliable() {
         return reliable;
     }
-    
+
     /**
      * Sets the <code>reliable</code> setting.
-     * 
+     *
      * @param value The value to set the <code>reliable</code> setting to.
      */
-    public void setReliable(boolean value)
-    {
+    public void setReliable(boolean value) {
         reliable = value;
     }
 
@@ -90,8 +84,7 @@
      *
      * @return the <code>subscription-timeout-minutes</code> property.
      */
-    public int getSubscriptionTimeoutMinutes()
-    {
+    public int getSubscriptionTimeoutMinutes() {
         return subscriptionTimeoutMinutes;
     }
 
@@ -103,8 +96,7 @@
      *
      * @param value The value to set the <code>subscription-timeout-minutes</code> property to.
      */
-    public void setSubscriptionTimeoutMinutes(int value)
-    {
+    public void setSubscriptionTimeoutMinutes(int value) {
         subscriptionTimeoutMinutes = value;
     }
 
@@ -113,8 +105,7 @@
      *
      * @return the <code>shared-backend</code> property.
      */
-    public boolean isSharedBackend()
-    {
+    public boolean isSharedBackend() {
         return sharedBackend;
     }
 
@@ -123,8 +114,7 @@
      *
      * @param sharedBackend The value to set the <code>shared-backend</code> property to.
      */
-    public void setSharedBackend(boolean sharedBackend)
-    {
+    public void setSharedBackend(boolean sharedBackend) {
         this.sharedBackend = sharedBackend;
         this.sharedBackendSet = true;
     }
@@ -135,8 +125,7 @@
      *
      * @return <code>true</code> if the shared backend has been set; <code>false</code> otherwise.
      */
-    public boolean isSharedBackendSet()
-    {
+    public boolean isSharedBackendSet() {
         return sharedBackendSet;
     }
 
@@ -145,8 +134,7 @@
      *
      * @return the <code>ThrottleSettings</code> property.
      */
-    public ThrottleSettings getThrottleSettings()
-    {
+    public ThrottleSettings getThrottleSettings() {
         return throttleSettings;
     }
 
@@ -155,8 +143,7 @@
      *
      * @param value The value to set the <code>ThrottleSettings</code> property to.
      */
-    public void setThrottleSettings(ThrottleSettings value)
-    {
+    public void setThrottleSettings(ThrottleSettings value) {
         throttleSettings = value;
     }
 
diff --git a/core/src/main/java/flex/messaging/config/SecuritySettings.java b/core/src/main/java/flex/messaging/config/SecuritySettings.java
index f95412a..d9d812f 100644
--- a/core/src/main/java/flex/messaging/config/SecuritySettings.java
+++ b/core/src/main/java/flex/messaging/config/SecuritySettings.java
@@ -26,8 +26,7 @@
 /**
  *
  */
-public class SecuritySettings
-{
+public class SecuritySettings {
     // Exception/error message numbers.
     private static final int NO_SEC_CONSTRAINT = 10062;
 
@@ -36,38 +35,32 @@
     private Map constraints;
     private boolean recreateHttpSessionAfterLogin;
 
-    public SecuritySettings()
-    {
+    public SecuritySettings() {
         constraints = new HashMap();
         loginCommandSettings = new HashMap();
     }
 
-    public void addConstraint(SecurityConstraint sc)
-    {
+    public void addConstraint(SecurityConstraint sc) {
         constraints.put(sc.getId(), sc);
     }
 
-    public SecurityConstraint getConstraint(String ref)
-    {
+    public SecurityConstraint getConstraint(String ref) {
         // If an attempt is made to use a constraint that we do not know about,
         // do not let the authorization succeed
-        if (constraints.get(ref) == null)
-        {
+        if (constraints.get(ref) == null) {
             // Security constraint {0} is not defined.
             SecurityException se = new SecurityException();
-            se.setMessage(NO_SEC_CONSTRAINT, new Object[] {ref});
+            se.setMessage(NO_SEC_CONSTRAINT, new Object[]{ref});
             throw se;
         }
-        return (SecurityConstraint)constraints.get(ref);
+        return (SecurityConstraint) constraints.get(ref);
     }
 
-    public void addLoginCommandSettings(LoginCommandSettings lcs)
-    {
+    public void addLoginCommandSettings(LoginCommandSettings lcs) {
         loginCommandSettings.put(lcs.getServer(), lcs);
     }
 
-    public Map getLoginCommands()
-    {
+    public Map getLoginCommands() {
         return loginCommandSettings;
     }
 
@@ -76,28 +69,23 @@
      *
      * @return the set of security constraints
      */
-    public Collection<SecurityConstraint> getConstraints()
-    {
+    public Collection<SecurityConstraint> getConstraints() {
         return Collections.unmodifiableCollection(constraints.values());
     }
 
-    public void setServerInfo(String s)
-    {
+    public void setServerInfo(String s) {
         serverInfo = s;
     }
 
-    public String getServerInfo()
-    {
+    public String getServerInfo() {
         return serverInfo;
     }
 
-    public boolean isRecreateHttpSessionAfterLogin()
-    {
+    public boolean isRecreateHttpSessionAfterLogin() {
         return recreateHttpSessionAfterLogin;
     }
 
-    public void setRecreateHttpSessionAfterLogin(boolean value)
-    {
+    public void setRecreateHttpSessionAfterLogin(boolean value) {
         recreateHttpSessionAfterLogin = value;
     }
 }
diff --git a/core/src/main/java/flex/messaging/config/ServerSettings.java b/core/src/main/java/flex/messaging/config/ServerSettings.java
index 77f61e9..8d658ba 100644
--- a/core/src/main/java/flex/messaging/config/ServerSettings.java
+++ b/core/src/main/java/flex/messaging/config/ServerSettings.java
@@ -21,8 +21,7 @@
 /**
  * Server settings for a message destination.
  */
-public class ServerSettings
-{
+public class ServerSettings {
     // Errors
     private static final int INVALID_CLUSTER_MESSAGE_ROUTING = 11121;
 
@@ -33,14 +32,15 @@
     private int priority = -1;
     private String subtopicSeparator;
     private RoutingMode routingMode = RoutingMode.SERVER_TO_SERVER;
-    
-    public static enum RoutingMode {NONE,BROADCAST,SERVER_TO_SERVER};
+
+    public static enum RoutingMode {NONE, BROADCAST, SERVER_TO_SERVER}
+
+    ;
 
     /**
      * Creates a default <code>ServerSettings</code> instance.
      */
-    public ServerSettings()
-    {
+    public ServerSettings() {
         isDurable = false;
         subtopicSeparator = MessagingConstants.DEFAULT_SUBTOPIC_SEPARATOR;
     }
@@ -50,8 +50,7 @@
      *
      * @return a boolean specifying whether or not the server has the <code>allow-subtopics</code> property.
      */
-    public boolean getAllowSubtopics()
-    {
+    public boolean getAllowSubtopics() {
         return allowSubtopics;
     }
 
@@ -60,8 +59,7 @@
      *
      * @param value The value for <code>allow-subtopics</code> property.
      */
-    public void setAllowSubtopics(boolean value)
-    {
+    public void setAllowSubtopics(boolean value) {
         allowSubtopics = value;
     }
 
@@ -70,39 +68,35 @@
      *
      * @return a boolean specifying whether or not the server has the <code>cluster-message-routing</code> property.
      */
-    public boolean isBroadcastRoutingMode()
-    {
+    public boolean isBroadcastRoutingMode() {
         return routingMode == RoutingMode.BROADCAST;
     }
 
     /**
      * Returns the routing mode configured.
-     * 
+     *
      * @return The configured routing mode.
      */
-    public RoutingMode getRoutingMode()
-    {
+    public RoutingMode getRoutingMode() {
         return routingMode;
     }
-    
+
     /**
      * Sets the <code>cluster-message-routing</code> property.
      *
      * @param routingMode <code>server-to-server</code>(default)
-     * or <code>broadcast</code>.
+     *                    or <code>broadcast</code>.
      */
-    public void setBroadcastRoutingMode(String routingMode)
-    {
+    public void setBroadcastRoutingMode(String routingMode) {
         if (routingMode.equalsIgnoreCase("broadcast"))
             this.routingMode = RoutingMode.BROADCAST;
         else if (routingMode.equalsIgnoreCase("server-to-server"))
             this.routingMode = RoutingMode.SERVER_TO_SERVER;
         else if (routingMode.equalsIgnoreCase("none"))
             this.routingMode = RoutingMode.NONE;
-        else
-        {
+        else {
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(INVALID_CLUSTER_MESSAGE_ROUTING, new Object[] {routingMode});
+            ce.setMessage(INVALID_CLUSTER_MESSAGE_ROUTING, new Object[]{routingMode});
             throw ce;
         }
     }
@@ -110,16 +104,14 @@
     /**
      * @deprecated Not used anymore.
      */
-    public int getMaxCacheSize()
-    {
+    public int getMaxCacheSize() {
         return 0;
     }
 
     /**
      * @deprecated Not used anymore.
      */
-    public void setMaxCacheSize(int size)
-    {
+    public void setMaxCacheSize(int size) {
         // No-op.
     }
 
@@ -128,8 +120,7 @@
      *
      * @return the <code>message-time-to-live</code> property.
      */
-    public long getMessageTTL()
-    {
+    public long getMessageTTL() {
         return messageTTL;
     }
 
@@ -138,8 +129,7 @@
      *
      * @param ttl The value for <code>message-time-to-live</code> property.
      */
-    public void setMessageTTL(long ttl)
-    {
+    public void setMessageTTL(long ttl) {
         messageTTL = ttl;
     }
 
@@ -148,8 +138,7 @@
      *
      * @return true if wilcard subtopics are disallowed.
      */
-    public boolean isDisallowWildcardSubtopics()
-    {
+    public boolean isDisallowWildcardSubtopics() {
         return disallowWildcardSubtopics;
     }
 
@@ -158,8 +147,7 @@
      *
      * @param value Whether the wildcard subtopics are disallowed.
      */
-    public void setDisallowWildcardSubtopics(boolean value)
-    {
+    public void setDisallowWildcardSubtopics(boolean value) {
         disallowWildcardSubtopics = value;
     }
 
@@ -168,8 +156,7 @@
      *
      * @return <code>true</code> if destination is durable; otherwise <code>false</code>.
      */
-    public boolean isDurable()
-    {
+    public boolean isDurable() {
         return isDurable;
     }
 
@@ -178,43 +165,39 @@
      *
      * @param durable The value for <code>durable</code> property.
      */
-    public void setDurable(boolean durable)
-    {
+    public void setDurable(boolean durable) {
         isDurable = durable;
     }
 
     /**
      * Returns the default message priority for the destination which is a numerical
      * value between 0 and 9 (and -1 means no default priority).
-     * 
+     *
      * @return The default message priority for the destination.
      */
-    public int getPriority()
-    {
+    public int getPriority() {
         return priority;
     }
 
     /**
-     * Sets the default message priority of the destination which should be 
+     * Sets the default message priority of the destination which should be
      * a numerical value between 0 and 9. Values less than 0 and greater than 9
      * are treated as 0 and 9 respectively.
-     * 
+     *
      * @param priority The new value for the priority.
      */
-    public void setPriority(int priority)
-    {
-        priority = priority < 0? 0 : priority > 9? 9 : priority;
+    public void setPriority(int priority) {
+        priority = priority < 0 ? 0 : priority > 9 ? 9 : priority;
         this.priority = priority;
     }
 
-    
+
     /**
      * Returns the <code>subtopic-separator</code> property.
      *
      * @return the <code>subtopic-separator</code> property.
      */
-    public String getSubtopicSeparator()
-    {
+    public String getSubtopicSeparator() {
         return subtopicSeparator;
     }
 
@@ -224,8 +207,7 @@
      *
      * @param value The value for <code>subtopic-separator</code> property.
      */
-    public void setSubtopicSeparator(String value)
-    {
+    public void setSubtopicSeparator(String value) {
         subtopicSeparator = value;
     }
 }
diff --git a/core/src/main/java/flex/messaging/config/ServletResourceResolver.java b/core/src/main/java/flex/messaging/config/ServletResourceResolver.java
index b79bc27..2967700 100644
--- a/core/src/main/java/flex/messaging/config/ServletResourceResolver.java
+++ b/core/src/main/java/flex/messaging/config/ServletResourceResolver.java
@@ -30,8 +30,7 @@
 /**
  *
  */
-public class ServletResourceResolver implements ConfigurationFileResolver
-{
+public class ServletResourceResolver implements ConfigurationFileResolver {
     private ServletContext context;
     private Stack configurationPathStack = new Stack();
 
@@ -40,36 +39,32 @@
      *
      * @param context servlet context
      */
-    public ServletResourceResolver(ServletContext context)
-    {
+    public ServletResourceResolver(ServletContext context) {
         this.context = context;
     }
 
     /**
      * Is the configuration file available.
      *
-     * @param path path to check
+     * @param path       path to check
      * @param throwError true if wmethod shold throw a ConfigurationException if path no found.
      * @return true if path is available
      * @throws ConfigurationException if throwError is true and path is not available
      */
-    public boolean isAvailable(String path, boolean throwError) throws ConfigurationException
-    {
+    public boolean isAvailable(String path, boolean throwError) throws ConfigurationException {
         boolean available = false;
         InputStream is = context.getResourceAsStream(path);
-        if (is != null)
-        {
-            try { is.close(); } catch (IOException ignore) { /* ignore */}
+        if (is != null) {
+            try {
+                is.close();
+            } catch (IOException ignore) { /* ignore */}
             pushConfigurationFile(path);
             available = true;
-        }
-        else
-        {
-            if (throwError)
-            {
+        } else {
+            if (throwError) {
                 // Please specify a valid ''services.configuration.file'' in web.xml.
                 ConfigurationException e = new ConfigurationException();
-                e.setMessage(11108, new Object[] {path});
+                e.setMessage(11108, new Object[]{path});
                 throw e;
             }
         }
@@ -77,44 +72,35 @@
         return available;
     }
 
-    public InputStream getConfigurationFile(String path)
-    {
+    public InputStream getConfigurationFile(String path) {
         InputStream is = context.getResourceAsStream(path);
-        if (is != null)
-        {
+        if (is != null) {
             pushConfigurationFile(path);
             return is;
-        }
-        else
-        {
+        } else {
             // Please specify a valid ''services.configuration.file'' in web.xml.
             ConfigurationException e = new ConfigurationException();
-            e.setMessage(11108, new Object[] {path});
+            e.setMessage(11108, new Object[]{path});
             throw e;
         }
     }
 
-    public InputStream getIncludedFile(String src)
-    {
+    public InputStream getIncludedFile(String src) {
         String path = configurationPathStack.peek() + "/" + src;
         InputStream is = context.getResourceAsStream(path);
 
-        if (is != null)
-        {
+        if (is != null) {
             pushConfigurationFile(path);
             return is;
-        }
-        else
-        {
+        } else {
             // Please specify a valid include file. ''{0}'' is invalid.
             ConfigurationException e = new ConfigurationException();
-            e.setMessage(11107, new Object[] {path});
+            e.setMessage(11107, new Object[]{path});
             throw e;
         }
     }
 
-    public void popIncludedFile()
-    {
+    public void popIncludedFile() {
         configurationPathStack.pop();
     }
 
@@ -122,25 +108,19 @@
      * Returns the list of XML files (denoted by .xml extension) in the directory
      * relative to the current configuration file.
      */
-    public List getFiles(String dir)
-    {
-        List result =  new ArrayList();
+    public List getFiles(String dir) {
+        List result = new ArrayList();
         String prefix = configurationPathStack.peek() + "/";
         Set paths = context.getResourcePaths(prefix + dir);
-        if (paths != null)
-        {
-            for (Object entry : paths)
-            {
+        if (paths != null) {
+            for (Object entry : paths) {
                 String path = (String) entry;
-                if (path.endsWith(".xml"))
-                {
+                if (path.endsWith(".xml")) {
                     result.add(path.substring(prefix.length()));
                 }
             }
             return result;
-        }
-        else
-        {
+        } else {
             // Please specify a valid include directory. ''{0}'' is invalid.
             ConfigurationException e = new ConfigurationException();
             e.setMessage(11113, new Object[]{dir});
@@ -148,8 +128,7 @@
         }
     }
 
-    private void pushConfigurationFile(String path)
-    {
+    private void pushConfigurationFile(String path) {
         String topLevelPath = path.substring(0, path.lastIndexOf('/'));
         configurationPathStack.push(topLevelPath);
     }
diff --git a/core/src/main/java/flex/messaging/config/SharedServerSettings.java b/core/src/main/java/flex/messaging/config/SharedServerSettings.java
index 8fe815a..44adf5b 100644
--- a/core/src/main/java/flex/messaging/config/SharedServerSettings.java
+++ b/core/src/main/java/flex/messaging/config/SharedServerSettings.java
@@ -22,44 +22,35 @@
  * defined in the configuration file.
  * The <tt>MessagingConfiguration</tt> instance using the parser will store these and
  * use them to configure the <tt>MessageBroker</tt> with shared server instances.
- *
- *
  */
-public class SharedServerSettings extends PropertiesSettings
-{
+public class SharedServerSettings extends PropertiesSettings {
     private String id;
 
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
 
-    public void setId(String value)
-    {
+    public void setId(String value) {
         id = value;
     }
 
     private String className;
 
-    public String getClassName()
-    {
+    public String getClassName() {
         return className;
     }
 
-    public void setClassName(String value)
-    {
+    public void setClassName(String value) {
         className = value;
     }
-    
+
     private String sourceFile;
-    
-    public String getSourceFile()
-    {
+
+    public String getSourceFile() {
         return sourceFile;
     }
-    
-    public void setSourceFile(String value)
-    {
+
+    public void setSourceFile(String value) {
         sourceFile = value;
     }
 }
diff --git a/core/src/main/java/flex/messaging/config/SystemSettings.java b/core/src/main/java/flex/messaging/config/SystemSettings.java
index cf4cd49..b7b14a4 100644
--- a/core/src/main/java/flex/messaging/config/SystemSettings.java
+++ b/core/src/main/java/flex/messaging/config/SystemSettings.java
@@ -33,8 +33,7 @@
 /**
  *
  */
-public class SystemSettings
-{
+public class SystemSettings {
     private ResourceLoader resourceLoader;
     private Locale defaultLocale;
     private boolean enforceEndpointValidation;
@@ -46,8 +45,7 @@
     private String uuidGeneratorClassName;
     private String dotNetFrameworkVersion;
 
-    public SystemSettings()
-    {
+    public SystemSettings() {
         enforceEndpointValidation = false;
         manageable = true;
         redeployEnabled = false;
@@ -58,140 +56,107 @@
         dotNetFrameworkVersion = null;
     }
 
-    public void setDefaultLocale(Locale locale)
-    {
+    public void setDefaultLocale(Locale locale) {
         defaultLocale = locale;
         resourceLoader.setDefaultLocale(defaultLocale);
     }
 
-    public Locale getDefaultLocale()
-    {
+    public Locale getDefaultLocale() {
         return defaultLocale;
     }
 
-    public boolean isManageable()
-    {
+    public boolean isManageable() {
         return manageable;
     }
 
-    public void setManageable(String manageable)
-    {
+    public void setManageable(String manageable) {
         manageable = manageable.toLowerCase();
         if (manageable.startsWith("f"))
             this.manageable = false;
     }
 
-    public boolean isEnforceEndpointValidation()
-    {
+    public boolean isEnforceEndpointValidation() {
         return enforceEndpointValidation;
     }
 
-    public void setEnforceEndpointValidation(String enforceEndpointValidation)
-    {
+    public void setEnforceEndpointValidation(String enforceEndpointValidation) {
         if (enforceEndpointValidation == null || enforceEndpointValidation.length() == 0)
             return;
         if (enforceEndpointValidation.toLowerCase().startsWith("t"))
             this.enforceEndpointValidation = true;
     }
 
-    public ResourceLoader getResourceLoader()
-    {
+    public ResourceLoader getResourceLoader() {
         return resourceLoader;
     }
 
-    public void setResourceLoader(ResourceLoader resourceLoader)
-    {
+    public void setResourceLoader(ResourceLoader resourceLoader) {
         this.resourceLoader = resourceLoader;
     }
 
-    public void setRedeployEnabled(String enabled)
-    {
+    public void setRedeployEnabled(String enabled) {
         enabled = enabled.toLowerCase();
         if (enabled.startsWith("t"))
             this.redeployEnabled = true;
     }
 
-    public boolean getRedeployEnabled()
-    {
+    public boolean getRedeployEnabled() {
         return redeployEnabled;
     }
 
-    public void setWatchInterval(String interval)
-    {
+    public void setWatchInterval(String interval) {
         this.watchInterval = Integer.parseInt(interval);
     }
 
-    public int getWatchInterval()
-    {
+    public int getWatchInterval() {
         return watchInterval;
     }
 
-    public void addWatchFile(String watch)
-    {
+    public void addWatchFile(String watch) {
         this.watches.add(watch);
     }
 
-    public List getWatchFiles()
-    {
+    public List getWatchFiles() {
         return watches;
     }
 
-    public void addTouchFile(String touch)
-    {
+    public void addTouchFile(String touch) {
         this.touches.add(touch);
     }
 
-    public List getTouchFiles()
-    {
+    public List getTouchFiles() {
         return touches;
     }
 
-    public void setPaths(ServletContext context)
-    {
-        if (redeployEnabled)
-        {
+    public void setPaths(ServletContext context) {
+        if (redeployEnabled) {
             List resolvedWatches = new ArrayList();
-            for (int i = 0; i < watches.size(); i++)
-            {
-                String path = (String)watches.get(i);
+            for (int i = 0; i < watches.size(); i++) {
+                String path = (String) watches.get(i);
                 String resolvedPath = null;
-                if (path.startsWith("{context.root}") || path.startsWith("{context-root}"))
-                {
+                if (path.startsWith("{context.root}") || path.startsWith("{context-root}")) {
                     path = path.substring(14);
                     resolvedPath = context.getRealPath(path);
 
-                    if (resolvedPath != null)
-                    {
-                        try
-                        {
+                    if (resolvedPath != null) {
+                        try {
                             resolvedWatches.add(new WatchedObject(resolvedPath));
-                        }
-                        catch (FileNotFoundException fnfe)
-                        {
+                        } catch (FileNotFoundException fnfe) {
                             Logger logger = Log.getLogger(ConfigurationManager.LOG_CATEGORY);
-                            if (logger != null)
-                            {
+                            if (logger != null) {
                                 logger.warn("The watch-file, " + path + ", could not be found and will be ignored.");
                             }
                         }
-                    }
-                    else
-                    {
+                    } else {
                         Logger logger = Log.getLogger(ConfigurationManager.LOG_CATEGORY);
                         logger.warn("The watch-file, " + path + ", could not be resolved to a path and will be ignored.");
                     }
-                }
-                else
-                {
-                    try
-                    {
+                } else {
+                    try {
                         resolvedWatches.add(new WatchedObject(path));
-                    }
-                    catch (FileNotFoundException fnfe)
-                    {
+                    } catch (FileNotFoundException fnfe) {
                         Logger logger = Log.getLogger(ConfigurationManager.LOG_CATEGORY);
-                        if (logger != null)
-                        {
+                        if (logger != null) {
                             logger.warn("The watch-file, " + path + ", could not be found and will be ignored.");
                         }
                     }
@@ -200,45 +165,31 @@
             watches = resolvedWatches;
 
             List resolvedTouches = new ArrayList();
-            for (int i = 0; i < touches.size(); i++)
-            {
-                String path = (String)touches.get(i);
+            for (int i = 0; i < touches.size(); i++) {
+                String path = (String) touches.get(i);
                 String resolvedPath = null;
-                if (path.startsWith("{context.root}") || path.startsWith("{context-root}"))
-                {
+                if (path.startsWith("{context.root}") || path.startsWith("{context-root}")) {
                     path = path.substring(14);
                     resolvedPath = context.getRealPath(path);
 
-                    if (resolvedPath != null)
-                    {
+                    if (resolvedPath != null) {
                         File file = new File(resolvedPath);
-                        if (!file.exists() || (!file.isFile() && !file.isDirectory()) || (!file.isAbsolute()))
-                        {
+                        if (!file.exists() || (!file.isFile() && !file.isDirectory()) || (!file.isAbsolute())) {
                             Logger logger = Log.getLogger(ConfigurationManager.LOG_CATEGORY);
                             logger.warn("The touch-file, " + path + ", could not be found and will be ignored.");
-                        }
-                        else
-                        {
+                        } else {
                             resolvedTouches.add(resolvedPath);
                         }
-                    }
-                    else
-                    {
+                    } else {
                         Logger logger = Log.getLogger(ConfigurationManager.LOG_CATEGORY);
                         logger.warn("The touch-file, " + path + ", could not be resolved to a path and will be ignored.");
                     }
-                }
-                else
-                {
-                    try
-                    {
+                } else {
+                    try {
                         resolvedTouches.add(new WatchedObject(path));
-                    }
-                    catch (FileNotFoundException fnfe)
-                    {
+                    } catch (FileNotFoundException fnfe) {
                         Logger logger = Log.getLogger(ConfigurationManager.LOG_CATEGORY);
-                        if (logger != null)
-                        {
+                        if (logger != null) {
                             logger.warn("The touch-file, " + path + ", could not be found and will be ignored.");
                         }
                     }
@@ -250,46 +201,44 @@
 
     /**
      * Returns the UUID generator class name.
-     * 
+     *
      * @return The UUID generator class name.
      */
-    public String getUUIDGeneratorClassName()
-    {
+    public String getUUIDGeneratorClassName() {
         return uuidGeneratorClassName;
     }
 
     /**
      * Sets the UUID generator class name.
-     * 
+     *
      * @param value The UUID generator class name.
      */
-    public void setUUIDGeneratorClassName(String value)
-    {
+    public void setUUIDGeneratorClassName(String value) {
         uuidGeneratorClassName = value;
     }
 
     /**
      * Set the dotnet framework version to use.
+     *
      * @param version the configured dotnet framework version
      */
-    public void setDotNetFrameworkVersion(String version)
-    {
+    public void setDotNetFrameworkVersion(String version) {
         dotNetFrameworkVersion = version;
     }
-    
+
     /**
      * Get the dotnet framework version.
+     *
      * @return String the dotnet framework version
      */
-    public String getDotNetFrameworkVersion()
-    {
+    public String getDotNetFrameworkVersion() {
         return dotNetFrameworkVersion;
     }
+
     /**
      * Clean up static member variables.
      */
-    public void clear()
-    {
+    public void clear() {
         resourceLoader = null;
         defaultLocale = null;
         watches = null;
diff --git a/core/src/main/java/flex/messaging/config/ThrottleSettings.java b/core/src/main/java/flex/messaging/config/ThrottleSettings.java
index 96b5a3b..5670a29 100644
--- a/core/src/main/java/flex/messaging/config/ThrottleSettings.java
+++ b/core/src/main/java/flex/messaging/config/ThrottleSettings.java
@@ -22,19 +22,19 @@
  * It exists to capture properties related to message throttling in a way
  * that simplifies the ThrottleManager's usage of the configuration.
  */
-public class ThrottleSettings
-{
+public class ThrottleSettings {
     /**
      * The Policy enum.
      */
-    public enum Policy
-    {
+    public enum Policy {
         NONE,
         ERROR,
         IGNORE,
         BUFFER,
         CONFLATE
-    };
+    }
+
+    ;
 
 
     public static final String ELEMENT_INBOUND = "throttle-inbound";
@@ -66,8 +66,7 @@
     /**
      * Creates a <code>ThrottleSettings</code> instance with default settings.
      */
-    public ThrottleSettings()
-    {
+    public ThrottleSettings() {
         inPolicy = Policy.NONE;
         outPolicy = Policy.NONE;
     }
@@ -78,8 +77,7 @@
      * @param policy The string policy to parse.
      * @return The Policy.
      */
-    public static Policy parsePolicy(String policy)
-    {
+    public static Policy parsePolicy(String policy) {
         if (Policy.NONE.toString().equalsIgnoreCase(policy))
             return Policy.NONE;
         else if (Policy.IGNORE.toString().equalsIgnoreCase(policy))
@@ -102,8 +100,7 @@
      * @return True if the incoming client frequency or outgoing
      * client frequency is enabled; otherwise false.
      */
-    public boolean isClientThrottleEnabled()
-    {
+    public boolean isClientThrottleEnabled() {
         return isInboundClientThrottleEnabled() || isOutboundClientThrottleEnabled();
     }
 
@@ -112,8 +109,7 @@
      *
      * @return True if the inbound client throttling is enabled.
      */
-    public boolean isInboundClientThrottleEnabled()
-    {
+    public boolean isInboundClientThrottleEnabled() {
         return inPolicy != Policy.NONE && getIncomingClientFrequency() > 0;
     }
 
@@ -122,8 +118,7 @@
      *
      * @return True if the outbound client throttling is enabled.
      */
-    public boolean isOutboundClientThrottleEnabled()
-    {
+    public boolean isOutboundClientThrottleEnabled() {
         return outPolicy != Policy.NONE && getOutgoingClientFrequency() > 0;
     }
 
@@ -133,8 +128,7 @@
      * @return true if incoming or outbound destination throttling is enabled;
      * otherwise false.
      */
-    public boolean isDestinationThrottleEnabled()
-    {
+    public boolean isDestinationThrottleEnabled() {
         return isInboundDestinationThrottleEnabled() || isOutboundDestinationThrottleEnabled();
     }
 
@@ -143,8 +137,7 @@
      *
      * @return true if inbound destination throttling is enabled.
      */
-    public boolean isInboundDestinationThrottleEnabled()
-    {
+    public boolean isInboundDestinationThrottleEnabled() {
         return inPolicy != Policy.NONE && getIncomingDestinationFrequency() > 0;
     }
 
@@ -153,8 +146,7 @@
      *
      * @return true if outbound destination throttling is enabled.
      */
-    public boolean isOutboundDestinationThrottleEnabled()
-    {
+    public boolean isOutboundDestinationThrottleEnabled() {
         return outPolicy != Policy.NONE && getOutgoingDestinationFrequency() > 0;
     }
 
@@ -163,8 +155,7 @@
      *
      * @return the inbound throttle policy.
      */
-    public Policy getInboundPolicy()
-    {
+    public Policy getInboundPolicy() {
         return inPolicy;
     }
 
@@ -173,10 +164,8 @@
      *
      * @param inPolicy The inbound policy.
      */
-    public void setInboundPolicy(Policy inPolicy)
-    {
-        if (inPolicy != Policy.NONE && inPolicy != Policy.ERROR && inPolicy != Policy.IGNORE)
-        {
+    public void setInboundPolicy(Policy inPolicy) {
+        if (inPolicy != Policy.NONE && inPolicy != Policy.ERROR && inPolicy != Policy.IGNORE) {
             ConfigurationException ex = new ConfigurationException();
             // Invalid inbound throttle policy ''{0}'' for destination ''{1}''. Valid values are 'NONE', 'ERROR', and 'IGNORE'.
             ex.setMessage(ERR_MSG_INVALID_INBOUND_POLICY, new Object[]{inPolicy, destinationName});
@@ -190,8 +179,7 @@
      *
      * @return the outbound throttle policy.
      */
-    public Policy getOutboundPolicy()
-    {
+    public Policy getOutboundPolicy() {
         return outPolicy;
     }
 
@@ -201,8 +189,7 @@
      *
      * @param outPolicy The outbound policy.
      */
-    public void setOutboundPolicy(Policy outPolicy)
-    {
+    public void setOutboundPolicy(Policy outPolicy) {
         // Policy is checked at throttle manager.
         this.outPolicy = outPolicy;
     }
@@ -212,8 +199,7 @@
      *
      * @return the destination name for <code>ThrottleSettings</code>.
      */
-    public String getDestinationName()
-    {
+    public String getDestinationName() {
         return destinationName;
     }
 
@@ -223,8 +209,7 @@
      *
      * @param destinationName The destination name.
      */
-    public void setDestinationName(String destinationName)
-    {
+    public void setDestinationName(String destinationName) {
         this.destinationName = destinationName;
     }
 
@@ -233,8 +218,7 @@
      *
      * @return The incoming client frequency (max-client-frequency).
      */
-    public int getIncomingClientFrequency()
-    {
+    public int getIncomingClientFrequency() {
         return inClientMessagesPerSec;
     }
 
@@ -245,13 +229,11 @@
      *
      * @param n The incoming client frequency.
      */
-    public void setIncomingClientFrequency(int n)
-    {
+    public void setIncomingClientFrequency(int n) {
         String name = "incoming client frequency";
         blockNegative(n, name);
 
-        if (inDestinationMessagesPerSec > 0 && n > inDestinationMessagesPerSec)
-        {
+        if (inDestinationMessagesPerSec > 0 && n > inDestinationMessagesPerSec) {
             ConfigurationException ex = new ConfigurationException();
             // Invalid {0} for destination ''{1}''. {0} ''{2}'' cannot be more than the incoming destination frequency ''{3}''.
             ex.setMessage(ERR_MSG_INVALID_INCOMING_CLENT_FREQ, new Object[]{name, destinationName,
@@ -266,8 +248,7 @@
      *
      * @return The incoming destination frequency (max-frequency).
      */
-    public int getIncomingDestinationFrequency()
-    {
+    public int getIncomingDestinationFrequency() {
         return inDestinationMessagesPerSec;
     }
 
@@ -278,13 +259,11 @@
      *
      * @param n The incoming destination frequency.
      */
-    public void setIncomingDestinationFrequency(int n)
-    {
+    public void setIncomingDestinationFrequency(int n) {
         String name = "The incoming destination frequency";
         blockNegative(n, name);
 
-        if (inClientMessagesPerSec > 0 && n < inClientMessagesPerSec)
-        {
+        if (inClientMessagesPerSec > 0 && n < inClientMessagesPerSec) {
             ConfigurationException ex = new ConfigurationException();
             // Invalid {0} for destination ''{1}''. {0} ''{2}'' cannot be less than the incoming client frequency ''{3}''.
             ex.setMessage(ERR_MSG_INVALID_INCOMING_DEST_FREQ, new Object[]{name, destinationName,
@@ -299,8 +278,7 @@
      *
      * @return The outgoing client frequency (max-client-frequency).
      */
-    public int getOutgoingClientFrequency()
-    {
+    public int getOutgoingClientFrequency() {
         return outClientMessagesPerSec;
     }
 
@@ -311,13 +289,11 @@
      *
      * @param n The outgoing client frequency.
      */
-    public void setOutgoingClientFrequency(int n)
-    {
+    public void setOutgoingClientFrequency(int n) {
         String name = "The outgoing client frequency";
         blockNegative(n, name);
 
-        if (outDestinationMessagesPerSec > 0 && n > outDestinationMessagesPerSec)
-        {
+        if (outDestinationMessagesPerSec > 0 && n > outDestinationMessagesPerSec) {
             ConfigurationException ex = new ConfigurationException();
             // Invalid {0} for destination ''{1}''. {0} ''{2}'' cannot be more than the outgoing destination frequency ''{3}''.
             ex.setMessage(ERR_MSG_INVALID_OUTGOING_CLIENT_FREQ, new Object[]{name, destinationName,
@@ -332,8 +308,7 @@
      *
      * @return The outgoing destination frequency (max-frequency).
      */
-    public int getOutgoingDestinationFrequency()
-    {
+    public int getOutgoingDestinationFrequency() {
         return outDestinationMessagesPerSec;
     }
 
@@ -344,13 +319,11 @@
      *
      * @param n The outgoing destination frequency.
      */
-    public void setOutgoingDestinationFrequency(int n)
-    {
+    public void setOutgoingDestinationFrequency(int n) {
         String name = "The outgoing destination frequency";
         blockNegative(n, name);
 
-        if (outClientMessagesPerSec > 0 && n < outClientMessagesPerSec)
-        {
+        if (outClientMessagesPerSec > 0 && n < outClientMessagesPerSec) {
             ConfigurationException ex = new ConfigurationException();
             // Invalid {0} for destination ''{1}''. {0} ''{2}'' cannot be less than the outgoing client frequency ''{3}''.
             ex.setMessage(ERR_MSG_INVALID_OUTGOING_DEST_FREQ, new Object[]{name, destinationName, Integer.valueOf(n),
@@ -360,10 +333,8 @@
         this.outDestinationMessagesPerSec = n;
     }
 
-    protected void blockNegative(int n, String name)
-    {
-        if (n < 0)
-        {
+    protected void blockNegative(int n, String name) {
+        if (n < 0) {
             ConfigurationException ex = new ConfigurationException();
             // Invalid {0} for destination ''{1}''. {0} cannot be negative.
             ex.setMessage(ERR_MSG_INVALID_NEGATIVE_VALUE, new Object[]{name, destinationName});
diff --git a/core/src/main/java/flex/messaging/config/ValidatorSettings.java b/core/src/main/java/flex/messaging/config/ValidatorSettings.java
index ed2ab75..918bd7b 100644
--- a/core/src/main/java/flex/messaging/config/ValidatorSettings.java
+++ b/core/src/main/java/flex/messaging/config/ValidatorSettings.java
@@ -21,8 +21,7 @@
 /**
  * Settings class for validators.
  */
-public class ValidatorSettings extends PropertiesSettings
-{
+public class ValidatorSettings extends PropertiesSettings {
     private String className;
     private String type = DeserializationValidator.class.getName();
 
@@ -31,8 +30,7 @@
      *
      * @return The class name.
      */
-    public String getClassName()
-    {
+    public String getClassName() {
         return className;
     }
 
@@ -41,8 +39,7 @@
      *
      * @param className The class name.
      */
-    public void setClassName(String className)
-    {
+    public void setClassName(String className) {
         this.className = className;
     }
 
@@ -51,8 +48,7 @@
      *
      * @return The type of the validator.
      */
-    public String getType()
-    {
+    public String getType() {
         return type;
     }
 
@@ -61,8 +57,7 @@
      *
      * @param type The type of the validator.
      */
-    public void setType(String type)
-    {
+    public void setType(String type) {
         this.type = type;
     }
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/config/XPathServerConfigurationParser.java b/core/src/main/java/flex/messaging/config/XPathServerConfigurationParser.java
index c567f21..418815e 100644
--- a/core/src/main/java/flex/messaging/config/XPathServerConfigurationParser.java
+++ b/core/src/main/java/flex/messaging/config/XPathServerConfigurationParser.java
@@ -31,63 +31,46 @@
  * Note: Since reference ids are used between elements, certain
  * sections of the document need to be parsed first.
  * </p>
- *
- *
  */
-public class XPathServerConfigurationParser extends ServerConfigurationParser
-{
+public class XPathServerConfigurationParser extends ServerConfigurationParser {
     private XPath xpath;
 
-    protected void initializeExpressionQuery()
-    {
+    protected void initializeExpressionQuery() {
         this.xpath = XPathFactory.newInstance().newXPath();
     }
 
-    protected Node selectSingleNode(Node source, String expression)
-    {
-        try
-        {
+    protected Node selectSingleNode(Node source, String expression) {
+        try {
             return (Node) xpath.evaluate
-                (expression, source, XPathConstants.NODE);
-        }
-        catch (XPathExpressionException expressionException)
-        {
+                    (expression, source, XPathConstants.NODE);
+        } catch (XPathExpressionException expressionException) {
             throw wrapException(expressionException);
         }
     }
 
-    protected NodeList selectNodeList(Node source, String expression)
-    {
-        try
-        {
+    protected NodeList selectNodeList(Node source, String expression) {
+        try {
             return (NodeList) xpath.evaluate
-                (expression, source, XPathConstants.NODESET);
-        }
-        catch (XPathExpressionException expressionException)
-        {
+                    (expression, source, XPathConstants.NODESET);
+        } catch (XPathExpressionException expressionException) {
             throw wrapException(expressionException);
         }
     }
 
-    protected Object evaluateExpression(Node source, String expression)
-    {
-        try
-        {
+    protected Object evaluateExpression(Node source, String expression) {
+        try {
             return xpath.evaluate(expression, source, XPathConstants.STRING);
-        }
-        catch (XPathExpressionException expressionException)
-        {
+        } catch (XPathExpressionException expressionException) {
             throw wrapException(expressionException);
         }
     }
 
     private ConfigurationException wrapException
-        (XPathExpressionException exception)
-    {
-       ConfigurationException result = new ConfigurationException();
-       result.setDetails(PARSER_INTERNAL_ERROR);
-       result.setRootCause(exception);
-       return result;
+            (XPathExpressionException exception) {
+        ConfigurationException result = new ConfigurationException();
+        result.setDetails(PARSER_INTERNAL_ERROR);
+        result.setRootCause(exception);
+        return result;
     }
 
 }
diff --git a/core/src/main/java/flex/messaging/config/package-info.java b/core/src/main/java/flex/messaging/config/package-info.java
index 266fd52..841540f 100644
--- a/core/src/main/java/flex/messaging/config/package-info.java
+++ b/core/src/main/java/flex/messaging/config/package-info.java
@@ -14,5 +14,5 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 package flex.messaging.config;
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/endpoints/AMFEndpoint.java b/core/src/main/java/flex/messaging/endpoints/AMFEndpoint.java
index 1f94c4b..72e20b5 100644
--- a/core/src/main/java/flex/messaging/endpoints/AMFEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/AMFEndpoint.java
@@ -30,8 +30,7 @@
 /**
  * AMF based endpoint for Flex Messaging. Based on the Flash Remoting gateway servlet.
  */
-public class AMFEndpoint extends BasePollingHTTPEndpoint
-{
+public class AMFEndpoint extends BasePollingHTTPEndpoint {
     /**
      * The log category for this endpoint.
      */
@@ -46,8 +45,7 @@
     /**
      * Constructs an unmanaged <code>AMFEndpoint</code>.
      */
-    public AMFEndpoint()
-    {
+    public AMFEndpoint() {
         this(false);
     }
 
@@ -55,10 +53,9 @@
      * Constructs an <code>AMFEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>AMFEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public AMFEndpoint(boolean enableManagement)
-    {
+    public AMFEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -72,22 +69,19 @@
      * Create the gateway filters that transform action requests
      * and responses.
      */
-    @Override protected AMFFilter createFilterChain()
-    {
+    @Override
+    protected AMFFilter createFilterChain() {
         AMFFilter serializationFilter = new SerializationFilter(getLogCategory());
         AMFFilter batchFilter = new BatchProcessFilter();
-        AMFFilter sessionFilter = sessionRewritingEnabled? new SessionFilter() : null;
+        AMFFilter sessionFilter = sessionRewritingEnabled ? new SessionFilter() : null;
         AMFFilter envelopeFilter = new LegacyFilter(this);
         AMFFilter messageBrokerFilter = new MessageBrokerFilter(this);
 
         serializationFilter.setNext(batchFilter);
-        if (sessionFilter != null)
-        {
+        if (sessionFilter != null) {
             batchFilter.setNext(sessionFilter);
             sessionFilter.setNext(envelopeFilter);
-        }
-        else
-        {
+        } else {
             batchFilter.setNext(envelopeFilter);
         }
         envelopeFilter.setNext(messageBrokerFilter);
@@ -100,8 +94,8 @@
      *
      * @return MessageIOConstants.AMF_CONTENT_TYPE
      */
-    @Override protected String getResponseContentType()
-    {
+    @Override
+    protected String getResponseContentType() {
         return MessageIOConstants.AMF_CONTENT_TYPE;
     }
 
@@ -110,8 +104,8 @@
      *
      * @return The log category of the endpoint.
      */
-    @Override protected String getLogCategory()
-    {
+    @Override
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -120,8 +114,8 @@
      *
      * @return The deserializer class name used by the endpoint.
      */
-    @Override protected String getDeserializerClassName()
-    {
+    @Override
+    protected String getDeserializerClassName() {
         return "flex.messaging.io.amf.AmfMessageDeserializer";
     }
 
@@ -130,8 +124,8 @@
      *
      * @return The serializer class name used by the endpoint.
      */
-    @Override protected String getSerializerClassName()
-    {
+    @Override
+    protected String getSerializerClassName() {
         return "flex.messaging.io.amf.AmfMessageSerializer";
     }
 
@@ -141,10 +135,10 @@
      * corresponding MBean control.
      *
      * @param broker The <code>MessageBroker</code> that manages this
-     * <code>AMFEndpoint</code>.
+     *               <code>AMFEndpoint</code>.
      */
-    @Override protected void setupEndpointControl(MessageBroker broker)
-    {
+    @Override
+    protected void setupEndpointControl(MessageBroker broker) {
         controller = new AMFEndpointControl(this, broker.getControl());
         controller.register();
         setControl(controller);
diff --git a/core/src/main/java/flex/messaging/endpoints/AbstractEndpoint.java b/core/src/main/java/flex/messaging/endpoints/AbstractEndpoint.java
index 6bc8c88..cfa33e3 100644
--- a/core/src/main/java/flex/messaging/endpoints/AbstractEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/AbstractEndpoint.java
@@ -67,16 +67,17 @@
 /**
  * This is the default implementation of Endpoint, which provides a convenient
  * base for behavior and associations common to all endpoints.
- *
+ * <p>
  * These properties that appear in the endpoint configuration are only used by the
  * client, therefore they have to be set on the appropriate client classes: connect-timeout-seconds set on Channel.
  *
  * @see flex.messaging.endpoints.Endpoint
  */
 public abstract class AbstractEndpoint extends ManageableComponent
-        implements Endpoint2, ConfigurationConstants
-{
-    /** Log category for <code>AbstractEndpoint</code>. */
+        implements Endpoint2, ConfigurationConstants {
+    /**
+     * Log category for <code>AbstractEndpoint</code>.
+     */
     public static final String LOG_CATEGORY = LogCategories.ENDPOINT_GENERAL;
 
     /**
@@ -166,8 +167,7 @@
     /**
      * Constructs an unmanaged <code>AbstractEndpoint</code>.
      */
-    public AbstractEndpoint()
-    {
+    public AbstractEndpoint() {
         this(false);
     }
 
@@ -175,10 +175,9 @@
      * Constructs an <code>AbstractEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>AbstractEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public AbstractEndpoint(boolean enableManagement)
-    {
+    public AbstractEndpoint(boolean enableManagement) {
         super(enableManagement);
         this.log = Log.getLogger(getLogCategory());
         serializationContext = new SerializationContext();
@@ -194,12 +193,11 @@
      * Initializes the <code>Endpoint</code> with the properties.
      * If subclasses override this method, they must call <code>super.initialize()</code>.
      *
-     * @param id The ID of the <code>Endpoint</code>.
+     * @param id         The ID of the <code>Endpoint</code>.
      * @param properties Properties for the <code>Endpoint</code>.
      */
     @Override
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
         if (properties == null || properties.size() == 0)
@@ -216,22 +214,17 @@
 
         // Check for a custom FlexClient outbound queue processor.
         ConfigMap outboundQueueConfig = properties.getPropertyAsMap(FLEX_CLIENT_OUTBOUND_QUEUE_PROCESSOR, null);
-        if (outboundQueueConfig != null)
-        {
+        if (outboundQueueConfig != null) {
             // Get nested props for the processor.
             flexClientOutboundQueueProcessorConfig = outboundQueueConfig.getPropertyAsMap(PROPERTIES_ELEMENT, null);
 
             String pClassName = outboundQueueConfig.getPropertyAsString(CLASS_ATTR, null);
-            if (pClassName != null)
-            {
-                try
-                {
+            if (pClassName != null) {
+                try {
                     flexClientOutboundQueueProcessClass = createClass(pClassName);
                     // And now create an instance and initialize to make sure the properties are valid.
                     setFlexClientOutboundQueueProcessorConfig(flexClientOutboundQueueProcessorConfig);
-                }
-                catch (Throwable t)
-                {
+                } catch (Throwable t) {
                     if (Log.isWarn())
                         log.warn("Cannot register custom FlexClient outbound queue processor class {0}", new Object[]{pClassName}, t);
                 }
@@ -239,8 +232,7 @@
         }
 
         ConfigMap serialization = properties.getPropertyAsMap(SERIALIZATION, null);
-        if (serialization != null)
-        {
+        if (serialization != null) {
             // Custom deserializers
             List<?> deserializers = serialization.getPropertyAsList(CUSTOM_DESERIALIZER, null);
             if (deserializers != null && Log.isWarn())
@@ -253,15 +245,11 @@
 
             // Type Marshaller implementation
             String typeMarshallerClassName = serialization.getPropertyAsString(TYPE_MARSHALLER, null);
-            if (typeMarshallerClassName != null && typeMarshallerClassName.length() > 0)
-            {
-                try
-                {
+            if (typeMarshallerClassName != null && typeMarshallerClassName.length() > 0) {
+                try {
                     Class<?> tmc = createClass(typeMarshallerClassName);
-                    typeMarshaller = (TypeMarshaller)ClassUtil.createDefaultInstance(tmc, TypeMarshaller.class);
-                }
-                catch (Throwable t)
-                {
+                    typeMarshaller = (TypeMarshaller) ClassUtil.createDefaultInstance(tmc, TypeMarshaller.class);
+                } catch (Throwable t) {
                     if (Log.isWarn())
                         log.warn("Cannot register custom type marshaller for type {0}", new Object[]{typeMarshallerClassName}, t);
                 }
@@ -283,8 +271,8 @@
             serializationContext.allowXml = serialization.getPropertyAsBoolean(ALLOW_XML, false);
             serializationContext.allowXmlDoctypeDeclaration = serialization.getPropertyAsBoolean(ALLOW_XML_DOCTYPE_DECLARATION, false);
             serializationContext.allowXmlExternalEntityExpansion = serialization.getPropertyAsBoolean(ALLOW_XML_EXTERNAL_ENTITY_EXPANSION, false);
-            serializationContext.maxObjectNestLevel = (int)serialization.getPropertyAsLong(MAX_OBJECT_NEST_LEVEL, 512);
-            serializationContext.maxCollectionNestLevel = (int)serialization.getPropertyAsLong(MAX_COLLECTION_NEST_LEVEL, 15);
+            serializationContext.maxObjectNestLevel = (int) serialization.getPropertyAsLong(MAX_OBJECT_NEST_LEVEL, 512);
+            serializationContext.maxCollectionNestLevel = (int) serialization.getPropertyAsLong(MAX_COLLECTION_NEST_LEVEL, 15);
             serializationContext.preferVectors = serialization.getPropertyAsBoolean(PREFER_VECTORS, false);
 
             boolean showStacktraces = serialization.getPropertyAsBoolean(SHOW_STACKTRACES, false);
@@ -310,29 +298,25 @@
      * they must call <code>super.start()</code>.
      */
     @Override
-    public void start()
-    {
+    public void start() {
         if (isStarted())
             return;
 
         // Check if the MessageBroker is started
         MessageBroker broker = getMessageBroker();
-        if (!broker.isStarted())
-        {
-            if (Log.isWarn())
-            {
+        if (!broker.isStarted()) {
+            if (Log.isWarn()) {
                 Log.getLogger(getLogCategory()).warn("Endpoint with id '{0}' cannot be started" +
-                        " when the MessageBroker is not started.",
+                                " when the MessageBroker is not started.",
                         new Object[]{getId()});
             }
             return;
         }
 
         // Set up management
-        if (isManaged() && broker.isManaged())
-        {
+        if (isManaged() && broker.isManaged()) {
             setupEndpointControl(broker);
-            MessageBrokerControl controller = (MessageBrokerControl)broker.getControl();
+            MessageBrokerControl controller = (MessageBrokerControl) broker.getControl();
             if (getControl() != null)
                 controller.addEndpoint(this);
         }
@@ -360,18 +344,15 @@
      * call <code>super.stop()</code>.
      */
     @Override
-    public void stop()
-    {
+    public void stop() {
         if (!isStarted())
             return;
 
         super.stop();
 
         // Remove management
-        if (isManaged() && getMessageBroker().isManaged())
-        {
-            if (getControl() != null)
-            {
+        if (isManaged() && getMessageBroker().isManaged()) {
+            if (getControl() != null) {
                 getControl().unregister();
                 setControl(null);
             }
@@ -390,17 +371,14 @@
      *
      * @param url A client-load-balancing URL.
      * @return <code>false</code> if the set already contains the URL, <code>true</code> otherwise.
-     *
      */
-    public boolean addClientLoadBalancingUrl(String url)
-    {
+    public boolean addClientLoadBalancingUrl(String url) {
         if (clientLoadBalancingUrls == null)
             clientLoadBalancingUrls = new HashSet<String>();
 
-        if (url == null || url.length() == 0)
-        {
+        if (url == null || url.length() == 0) {
             // Invalid {0} configuration for endpoint ''{1}''; cannot add empty url.
-            ConfigurationException  ce = new ConfigurationException();
+            ConfigurationException ce = new ConfigurationException();
             ce.setMessage(ERR_MSG_EMTPY_CLIENT_LOAD_BALACNING_URL, new Object[]{CLIENT_LOAD_BALANCING_ELEMENT, getId()});
             throw ce;
         }
@@ -414,8 +392,7 @@
      * @param url The URL to remove.
      * @return <code>true</code> if the set contained the URL, <code>false</code> otherwise.
      */
-    public boolean removeClientLoadBalancingUrl(String url)
-    {
+    public boolean removeClientLoadBalancingUrl(String url) {
         if (clientLoadBalancingUrls != null)
             return clientLoadBalancingUrls.remove(url);
         return false;
@@ -427,9 +404,8 @@
      * @return A snapshot of the current client-load-balancing URLs, or <code>null</code> if
      * no URL exists.
      */
-    public Set<String> getClientLoadBalancingUrls()
-    {
-        return clientLoadBalancingUrls == null? null : new HashSet<String>(clientLoadBalancingUrls);
+    public Set<String> getClientLoadBalancingUrls() {
+        return clientLoadBalancingUrls == null ? null : new HashSet<String>(clientLoadBalancingUrls);
     }
 
     /**
@@ -437,8 +413,7 @@
      *
      * @return The corresponding client channel type for the endpoint.
      */
-    public String getClientType()
-    {
+    public String getClientType() {
         return clientType;
     }
 
@@ -447,8 +422,7 @@
      *
      * @param type The corresponding client channel type for the endpoint.
      */
-    public void setClientType(String type)
-    {
+    public void setClientType(String type) {
         this.clientType = type;
     }
 
@@ -457,8 +431,7 @@
      *
      * @return The <code>FlexClientOutboundQueueProcessorClass</code> of the endpoint.
      */
-    public Class<?> getFlexClientOutboundQueueProcessorClass()
-    {
+    public Class<?> getFlexClientOutboundQueueProcessorClass() {
         return flexClientOutboundQueueProcessClass;
     }
 
@@ -467,12 +440,10 @@
      *
      * @param flexClientOutboundQueueProcessorClass the Class of the Flex client outbound queue processor.
      */
-    public void setFlexClientOutboundQueueProcessorClass(Class<?> flexClientOutboundQueueProcessorClass)
-    {
+    public void setFlexClientOutboundQueueProcessorClass(Class<?> flexClientOutboundQueueProcessorClass) {
         this.flexClientOutboundQueueProcessClass = flexClientOutboundQueueProcessorClass;
-        if (flexClientOutboundQueueProcessClass != null && flexClientOutboundQueueProcessorConfig != null)
-        {
-            FlexClientOutboundQueueProcessor processor = (FlexClientOutboundQueueProcessor)ClassUtil.createDefaultInstance(flexClientOutboundQueueProcessClass, null);
+        if (flexClientOutboundQueueProcessClass != null && flexClientOutboundQueueProcessorConfig != null) {
+            FlexClientOutboundQueueProcessor processor = (FlexClientOutboundQueueProcessor) ClassUtil.createDefaultInstance(flexClientOutboundQueueProcessClass, null);
             processor.initialize(flexClientOutboundQueueProcessorConfig);
         }
     }
@@ -482,8 +453,7 @@
      *
      * @return The properties for the <code>FlexClientOutboundQueueProcessor</code> of the endpoint.
      */
-    public ConfigMap getFlexClientOutboundQueueProcessorConfig()
-    {
+    public ConfigMap getFlexClientOutboundQueueProcessorConfig() {
         return flexClientOutboundQueueProcessorConfig;
     }
 
@@ -492,12 +462,10 @@
      *
      * @param flexClientOutboundQueueProcessorConfig The configuration map.
      */
-    public void setFlexClientOutboundQueueProcessorConfig(ConfigMap flexClientOutboundQueueProcessorConfig)
-    {
+    public void setFlexClientOutboundQueueProcessorConfig(ConfigMap flexClientOutboundQueueProcessorConfig) {
         this.flexClientOutboundQueueProcessorConfig = flexClientOutboundQueueProcessorConfig;
-        if (flexClientOutboundQueueProcessorConfig != null && flexClientOutboundQueueProcessClass != null)
-        {
-            FlexClientOutboundQueueProcessor processor = (FlexClientOutboundQueueProcessor)ClassUtil.createDefaultInstance(flexClientOutboundQueueProcessClass, null);
+        if (flexClientOutboundQueueProcessorConfig != null && flexClientOutboundQueueProcessClass != null) {
+            FlexClientOutboundQueueProcessor processor = (FlexClientOutboundQueueProcessor) ClassUtil.createDefaultInstance(flexClientOutboundQueueProcessClass, null);
             processor.initialize(flexClientOutboundQueueProcessorConfig);
         }
     }
@@ -510,8 +478,7 @@
      * @param id The endpoint ID.
      */
     @Override
-    public void setId(String id)
-    {
+    public void setId(String id) {
         String oldId = getId();
 
         if (oldId != null && oldId.equals(id))
@@ -521,8 +488,7 @@
 
         // Update the endpoint id in the broker
         MessageBroker broker = getMessageBroker();
-        if (broker != null)
-        {
+        if (broker != null) {
             // broker must have the endpoint then
             broker.removeEndpoint(oldId);
             broker.addEndpoint(this);
@@ -534,9 +500,8 @@
      *
      * @return The <code>MessageBroker</code> of the <code>AbstractEndpoint</code>.
      */
-    public MessageBroker getMessageBroker()
-    {
-        return (MessageBroker)getParent();
+    public MessageBroker getMessageBroker() {
+        return (MessageBroker) getParent();
     }
 
     /**
@@ -546,8 +511,7 @@
      *
      * @param broker The <code>MessageBroker</code> of the <code>AbstractEndpoint</code>.
      */
-    public void setMessageBroker(MessageBroker broker)
-    {
+    public void setMessageBroker(MessageBroker broker) {
         MessageBroker oldBroker = getMessageBroker();
 
         setParent(broker);
@@ -563,10 +527,10 @@
     /**
      * Return the highest messaging version currently available via this
      * endpoint.
+     *
      * @return double the messaging version
      */
-    public double getMessagingVersion()
-    {
+    public double getMessagingVersion() {
         return messagingVersion;
     }
 
@@ -577,8 +541,7 @@
      * @return The port of the URL of the endpoint, or 0 if the URL does not contain
      * a port number.
      */
-    public int getPort()
-    {
+    public int getPort() {
         return port;
     }
 
@@ -587,8 +550,7 @@
      *
      * @return <code>false</code> by default.
      */
-    public boolean isSecure()
-    {
+    public boolean isSecure() {
         return false;
     }
 
@@ -600,8 +562,7 @@
      * @return <code>true</code> if this endpoint will not process direct client connections and is just
      * a local representation of a symmetric endpoint on a remote host that will, <code>false</code> otherwise.
      */
-    public boolean isRemote()
-    {
+    public boolean isRemote() {
         return remote;
     }
 
@@ -609,29 +570,28 @@
      * Sets the remote status for this endpoint.
      *
      * @param value <code>true</code> if this endpoint will not process direct client connections and is just
-     * a local representation of a symmetric endpoint on a remote host that will, <code>false</code> otherwise.
+     *              a local representation of a symmetric endpoint on a remote host that will, <code>false</code> otherwise.
      */
-    public void setRemote(boolean value)
-    {
+    public void setRemote(boolean value) {
         remote = value;
     }
 
     /**
      * Retrieves the <tt>Server</tt> that the endpoint is using, or <code>null</code> if
      * no server has been assigned.
+     *
      * @return Server The Server object the endpoint is using.
      */
-    public Server getServer()
-    {
+    public Server getServer() {
         return server;
     }
 
     /**
      * Sets the <tt>Server</tt> that the endpoint will use.
+     *
      * @param server The Server object.
      */
-    public void setServer(Server server)
-    {
+    public void setServer(Server server) {
         this.server = server;
     }
 
@@ -640,8 +600,7 @@
      *
      * @return <code>true</code> if the endpoint is server only, <code>false</code> otherwise.
      */
-    public boolean getServerOnly()
-    {
+    public boolean getServerOnly() {
         return serverOnly;
     }
 
@@ -650,8 +609,7 @@
      *
      * @param serverOnly <code>true</code> if the endpoint is server only, <code>false</code> otherwise.
      */
-    public void setServerOnly(boolean serverOnly)
-    {
+    public void setServerOnly(boolean serverOnly) {
         this.serverOnly = serverOnly;
     }
 
@@ -660,8 +618,7 @@
      *
      * @return The <code>SecurityConstraint</code> of the <code>Endpoint</code>.
      */
-    public SecurityConstraint getSecurityConstraint()
-    {
+    public SecurityConstraint getSecurityConstraint() {
         return securityConstraint;
     }
 
@@ -670,8 +627,7 @@
      *
      * @param securityConstraint The SecurityContraint object.
      */
-    public void setSecurityConstraint(SecurityConstraint securityConstraint)
-    {
+    public void setSecurityConstraint(SecurityConstraint securityConstraint) {
         this.securityConstraint = securityConstraint;
     }
 
@@ -680,8 +636,7 @@
      *
      * @return The <code>SerializationContext</code> of the endpoint.
      */
-    public SerializationContext getSerializationContext()
-    {
+    public SerializationContext getSerializationContext() {
         return serializationContext;
     }
 
@@ -690,8 +645,7 @@
      *
      * @param serializationContext The SerializationContext object.
      */
-    public void setSerializationContext(SerializationContext serializationContext)
-    {
+    public void setSerializationContext(SerializationContext serializationContext) {
         this.serializationContext = serializationContext;
     }
 
@@ -700,8 +654,7 @@
      *
      * @return The <code>TypeMarshaller</code> of the endpoint.
      */
-    public TypeMarshaller getTypeMarshaller()
-    {
+    public TypeMarshaller getTypeMarshaller() {
         if (typeMarshaller == null)
             typeMarshaller = new ASTranslator();
 
@@ -713,8 +666,7 @@
      *
      * @param typeMarshaller The TypeMarshaller object.
      */
-    public void setTypeMarshaller(TypeMarshaller typeMarshaller)
-    {
+    public void setTypeMarshaller(TypeMarshaller typeMarshaller) {
         this.typeMarshaller = typeMarshaller;
     }
 
@@ -723,8 +675,7 @@
      *
      * @return The URL of the endpoint.
      */
-    public String getUrl()
-    {
+    public String getUrl() {
         return url;
     }
 
@@ -733,8 +684,7 @@
      *
      * @param url The URL of the endpoint.
      */
-    public void setUrl(String url)
-    {
+    public void setUrl(String url) {
         this.url = url;
         port = internalParsePort(url);
         parsedForContext = null;
@@ -742,23 +692,17 @@
     }
 
     /**
-     *
      * Returns the url of the endpoint parsed for the client.
      *
      * @return The url of the endpoint parsed for the client.
      */
-    public String getUrlForClient()
-    {
-        if (!clientContextParsed)
-        {
+    public String getUrlForClient() {
+        if (!clientContextParsed) {
             HttpServletRequest req = FlexContext.getHttpRequest();
-            if (req != null)
-            {
+            if (req != null) {
                 String contextPath = req.getContextPath();
                 parseClientUrl(contextPath);
-            }
-            else
-            {
+            } else {
                 return url;
             }
         }
@@ -766,14 +710,12 @@
     }
 
     /**
-     *
      * Returns the total throughput for the endpoint.
      *
      * @return The total throughput for the endpoint.
      */
-    public long getThroughput()
-    {
-        EndpointControl control = (EndpointControl)getControl();
+    public long getThroughput() {
+        EndpointControl control = (EndpointControl) getControl();
 
         return control.getBytesDeserialized().longValue() + control.getBytesSerialized().longValue();
     }
@@ -785,8 +727,7 @@
     //--------------------------------------------------------------------------
 
 
-    public static void addNoCacheHeaders(HttpServletRequest req, HttpServletResponse res)
-    {
+    public static void addNoCacheHeaders(HttpServletRequest req, HttpServletResponse res) {
         String userAgent = req.getHeader(UserAgentManager.USER_AGENT_HEADER_NAME);
 
         // For MSIE over HTTPS, set additional Cache-Control values.
@@ -806,11 +747,9 @@
     /**
      *
      */
-    public Message convertToSmallMessage(Message message)
-    {
-        if (message instanceof SmallMessage)
-        {
-            Message smallMessage = ((SmallMessage)message).getSmallMessage();
+    public Message convertToSmallMessage(Message message) {
+        if (message instanceof SmallMessage) {
+            Message smallMessage = ((SmallMessage) message).getSmallMessage();
             if (smallMessage != null)
                 message = smallMessage;
         }
@@ -825,8 +764,7 @@
      *
      * @return ConfigMap The ConfigMap object.
      */
-    public ConfigMap describeEndpoint()
-    {
+    public ConfigMap describeEndpoint() {
         ConfigMap channelConfig = new ConfigMap();
 
         if (serverOnly) // Client does not need server only endpoints.
@@ -838,11 +776,9 @@
         ConfigMap properties = new ConfigMap();
 
         boolean containsClientLoadBalancing = clientLoadBalancingUrls != null && !clientLoadBalancingUrls.isEmpty();
-        if (containsClientLoadBalancing)
-        {
+        if (containsClientLoadBalancing) {
             ConfigMap clientLoadBalancing = new ConfigMap();
-            for (Iterator<String> iterator = clientLoadBalancingUrls.iterator(); iterator.hasNext();)
-            {
+            for (Iterator<String> iterator = clientLoadBalancingUrls.iterator(); iterator.hasNext(); ) {
                 ConfigMap url = new ConfigMap();
                 // Adding as a value rather than attribute to the parent.
                 url.addProperty(EMPTY_STRING, iterator.next());
@@ -852,37 +788,32 @@
         }
 
         // Add endpoint uri only if no client-load-balancing urls are defined.
-        if (!containsClientLoadBalancing)
-        {
+        if (!containsClientLoadBalancing) {
             ConfigMap endpointConfig = new ConfigMap();
             endpointConfig.addProperty(URI_ATTR, getUrlForClient());
             channelConfig.addProperty(ENDPOINT_ELEMENT, endpointConfig);
         }
 
-        if (connectTimeoutSeconds > 0)
-        {
+        if (connectTimeoutSeconds > 0) {
             ConfigMap connectTimeoutConfig = new ConfigMap();
             connectTimeoutConfig.addProperty(EMPTY_STRING, String.valueOf(connectTimeoutSeconds));
             properties.addProperty(CONNECT_TIMEOUT_SECONDS_ELEMENT, connectTimeoutConfig);
         }
 
-        if (requestTimeoutSeconds > 0)
-        {
+        if (requestTimeoutSeconds > 0) {
             ConfigMap requestTimeoutSeconds = new ConfigMap();
             requestTimeoutSeconds.addProperty(EMPTY_STRING, String.valueOf(requestTimeoutSeconds));
             properties.addProperty(REQUEST_TIMEOUT_SECONDS_ELEMENT, requestTimeoutSeconds);
         }
 
-        if (recordMessageTimes)
-        {
+        if (recordMessageTimes) {
             ConfigMap recordMessageTimesMap = new ConfigMap();
             // Adding as a value rather than attribute to the parent
             recordMessageTimesMap.addProperty(EMPTY_STRING, TRUE_STRING);
             properties.addProperty(RECORD_MESSAGE_TIMES_ELEMENT, recordMessageTimesMap);
         }
 
-        if (recordMessageSizes)
-        {
+        if (recordMessageSizes) {
             ConfigMap recordMessageSizesMap = new ConfigMap();
             // Adding as a value rather than attribute to the parent
             recordMessageSizesMap.addProperty(EMPTY_STRING, TRUE_STRING);
@@ -900,11 +831,9 @@
     }
 
     /**
-     *
      * Make sure this matches with ChannelSettings.getParsedUri.
      */
-    public String getParsedUrl(String contextPath)
-    {
+    public String getParsedUrl(String contextPath) {
         parseUrl(contextPath);
         return parsedUrl;
     }
@@ -912,13 +841,10 @@
     /**
      *
      */
-    public void handleClientMessagingVersion(Number version)
-    {
-        if (version != null)
-        {
+    public void handleClientMessagingVersion(Number version) {
+        if (version != null) {
             boolean clientSupportsSmallMessages = version.doubleValue() >= messagingVersion;
-            if (clientSupportsSmallMessages && getSerializationContext().enableSmallMessages)
-            {
+            if (clientSupportsSmallMessages && getSerializationContext().enableSmallMessages) {
                 FlexSession session = FlexContext.getFlexSession();
                 if (session != null)
                     session.setUseSmallMessages(true);
@@ -934,8 +860,7 @@
      * @param req The HttpServletRequest object.
      * @param res The HttpServletResponse object.
      */
-    public void service(HttpServletRequest req, HttpServletResponse res)
-    {
+    public void service(HttpServletRequest req, HttpServletResponse res) {
         validateRequestProtocol(req);
     }
 
@@ -946,21 +871,17 @@
      * @param message The decoded message data.
      * @return Message The transformed message.
      */
-    public Message serviceMessage(Message message)
-    {
-        if (isManaged())
-        {
+    public Message serviceMessage(Message message) {
+        if (isManaged()) {
             ((EndpointControl) getControl()).incrementServiceMessageCount();
         }
 
-        try
-        {
+        try {
             FlexContext.setThreadLocalEndpoint(this);
             Message ack = null;
 
             // Make sure this message is timestamped.
-            if (message.getTimestamp() == 0)
-            {
+            if (message.getTimestamp() == 0) {
                 message.setTimestamp(System.currentTimeMillis());
             }
 
@@ -972,9 +893,8 @@
                 message.setHeader(Message.VALIDATE_ENDPOINT_HEADER, Boolean.TRUE);
             message.setHeader(Message.ENDPOINT_HEADER, getId());
 
-            if (message instanceof CommandMessage)
-            {
-                CommandMessage command = (CommandMessage)message;
+            if (message instanceof CommandMessage) {
+                CommandMessage command = (CommandMessage) message;
 
                 // Apply channel endpoint level constraint; always allow login commands through.
                 int operation = command.getOperation();
@@ -984,37 +904,29 @@
                 // Handle general (not Consumer specific) poll requests here.
                 // We need to fetch all outbound messages for client subscriptions over this endpoint.
                 // We identify these general poll messages by their operation and a null clientId.
-                if (operation == CommandMessage.POLL_OPERATION && message.getClientId() == null)
-                {
+                if (operation == CommandMessage.POLL_OPERATION && message.getClientId() == null) {
                     verifyFlexClientSupport(command);
 
 
                     FlexClient flexClient = FlexContext.getFlexClient();
                     ack = handleFlexClientPollCommand(flexClient, command);
-                }
-                else if (operation == CommandMessage.DISCONNECT_OPERATION)
-                {
+                } else if (operation == CommandMessage.DISCONNECT_OPERATION) {
                     ack = handleChannelDisconnect(command);
-                }
-                else if (operation == CommandMessage.TRIGGER_CONNECT_OPERATION)
-                {
+                } else if (operation == CommandMessage.TRIGGER_CONNECT_OPERATION) {
                     ack = new AcknowledgeMessage();
-                    ((AcknowledgeMessage)ack).setCorrelationId(message.getMessageId());
+                    ((AcknowledgeMessage) ack).setCorrelationId(message.getMessageId());
 
                     boolean needsConfig = false;
                     if (command.getHeader(CommandMessage.NEEDS_CONFIG_HEADER) != null)
-                        needsConfig = ((Boolean)(command.getHeader(CommandMessage.NEEDS_CONFIG_HEADER)));
+                        needsConfig = ((Boolean) (command.getHeader(CommandMessage.NEEDS_CONFIG_HEADER)));
 
                     // Send configuration information only if the client requested.
-                    if (needsConfig)
-                    {
+                    if (needsConfig) {
                         ConfigMap serverConfig = getMessageBroker().describeServices(this);
                         if (serverConfig.size() > 0)
                             ack.setBody(serverConfig);
                     }
-                }
-                else
-                {
+                } else {
                     // Block a subset of commands for legacy clients that need to be recompiled to
                     // interop with a 2.5+ server.
                     if (operation == CommandMessage.SUBSCRIBE_OPERATION || operation == CommandMessage.POLL_OPERATION)
@@ -1023,9 +935,8 @@
                     ack = getMessageBroker().routeCommandToService((CommandMessage) message, this);
 
                     // Look for client advertised features on initial connect.
-                    if (operation == CommandMessage.CLIENT_PING_OPERATION || operation == CommandMessage.LOGIN_OPERATION)
-                    {
-                        Number clientVersion = (Number)command.getHeader(CommandMessage.MESSAGING_VERSION);
+                    if (operation == CommandMessage.CLIENT_PING_OPERATION || operation == CommandMessage.LOGIN_OPERATION) {
+                        Number clientVersion = (Number) command.getHeader(CommandMessage.MESSAGING_VERSION);
                         handleClientMessagingVersion(clientVersion);
 
                         // Also respond by advertising the messaging version on the
@@ -1033,9 +944,7 @@
                         ack.setHeader(CommandMessage.MESSAGING_VERSION, new Double(messagingVersion));
                     }
                 }
-            }
-            else
-            {
+            } else {
                 // Block any AsyncMessages from a legacy client.
                 if (message instanceof AsyncMessage)
                     verifyFlexClientSupport(message);
@@ -1047,98 +956,84 @@
             }
 
             return ack;
-        }
-        finally
-        {
+        } finally {
             FlexContext.setThreadLocalEndpoint(null);
         }
     }
 
-   /**
-    * Utility method that endpoint implementations (or associated classes)
-    * should invoke when they receive an incoming message from a client but before
-    * servicing it. This method looks up or creates the proper FlexClient instance
-    * based upon the client the message came from and places it in the FlexContext.
-    *
-    * @param message The incoming message to process.
-    *
-    * @return The FlexClient, or <code>null</code> if the message did not contain a FlexClient ID value.
-    */
-   public FlexClient setupFlexClient(Message message)
-   {
-       FlexClient flexClient = null;
-       if (message.getHeaders().containsKey(Message.FLEX_CLIENT_ID_HEADER))
-       {
-           String id = (String)message.getHeaders().get(Message.FLEX_CLIENT_ID_HEADER);
-           // If the id is null, reset to the special token value that let's us differentiate
-           // between legacy clients and 2.5+ clients.
-           if (id == null)
-               id = FlexClient.NULL_FLEXCLIENT_ID;
-           flexClient = setupFlexClient(id);
-       }
-       return flexClient;
-   }
+    /**
+     * Utility method that endpoint implementations (or associated classes)
+     * should invoke when they receive an incoming message from a client but before
+     * servicing it. This method looks up or creates the proper FlexClient instance
+     * based upon the client the message came from and places it in the FlexContext.
+     *
+     * @param message The incoming message to process.
+     * @return The FlexClient, or <code>null</code> if the message did not contain a FlexClient ID value.
+     */
+    public FlexClient setupFlexClient(Message message) {
+        FlexClient flexClient = null;
+        if (message.getHeaders().containsKey(Message.FLEX_CLIENT_ID_HEADER)) {
+            String id = (String) message.getHeaders().get(Message.FLEX_CLIENT_ID_HEADER);
+            // If the id is null, reset to the special token value that let's us differentiate
+            // between legacy clients and 2.5+ clients.
+            if (id == null)
+                id = FlexClient.NULL_FLEXCLIENT_ID;
+            flexClient = setupFlexClient(id);
+        }
+        return flexClient;
+    }
 
-   /**
-    * Utility method that endpoint implementations (or associated classes)
-    * should invoke when they receive an incoming message from a client but before
-    * servicing it. This method looks up or creates the proper FlexClient instance
-    * based upon the FlexClient ID value received from the client.
-    * It also associates this FlexClient instance with the current FlexSession.
-    *
-    * @param id The FlexClient ID value from the client.
-    *
-    * @return The FlexClient or null if the provided ID was <code>null</code>.
-    */
-   public FlexClient setupFlexClient(String id)
-   {
-       FlexClient flexClient = null;
-       if (id != null)
-       {
-           // This indicates that we're dealing with a non-legacy client that hasn't been
-           // assigned a FlexClient Id yet. Reset to null to generate a fresh Id.
-           if (id.equals(FlexClient.NULL_FLEXCLIENT_ID))
-               id = null;
+    /**
+     * Utility method that endpoint implementations (or associated classes)
+     * should invoke when they receive an incoming message from a client but before
+     * servicing it. This method looks up or creates the proper FlexClient instance
+     * based upon the FlexClient ID value received from the client.
+     * It also associates this FlexClient instance with the current FlexSession.
+     *
+     * @param id The FlexClient ID value from the client.
+     * @return The FlexClient or null if the provided ID was <code>null</code>.
+     */
+    public FlexClient setupFlexClient(String id) {
+        FlexClient flexClient = null;
+        if (id != null) {
+            // This indicates that we're dealing with a non-legacy client that hasn't been
+            // assigned a FlexClient Id yet. Reset to null to generate a fresh Id.
+            if (id.equals(FlexClient.NULL_FLEXCLIENT_ID))
+                id = null;
 
-           flexClient = getMessageBroker().getFlexClientManager().getFlexClient(id);
-           // Make sure the FlexClient and FlexSession are associated.
-           FlexSession session = FlexContext.getFlexSession();
-           flexClient.registerFlexSession(session);
-           // And place the FlexClient in FlexContext for this request.
-           FlexContext.setThreadLocalFlexClient(flexClient);
-       }
-       return flexClient;
-   }
+            flexClient = getMessageBroker().getFlexClientManager().getFlexClient(id);
+            // Make sure the FlexClient and FlexSession are associated.
+            FlexSession session = FlexContext.getFlexSession();
+            flexClient.registerFlexSession(session);
+            // And place the FlexClient in FlexContext for this request.
+            FlexContext.setThreadLocalFlexClient(flexClient);
+        }
+        return flexClient;
+    }
 
-   /**
-    *
-    * Performance metrics gathering property
-    */
-    public boolean isRecordMessageSizes()
-    {
+    /**
+     * Performance metrics gathering property
+     */
+    public boolean isRecordMessageSizes() {
         return recordMessageSizes;
     }
 
-   /**
-    *
-    * Performance metrics gathering property
-    */
-    public boolean isRecordMessageTimes()
-    {
+    /**
+     * Performance metrics gathering property
+     */
+    public boolean isRecordMessageTimes() {
         return recordMessageTimes;
     }
 
     /**
      *
      */
-    public void setThreadLocals()
-    {
-        if (serializationContext != null)
-        {
-            SerializationContext context = (SerializationContext)serializationContext.clone();
+    public void setThreadLocals() {
+        if (serializationContext != null) {
+            SerializationContext context = (SerializationContext) serializationContext.clone();
             // Get the latest deserialization validator from the broker.
             MessageBroker broker = getMessageBroker();
-            DeserializationValidator validator = broker == null? null : broker.getDeserializationValidator();
+            DeserializationValidator validator = broker == null ? null : broker.getDeserializationValidator();
             context.setDeserializationValidator(validator);
             SerializationContext.setSerializationContext(context);
         }
@@ -1149,8 +1044,7 @@
     /**
      *
      */
-    public void clearThreadLocals()
-    {
+    public void clearThreadLocals() {
         SerializationContext.clearThreadLocalObjects();
         TypeMarshallingContext.clearThreadLocalObjects();
     }
@@ -1168,8 +1062,7 @@
      * @return The log category.
      */
     @Override
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -1181,8 +1074,7 @@
      * @param disconnectCommand The disconnect command.
      * @return The response; by default an empty <tt>AcknowledgeMessage</tt>.
      */
-    protected Message handleChannelDisconnect(CommandMessage disconnectCommand)
-    {
+    protected Message handleChannelDisconnect(CommandMessage disconnectCommand) {
         return new AcknowledgeMessage();
     }
 
@@ -1192,12 +1084,11 @@
      * and if any messages are currently queued they are returned immediately. If no
      * messages are queued an empty response is returned immediately.
      *
-     * @param flexClient The FlexClient that issued the poll request.
+     * @param flexClient  The FlexClient that issued the poll request.
      * @param pollCommand The poll command from the client.
      * @return The FlushResult response.
      */
-    protected FlushResult handleFlexClientPoll(FlexClient flexClient, CommandMessage pollCommand)
-    {
+    protected FlushResult handleFlexClientPoll(FlexClient flexClient, CommandMessage pollCommand) {
         return flexClient.poll(getId());
     }
 
@@ -1205,56 +1096,48 @@
      * Handles a general poll request from a FlexClient to this endpoint.
      * Subclasses may override to implement different poll handling strategies.
      *
-     * @param flexClient The FlexClient that issued the poll request.
+     * @param flexClient  The FlexClient that issued the poll request.
      * @param pollCommand The poll command from the client.
      * @return The poll response message; either for success or fault.
      */
-    protected Message handleFlexClientPollCommand(FlexClient flexClient, CommandMessage pollCommand)
-    {
+    protected Message handleFlexClientPollCommand(FlexClient flexClient, CommandMessage pollCommand) {
         if (Log.isDebug())
             Log.getLogger(getMessageBroker().getLogCategory(pollCommand)).debug(
-                 "Before handling general client poll request. " + StringUtils.NEWLINE +
-                 "  incomingMessage: " + pollCommand + StringUtils.NEWLINE);
+                    "Before handling general client poll request. " + StringUtils.NEWLINE +
+                            "  incomingMessage: " + pollCommand + StringUtils.NEWLINE);
 
         FlushResult flushResult = handleFlexClientPoll(flexClient, pollCommand);
         Message pollResponse = null;
 
         // Generate a no-op poll response if necessary; prevents a single client from busy polling when the server
         // is doing wait()-based long-polls.
-        if ((flushResult instanceof PollFlushResult) && ((PollFlushResult)flushResult).isClientProcessingSuppressed())
-        {
+        if ((flushResult instanceof PollFlushResult) && ((PollFlushResult) flushResult).isClientProcessingSuppressed()) {
             pollResponse = new CommandMessage(CommandMessage.CLIENT_SYNC_OPERATION);
             pollResponse.setHeader(CommandMessage.NO_OP_POLL_HEADER, Boolean.TRUE);
         }
 
-        if (pollResponse == null)
-        {
+        if (pollResponse == null) {
             List<Message> messagesToReturn = (flushResult != null) ? flushResult.getMessages() : null;
-            if (messagesToReturn != null && !messagesToReturn.isEmpty())
-            {
+            if (messagesToReturn != null && !messagesToReturn.isEmpty()) {
                 pollResponse = new CommandMessage(CommandMessage.CLIENT_SYNC_OPERATION);
                 pollResponse.setBody(messagesToReturn.toArray());
-            }
-            else
-            {
+            } else {
                 pollResponse = new AcknowledgeMessage();
             }
         }
 
         // Set the adaptive poll wait time if necessary.
-        if (flushResult != null)
-        {
+        if (flushResult != null) {
             int nextFlushWaitTime = flushResult.getNextFlushWaitTimeMillis();
             if (nextFlushWaitTime > 0)
                 pollResponse.setHeader(CommandMessage.POLL_WAIT_HEADER, new Integer(nextFlushWaitTime));
         }
 
-        if (Log.isDebug())
-        {
+        if (Log.isDebug()) {
             String debugPollResult = Log.getPrettyPrinter().prettify(pollResponse);
             Log.getLogger(getMessageBroker().getLogCategory(pollCommand)).debug(
-                 "After handling general client poll request. " + StringUtils.NEWLINE +
-                 "  reply: " + debugPollResult + StringUtils.NEWLINE);
+                    "After handling general client poll request. " + StringUtils.NEWLINE +
+                            "  reply: " + debugPollResult + StringUtils.NEWLINE);
         }
 
         return pollResponse;
@@ -1263,18 +1146,16 @@
     /**
      * Initializes the <code>Endpoint</code> with the client-load-balancing urls.
      *
-     * @param id Id of the <code>Endpoint</code>.
+     * @param id         Id of the <code>Endpoint</code>.
      * @param properties Properties for the <code>Endpoint</code>.
      */
 
-    protected void initializeClientLoadBalancing(String id, ConfigMap properties)
-    {
+    protected void initializeClientLoadBalancing(String id, ConfigMap properties) {
         if (!properties.containsKey(CLIENT_LOAD_BALANCING_ELEMENT))
             return;
 
         ConfigMap clientLoadBalancing = properties.getPropertyAsMap(CLIENT_LOAD_BALANCING_ELEMENT, null);
-        if (clientLoadBalancing == null)
-        {
+        if (clientLoadBalancing == null) {
             // Invalid {0} configuration for endpoint ''{1}''; no urls defined.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(ERR_MSG_EMPTY_CLIENT_LOAD_BALANCING_ELEMENT, new Object[]{CLIENT_LOAD_BALANCING_ELEMENT, getId()});
@@ -1283,26 +1164,22 @@
 
         @SuppressWarnings("unchecked")
         List<String> urls = clientLoadBalancing.getPropertyAsList(URL_ATTR, null);
-        if (urls == null || urls.isEmpty())
-        {
+        if (urls == null || urls.isEmpty()) {
             // Invalid {0} configuration for endpoint ''{1}''; no urls defined.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(ERR_MSG_EMPTY_CLIENT_LOAD_BALANCING_ELEMENT, new Object[]{CLIENT_LOAD_BALANCING_ELEMENT, getId()});
             throw ce;
         }
 
-        for (Iterator<String> iterator = urls.iterator(); iterator.hasNext();)
-        {
+        for (Iterator<String> iterator = urls.iterator(); iterator.hasNext(); ) {
             String url = iterator.next();
             if (!addClientLoadBalancingUrl(url) && Log.isWarn())
                 log.warn("Endpoint '{0}' is ignoring the url '{1}' as it's already in the set of client-load-balancing urls.", new Object[]{id, url});
         }
     }
 
-    protected void checkSecurityConstraint(Message message)
-    {
-        if (securityConstraint != null)
-        {
+    protected void checkSecurityConstraint(Message message) {
+        if (securityConstraint != null) {
             getMessageBroker().getLoginManager().checkConstraint(securityConstraint);
         }
     }
@@ -1342,31 +1219,27 @@
      * template method.
      *
      * @param broker The <code>MessageBroker</code> that manages this
-     * <code>AbstractEndpoint</code>.
+     *               <code>AbstractEndpoint</code>.
      */
     protected abstract void setupEndpointControl(MessageBroker broker);
 
     /**
      * Validates the endpoint url scheme.
      */
-    protected void validateEndpointProtocol()
-    {
-        String scheme = isSecure()? getSecureProtocolScheme() : getInsecureProtocolScheme();
-        if (!url.startsWith(scheme))
-        {
+    protected void validateEndpointProtocol() {
+        String scheme = isSecure() ? getSecureProtocolScheme() : getInsecureProtocolScheme();
+        if (!url.startsWith(scheme)) {
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(ERR_MSG_INVALID_URL_SCHEME, new Object[] {url, scheme});
+            ce.setMessage(ERR_MSG_INVALID_URL_SCHEME, new Object[]{url, scheme});
             throw ce;
         }
     }
 
-    protected void validateRequestProtocol(HttpServletRequest req)
-    {
+    protected void validateRequestProtocol(HttpServletRequest req) {
         // Secure url can talk to secure or non-secure endpoint.
         // Non-secure url can only talk to non-secure endpoint.
         boolean secure = req.isSecure();
-        if (!secure && isSecure())
-        {
+        if (!secure && isSecure()) {
             // Secure endpoints must be contacted via a secure protocol.
             String endpointPath = req.getServletPath() + req.getPathInfo();
             SecurityException se = new SecurityException();
@@ -1376,18 +1249,15 @@
     }
 
     /**
-     *
      * Verifies that the remote client supports the FlexClient API.
      * Legacy clients that do not support this receive a message fault for any messages they send.
      *
      * @param message The message to verify.
      */
-    protected void verifyFlexClientSupport(Message message)
-    {
-        if (FlexContext.getFlexClient() == null)
-        {
+    protected void verifyFlexClientSupport(Message message) {
+        if (FlexContext.getFlexClient() == null) {
             MessageException me = new MessageException();
-            me.setMessage(REQUIRES_FLEXCLIENT_SUPPORT, new Object[] {message.getDestination()});
+            me.setMessage(REQUIRES_FLEXCLIENT_SUPPORT, new Object[]{message.getDestination()});
             throw me;
         }
     }
@@ -1395,24 +1265,20 @@
     /**
      *
      */
-    protected Class<?> createClass(String className)
-    {
+    protected Class<?> createClass(String className) {
         return ClassUtil.createClass(className, FlexContext.getMessageBroker() == null ? null :
-                    FlexContext.getMessageBroker().getClassLoader());
+                FlexContext.getMessageBroker().getClassLoader());
     }
 
     // This should match with ChannelSetting.parseClientUri
-    private void parseClientUrl(String contextPath)
-    {
-        if (!clientContextParsed)
-        {
+    private void parseClientUrl(String contextPath) {
+        if (!clientContextParsed) {
             String channelEndpoint = url.trim();
 
             // either {context-root} or {context.root} is legal
             channelEndpoint = StringUtils.substitute(channelEndpoint, "{context-root}", ConfigurationConstants.CONTEXT_PATH_TOKEN);
 
-            if ((contextPath == null) && (channelEndpoint.indexOf(ConfigurationConstants.CONTEXT_PATH_TOKEN) != -1))
-            {
+            if ((contextPath == null) && (channelEndpoint.indexOf(ConfigurationConstants.CONTEXT_PATH_TOKEN) != -1)) {
                 // context root must be specified before it is used
                 ConfigurationException e = new ConfigurationException();
                 e.setMessage(ConfigurationConstants.UNDEFINED_CONTEXT_ROOT, new Object[]{getId()});
@@ -1421,15 +1287,13 @@
 
             // simplify the number of combinations to test by ensuring our
             // context path always starts with a slash
-            if (contextPath != null && !contextPath.startsWith("/"))
-            {
+            if (contextPath != null && !contextPath.startsWith("/")) {
                 contextPath = "/" + contextPath;
             }
 
             // avoid double-slashes from context root by replacing /{context.root}
             // in a single replacement step
-            if (channelEndpoint.indexOf(ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN) != -1)
-            {
+            if (channelEndpoint.indexOf(ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN) != -1) {
                 // but avoid double-slash for /{context.root}/etc when we have
                 // the default context root
                 if ("/".equals(contextPath) && !ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN.equals(channelEndpoint))
@@ -1438,8 +1302,7 @@
                 channelEndpoint = StringUtils.substitute(channelEndpoint, ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN, contextPath);
             }
             // otherwise we have something like {server.name}:{server.port}{context.root}...
-            else
-            {
+            else {
                 // but avoid double-slash for {context.root}/etc when we have
                 // the default context root
                 if ("/".equals(contextPath) && !ConfigurationConstants.CONTEXT_PATH_TOKEN.equals(channelEndpoint))
@@ -1453,31 +1316,26 @@
         }
     }
 
-    private int internalParsePort(String url)
-    {
+    private int internalParsePort(String url) {
         int port = ChannelSettings.parsePort(url);
         // If there is no specified port, log an info message as urls without ports are supported
         if (port == 0 && Log.isInfo())
             log.info("No port specified in channel URL:  {0}", new Object[]{url});
 
-        return port == -1? 0 : port; // Replace -1 with 0.
+        return port == -1 ? 0 : port; // Replace -1 with 0.
     }
 
-    private void parseUrl(String contextPath)
-    {
+    private void parseUrl(String contextPath) {
         // Parse again only if never parsed before or parsed for a different contextPath.
-        if (parsedForContext == null || !parsedForContext.equals(contextPath))
-        {
+        if (parsedForContext == null || !parsedForContext.equals(contextPath)) {
             String channelEndpoint = url.toLowerCase().trim();
 
             // Remove protocol and host info
             String insecureProtocol = getInsecureProtocolScheme() + "://";
             String secureProtocol = getSecureProtocolScheme() + "://";
-            if (channelEndpoint.startsWith(secureProtocol) || channelEndpoint.startsWith(insecureProtocol))
-            {
+            if (channelEndpoint.startsWith(secureProtocol) || channelEndpoint.startsWith(insecureProtocol)) {
                 int nextSlash = channelEndpoint.indexOf('/', 8);
-                if (nextSlash > 0)
-                {
+                if (nextSlash > 0) {
                     channelEndpoint = channelEndpoint.substring(nextSlash);
                 }
             }
@@ -1486,25 +1344,18 @@
             channelEndpoint = StringUtils.substitute(channelEndpoint, "{context-root}", ConfigurationConstants.CONTEXT_PATH_TOKEN);
 
             // Remove context path info
-            if (channelEndpoint.startsWith(ConfigurationConstants.CONTEXT_PATH_TOKEN))
-            {
+            if (channelEndpoint.startsWith(ConfigurationConstants.CONTEXT_PATH_TOKEN)) {
                 channelEndpoint = channelEndpoint.substring(ConfigurationConstants.CONTEXT_PATH_TOKEN.length());
-            }
-            else if (channelEndpoint.startsWith(ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN))
-            {
+            } else if (channelEndpoint.startsWith(ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN)) {
                 channelEndpoint = channelEndpoint.substring(ConfigurationConstants.SLASH_CONTEXT_PATH_TOKEN.length());
-            }
-            else if (contextPath.length() > 0)
-            {
-                if (channelEndpoint.startsWith(contextPath.toLowerCase()))
-                {
+            } else if (contextPath.length() > 0) {
+                if (channelEndpoint.startsWith(contextPath.toLowerCase())) {
                     channelEndpoint = channelEndpoint.substring(contextPath.length());
                 }
             }
 
             // We also don't match on trailing slashes
-            if (channelEndpoint.endsWith("/"))
-            {
+            if (channelEndpoint.endsWith("/")) {
                 channelEndpoint = channelEndpoint.substring(0, channelEndpoint.length() - 1);
             }
 
diff --git a/core/src/main/java/flex/messaging/endpoints/BaseHTTPEndpoint.java b/core/src/main/java/flex/messaging/endpoints/BaseHTTPEndpoint.java
index bb31b39..5b3eab9 100644
--- a/core/src/main/java/flex/messaging/endpoints/BaseHTTPEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/BaseHTTPEndpoint.java
@@ -42,8 +42,7 @@
 /**
  * Abstract base class for all the HTTP-based endpoints.
  */
-public abstract class BaseHTTPEndpoint extends AbstractEndpoint
-{
+public abstract class BaseHTTPEndpoint extends AbstractEndpoint {
     //--------------------------------------------------------------------------
     //
     // Public Static Constants
@@ -84,8 +83,7 @@
     /**
      * Constructs an unmanaged <code>BaseHTTPEndpoint</code>.
      */
-    public BaseHTTPEndpoint()
-    {
+    public BaseHTTPEndpoint() {
         this(false);
     }
 
@@ -93,10 +91,9 @@
      * Constructs a <code>BaseHTTPEndpoint</code> with the specified management setting.
      *
      * @param enableManagement <code>true</code> if the <code>BaseHTTPEndpoint</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public BaseHTTPEndpoint(boolean enableManagement)
-    {
+    public BaseHTTPEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -110,11 +107,11 @@
      * Initializes the <code>Endpoint</code> with the properties.
      * If subclasses override this method, they must call <code>super.initialize()</code>.
      *
-     * @param id The ID of the <code>Endpoint</code>.
+     * @param id         The ID of the <code>Endpoint</code>.
      * @param properties Properties for the <code>Endpoint</code>.
      */
-    @Override public void initialize(String id, ConfigMap properties)
-    {
+    @Override
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
         if (properties == null || properties.size() == 0)
@@ -134,8 +131,8 @@
      * Starts the <code>Endpoint</code> by creating a filter chain and setting
      * up serializers and deserializers.
      */
-    @Override public void start()
-    {
+    @Override
+    public void start() {
         if (isStarted())
             return;
 
@@ -183,8 +180,7 @@
      * @return <code>true</code> if <code>add-no-cache-headers</code> is enabled;
      * <code>false</code> otherwise.
      */
-    public boolean isAddNoCacheHeaders()
-    {
+    public boolean isAddNoCacheHeaders() {
         return addNoCacheHeaders;
     }
 
@@ -193,8 +189,7 @@
      *
      * @param addNoCacheHeaders The <code>add-no-cache-headers</code> property.
      */
-    public void setAddNoCacheHeaders(boolean addNoCacheHeaders)
-    {
+    public void setAddNoCacheHeaders(boolean addNoCacheHeaders) {
         this.addNoCacheHeaders = addNoCacheHeaders;
     }
 
@@ -203,7 +198,6 @@
     //----------------------------------
 
     /**
-     *
      * This is a property used on the client.
      */
     protected boolean loginAfterDisconnect;
@@ -220,10 +214,9 @@
      * The default is <code>false</code>.
      *
      * @return <code>true</code> if the server session will be invalidated
-     *         when a client channel disconnects, <code>false</code> otherwise.
+     * when a client channel disconnects, <code>false</code> otherwise.
      */
-    public boolean isInvalidateSessionOnDisconnect()
-    {
+    public boolean isInvalidateSessionOnDisconnect() {
         return invalidateSessionOnDisconnect;
     }
 
@@ -235,8 +228,7 @@
      * @param value <code>true</code> to invalidate the server session for a client
      *              that disconnects its channel, <code>false</code> otherwise.
      */
-    public void setInvalidateSessionOnDisconnect(boolean value)
-    {
+    public void setInvalidateSessionOnDisconnect(boolean value) {
         invalidateSessionOnDisconnect = value;
     }
 
@@ -251,8 +243,7 @@
      *
      * @return The <code>redirect-url</code> property.
      */
-    public String getRedirectURL()
-    {
+    public String getRedirectURL() {
         return redirectURL;
     }
 
@@ -261,8 +252,7 @@
      *
      * @param redirectURL The <code>redirect-url</code> property.
      */
-    public void setRedirectURL(String redirectURL)
-    {
+    public void setRedirectURL(String redirectURL) {
         this.redirectURL = redirectURL;
     }
 
@@ -279,8 +269,7 @@
      *
      * @return <code>true</code> if the session rewriting is enabled.
      */
-    public boolean isSessionRewritingEnabled()
-    {
+    public boolean isSessionRewritingEnabled() {
         return sessionRewritingEnabled;
     }
 
@@ -289,8 +278,7 @@
      *
      * @param value The session writing enabled value.
      */
-    public void setSessionRewritingEnabled(boolean value)
-    {
+    public void setSessionRewritingEnabled(boolean value) {
         sessionRewritingEnabled = value;
     }
 
@@ -307,12 +295,10 @@
      * @param res The active servlet response.
      */
     @Override
-    public void service(HttpServletRequest req, HttpServletResponse res)
-    {
+    public void service(HttpServletRequest req, HttpServletResponse res) {
         super.service(req, res);
 
-        try
-        {
+        try {
             // Setup serialization and type marshalling contexts
             setThreadLocals();
 
@@ -329,14 +315,12 @@
 
             // After serialization completes, increment endpoint byte counters,
             // if the endpoint is managed
-            if (isManaged())
-            {
+            if (isManaged()) {
                 controller.addToBytesDeserialized(context.getDeserializedBytes());
                 controller.addToBytesSerialized(context.getSerializedBytes());
             }
 
-            if (context.getStatus() != MessageIOConstants.STATUS_NOTAMF)
-            {
+            if (context.getStatus() != MessageIOConstants.STATUS_NOTAMF) {
                 if (addNoCacheHeaders)
                     addNoCacheHeaders(req, res);
 
@@ -349,66 +333,50 @@
                 res.setContentLength(outBuffer.size());
                 outBuffer.writeTo(res.getOutputStream());
                 res.flushBuffer();
-            }
-            else
-            {
+            } else {
                 // Not an AMF request, probably viewed in a browser
-                if (redirectURL != null)
-                {
-                    try
-                    {
+                if (redirectURL != null) {
+                    try {
                         //Check for redirect URL context-root token
                         redirectURL = SettingsReplaceUtil.replaceContextPath(redirectURL, req.getContextPath());
                         res.sendRedirect(redirectURL);
-                    }
-                    catch (IllegalStateException alreadyFlushed)
-                    {
+                    } catch (IllegalStateException alreadyFlushed) {
                         // ignore
                     }
                 }
             }
-        }
-        catch (IOException ioe)
-        {
+        } catch (IOException ioe) {
             // This happens when client closes the connection, log it at info level
             log.info(ioe.getMessage());
             // Store exception information for latter logging
             req.setAttribute(HTTPRequestLog.HTTP_ERROR_INFO, ioe.toString());
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             log.error(t.getMessage(), t);
             // Store exception information for latter logging
             req.setAttribute(HTTPRequestLog.HTTP_ERROR_INFO, t.toString());
-        }
-        finally
-        {
+        } finally {
             clearThreadLocals();
         }
     }
 
 
     /**
-     *
      * Returns a <code>ConfigMap</code> of endpoint properties that the client
      * needs. This includes properties from <code>super.describeEndpoint</code>
      * and additional <code>BaseHTTPEndpoint</code> specific properties under
      * "properties" key.
      */
     @Override
-    public ConfigMap describeEndpoint()
-    {
+    public ConfigMap describeEndpoint() {
         ConfigMap endpointConfig = super.describeEndpoint();
 
-        if (loginAfterDisconnect)
-        {
+        if (loginAfterDisconnect) {
             ConfigMap loginAfterDisconnect = new ConfigMap();
             // Adding as a value rather than attribute to the parent
             loginAfterDisconnect.addProperty(EMPTY_STRING, TRUE_STRING);
 
             ConfigMap properties = endpointConfig.getPropertyAsMap(PROPERTIES_ELEMENT, null);
-            if (properties == null)
-            {
+            if (properties == null) {
                 properties = new ConfigMap();
                 endpointConfig.addProperty(PROPERTIES_ELEMENT, properties);
             }
@@ -425,8 +393,7 @@
      * @see AbstractEndpoint#setupFlexClient(String)
      */
     @Override
-    public FlexClient setupFlexClient(String id)
-    {
+    public FlexClient setupFlexClient(String id) {
         FlexClient flexClient = super.setupFlexClient(id);
 
         // Scan for duplicate HTTP-sessions and if found, invalidate them and throw a MessageException.
@@ -434,20 +401,16 @@
         boolean duplicateSessionDetected = (FlexContext.getHttpRequest().getAttribute(REQUEST_ATTR_DUPLICATE_SESSION_FLAG) != null);
 
         List<FlexSession> sessions = null;
-        if (!duplicateSessionDetected)
-        {
+        if (!duplicateSessionDetected) {
             sessions = flexClient.getFlexSessions();
             int n = sessions.size();
-            if (n > 1)
-            {
+            if (n > 1) {
                 List<HttpFlexSession> httpFlexSessions = new ArrayList<HttpFlexSession>();
-                for (int i = 0; i < n; i++)
-                {
+                for (int i = 0; i < n; i++) {
                     FlexSession currentSession = sessions.get(i);
                     if (currentSession instanceof HttpFlexSession)
-                        httpFlexSessions.add((HttpFlexSession)currentSession);
-                    if (httpFlexSessions.size() > 1)
-                    {
+                        httpFlexSessions.add((HttpFlexSession) currentSession);
+                    if (httpFlexSessions.size() > 1) {
                         FlexContext.getHttpRequest().setAttribute(REQUEST_ATTR_DUPLICATE_SESSION_FLAG, httpFlexSessions);
                         duplicateSessionDetected = true;
                         break;
@@ -458,25 +421,20 @@
 
         // If more than one was found, remote host isn't using session cookies. Kill all duplicate sessions and return an error.
         // Simplest to just re-scan the list given that it will be very short, but use an iterator for concurrent modification.
-        if (duplicateSessionDetected)
-        {
+        if (duplicateSessionDetected) {
             Object attributeValue = FlexContext.getHttpRequest().getAttribute(REQUEST_ATTR_DUPLICATE_SESSION_FLAG);
             String newSessionId = null;
             String oldSessionId = null;
-            if (attributeValue != null)
-            {
+            if (attributeValue != null) {
                 @SuppressWarnings("unchecked")
-                List<HttpFlexSession> httpFlexSessions = (List<HttpFlexSession>)attributeValue;
+                List<HttpFlexSession> httpFlexSessions = (List<HttpFlexSession>) attributeValue;
                 oldSessionId = httpFlexSessions.get(0).getId();
                 newSessionId = httpFlexSessions.get(1).getId();
             }
 
-            if (sessions != null)
-            {
-                for (FlexSession session : sessions)
-                {
-                    if (session instanceof HttpFlexSession)
-                    {
+            if (sessions != null) {
+                for (FlexSession session : sessions) {
+                    if (session instanceof HttpFlexSession) {
                         session.invalidate();
                     }
                 }
@@ -504,19 +462,17 @@
      * exception is that access control headers (Access-Control-*) are sent only
      * if there is an Origin header in the request.
      *
-     * @param request The HTTP request.
+     * @param request  The HTTP request.
      * @param response The HTTP response.
      */
-    protected void addHeadersToResponse(HttpServletRequest request, HttpServletResponse response)
-    {
+    protected void addHeadersToResponse(HttpServletRequest request, HttpServletResponse response) {
         if (httpResponseHeaders == null || httpResponseHeaders.isEmpty())
             return;
 
         String origin = request.getHeader(HEADER_NAME_ORIGIN);
         boolean originHeaderExists = origin != null && origin.length() != 0;
 
-        for (HttpHeader header : httpResponseHeaders)
-        {
+        for (HttpHeader header : httpResponseHeaders) {
             if (header.name.startsWith(ACCESS_CONTROL) && !originHeaderExists)
                 continue;
 
@@ -542,8 +498,8 @@
      *
      * @return https.
      */
-    @Override protected String getSecureProtocolScheme()
-    {
+    @Override
+    protected String getSecureProtocolScheme() {
         return HTTPS_PROTOCOL_SCHEME;
     }
 
@@ -552,29 +508,26 @@
      *
      * @return http.
      */
-    @Override protected String getInsecureProtocolScheme()
-    {
+    @Override
+    protected String getInsecureProtocolScheme() {
         return HTTP_PROTOCOL_SCHEME;
     }
 
     /**
      * @see flex.messaging.endpoints.AbstractEndpoint#handleChannelDisconnect(CommandMessage)
      */
-    @Override protected Message handleChannelDisconnect(CommandMessage disconnectCommand)
-    {
-        HttpFlexSession session = (HttpFlexSession)FlexContext.getFlexSession();
+    @Override
+    protected Message handleChannelDisconnect(CommandMessage disconnectCommand) {
+        HttpFlexSession session = (HttpFlexSession) FlexContext.getFlexSession();
         FlexClient flexClient = FlexContext.getFlexClient();
 
         // Shut down any subscriptions established over this channel/endpoint
         // for this specific FlexClient.
-        if (flexClient.isValid())
-        {
+        if (flexClient.isValid()) {
             String endpointId = getId();
             List<MessageClient> messageClients = flexClient.getMessageClients();
-            for (MessageClient messageClient : messageClients)
-            {
-                if (messageClient.getEndpointId().equals(endpointId))
-                {
+            for (MessageClient messageClient : messageClients) {
+                if (messageClient.getEndpointId().equals(endpointId)) {
                     messageClient.setClientChannelDisconnected(true);
                     messageClient.invalidate();
                 }
@@ -588,8 +541,7 @@
         return super.handleChannelDisconnect(disconnectCommand);
     }
 
-    protected void initializeHttpResponseHeaders(ConfigMap properties)
-    {
+    protected void initializeHttpResponseHeaders(ConfigMap properties) {
         if (!properties.containsKey(HTTP_RESPONSE_HEADERS))
             return;
 
@@ -605,8 +557,7 @@
         if (this.httpResponseHeaders == null)
             this.httpResponseHeaders = new ArrayList<HttpHeader>();
 
-        for (String header : headers)
-        {
+        for (String header : headers) {
             int colonIndex = header.indexOf(":");
             String name = header.substring(0, colonIndex).trim();
             String value = header.substring(colonIndex + 1).trim();
@@ -623,13 +574,12 @@
     /**
      * Helper class used for headers in the HTTP request/response.
      */
-    static class HttpHeader
-    {
-        public HttpHeader(String name, String value)
-        {
+    static class HttpHeader {
+        public HttpHeader(String name, String value) {
             this.name = name;
             this.value = value;
         }
+
         public final String name;
         public final String value;
     }
diff --git a/core/src/main/java/flex/messaging/endpoints/BasePollingHTTPEndpoint.java b/core/src/main/java/flex/messaging/endpoints/BasePollingHTTPEndpoint.java
index 0353354..54c9187 100644
--- a/core/src/main/java/flex/messaging/endpoints/BasePollingHTTPEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/BasePollingHTTPEndpoint.java
@@ -38,8 +38,7 @@
  * state until messages are available for delivery or the configurable wait interval
  * is reached.
  */
-public abstract class BasePollingHTTPEndpoint extends BaseHTTPEndpoint implements PollWaitListener
-{
+public abstract class BasePollingHTTPEndpoint extends BaseHTTPEndpoint implements PollWaitListener {
     //--------------------------------------------------------------------------
     //
     // Private Static Constants
@@ -68,8 +67,7 @@
     /**
      * Constructs an unmanaged <code>BasePollingHTTPEndpoint</code>.
      */
-    public BasePollingHTTPEndpoint()
-    {
+    public BasePollingHTTPEndpoint() {
         this(false);
     }
 
@@ -77,10 +75,9 @@
      * Constructs an <code>BasePollingHTTPEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>BasePollingHTTPEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public BasePollingHTTPEndpoint(boolean enableManagement)
-    {
+    public BasePollingHTTPEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -94,16 +91,14 @@
      * Initializes the <code>Endpoint</code> with the properties.
      * If subclasses override this method, they must call <code>super.initialize()</code>.
      *
-     * @param id The ID of the <code>Endpoint</code>.
+     * @param id         The ID of the <code>Endpoint</code>.
      * @param properties Properties for the <code>Endpoint</code>.
      */
     @Override
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
-        if (properties == null || properties.size() == 0)
-        {
+        if (properties == null || properties.size() == 0) {
             // Initialize default user agent manager settings.
             UserAgentManager.setupUserAgentManager(null, userAgentManager);
 
@@ -129,8 +124,7 @@
         UserAgentManager.setupUserAgentManager(properties, userAgentManager);
 
         // Set initial state for the canWait flag based on whether we allow waits or not.
-        if (maxWaitingPollRequests > 0 && (waitInterval == -1 || waitInterval > 0))
-        {
+        if (maxWaitingPollRequests > 0 && (waitInterval == -1 || waitInterval > 0)) {
             waitEnabled = true;
             canWait = true;
         }
@@ -190,10 +184,10 @@
      * A value greater than zero will cause the client to wait for the specified interval before
      * issuing its next poll request with a value of 1 triggering an immediate poll from the client
      * as soon as a waited poll response is received.
+     *
      * @return The client wait interval.
      */
-    public int getClientWaitInterval()
-    {
+    public int getClientWaitInterval() {
         return clientWaitInterval;
     }
 
@@ -208,10 +202,9 @@
      * This property does not effect polling clients that poll the server without a server wait.
      *
      * @param value The number of milliseconds a client will wait before issuing its next poll when the
-     *        server is configured to wait.
+     *              server is configured to wait.
      */
-    public void setClientWaitInterval(int value)
-    {
+    public void setClientWaitInterval(int value) {
         clientWaitInterval = value;
     }
 
@@ -224,10 +217,10 @@
     /**
      * Retrieves the maximum number of server poll response threads that will be
      * waiting for messages to arrive for clients.
+     *
      * @return The maximum number of waiting poll requests.
      */
-    public int getMaxWaitingPollRequests()
-    {
+    public int getMaxWaitingPollRequests() {
         return maxWaitingPollRequests;
     }
 
@@ -236,13 +229,11 @@
      * waiting for messages to arrive for clients.
      *
      * @param maxWaitingPollRequests The maximum number of server poll response threads
-     * that will be waiting for messages to arrive for the client.
+     *                               that will be waiting for messages to arrive for the client.
      */
-    public void setMaxWaitingPollRequests(int maxWaitingPollRequests)
-    {
+    public void setMaxWaitingPollRequests(int maxWaitingPollRequests) {
         this.maxWaitingPollRequests = maxWaitingPollRequests;
-        if (maxWaitingPollRequests > 0 && (waitInterval == -1 || waitInterval > 0))
-        {
+        if (maxWaitingPollRequests > 0 && (waitInterval == -1 || waitInterval > 0)) {
             waitEnabled = true;
             canWait = (waitingPollRequestsCount < maxWaitingPollRequests);
         }
@@ -253,7 +244,6 @@
     //----------------------------------
 
     /**
-     *
      * This is a property used on the client.
      */
     protected boolean piggybackingEnabled;
@@ -263,7 +253,6 @@
     //----------------------------------
 
     /**
-     *
      * This is a property used on the client.
      */
     protected boolean pollingEnabled;
@@ -273,7 +262,6 @@
     //----------------------------------
 
     /**
-     *
      * This is a property used on the client.
      */
     protected long pollingIntervalMillis = -1;
@@ -287,10 +275,10 @@
     /**
      * Retrieves the number of milliseconds the server poll response thread will be
      * waiting for messages to arrive for the client.
+     *
      * @return The wait interval.
      */
-    public long getWaitInterval()
-    {
+    public long getWaitInterval() {
         return waitInterval;
     }
 
@@ -299,13 +287,11 @@
      * waiting for messages to arrive for the client.
      *
      * @param waitInterval The number of milliseconds the server poll response thread will be
-     * waiting for messages to arrive for the client.
+     *                     waiting for messages to arrive for the client.
      */
-    public void setWaitInterval(long waitInterval)
-    {
+    public void setWaitInterval(long waitInterval) {
         this.waitInterval = waitInterval;
-        if (maxWaitingPollRequests > 0 && (waitInterval == -1 || waitInterval > 0))
-        {
+        if (maxWaitingPollRequests > 0 && (waitInterval == -1 || waitInterval > 0)) {
             waitEnabled = true;
             canWait = (waitingPollRequestsCount < maxWaitingPollRequests);
         }
@@ -321,8 +307,7 @@
      *
      * @return The count of the number of request threads that are currently in the wait state.
      */
-    public int getWaitingPollRequestsCount()
-    {
+    public int getWaitingPollRequestsCount() {
         return waitingPollRequestsCount;
     }
 
@@ -333,43 +318,37 @@
     //--------------------------------------------------------------------------
 
     /**
-     *
      * Returns a <code>ConfigMap</code> of endpoint properties that the client
      * needs. This includes properties from <code>super.describeEndpoint</code>
      * and additional <code>BaseHTTPEndpoint</code> specific properties under
      * "properties" key.
      */
     @Override
-    public ConfigMap describeEndpoint()
-    {
+    public ConfigMap describeEndpoint() {
         ConfigMap endpointConfig = super.describeEndpoint();
 
         boolean createdProperties = false;
         ConfigMap properties = endpointConfig.getPropertyAsMap(PROPERTIES_ELEMENT, null);
-        if (properties == null)
-        {
+        if (properties == null) {
             properties = new ConfigMap();
             createdProperties = true;
         }
 
-        if (pollingEnabled)
-        {
+        if (pollingEnabled) {
             ConfigMap pollingEnabled = new ConfigMap();
             // Adding as a value rather than attribute to the parent
             pollingEnabled.addProperty(EMPTY_STRING, TRUE_STRING);
             properties.addProperty(POLLING_ENABLED, pollingEnabled);
         }
 
-        if (pollingIntervalMillis > -1)
-        {
+        if (pollingIntervalMillis > -1) {
             ConfigMap pollingInterval = new ConfigMap();
             // Adding as a value rather than attribute to the parent
             pollingInterval.addProperty(EMPTY_STRING, String.valueOf(pollingIntervalMillis));
             properties.addProperty(POLLING_INTERVAL_MILLIS, pollingInterval);
         }
 
-        if (piggybackingEnabled)
-        {
+        if (piggybackingEnabled) {
             ConfigMap piggybackingEnabled = new ConfigMap();
             // Adding as a value rather than attribute to the parent
             piggybackingEnabled.addProperty(EMPTY_STRING, String.valueOf(piggybackingEnabled));
@@ -389,8 +368,7 @@
      * @see flex.messaging.endpoints.AbstractEndpoint#start()
      */
     @Override
-    public void start()
-    {
+    public void start() {
         if (isStarted())
             return;
 
@@ -405,18 +383,15 @@
      * @see flex.messaging.endpoints.AbstractEndpoint#stop()
      */
     @Override
-    public void stop()
-    {
+    public void stop() {
         if (!isStarted())
             return;
 
         // Notify any currently waiting polls.
         Enumeration keys = currentWaitedRequests.keys();
-        while (keys.hasMoreElements())
-        {
+        while (keys.hasMoreElements()) {
             Object notifier = keys.nextElement();
-            synchronized (notifier)
-            {
+            synchronized (notifier) {
                 notifier.notifyAll(); // Break any current waits.
             }
         }
@@ -427,19 +402,19 @@
 
     /**
      * (non-Javaodc)
+     *
      * @see flex.messaging.client.PollWaitListener#waitStart(Object)
      */
-    public void waitStart(Object notifier)
-    {
+    public void waitStart(Object notifier) {
         currentWaitedRequests.put(notifier, Boolean.TRUE);
     }
 
     /**
      * (non-Javaodc)
+     *
      * @see flex.messaging.client.PollWaitListener#waitEnd(Object)
      */
-    public void waitEnd(Object notifier)
-    {
+    public void waitEnd(Object notifier) {
         if (currentWaitedRequests != null)
             currentWaitedRequests.remove(notifier);
     }
@@ -457,16 +432,14 @@
      * and waits will only be attempted if the canWait flag that is based on the <code>max-waiting-poll-requests</code>
      * and the specified <code>wait-interval</code> is true.
      *
-     * @param flexClient The FlexClient that issued the poll request.
+     * @param flexClient  The FlexClient that issued the poll request.
      * @param pollCommand The poll command from the client.
      * @return The flush info used to build the poll response.
      */
     @Override
-    protected FlushResult handleFlexClientPoll(FlexClient flexClient, CommandMessage pollCommand)
-    {
+    protected FlushResult handleFlexClientPoll(FlexClient flexClient, CommandMessage pollCommand) {
         FlushResult flushResult = null;
-        if (canWait && !pollCommand.headerExists(CommandMessage.SUPPRESS_POLL_WAIT_HEADER))
-        {
+        if (canWait && !pollCommand.headerExists(CommandMessage.SUPPRESS_POLL_WAIT_HEADER)) {
             FlexSession session = FlexContext.getFlexSession();
             // If canWait is true it means we currently have less than the max number of allowed waiting threads.
 
@@ -474,127 +447,99 @@
             // Also, we have to be careful to handle the case where two threads get to this point when only
             // one wait spot remains; one thread will win and the other needs to revert to a non-waitable poll.
             boolean thisThreadCanWait;
-            synchronized (lock)
-            {
+            synchronized (lock) {
                 ++waitingPollRequestsCount;
-                if (waitingPollRequestsCount == maxWaitingPollRequests)
-                {
+                if (waitingPollRequestsCount == maxWaitingPollRequests) {
                     thisThreadCanWait = true; // This thread got the last wait spot.
                     canWait = false;
-                }
-                else if (waitingPollRequestsCount > maxWaitingPollRequests)
-                {
+                } else if (waitingPollRequestsCount > maxWaitingPollRequests) {
                     thisThreadCanWait = false; // This thread was beaten out for the last spot.
                     --waitingPollRequestsCount; // Decrement the count because we're not going to try a poll with wait.
                     canWait = false; // All the wait spots are currently occupied so prevent further attempts for now.
-                }
-                else
-                {
+                } else {
                     // We haven't hit the limit yet, allow this thread to wait.
                     thisThreadCanWait = true;
                 }
             }
 
             // Check the max waiting connections per session count
-            if (thisThreadCanWait)
-            {
+            if (thisThreadCanWait) {
                 String userAgentValue = FlexContext.getHttpRequest().getHeader(UserAgentManager.USER_AGENT_HEADER_NAME);
                 UserAgentSettings agentSettings = userAgentManager.match(userAgentValue);
-                synchronized(session)
-                {
+                synchronized (session) {
                     if (agentSettings != null)
                         session.maxConnectionsPerSession = agentSettings.getMaxPersistentConnectionsPerSession();
 
                     ++session.streamingConnectionsCount;
                     if (session.maxConnectionsPerSession == FlexSession.MAX_CONNECTIONS_PER_SESSION_UNLIMITED
-                            || session.streamingConnectionsCount <= session.maxConnectionsPerSession)
-                    {
+                            || session.streamingConnectionsCount <= session.maxConnectionsPerSession) {
                         thisThreadCanWait = true; // We haven't hit the limit yet, allow the wait.
-                    }
-                    else // (session.streamingConnectionsCount > session.maxConnectionsPerSession)
+                    } else // (session.streamingConnectionsCount > session.maxConnectionsPerSession)
                     {
                         thisThreadCanWait = false; // no more from this client
                         --session.streamingConnectionsCount;
                     }
                 }
 
-                if (!thisThreadCanWait)
-                {
+                if (!thisThreadCanWait) {
                     // Decrement the waiting poll count, since this poll isn't going to wait.
-                    synchronized (lock)
-                    {
+                    synchronized (lock) {
                         --waitingPollRequestsCount;
                         if (waitingPollRequestsCount < maxWaitingPollRequests)
                             canWait = true;
                     }
-                    if (Log.isDebug())
-                    {
+                    if (Log.isDebug()) {
                         log.debug("Max long-polling requests per session limit (" + session.maxConnectionsPerSession + ") has been reached, this poll won't wait.");
                     }
                 }
 
             }
 
-            if (thisThreadCanWait)
-            {
+            if (thisThreadCanWait) {
                 if (Log.isDebug())
-                    log.debug("Number of waiting threads for endpoint with id '"+ getId() +"' is " + waitingPollRequestsCount + ".");
+                    log.debug("Number of waiting threads for endpoint with id '" + getId() + "' is " + waitingPollRequestsCount + ".");
 
-                try
-                {
-                    flushResult  = flexClient.pollWithWait(getId(), FlexContext.getFlexSession(), this, waitInterval);
-                    if (flushResult != null)
-                    {
+                try {
+                    flushResult = flexClient.pollWithWait(getId(), FlexContext.getFlexSession(), this, waitInterval);
+                    if (flushResult != null) {
                         // Prevent busy-polling due to multiple clients sharing a session and swapping each other out too quickly.
-                        if ((flushResult instanceof PollFlushResult) && ((PollFlushResult)flushResult).isAvoidBusyPolling() && (flushResult.getNextFlushWaitTimeMillis() < DEFAULT_WAIT_FOR_EXCESS_POLL_WAIT_CLIENTS))
-                        {
+                        if ((flushResult instanceof PollFlushResult) && ((PollFlushResult) flushResult).isAvoidBusyPolling() && (flushResult.getNextFlushWaitTimeMillis() < DEFAULT_WAIT_FOR_EXCESS_POLL_WAIT_CLIENTS)) {
                             // Force the client polling interval to match the default defined in the client PollingChannel.
                             flushResult.setNextFlushWaitTimeMillis(DEFAULT_WAIT_FOR_EXCESS_POLL_WAIT_CLIENTS);
-                        }
-                        else if ((clientWaitInterval > 0) && (flushResult.getNextFlushWaitTimeMillis() == 0))
-                        {
+                        } else if ((clientWaitInterval > 0) && (flushResult.getNextFlushWaitTimeMillis() == 0)) {
                             // If the FlushResult doesn't specify it's own flush wait time, use the configured clientWaitInterval if defined.
                             flushResult.setNextFlushWaitTimeMillis(clientWaitInterval);
                         }
                     }
-                }
-                finally
-                {
+                } finally {
                     // We're done waiting so decrement the count of waiting threads and update the canWait flag if necessary
-                    synchronized (lock)
-                    {
+                    synchronized (lock) {
                         --waitingPollRequestsCount;
                         if (waitingPollRequestsCount < maxWaitingPollRequests)
                             canWait = true;
                     }
-                    synchronized (session)
-                    {
+                    synchronized (session) {
                         --session.streamingConnectionsCount;
                     }
 
                     if (Log.isDebug())
-                        log.debug("Number of waiting threads for endpoint with id '"+ getId() +"' is " + waitingPollRequestsCount + ".");
+                        log.debug("Number of waiting threads for endpoint with id '" + getId() + "' is " + waitingPollRequestsCount + ".");
                 }
             }
-        }
-        else if (Log.isDebug() && waitEnabled)
-        {
+        } else if (Log.isDebug() && waitEnabled) {
             if (pollCommand.headerExists(CommandMessage.SUPPRESS_POLL_WAIT_HEADER))
                 log.debug("Suppressing poll wait for this request because it is part of a batch of messages to process.");
             else
-                log.debug("Max waiting poll requests limit '" + maxWaitingPollRequests + "' has been reached for endpoint '" + getId() + "'. FlexClient with id '"+ flexClient.getId() + "' will poll with no wait.");
+                log.debug("Max waiting poll requests limit '" + maxWaitingPollRequests + "' has been reached for endpoint '" + getId() + "'. FlexClient with id '" + flexClient.getId() + "' will poll with no wait.");
         }
 
         // If we weren't able to do a poll with wait above for any reason just run the base poll handling logic.
-        if (flushResult == null)
-        {
+        if (flushResult == null) {
             flushResult = super.handleFlexClientPoll(flexClient, pollCommand);
             // If this is an excess poll request that we couldn't wait on, make sure the client doesn't poll the endpoint too aggressively.
             // In this case, force a client wait to match the default polling interval defined in the client PollingChannel.
-            if ( waitEnabled && (pollingIntervalMillis < DEFAULT_WAIT_FOR_EXCESS_POLL_WAIT_CLIENTS))
-            {
-                if (flushResult == null)
-                {
+            if (waitEnabled && (pollingIntervalMillis < DEFAULT_WAIT_FOR_EXCESS_POLL_WAIT_CLIENTS)) {
+                if (flushResult == null) {
                     flushResult = new FlushResult();
                 }
                 flushResult.setNextFlushWaitTimeMillis(DEFAULT_WAIT_FOR_EXCESS_POLL_WAIT_CLIENTS);
diff --git a/core/src/main/java/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java b/core/src/main/java/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java
index 7aa7328..1422e26 100644
--- a/core/src/main/java/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java
@@ -58,8 +58,7 @@
  * that are received. To support polling clients use subclasses of
  * BaseHTTPEndpoint instead.
  */
-public abstract class BaseStreamingHTTPEndpoint extends BaseHTTPEndpoint
-{
+public abstract class BaseStreamingHTTPEndpoint extends BaseHTTPEndpoint {
     //--------------------------------------------------------------------------
     //
     // Private Static Constants
@@ -69,17 +68,17 @@
     /**
      * This token is used in chunked HTTP responses frequently so initialize it statically for general use.
      */
-    private static final byte[] CRLF_BYTES = {(byte)13, (byte)10};
+    private static final byte[] CRLF_BYTES = {(byte) 13, (byte) 10};
 
     /**
      * This token is used for the terminal chunk within a chunked response.
      */
-    private static final byte ZERO_BYTE = (byte)48;
+    private static final byte ZERO_BYTE = (byte) 48;
 
     /**
      * This token is used to signal that a chunk of data should be skipped by the client.
      */
-    private static final byte NULL_BYTE = (byte)0;
+    private static final byte NULL_BYTE = (byte) 0;
 
     /**
      * Parameter name for 'command' passed in a request for a new streaming connection.
@@ -100,7 +99,7 @@
     private static final String CLOSE_COMMAND = "close";
 
     /**
-     *  Parameter name for the stream ID; passed with commands for an existing streaming connection.
+     * Parameter name for the stream ID; passed with commands for an existing streaming connection.
      */
     private static final String STREAM_ID_PARAM_NAME = "streamId";
 
@@ -146,8 +145,7 @@
     /**
      * Constructs an unmanaged <code>BaseStreamingHTTPEndpoint</code>.
      */
-    public BaseStreamingHTTPEndpoint()
-    {
+    public BaseStreamingHTTPEndpoint() {
         this(false);
     }
 
@@ -155,10 +153,9 @@
      * Constructs an <code>BaseStreamingHTTPEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>BaseStreamingHTTPEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public BaseStreamingHTTPEndpoint(boolean enableManagement)
-    {
+    public BaseStreamingHTTPEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -172,16 +169,14 @@
      * Initializes the <code>Endpoint</code> with the properties.
      * If subclasses override this method, they must call <code>super.initialize()</code>.
      *
-     * @param id The ID of the <code>Endpoint</code>.
+     * @param id         The ID of the <code>Endpoint</code>.
      * @param properties Properties for the <code>Endpoint</code>.
      */
     @Override
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
-        if (properties == null || properties.size() == 0)
-        {
+        if (properties == null || properties.size() == 0) {
             // Initialize default user agent manager settings.
             UserAgentManager.setupUserAgentManager(null, userAgentManager);
 
@@ -196,12 +191,9 @@
 
         // Number of minutes a client can remain idle before the server times the connection out.
         int connectionIdleTimeoutMinutes = properties.getPropertyAsInt(PROPERTY_CONNECTION_IDLE_TIMEOUT_MINUTES, getConnectionIdleTimeoutMinutes());
-        if (connectionIdleTimeoutMinutes != 0)
-        {
+        if (connectionIdleTimeoutMinutes != 0) {
             setConnectionIdleTimeoutMinutes(connectionIdleTimeoutMinutes);
-        }
-        else
-        {
+        } else {
             connectionIdleTimeoutMinutes = properties.getPropertyAsInt(PROPERTY_LEGACY_CONNECTION_IDLE_TIMEOUT_MINUTES, getConnectionIdleTimeoutMinutes());
             if (connectionIdleTimeoutMinutes != 0)
                 setConnectionIdleTimeoutMinutes(connectionIdleTimeoutMinutes);
@@ -219,25 +211,22 @@
 
 
     @Override
-    public void start()
-    {
+    public void start() {
         if (isStarted())
             return;
 
         super.start();
 
-        if (connectionIdleTimeoutMinutes > 0)
-        {
-            pushNotifierTimeoutManager = new TimeoutManager(new ThreadFactory()
-                                                            {
-                                                                int counter = 1;
-                                                                public synchronized Thread newThread(Runnable runnable)
-                                                                {
-                                                                    Thread t = new Thread(runnable);
-                                                                    t.setName(getId() + "-StreamingConnectionTimeoutThread-" + counter++);
-                                                                    return t;
-                                                                }
-                                                            });
+        if (connectionIdleTimeoutMinutes > 0) {
+            pushNotifierTimeoutManager = new TimeoutManager(new ThreadFactory() {
+                int counter = 1;
+
+                public synchronized Thread newThread(Runnable runnable) {
+                    Thread t = new Thread(runnable);
+                    t.setName(getId() + "-StreamingConnectionTimeoutThread-" + counter++);
+                    return t;
+                }
+            });
         }
 
         currentStreamingRequests = new ConcurrentHashMap<String, EndpointPushNotifier>();
@@ -245,17 +234,16 @@
 
     /**
      * (non-JavaDoc)
+     *
      * @see flex.messaging.endpoints.AbstractEndpoint#stop()
      */
     @Override
-    public void stop()
-    {
+    public void stop() {
         if (!isStarted())
             return;
 
         // Shutdown the timeout manager for streaming connections cleanly.
-        if (pushNotifierTimeoutManager != null)
-        {
+        if (pushNotifierTimeoutManager != null) {
             pushNotifierTimeoutManager.shutdown();
             pushNotifierTimeoutManager = null;
         }
@@ -323,8 +311,7 @@
      *
      * @return <code>true</code> if the invalidate-messageclient-on-streaming-close is enabled, <code>false</code> otherwise.
      */
-    public boolean isInvalidateMessageClientOnStreamingClose()
-    {
+    public boolean isInvalidateMessageClientOnStreamingClose() {
         return invalidateMessageClientOnStreamingClose;
     }
 
@@ -342,8 +329,7 @@
      *
      * @param value The property value.
      */
-    public void setInvalidateMessageClientOnStreamingClose(boolean value)
-    {
+    public void setInvalidateMessageClientOnStreamingClose(boolean value) {
         invalidateMessageClientOnStreamingClose = value;
     }
 
@@ -357,10 +343,10 @@
      * Retrieves the number of milliseconds the server will wait before writing a
      * single <code>null</code> byte to the streaming connection, to ensure the client is
      * still available.
+     *
      * @return The server-to-client heartbeat time in milliseconds.
      */
-    public long getServerToClientHeartbeatMillis()
-    {
+    public long getServerToClientHeartbeatMillis() {
         return serverToClientHeartbeatMillis;
     }
 
@@ -370,10 +356,10 @@
      * still available when there are no new messages for the client.
      * A non-positive value means the server will wait forever for new messages and
      * it will not write the <code>null</code> byte to determine if the client is available.
+     *
      * @param serverToClientHeartbeatMillis The server-to-client heartbeat time in milliseconds.
      */
-    public void setServerToClientHeartbeatMillis(long serverToClientHeartbeatMillis)
-    {
+    public void setServerToClientHeartbeatMillis(long serverToClientHeartbeatMillis) {
         if (serverToClientHeartbeatMillis < 0)
             serverToClientHeartbeatMillis = 0;
         this.serverToClientHeartbeatMillis = serverToClientHeartbeatMillis;
@@ -394,8 +380,7 @@
      * @return The number of minutes a client can remain idle before the server
      * times the connection out.
      */
-    public int getConnectionIdleTimeoutMinutes()
-    {
+    public int getConnectionIdleTimeoutMinutes() {
         return connectionIdleTimeoutMinutes;
     }
 
@@ -405,10 +390,9 @@
      * connections will not be timed out.
      *
      * @param value The number of minutes a client can remain idle
-     * before the server times the connection out.
+     *              before the server times the connection out.
      */
-    public void setConnectionIdleTimeoutMinutes(int value)
-    {
+    public void setConnectionIdleTimeoutMinutes(int value) {
         if (value < 0)
             value = 0;
 
@@ -417,19 +401,19 @@
 
     /**
      * (non-JavaDoc)
+     *
      * @deprecated Use {@link BaseStreamingHTTPEndpoint#getConnectionIdleTimeoutMinutes()} instead.
      */
-    public int getIdleTimeoutMinutes()
-    {
+    public int getIdleTimeoutMinutes() {
         return getConnectionIdleTimeoutMinutes();
     }
 
     /**
      * (non-JavaDoc)
+     *
      * @deprecated Use {@link BaseStreamingHTTPEndpoint#setConnectionIdleTimeoutMinutes(int)} instead.
      */
-    public void setIdleTimeoutMinutes(int value)
-    {
+    public void setIdleTimeoutMinutes(int value) {
         setConnectionIdleTimeoutMinutes(value);
     }
 
@@ -446,8 +430,7 @@
      * @return The maximum number of clients that will be allowed to establish
      * a streaming HTTP connection with the endpoint.
      */
-    public int getMaxStreamingClients()
-    {
+    public int getMaxStreamingClients() {
         return maxStreamingClients;
     }
 
@@ -456,10 +439,9 @@
      * a streaming HTTP connection with the server.
      *
      * @param maxStreamingClients The maximum number of clients that will be allowed
-     * to establish a streaming HTTP connection with the server.
+     *                            to establish a streaming HTTP connection with the server.
      */
-    public void setMaxStreamingClients(int maxStreamingClients)
-    {
+    public void setMaxStreamingClients(int maxStreamingClients) {
         this.maxStreamingClients = maxStreamingClients;
         canStream = (streamingClientsCount < maxStreamingClients);
     }
@@ -475,8 +457,7 @@
      *
      * @return The number of clients that are currently in the streaming state.
      */
-    public int getStreamingClientsCount()
-    {
+    public int getStreamingClientsCount() {
         return streamingClientsCount;
     }
 
@@ -498,8 +479,7 @@
      * @param res The active servlet response.
      */
     @Override
-    public void service(HttpServletRequest req, HttpServletResponse res)
-    {
+    public void service(HttpServletRequest req, HttpServletResponse res) {
         String command = req.getParameter(COMMAND_PARAM_NAME);
         if (command != null)
             serviceStreamingRequest(req, res);
@@ -519,29 +499,24 @@
      *
      * @param message Message to add performance headers to.
      */
-    protected void addPerformanceInfo(Message message)
-    {
+    protected void addPerformanceInfo(Message message) {
         MessagePerformanceInfo mpiOriginal = getMPI(message);
         if (mpiOriginal == null)
             return;
 
-        MessagePerformanceInfo mpip = (MessagePerformanceInfo)mpiOriginal.clone();
-        try
-        {
+        MessagePerformanceInfo mpip = (MessagePerformanceInfo) mpiOriginal.clone();
+        try {
             // Set the original message info as the pushed causer info.
             MessagePerformanceUtils.setMPIP(message, mpip);
             MessagePerformanceUtils.setMPII(message, null);
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             if (Log.isDebug())
                 log.debug("MPI exception while streaming the message: " + e.toString());
         }
 
         // Overhead only used when MPI is enabled for sizing
         MessagePerformanceInfo mpio = new MessagePerformanceInfo();
-        if (mpip.recordMessageTimes)
-        {
+        if (mpip.recordMessageTimes) {
             mpio.sendTime = System.currentTimeMillis();
             mpio.infoType = "OUT";
         }
@@ -549,26 +524,21 @@
         MessagePerformanceUtils.setMPIO(message, mpio);
 
         // If MPI sizing information is enabled serialize again so that we know size
-        if (mpip.recordMessageSizes)
-        {
-            try
-            {
+        if (mpip.recordMessageSizes) {
+            try {
                 // Each subclass serializes the message in their own format to
                 // get the message size for the MPIO.
                 long serializationOverhead = System.currentTimeMillis();
                 mpio.messageSize = getMessageSizeForPerformanceInfo(message);
 
                 // Set serialization overhead to the time calculated during serialization above
-                if (mpip.recordMessageTimes)
-                {
+                if (mpip.recordMessageTimes) {
                     serializationOverhead = System.currentTimeMillis() - serializationOverhead;
                     mpip.addToOverhead(serializationOverhead);
                     mpiOriginal.addToOverhead(serializationOverhead);
                     mpio.sendTime = System.currentTimeMillis();
                 }
-            }
-            catch(Exception e)
-            {
+            } catch (Exception e) {
                 log.debug("MPI exception while streaming the message: " + e.toString());
             }
         }
@@ -582,8 +552,7 @@
      * @return The small message if the message has a small version, or regular message
      * if it doesn't .
      */
-    protected Message convertPushMessageToSmall(Message message)
-    {
+    protected Message convertPushMessageToSmall(Message message) {
         FlexSession session = FlexContext.getFlexSession();
         if (session != null && session.useSmallMessages())
             return convertToSmallMessage(message);
@@ -597,24 +566,21 @@
      * size information in performance information gathering.
      *
      * @param message Message to get the size for.
-     *
      * @return The size of the message after message is serialized.
      */
-    protected long getMessageSizeForPerformanceInfo(Message message)
-    {
+    protected long getMessageSizeForPerformanceInfo(Message message) {
         return 0;
     }
 
     /**
      * This streaming endpoint does not support polling clients.
      *
-     * @param flexClient The FlexClient that issued the poll request.
+     * @param flexClient  The FlexClient that issued the poll request.
      * @param pollCommand The poll command from the client.
      * @return The flush info used to build the poll response.
      */
     @Override
-    protected FlushResult handleFlexClientPoll(FlexClient flexClient, CommandMessage pollCommand)
-    {
+    protected FlushResult handleFlexClientPoll(FlexClient flexClient, CommandMessage pollCommand) {
         MessageException me = new MessageException();
         me.setMessage(POLL_NOT_SUPPORTED_MESSAGE);
         me.setDetails(POLL_NOT_SUPPORTED_MESSAGE);
@@ -625,16 +591,14 @@
     /**
      * Handles streaming connection open command sent by the FlexClient.
      *
-     * @param req The <code>HttpServletRequest</code> to service.
-     * @param res The <code>HttpServletResponse</code> to be used in case an error
-     * has to be sent back.
+     * @param req        The <code>HttpServletRequest</code> to service.
+     * @param res        The <code>HttpServletResponse</code> to be used in case an error
+     *                   has to be sent back.
      * @param flexClient FlexClient that requested the streaming connection.
      */
-    protected void handleFlexClientStreamingOpenRequest(HttpServletRequest req, HttpServletResponse res, FlexClient flexClient)
-    {
+    protected void handleFlexClientStreamingOpenRequest(HttpServletRequest req, HttpServletResponse res, FlexClient flexClient) {
         FlexSession session = FlexContext.getFlexSession();
-        if (canStream && session.canStream)
-        {
+        if (canStream && session.canStream) {
             // If canStream/session.canStream is true it means we currently have
             // less than the max number of allowed streaming threads, per endpoint/session.
 
@@ -642,21 +606,15 @@
             // Also, we have to be careful to handle the case where two threads get to this point when only
             // one streaming spot remains; one thread will win and the other needs to fault.
             boolean thisThreadCanStream;
-            synchronized (lock)
-            {
+            synchronized (lock) {
                 ++streamingClientsCount;
-                if (streamingClientsCount == maxStreamingClients)
-                {
+                if (streamingClientsCount == maxStreamingClients) {
                     thisThreadCanStream = true; // This thread got the last spot.
                     canStream = false;
-                }
-                else if (streamingClientsCount > maxStreamingClients)
-                {
+                } else if (streamingClientsCount > maxStreamingClients) {
                     thisThreadCanStream = false; // This thread was beaten out for the last spot.
                     --streamingClientsCount; // Decrement the count because we're not going to grant the streaming right to the client.
-                }
-                else
-                {
+                } else {
                     // We haven't hit the limit yet, allow this thread to stream.
                     thisThreadCanStream = true;
                 }
@@ -664,21 +622,18 @@
 
             // If the thread cannot wait due to endpoint streaming connection
             // limit, inform the client and return.
-            if (!thisThreadCanStream)
-            {
+            if (!thisThreadCanStream) {
                 String errorMessage = "Endpoint with id '" + getId() + "' cannot grant streaming connection to FlexClient with id '"
                         + flexClient.getId() + "' because " + MAX_STREAMING_CLIENTS + " limit of '"
                         + maxStreamingClients + "' has been reached.";
                 if (Log.isError())
                     log.error(errorMessage);
-                try
-                {
+                try {
                     errorMessage = "Endpoint with id '" + getId() + "' cannot grant streaming connection to FlexClient with id '"
-                    + flexClient.getId() + "' because " + MAX_STREAMING_CLIENTS + " limit has been reached.";
+                            + flexClient.getId() + "' because " + MAX_STREAMING_CLIENTS + " limit has been reached.";
                     res.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, errorMessage);
+                } catch (IOException ignore) {
                 }
-                catch (IOException ignore)
-                {}
                 return;
             }
 
@@ -686,28 +641,22 @@
             byte[] kickStartBytesToStream = null;
             String userAgentValue = req.getHeader(UserAgentManager.USER_AGENT_HEADER_NAME);
             UserAgentSettings agentSettings = userAgentManager.match(userAgentValue);
-            if (agentSettings != null)
-            {
-                synchronized (session)
-                {
+            if (agentSettings != null) {
+                synchronized (session) {
                     session.maxConnectionsPerSession = agentSettings.getMaxPersistentConnectionsPerSession();
                 }
 
                 int kickStartBytes = agentSettings.getKickstartBytes();
-                if (kickStartBytes > 0)
-                {
+                if (kickStartBytes > 0) {
                     // Determine the minimum number of actual bytes that need to be sent to
                     // kickstart, taking into account transfer-encoding overhead.
-                    try
-                    {
+                    try {
                         int chunkLengthHeaderSize = Integer.toHexString(kickStartBytes).getBytes("ASCII").length;
                         int chunkOverhead = chunkLengthHeaderSize + 4; // 4 for the 2 wrapping CRLF tokens.
                         int minimumKickstartBytes = kickStartBytes - chunkOverhead;
                         kickStartBytesToStream = new byte[(minimumKickstartBytes > 0) ? minimumKickstartBytes :
                                 kickStartBytes];
-                    }
-                    catch (UnsupportedEncodingException ignore)
-                    {
+                    } catch (UnsupportedEncodingException ignore) {
                         kickStartBytesToStream = new byte[kickStartBytes];
                     }
                     Arrays.fill(kickStartBytesToStream, NULL_BYTE);
@@ -715,30 +664,21 @@
             }
 
             // Now, check with the session before granting the streaming connection.
-            synchronized(session)
-            {
+            synchronized (session) {
                 ++session.streamingConnectionsCount;
-                if (session.maxConnectionsPerSession == FlexSession.MAX_CONNECTIONS_PER_SESSION_UNLIMITED)
-                {
+                if (session.maxConnectionsPerSession == FlexSession.MAX_CONNECTIONS_PER_SESSION_UNLIMITED) {
                     thisThreadCanStream = true;
-                }
-                else if (session.streamingConnectionsCount == session.maxConnectionsPerSession)
-                {
+                } else if (session.streamingConnectionsCount == session.maxConnectionsPerSession) {
                     thisThreadCanStream = true; // This thread got the last spot in the session.
                     session.canStream = false;
-                }
-                else if (session.streamingConnectionsCount > session.maxConnectionsPerSession)
-                {
+                } else if (session.streamingConnectionsCount > session.maxConnectionsPerSession) {
                     thisThreadCanStream = false; // This thread was beaten out for the last spot.
                     --session.streamingConnectionsCount;
-                    synchronized(lock)
-                    {
+                    synchronized (lock) {
                         // Decrement the endpoint count because we're not going to grant the streaming right to the client.
                         --streamingClientsCount;
                     }
-                }
-                else
-                {
+                } else {
                     // We haven't hit the limit yet, allow this thread to stream.
                     thisThreadCanStream = true;
                 }
@@ -746,20 +686,16 @@
 
             // If the thread cannot wait due to session streaming connection
             // limit, inform the client and return.
-            if (!thisThreadCanStream)
-            {
+            if (!thisThreadCanStream) {
                 if (Log.isError())
                     log.error("Endpoint with id '" + getId() + "' cannot grant streaming connection to FlexClient with id '"
                             + flexClient.getId() + "' because " + UserAgentManager.MAX_PERSISTENT_CONNECTIONS_PER_SESSION + " limit of '" + session.maxConnectionsPerSession
-                            + ((agentSettings != null) ? "' for user-agent '" + agentSettings.getMatchOn() + "'" : "") +  " has been reached." );
-                try
-                {
+                            + ((agentSettings != null) ? "' for user-agent '" + agentSettings.getMatchOn() + "'" : "") + " has been reached.");
+                try {
                     // Return an HTTP status code 400.
                     String errorMessage = "The server cannot grant streaming connection to this client because limit has been reached.";
                     res.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, errorMessage);
-                }
-                catch (IOException ignore)
-                {
+                } catch (IOException ignore) {
                     // NOWARN
                 }
                 return;
@@ -769,8 +705,7 @@
             String threadName = currentThread.getName();
             EndpointPushNotifier notifier = null;
             boolean suppressIOExceptionLogging = false; // Used to suppress logging for IO exception.
-            try
-            {
+            try {
                 currentThread.setName(threadName + STREAMING_THREAD_NAME_EXTENSION);
 
                 // Open and commit response headers and get output stream.
@@ -783,8 +718,7 @@
                 res.flushBuffer();
 
                 // If kickstart-bytes are specified, stream them.
-                if (kickStartBytesToStream != null)
-                {
+                if (kickStartBytesToStream != null) {
                     if (Log.isDebug())
                         log.debug("Endpoint with id '" + getId() + "' is streaming " + kickStartBytesToStream.length
                                 + " bytes (not counting chunk encoding overhead) to kick-start the streaming connection for FlexClient with id '"
@@ -798,12 +732,9 @@
 
                 // Activate streaming helper for this connection.
                 // Watch out for duplicate stream issues.
-                try
-                {
+                try {
                     notifier = new EndpointPushNotifier(this, flexClient);
-                }
-                catch (MessageException me)
-                {
+                } catch (MessageException me) {
                     if (me.getNumber() == 10033) // It's a duplicate stream request from the same FlexClient. Leave the current stream in place and fault this.
                     {
                         if (Log.isWarn())
@@ -811,23 +742,18 @@
                                     + flexClient.getId() + "'. Faulting request.");
 
                         // Rollback counters and send an error response.
-                        synchronized (lock)
-                        {
+                        synchronized (lock) {
                             --streamingClientsCount;
                             canStream = (streamingClientsCount < maxStreamingClients);
-                            synchronized (session)
-                            {
+                            synchronized (session) {
                                 --session.streamingConnectionsCount;
                                 session.canStream = (session.maxConnectionsPerSession == FlexSession.MAX_CONNECTIONS_PER_SESSION_UNLIMITED
                                         || session.streamingConnectionsCount < session.maxConnectionsPerSession);
                             }
                         }
-                        try
-                        {
+                        try {
                             res.sendError(HttpServletResponse.SC_BAD_REQUEST);
-                        }
-                        catch (IOException ignore)
-                        {
+                        } catch (IOException ignore) {
                             // NOWARN
                         }
                         return; // Exit early.
@@ -849,44 +775,36 @@
 
                 // Output session level streaming count.
                 if (Log.isDebug())
-                    Log.getLogger(FlexSession.FLEX_SESSION_LOG_CATEGORY).info("Number of streaming clients for FlexSession with id '"+ session.getId() +"' is " + session.streamingConnectionsCount + ".");
+                    Log.getLogger(FlexSession.FLEX_SESSION_LOG_CATEGORY).info("Number of streaming clients for FlexSession with id '" + session.getId() + "' is " + session.streamingConnectionsCount + ".");
 
                 // Output endpoint level streaming count.
                 if (Log.isDebug())
-                    log.debug("Number of streaming clients for endpoint with id '"+ getId() +"' is " + streamingClientsCount + ".");
+                    log.debug("Number of streaming clients for endpoint with id '" + getId() + "' is " + streamingClientsCount + ".");
 
                 // And cycle in a wait-notify loop with the aid of the helper until it
                 // is closed, we're interrupted or the act of streaming data to the client fails.
-                while (!notifier.isClosed())
-                {
-                    try
-                    {
+                while (!notifier.isClosed()) {
+                    try {
                         // Drain any messages that might have been accumulated
                         // while the previous drain was being processed.
                         List<AsyncMessage> messages = null;
-                        synchronized (notifier.pushNeeded)
-                        {
+                        synchronized (notifier.pushNeeded) {
                             messages = notifier.drainMessages();
                         }
                         streamMessages(messages, os, res);
 
-                        synchronized (notifier.pushNeeded)
-                        {
+                        synchronized (notifier.pushNeeded) {
                             notifier.pushNeeded.wait(serverToClientHeartbeatMillis);
-                        
+
                             messages = notifier.drainMessages();
                         }
                         // If there are no messages to send to the client, send an null
                         // byte as a heartbeat to make sure the client is still valid.
-                        if (messages == null && serverToClientHeartbeatMillis > 0)
-                        {
-                            try
-                            {
+                        if (messages == null && serverToClientHeartbeatMillis > 0) {
+                            try {
                                 os.write(NULL_BYTE);
                                 res.flushBuffer();
-                            }
-                            catch (IOException e)
-                            {
+                            } catch (IOException e) {
                                 if (Log.isWarn())
                                     log.warn("Endpoint with id '" + getId() + "' is closing the streaming connection to FlexClient with id '"
                                             + flexClient.getId() + "' because endpoint encountered a socket write error" +
@@ -895,17 +813,14 @@
                             }
                         }
                         // Otherwise stream the messages to the client.
-                        else
-                        {
+                        else {
                             // Update the last time notifier was used to drain messages.
                             // Important for idle timeout detection.
                             notifier.updateLastUse();
 
                             streamMessages(messages, os, res);
                         }
-                    }
-                    catch (InterruptedException e)
-                    {
+                    } catch (InterruptedException e) {
                         if (Log.isWarn())
                             log.warn("Streaming thread '" + threadName + "' for endpoint with id '" + getId() + "' has been interrupted and the streaming connection will be closed.");
                         os.close();
@@ -923,102 +838,83 @@
                 suppressIOExceptionLogging = true;
                 // Terminate the response.
                 streamChunk(null, os, res);
-            }
-            catch (IOException e)
-            {
+            } catch (IOException e) {
                 if (Log.isWarn() && !suppressIOExceptionLogging)
                     log.warn("Streaming thread '" + threadName + "' for endpoint with id '" + getId() + "' is closing connection due to an IO error.", e);
-            }
-            finally
-            {
+            } finally {
                 currentThread.setName(threadName);
 
                 // We're done so decrement the counts for streaming threads,
                 // and update the canStream flag if necessary.
-                synchronized (lock)
-                {
+                synchronized (lock) {
                     --streamingClientsCount;
                     canStream = (streamingClientsCount < maxStreamingClients);
-                    synchronized (session)
-                    {
+                    synchronized (session) {
                         --session.streamingConnectionsCount;
                         session.canStream = (session.maxConnectionsPerSession == FlexSession.MAX_CONNECTIONS_PER_SESSION_UNLIMITED
                                 || session.streamingConnectionsCount < session.maxConnectionsPerSession);
                     }
                 }
 
-                if (notifier != null && currentStreamingRequests != null)
-                {
+                if (notifier != null && currentStreamingRequests != null) {
                     currentStreamingRequests.remove(notifier.getNotifierId());
                     notifier.close();
                 }
 
                 // Output session level streaming count.
                 if (Log.isDebug())
-                    Log.getLogger(FlexSession.FLEX_SESSION_LOG_CATEGORY).info("Number of streaming clients for FlexSession with id '"+ session.getId() +"' is " + session.streamingConnectionsCount + ".");
+                    Log.getLogger(FlexSession.FLEX_SESSION_LOG_CATEGORY).info("Number of streaming clients for FlexSession with id '" + session.getId() + "' is " + session.streamingConnectionsCount + ".");
 
                 // Output endpoint level streaming count.
                 if (Log.isDebug())
-                    log.debug("Number of streaming clients for endpoint with id '"+ getId() +"' is " + streamingClientsCount + ".");
+                    log.debug("Number of streaming clients for endpoint with id '" + getId() + "' is " + streamingClientsCount + ".");
             }
         }
         // Otherwise, client's streaming connection open request could not be granted.
-        else
-        {
-            if (Log.isError())
-            {
+        else {
+            if (Log.isError()) {
                 String logString = null;
-                if (!canStream)
-                {
+                if (!canStream) {
                     logString = "Endpoint with id '" + getId() + "' cannot grant streaming connection to FlexClient with id '"
-                    + flexClient.getId() + "' because " + MAX_STREAMING_CLIENTS + " limit of '"
-                    + maxStreamingClients + "' has been reached.";
-                }
-                else if (!session.canStream)
-                {
+                            + flexClient.getId() + "' because " + MAX_STREAMING_CLIENTS + " limit of '"
+                            + maxStreamingClients + "' has been reached.";
+                } else if (!session.canStream) {
                     logString = "Endpoint with id '" + getId() + "' cannot grant streaming connection to FlexClient with id '"
-                    + flexClient.getId() + "' because " + UserAgentManager.MAX_STREAMING_CONNECTIONS_PER_SESSION + " limit of '"
-                    + session.maxConnectionsPerSession + "' has been reached.";
+                            + flexClient.getId() + "' because " + UserAgentManager.MAX_STREAMING_CONNECTIONS_PER_SESSION + " limit of '"
+                            + session.maxConnectionsPerSession + "' has been reached.";
                 }
                 if (logString != null)
                     log.error(logString);
             }
 
-            try
-            {
+            try {
                 // Return an HTTP status code 400 to indicate that client request can't be processed.
                 String errorMessage = null;
-                if (!canStream)
-                {
+                if (!canStream) {
                     errorMessage = "Endpoint with id '" + getId() + "' cannot grant streaming connection to FlexClient with id '"
-                    + flexClient.getId() + "' because " + MAX_STREAMING_CLIENTS + " limit has been reached.";
-                }
-                else if (!session.canStream)
-                {
+                            + flexClient.getId() + "' because " + MAX_STREAMING_CLIENTS + " limit has been reached.";
+                } else if (!session.canStream) {
                     errorMessage = "Endpoint with id '" + getId() + "' cannot grant streaming connection to FlexClient with id '"
-                    + flexClient.getId() + "' because " + UserAgentManager.MAX_STREAMING_CONNECTIONS_PER_SESSION + " limit has been reached.";
+                            + flexClient.getId() + "' because " + UserAgentManager.MAX_STREAMING_CONNECTIONS_PER_SESSION + " limit has been reached.";
                 }
                 res.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, errorMessage);
+            } catch (IOException ignore) {
             }
-            catch (IOException ignore)
-            {}
         }
     }
 
     /**
      * Handles streaming connection close command sent by the FlexClient.
      *
-     * @param req The <code>HttpServletRequest</code> to service.
-     * @param res The <code>HttpServletResponse</code> to be used in case an error
-     * has to be sent back.
+     * @param req        The <code>HttpServletRequest</code> to service.
+     * @param res        The <code>HttpServletResponse</code> to be used in case an error
+     *                   has to be sent back.
      * @param flexClient FlexClient that requested the streaming connection.
-     * @param streamId The id for the stream to close.
+     * @param streamId   The id for the stream to close.
      */
-    protected void handleFlexClientStreamingCloseRequest(HttpServletRequest req, HttpServletResponse res, FlexClient flexClient, String streamId)
-    {
-        if (streamId != null)
-        {
-            EndpointPushNotifier notifier = (EndpointPushNotifier)flexClient.getEndpointPushHandler(getId());
+    protected void handleFlexClientStreamingCloseRequest(HttpServletRequest req, HttpServletResponse res, FlexClient flexClient, String streamId) {
+        if (streamId != null) {
+            EndpointPushNotifier notifier = (EndpointPushNotifier) flexClient.getEndpointPushHandler(getId());
             if ((notifier != null) && notifier.getNotifierId().equals(streamId))
                 notifier.close();
         }
@@ -1029,10 +925,9 @@
      *
      * @param req The <code>HttpServletRequest</code> to service.
      * @param res The <code>HttpServletResponse</code> to be used in case an error
-     * has to be sent back.
+     *            has to be sent back.
      */
-    protected void serviceStreamingRequest(HttpServletRequest req, HttpServletResponse res)
-    {
+    protected void serviceStreamingRequest(HttpServletRequest req, HttpServletResponse res) {
         // If this is a request for a streaming connection, make sure it's for a valid FlexClient
         // and that the FlexSession doesn't already have a streaming connection open.
         // Streaming requests are POSTs (to help prevent the possibility of caching) that carry the
@@ -1046,52 +941,43 @@
         String command = req.getParameter(COMMAND_PARAM_NAME);
 
         // Only HTTP 1.1 is supported, disallow HTTP 1.0.
-        if (req.getProtocol().equals(HTTP_1_0))
-        {
+        if (req.getProtocol().equals(HTTP_1_0)) {
             if (Log.isError())
                 log.error("Endpoint with id '" + getId() + "' cannot service the streaming request made with " +
-                " HTTP 1.0. Only HTTP 1.1 is supported.");
+                        " HTTP 1.0. Only HTTP 1.1 is supported.");
 
-            try
-            {
+            try {
                 // Return an HTTP status code 400 to indicate that the client's request was syntactically invalid (bad command).
                 res.sendError(HttpServletResponse.SC_BAD_REQUEST);
+            } catch (IOException ignore) {
             }
-            catch (IOException ignore)
-            {}
             return; // Abort further server processing.
         }
 
-        if (!(command.equals(OPEN_COMMAND) || command.equals(CLOSE_COMMAND)))
-        {
+        if (!(command.equals(OPEN_COMMAND) || command.equals(CLOSE_COMMAND))) {
             if (Log.isError())
                 log.error("Endpoint with id '" + getId() + "' cannot service the streaming request as the supplied command '"
                         + command + "' is invalid.");
 
-            try
-            {
+            try {
                 // Return an HTTP status code 400 to indicate that the client's request was syntactically invalid (bad command).
                 res.sendError(HttpServletResponse.SC_BAD_REQUEST);
+            } catch (IOException ignore) {
             }
-            catch (IOException ignore)
-            {}
             return; // Abort further server processing.
         }
 
         String flexClientId = req.getParameter(Message.FLEX_CLIENT_ID_HEADER);
-        if (flexClientId == null)
-        {
+        if (flexClientId == null) {
             if (Log.isError())
                 log.error("Endpoint with id '" + getId() + "' cannot service the streaming request as no FlexClient id"
                         + " has been supplied in the request.");
 
-            try
-            {
+            try {
                 // Return an HTTP status code 400 to indicate that the client's request was syntactically invalid (missing id).
                 res.sendError(HttpServletResponse.SC_BAD_REQUEST);
+            } catch (IOException ignore) {
             }
-            catch (IOException ignore)
-            {}
             return; // Abort further server processing.
         }
 
@@ -1104,46 +990,38 @@
         FlexClient flexClient = null;
         List<FlexClient> flexClients = FlexContext.getFlexSession().getFlexClients();
         boolean validFlexClientId = false;
-        for (Iterator<FlexClient> iter = flexClients.iterator(); iter.hasNext();)
-        {
+        for (Iterator<FlexClient> iter = flexClients.iterator(); iter.hasNext(); ) {
             flexClient = iter.next();
-            if (flexClient.getId().equals(flexClientId) && flexClient.isValid())
-            {
+            if (flexClient.getId().equals(flexClientId) && flexClient.isValid()) {
                 validFlexClientId = true;
                 break;
             }
         }
-        if (!command.equals(CLOSE_COMMAND) && !validFlexClientId)
-        {
+        if (!command.equals(CLOSE_COMMAND) && !validFlexClientId) {
             if (Log.isError())
                 log.error("Endpoint with id '" + getId() + "' cannot service the streaming request as either the supplied"
                         + " FlexClient id '" + flexClientId + " is not valid, or the FlexClient with that id is not valid.");
 
-            try
-            {
+            try {
                 // Return an HTTP status code 400 to indicate that the client's request was syntactically invalid (invalid id).
                 res.sendError(HttpServletResponse.SC_BAD_REQUEST);
+            } catch (IOException ignore) {
             }
-            catch (IOException ignore)
-            {}
             return; // Abort further server processing.
         }
 
         // If a close command is received and we don't have any flex clients registered simply invalidate 
         // the Flex Session. This will take care of the Flex Session that got created when the MB servlet 
         // was processing the CLOSE request.
-        if (command.equals(CLOSE_COMMAND) && flexClients.size() == 0)
-        {
+        if (command.equals(CLOSE_COMMAND) && flexClients.size() == 0) {
             FlexSession flexSession = FlexContext.getFlexSession();
-            if (flexSession instanceof HttpFlexSession)
-            {
-                ((HttpFlexSession)flexSession).invalidate(false);
+            if (flexSession instanceof HttpFlexSession) {
+                ((HttpFlexSession) flexSession).invalidate(false);
             }
             return;
         }
 
-        if (flexClient != null)
-        {
+        if (flexClient != null) {
             if (command.equals(OPEN_COMMAND))
                 handleFlexClientStreamingOpenRequest(req, res, flexClient);
             else if (command.equals(CLOSE_COMMAND))
@@ -1158,24 +1036,20 @@
      * signal the end of the response.
      * Once the chunk is written to the output stream, the stream will be flushed immediately (no buffering).
      *
-     * @param bytes The array of bytes to write as a chunk in the response; or if null, the signal to write the final chunk to complete the response.
-     * @param os The output stream the chunk will be written to.
+     * @param bytes    The array of bytes to write as a chunk in the response; or if null, the signal to write the final chunk to complete the response.
+     * @param os       The output stream the chunk will be written to.
      * @param response The HttpServletResponse, used to flush the chunk to the client.
-     *
      * @throws IOException if writing the chunk to the output stream fails.
      */
-    protected void streamChunk(byte[] bytes, ServletOutputStream os, HttpServletResponse response) throws IOException
-    {
-        if ((bytes != null) && (bytes.length > 0))
-        {
+    protected void streamChunk(byte[] bytes, ServletOutputStream os, HttpServletResponse response) throws IOException {
+        if ((bytes != null) && (bytes.length > 0)) {
             byte[] chunkLength = Integer.toHexString(bytes.length).getBytes("ASCII");
             os.write(chunkLength);
             os.write(CRLF_BYTES);
             os.write(bytes);
             os.write(CRLF_BYTES);
             response.flushBuffer();
-        }
-        else // Send final 'EOF' chunk for the response.
+        } else // Send final 'EOF' chunk for the response.
         {
             os.write(ZERO_BYTE);
             os.write(CRLF_BYTES);
@@ -1188,7 +1062,7 @@
      * Serializes messages and streams each to the client as a response chunk using streamChunk().
      *
      * @param messages The messages to serialize and push to the client.
-     * @param os The output stream the chunk will be written to.
+     * @param os       The output stream the chunk will be written to.
      * @param response The HttpServletResponse, used to flush the chunk to the client.
      */
     protected abstract void streamMessages(List messages, ServletOutputStream os, HttpServletResponse response) throws IOException;
@@ -1201,9 +1075,8 @@
      * @return MessagePerformanceInfo if the message performance gathering is enabled,
      * null otherwise.
      */
-    protected MessagePerformanceInfo getMPI(Message message)
-    {
-        return (isRecordMessageSizes() || isRecordMessageTimes())?
+    protected MessagePerformanceInfo getMPI(Message message) {
+        return (isRecordMessageSizes() || isRecordMessageTimes()) ?
                 MessagePerformanceUtils.getMPII(message) : null;
     }
 
@@ -1218,8 +1091,7 @@
      *
      * @param notifier The EndpointPushNotifier to monitor.
      */
-    private void monitorTimeout(EndpointPushNotifier notifier)
-    {
+    private void monitorTimeout(EndpointPushNotifier notifier) {
         if (pushNotifierTimeoutManager != null)
             pushNotifierTimeoutManager.scheduleTimeout(notifier);
     }
diff --git a/core/src/main/java/flex/messaging/endpoints/DuplicateSessionException.java b/core/src/main/java/flex/messaging/endpoints/DuplicateSessionException.java
index 2cc6b0f..fc4bce1 100644
--- a/core/src/main/java/flex/messaging/endpoints/DuplicateSessionException.java
+++ b/core/src/main/java/flex/messaging/endpoints/DuplicateSessionException.java
@@ -22,8 +22,7 @@
 /**
  * Exception class used to indicate duplicate client sessions were detected.
  */
-public class DuplicateSessionException extends MessageException
-{
+public class DuplicateSessionException extends MessageException {
     /**
      *
      */
@@ -44,8 +43,7 @@
      * Default constructor.
      * Sets the code to a default value of <code>DUPLICATE_SESSION_DETECTED_CODE</code>.
      */
-    public DuplicateSessionException()
-    {
+    public DuplicateSessionException() {
         setCode(DUPLICATE_SESSION_DETECTED_CODE);
     }
 
@@ -62,8 +60,8 @@
     /**
      * Override to log at the DEBUG level.
      */
-    @Override public short getPreferredLogLevel()
-    {
+    @Override
+    public short getPreferredLogLevel() {
         return LogEvent.DEBUG;
     }
 
@@ -74,8 +72,8 @@
     /**
      * Override to suppress stack trace logging.
      */
-    @Override public boolean isLogStackTraceEnabled()
-    {
+    @Override
+    public boolean isLogStackTraceEnabled() {
         return false;
     }
 }
diff --git a/core/src/main/java/flex/messaging/endpoints/Endpoint.java b/core/src/main/java/flex/messaging/endpoints/Endpoint.java
index 3e1f7de..0e15c44 100644
--- a/core/src/main/java/flex/messaging/endpoints/Endpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/Endpoint.java
@@ -31,55 +31,53 @@
  * Endpoints are specific to a message format and network transport,
  * and are defined by the named URI path on which they are located.
  */
-public interface Endpoint extends Manageable
-{
+public interface Endpoint extends Manageable {
     /**
-     * Initializes the endpoint with an ID and properties. 
-     * 
-     * @param id The ID of the endpoint. 
-     * @param properties Properties of the endpoint. 
+     * Initializes the endpoint with an ID and properties.
+     *
+     * @param id         The ID of the endpoint.
+     * @param properties Properties of the endpoint.
      */
     void initialize(String id, ConfigMap properties);
-    
+
     /**
      * Start the endpoint. The MethodBroker invokes this
      * method in order to set the endpoint up for sending and receiving
      * messages from Flash clients.
-     *
      */
     void start();
-    
+
     /**
-     * Determines whether the endpoint is started. 
-     * 
-     * @return <code>true</code> if the endpoint is started;  <code>false</code> otherwise. 
+     * Determines whether the endpoint is started.
+     *
+     * @return <code>true</code> if the endpoint is started;  <code>false</code> otherwise.
      */
     boolean isStarted();
-    
+
     /**
      * Stop and destroy the endpoint. The MethodBroker invokes
      * this method in order to stop the endpoint from sending
      * and receiving messages from Flash clients.
-     * 
      */
     void stop();
-       
+
     /**
-     * Retrieves the corresponding client channel type for the endpoint. 
-     * 
-     * @return The corresponding client channel type for the endpoint. 
+     * Retrieves the corresponding client channel type for the endpoint.
+     *
+     * @return The corresponding client channel type for the endpoint.
      */
     String getClientType();
-    
+
     /**
-     * Sets the corresponding client channel type for the endpoint. 
-     * 
-     * @param clientType The corresponding client channel type for the endpoint.  
+     * Sets the corresponding client channel type for the endpoint.
+     *
+     * @param clientType The corresponding client channel type for the endpoint.
      */
     void setClientType(String clientType);
-      
+
     /**
      * Retrieves the endpoint properties the client needs.
+     *
      * @return The endpoint properties the client needs.
      */
     ConfigMap describeEndpoint();
@@ -87,10 +85,11 @@
     /**
      * All endpoints are referenceable by an ID that is unique among
      * all the endpoints registered to a single broker instance.
+     *
      * @return The endpoint ID.
      */
     String getId();
-    
+
     /**
      * All endpoints are referenceable by an ID that is unique among
      * all the endpoints registered to a single broker instance. The id
@@ -99,57 +98,59 @@
      * @param id The endpoint ID.
      */
     void setId(String id);
-    
+
     /**
      * All endpoints must be managed by a single MessageBroker,
      * and must be capable of returning a reference to that broker.
-     * This broker reference is used when the endpoint wishes to 
+     * This broker reference is used when the endpoint wishes to
      * send a message to one of the broker's services.
-     * 
+     *
      * @return broker The MessageBroker instance which manages this endpoint.
      */
     MessageBroker getMessageBroker();
-    
+
     /**
-     * Sets the <code>MessageBroker</code> of the endpoint. 
-     * 
+     * Sets the <code>MessageBroker</code> of the endpoint.
+     *
      * @param broker the message broker object
      */
     void setMessageBroker(MessageBroker broker);
 
     /**
      * Retrieves the highest messaging version currently available via this
-     * endpoint.  
+     * endpoint.
+     *
      * @return The messaging version number.
      */
     double getMessagingVersion();
-    
+
 
     String getParsedUrl(String contextPath);
-    
+
     /**
-     * Retrieves the port of the URL of the endpoint. 
-     * 
-     * @return The port of the URL of the endpoint. 
+     * Retrieves the port of the URL of the endpoint.
+     *
+     * @return The port of the URL of the endpoint.
      */
     int getPort();
-       
+
     /**
-     * Specifies whether this protocol requires the secure HTTPS protocol. 
+     * Specifies whether this protocol requires the secure HTTPS protocol.
+     *
      * @return <code>true</code> if the endpoint is a secure endpoint, <code>false</code> otherwise.
      */
     boolean isSecure();
 
     /**
-     * Retrieves the security constraint of the endpoint. 
-     * 
+     * Retrieves the security constraint of the endpoint.
+     *
      * @return The security constraint of the endpoint.
      */
     SecurityConstraint getSecurityConstraint();
-    
+
     /**
-     * Sets the security constraint of the endpoint. 
-     * 
+     * Sets the security constraint of the endpoint.
+     *
      * @param constraint The security constraint of the endpoint.
      */
     void setSecurityConstraint(SecurityConstraint constraint);
@@ -163,25 +164,24 @@
      * @param res The HttpServletResponse object.
      */
     void service(HttpServletRequest req, HttpServletResponse res);
-        
+
     /**
-     * Retrieves the URL of the endpoint. 
-     * 
-     * @return The URL of the endpoint. 
+     * Retrieves the URL of the endpoint.
+     *
+     * @return The URL of the endpoint.
      */
     String getUrl();
-    
+
     /**
-     * Sets the URL of the endpoint. 
-     * 
+     * Sets the URL of the endpoint.
+     *
      * @param url The URL of the endpoint.
      */
-    void setUrl(String url);  
-    
+    void setUrl(String url);
+
     /**
+     * Returns the url of the endpoint parsed for the client.
      *
-     * Returns the url of the endpoint parsed for the client. 
-     *  
      * @return The url of the endpoint parsed for the client.
      */
     String getUrlForClient();
diff --git a/core/src/main/java/flex/messaging/endpoints/Endpoint2.java b/core/src/main/java/flex/messaging/endpoints/Endpoint2.java
index 8f10ebe..bb5ab90 100644
--- a/core/src/main/java/flex/messaging/endpoints/Endpoint2.java
+++ b/core/src/main/java/flex/messaging/endpoints/Endpoint2.java
@@ -19,19 +19,18 @@
 import flex.messaging.Server;
 
 /**
- * Extension interface for <tt>Endpoint</tt> that adds support for a 
+ * Extension interface for <tt>Endpoint</tt> that adds support for a
  * referenced <tt>Server</tt> that the endpoint may use.
  */
-public interface Endpoint2 extends Endpoint
-{
-   /**
-    * Retrieves the <tt>Server</tt> that the endpoint is using; <code>null</code> if
-    * no server has been assigned.
-    */
-   Server getServer();
-   
-   /**
-    * Sets the <tt>Server</tt> that the endpoint will use.
-    */
-   void setServer(Server server);
+public interface Endpoint2 extends Endpoint {
+    /**
+     * Retrieves the <tt>Server</tt> that the endpoint is using; <code>null</code> if
+     * no server has been assigned.
+     */
+    Server getServer();
+
+    /**
+     * Sets the <tt>Server</tt> that the endpoint will use.
+     */
+    void setServer(Server server);
 }
diff --git a/core/src/main/java/flex/messaging/endpoints/HTTPEndpoint.java b/core/src/main/java/flex/messaging/endpoints/HTTPEndpoint.java
index 82e358f..2c9abe4 100644
--- a/core/src/main/java/flex/messaging/endpoints/HTTPEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/HTTPEndpoint.java
@@ -38,10 +38,8 @@
  * The message broker directs requests to the appropriate service,
  * in Flex 1.5 terms, the Proxy Service. The response from the proxy
  * request is streamed back to the client.
- *
  */
-public class HTTPEndpoint extends BasePollingHTTPEndpoint
-{
+public class HTTPEndpoint extends BasePollingHTTPEndpoint {
     public static final String LOG_CATEGORY = LogCategories.ENDPOINT_HTTP;
 
     private static final int IMPROPER_CONTENT_TYPE = 10068;
@@ -55,8 +53,7 @@
     /**
      * Constructs an unmanaged <code>HTTPEndpoint</code>.
      */
-    public HTTPEndpoint()
-    {
+    public HTTPEndpoint() {
         this(false);
     }
 
@@ -64,10 +61,9 @@
      * Constructs a <code>HTTPEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>HTTPEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public HTTPEndpoint(boolean enableManagement)
-    {
+    public HTTPEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -75,8 +71,8 @@
      * Currently this override is a no-op to disable small messages over HTTP
      * endpoints.
      */
-    @Override public Message convertToSmallMessage(Message message)
-    {
+    @Override
+    public Message convertToSmallMessage(Message message) {
         return message;
     }
 
@@ -86,12 +82,11 @@
      * @param req The servlet request.
      * @param res The servlet response.
      */
-    @Override public void service(HttpServletRequest req, HttpServletResponse res)
-    {
+    @Override
+    public void service(HttpServletRequest req, HttpServletResponse res) {
         String contentType = req.getContentType();
         boolean xmlContentType = contentType == null || contentType.equals(MessageIOConstants.XML_CONTENT_TYPE);
-        if (!xmlContentType)
-        {
+        if (!xmlContentType) {
             // HTTP endpoint ''{0}'' must be contacted via a HTTP request with proper content type.
             SecurityException se = new SecurityException();
             se.setMessage(IMPROPER_CONTENT_TYPE, new Object[]{id});
@@ -110,21 +105,18 @@
     /**
      * Create default filter chain or return current one if already present.
      */
-    @Override protected AMFFilter createFilterChain()
-    {
+    @Override
+    protected AMFFilter createFilterChain() {
         AMFFilter serializationFilter = new SerializationFilter(getLogCategory());
         AMFFilter batchFilter = new BatchProcessFilter();
-        AMFFilter sessionFilter = sessionRewritingEnabled? new SessionFilter() : null;
+        AMFFilter sessionFilter = sessionRewritingEnabled ? new SessionFilter() : null;
         AMFFilter messageBrokerFilter = new MessageBrokerFilter(this);
 
         serializationFilter.setNext(batchFilter);
-        if (sessionFilter != null)
-        {
+        if (sessionFilter != null) {
             batchFilter.setNext(sessionFilter);
             sessionFilter.setNext(messageBrokerFilter);
-        }
-        else
-        {
+        } else {
             batchFilter.setNext(messageBrokerFilter);
         }
 
@@ -134,8 +126,8 @@
     /**
      * Returns MessageIOConstants.XML_CONTENT_TYPE.
      */
-    @Override protected String getResponseContentType()
-    {
+    @Override
+    protected String getResponseContentType() {
         return MessageIOConstants.XML_CONTENT_TYPE;
     }
 
@@ -144,8 +136,8 @@
      *
      * @return The log category of the endpoint.
      */
-    @Override protected String getLogCategory()
-    {
+    @Override
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -154,8 +146,8 @@
      *
      * @return The deserializer class name used by the endpoint.
      */
-    @Override protected String getDeserializerClassName()
-    {
+    @Override
+    protected String getDeserializerClassName() {
         return "flex.messaging.io.amfx.AmfxMessageDeserializer";
     }
 
@@ -164,8 +156,8 @@
      *
      * @return The serializer class name used by the endpoint.
      */
-    @Override protected String getSerializerClassName()
-    {
+    @Override
+    protected String getSerializerClassName() {
         return "flex.messaging.io.amfx.AmfxMessageSerializer";
     }
 
@@ -174,10 +166,10 @@
      * corresponding MBean control.
      *
      * @param broker The <code>MessageBroker</code> that manages this
-     * <code>HTTPEndpoint</code>.
+     *               <code>HTTPEndpoint</code>.
      */
-    @Override protected void setupEndpointControl(MessageBroker broker)
-    {
+    @Override
+    protected void setupEndpointControl(MessageBroker broker) {
         controller = new HTTPEndpointControl(this, broker.getControl());
         controller.register();
         setControl(controller);
diff --git a/core/src/main/java/flex/messaging/endpoints/SecureAMFEndpoint.java b/core/src/main/java/flex/messaging/endpoints/SecureAMFEndpoint.java
index 7b3a44f..61ecd2f 100644
--- a/core/src/main/java/flex/messaging/endpoints/SecureAMFEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/SecureAMFEndpoint.java
@@ -19,8 +19,7 @@
 /**
  * Secure version of AMFEndpoint.
  */
-public class SecureAMFEndpoint extends AMFEndpoint
-{
+public class SecureAMFEndpoint extends AMFEndpoint {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -30,8 +29,7 @@
     /**
      * Constructs an unmanaged <code>SecureAMFEndpoint</code>.
      */
-    public SecureAMFEndpoint()
-    {
+    public SecureAMFEndpoint() {
         this(false);
     }
 
@@ -39,10 +37,9 @@
      * Constructs a <code>SecureAMFEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>SecureAMFEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public SecureAMFEndpoint(boolean enableManagement)
-    {
+    public SecureAMFEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -57,8 +54,7 @@
      *
      * @return <code>true</code> if the endpoint is secure, <code>false</code> otherwise.
      */
-    public boolean isSecure()
-    {
+    public boolean isSecure() {
         return true;
     }
 }
diff --git a/core/src/main/java/flex/messaging/endpoints/SecureHTTPEndpoint.java b/core/src/main/java/flex/messaging/endpoints/SecureHTTPEndpoint.java
index 1f08a63..f715c22 100644
--- a/core/src/main/java/flex/messaging/endpoints/SecureHTTPEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/SecureHTTPEndpoint.java
@@ -19,8 +19,7 @@
 /**
  * Secure version of HTTPEndpoint.
  */
-public class SecureHTTPEndpoint extends HTTPEndpoint
-{
+public class SecureHTTPEndpoint extends HTTPEndpoint {
     //--------------------------------------------------------------------------
     //
     // Constructors
@@ -30,8 +29,7 @@
     /**
      * Constructs an unmanaged <code>SecureHTTPEndpoint</code>.
      */
-    public SecureHTTPEndpoint()
-    {
+    public SecureHTTPEndpoint() {
         this(false);
     }
 
@@ -39,10 +37,9 @@
      * Constructs a <code>SecureHTTPEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>SecureHTTPEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public SecureHTTPEndpoint(boolean enableManagement)
-    {
+    public SecureHTTPEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -57,8 +54,7 @@
      *
      * @return <code>true</code> if the endpoint is secure, <code>false</code> otherwise.
      */
-    public boolean isSecure()
-    {
+    public boolean isSecure() {
         return true;
     }
 }
diff --git a/core/src/main/java/flex/messaging/endpoints/SecureStreamingAMFEndpoint.java b/core/src/main/java/flex/messaging/endpoints/SecureStreamingAMFEndpoint.java
index dd38d97..8951a95 100644
--- a/core/src/main/java/flex/messaging/endpoints/SecureStreamingAMFEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/SecureStreamingAMFEndpoint.java
@@ -19,8 +19,7 @@
 /**
  * Secure version of StreamingAMFEndpoint.
  */
-public class SecureStreamingAMFEndpoint extends StreamingAMFEndpoint
-{
+public class SecureStreamingAMFEndpoint extends StreamingAMFEndpoint {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -30,8 +29,7 @@
     /**
      * Constructs an unmanaged <code>SecureStreamingAMFEndpoint</code>.
      */
-    public SecureStreamingAMFEndpoint()
-    {
+    public SecureStreamingAMFEndpoint() {
         this(false);
     }
 
@@ -39,10 +37,9 @@
      * Constructs a <code>SecureStreamingAMFEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>SecureStreamingAMFEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public SecureStreamingAMFEndpoint(boolean enableManagement)
-    {
+    public SecureStreamingAMFEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -57,8 +54,7 @@
      *
      * @return <code>true</code> if the endpoint is secure, <code>false</code> otherwise.
      */
-    public boolean isSecure()
-    {
+    public boolean isSecure() {
         return true;
     }
 }
diff --git a/core/src/main/java/flex/messaging/endpoints/SecureStreamingHTTPEndpoint.java b/core/src/main/java/flex/messaging/endpoints/SecureStreamingHTTPEndpoint.java
index d053a4d..e35f3ae 100644
--- a/core/src/main/java/flex/messaging/endpoints/SecureStreamingHTTPEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/SecureStreamingHTTPEndpoint.java
@@ -19,8 +19,7 @@
 /**
  * Secure version of StreamingHTTPEndpoint.
  */
-public class SecureStreamingHTTPEndpoint extends StreamingHTTPEndpoint
-{
+public class SecureStreamingHTTPEndpoint extends StreamingHTTPEndpoint {
     //--------------------------------------------------------------------------
     //
     // Constructors
@@ -30,8 +29,7 @@
     /**
      * Constructs an unmanaged <code>SecureStreamingHTTPEndpoint</code>.
      */
-    public SecureStreamingHTTPEndpoint()
-    {
+    public SecureStreamingHTTPEndpoint() {
         this(false);
     }
 
@@ -39,10 +37,9 @@
      * Constructs a <code>SecureStreamingHTTPEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>SecureHTTPEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public SecureStreamingHTTPEndpoint(boolean enableManagement)
-    {
+    public SecureStreamingHTTPEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -57,8 +54,7 @@
      *
      * @return <code>true</code> if the endpoint is secure, <code>false</code> otherwise.
      */
-    public boolean isSecure()
-    {
+    public boolean isSecure() {
         return true;
     }
 }
diff --git a/core/src/main/java/flex/messaging/endpoints/StreamingAMFEndpoint.java b/core/src/main/java/flex/messaging/endpoints/StreamingAMFEndpoint.java
index 7c5e02a..a162035 100644
--- a/core/src/main/java/flex/messaging/endpoints/StreamingAMFEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/StreamingAMFEndpoint.java
@@ -50,8 +50,7 @@
  * This endpoint does not support polling clients and will fault any poll requests
  * that are received. To support polling clients use AMFEndpoint instead.
  */
-public class StreamingAMFEndpoint extends BaseStreamingHTTPEndpoint
-{
+public class StreamingAMFEndpoint extends BaseStreamingHTTPEndpoint {
     //--------------------------------------------------------------------------
     //
     // Public Static Constants
@@ -78,8 +77,7 @@
     /**
      * Constructs an unmanaged <code>StreamingAMFEndpoint</code>.
      */
-    public StreamingAMFEndpoint()
-    {
+    public StreamingAMFEndpoint() {
         this(false);
     }
 
@@ -87,10 +85,9 @@
      * Constructs a <code>StreamingAMFEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>StreamingAMFEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public StreamingAMFEndpoint(boolean enableManagement)
-    {
+    public StreamingAMFEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -104,22 +101,19 @@
      * Create the gateway filters that transform action requests
      * and responses.
      */
-    @Override protected AMFFilter createFilterChain()
-    {
+    @Override
+    protected AMFFilter createFilterChain() {
         AMFFilter serializationFilter = new SerializationFilter(getLogCategory());
         AMFFilter batchFilter = new BatchProcessFilter();
-        AMFFilter sessionFilter = sessionRewritingEnabled? new SessionFilter() : null;
+        AMFFilter sessionFilter = sessionRewritingEnabled ? new SessionFilter() : null;
         AMFFilter envelopeFilter = new LegacyFilter(this);
         AMFFilter messageBrokerFilter = new MessageBrokerFilter(this);
 
         serializationFilter.setNext(batchFilter);
-        if (sessionFilter != null)
-        {
+        if (sessionFilter != null) {
             batchFilter.setNext(sessionFilter);
             sessionFilter.setNext(envelopeFilter);
-        }
-        else
-        {
+        } else {
             batchFilter.setNext(envelopeFilter);
         }
         envelopeFilter.setNext(messageBrokerFilter);
@@ -130,8 +124,8 @@
     /**
      * Returns MessageIOConstants.AMF_CONTENT_TYPE.
      */
-    @Override protected String getResponseContentType()
-    {
+    @Override
+    protected String getResponseContentType() {
         return MessageIOConstants.AMF_CONTENT_TYPE;
     }
 
@@ -140,8 +134,8 @@
      *
      * @return The log category of the endpoint.
      */
-    @Override protected String getLogCategory()
-    {
+    @Override
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -151,21 +145,17 @@
      * the serialized message.
      *
      * @param message Message to get the size for.
-     *
      * @return The size of the message after message is serialized.
      */
-    @Override protected long getMessageSizeForPerformanceInfo(Message message)
-    {
+    @Override
+    protected long getMessageSizeForPerformanceInfo(Message message) {
         Amf3Output amfOut = new Amf3Output(serializationContext);
         ByteArrayOutputStream outStream = new ByteArrayOutputStream();
         DataOutputStream dataOutStream = new DataOutputStream(outStream);
         amfOut.setOutputStream(dataOutStream);
-        try
-        {
+        try {
             amfOut.writeObject(message);
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
             if (Log.isDebug())
                 log.debug("MPI exception while retrieving the size of the serialized message: " + e.toString());
         }
@@ -177,8 +167,8 @@
      *
      * @return The deserializer class name used by the endpoint.
      */
-    @Override protected String getDeserializerClassName()
-    {
+    @Override
+    protected String getDeserializerClassName() {
         return "flex.messaging.io.amf.AmfMessageDeserializer";
     }
 
@@ -187,8 +177,8 @@
      *
      * @return The serializer class name used by the endpoint.
      */
-    @Override protected String getSerializerClassName()
-    {
+    @Override
+    protected String getSerializerClassName() {
         return "flex.messaging.io.amf.AmfMessageSerializer";
     }
 
@@ -197,10 +187,10 @@
      * corresponding MBean control.
      *
      * @param broker The <code>MessageBroker</code> that manages this
-     * <code>StreamingAMFEndpoint</code>.
+     *               <code>StreamingAMFEndpoint</code>.
      */
-    @Override protected void setupEndpointControl(MessageBroker broker)
-    {
+    @Override
+    protected void setupEndpointControl(MessageBroker broker) {
         controller = new StreamingAMFEndpointControl(this, broker.getControl());
         controller.register();
         setControl(controller);
@@ -211,19 +201,18 @@
      * Serializes messages and streams each to the client as a response chunk using streamChunk().
      *
      * @param messages The messages to serialize and push to the client.
-     * @param os The output stream the chunk will be written to.
+     * @param os       The output stream the chunk will be written to.
      * @param response The HttpServletResponse, used to flush the chunk to the client.
      */
-    @Override protected void streamMessages(List messages, ServletOutputStream os, HttpServletResponse response) throws IOException
-    {
+    @Override
+    protected void streamMessages(List messages, ServletOutputStream os, HttpServletResponse response) throws IOException {
         if (messages == null || messages.isEmpty())
             return;
 
         // Serialize each message as a separate chunk of bytes.
         TypeMarshallingContext.setTypeMarshaller(getTypeMarshaller());
-        for (Iterator iter = messages.iterator(); iter.hasNext();)
-        {
-            Message message = (Message)iter.next();
+        for (Iterator iter = messages.iterator(); iter.hasNext(); ) {
+            Message message = (Message) iter.next();
             addPerformanceInfo(message);
             message = convertPushMessageToSmall(message);
             if (Log.isDebug())
@@ -240,7 +229,7 @@
             streamChunk(messageBytes, os, response);
 
             if (isManaged())
-                ((StreamingAMFEndpointControl)controller).incrementPushCount();
+                ((StreamingAMFEndpointControl) controller).incrementPushCount();
         }
         TypeMarshallingContext.setTypeMarshaller(null);
     }
diff --git a/core/src/main/java/flex/messaging/endpoints/StreamingHTTPEndpoint.java b/core/src/main/java/flex/messaging/endpoints/StreamingHTTPEndpoint.java
index a5e1c66..6d573ba 100644
--- a/core/src/main/java/flex/messaging/endpoints/StreamingHTTPEndpoint.java
+++ b/core/src/main/java/flex/messaging/endpoints/StreamingHTTPEndpoint.java
@@ -49,8 +49,7 @@
  * This endpoint does not support polling clients and will fault any poll requests
  * that are received. To support polling clients use HTTPEndpoint instead.
  */
-public class StreamingHTTPEndpoint extends BaseStreamingHTTPEndpoint
-{
+public class StreamingHTTPEndpoint extends BaseStreamingHTTPEndpoint {
     //--------------------------------------------------------------------------
     //
     // Public Constants
@@ -71,8 +70,7 @@
     /**
      * Constructs an unmanaged <code>StreamingHTTPEndpoint</code>.
      */
-    public StreamingHTTPEndpoint()
-    {
+    public StreamingHTTPEndpoint() {
         this(false);
     }
 
@@ -80,10 +78,9 @@
      * Constructs a <code>StreamingHTTPEndpoint</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>StreamingHTTPEndpoint</code>
-     * is manageable; <code>false</code> otherwise.
+     *                         is manageable; <code>false</code> otherwise.
      */
-    public StreamingHTTPEndpoint(boolean enableManagement)
-    {
+    public StreamingHTTPEndpoint(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -96,21 +93,18 @@
     /**
      * Create default filter chain or return current one if already present.
      */
-    @Override protected AMFFilter createFilterChain()
-    {
+    @Override
+    protected AMFFilter createFilterChain() {
         AMFFilter serializationFilter = new SerializationFilter(getLogCategory());
         AMFFilter batchFilter = new BatchProcessFilter();
-        AMFFilter sessionFilter = sessionRewritingEnabled? new SessionFilter() : null;
+        AMFFilter sessionFilter = sessionRewritingEnabled ? new SessionFilter() : null;
         AMFFilter messageBrokerFilter = new MessageBrokerFilter(this);
 
         serializationFilter.setNext(batchFilter);
-        if (sessionFilter != null)
-        {
+        if (sessionFilter != null) {
             batchFilter.setNext(sessionFilter);
             sessionFilter.setNext(messageBrokerFilter);
-        }
-        else
-        {
+        } else {
             batchFilter.setNext(messageBrokerFilter);
         }
 
@@ -120,8 +114,8 @@
     /**
      * Returns MessageIOConstants.XML_CONTENT_TYPE.
      */
-    @Override protected String getResponseContentType()
-    {
+    @Override
+    protected String getResponseContentType() {
         return MessageIOConstants.XML_CONTENT_TYPE;
     }
 
@@ -130,8 +124,8 @@
      *
      * @return The log category of the endpoint.
      */
-    @Override protected String getLogCategory()
-    {
+    @Override
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -141,21 +135,17 @@
      * of the serialized message.
      *
      * @param message Message to get the size for.
-     *
      * @return The size of the message after message is serialized.
      */
-    @Override protected long getMessageSizeForPerformanceInfo(Message message)
-    {
+    @Override
+    protected long getMessageSizeForPerformanceInfo(Message message) {
         AmfxOutput amfxOut = new AmfxOutput(serializationContext);
         ByteArrayOutputStream outStream = new ByteArrayOutputStream();
         DataOutputStream dataOutStream = new DataOutputStream(outStream);
         amfxOut.setOutputStream(dataOutStream);
-        try
-        {
+        try {
             amfxOut.writeObject(message);
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
             if (Log.isDebug())
                 log.debug("MPI exception while retrieving the size of the serialized message: " + e.toString());
         }
@@ -167,8 +157,8 @@
      *
      * @return The deserializer class name used by the endpoint.
      */
-    @Override protected String getDeserializerClassName()
-    {
+    @Override
+    protected String getDeserializerClassName() {
         return "flex.messaging.io.amfx.AmfxMessageDeserializer";
     }
 
@@ -177,8 +167,8 @@
      *
      * @return The serializer class name used by the endpoint.
      */
-    @Override protected String getSerializerClassName()
-    {
+    @Override
+    protected String getSerializerClassName() {
         return "flex.messaging.io.amfx.AmfxMessageSerializer";
     }
 
@@ -187,10 +177,10 @@
      * corresponding MBean control.
      *
      * @param broker The <code>MessageBroker</code> that manages this
-     * <code>StreamingHTTPEndpoint</code>.
+     *               <code>StreamingHTTPEndpoint</code>.
      */
-    @Override protected void setupEndpointControl(MessageBroker broker)
-    {
+    @Override
+    protected void setupEndpointControl(MessageBroker broker) {
         controller = new StreamingHTTPEndpointControl(this, broker.getControl());
         controller.register();
         setControl(controller);
@@ -201,19 +191,18 @@
      * Serializes messages and streams each to the client as a response chunk using streamChunk().
      *
      * @param messages The messages to serialize and push to the client.
-     * @param os The output stream the chunk will be written to.
+     * @param os       The output stream the chunk will be written to.
      * @param response The HttpServletResponse, used to flush the chunk to the client.
      */
-    @Override protected void streamMessages(List messages, ServletOutputStream os, HttpServletResponse response) throws IOException
-    {
+    @Override
+    protected void streamMessages(List messages, ServletOutputStream os, HttpServletResponse response) throws IOException {
         if (messages == null || messages.isEmpty())
             return;
 
         // Serialize each message as a separate chunk of bytes.
         TypeMarshallingContext.setTypeMarshaller(getTypeMarshaller());
-        for (Iterator iter = messages.iterator(); iter.hasNext();)
-        {
-            Message message = (Message)iter.next();
+        for (Iterator iter = messages.iterator(); iter.hasNext(); ) {
+            Message message = (Message) iter.next();
             addPerformanceInfo(message);
 
             message = convertPushMessageToSmall(message);
@@ -232,7 +221,7 @@
             streamChunk(messageBytes, os, response);
 
             if (isManaged())
-                ((StreamingHTTPEndpointControl)controller).incrementPushCount();
+                ((StreamingHTTPEndpointControl) controller).incrementPushCount();
         }
         TypeMarshallingContext.setTypeMarshaller(null);
     }
diff --git a/core/src/main/java/flex/messaging/endpoints/amf/AMFFilter.java b/core/src/main/java/flex/messaging/endpoints/amf/AMFFilter.java
index 5abaea2..85822c0 100644
--- a/core/src/main/java/flex/messaging/endpoints/amf/AMFFilter.java
+++ b/core/src/main/java/flex/messaging/endpoints/amf/AMFFilter.java
@@ -25,21 +25,17 @@
  * which contains the message/invocation as well as conextual information
  * about it, following the standard pipe-and-filter design pattern.
  */
-public abstract class AMFFilter
-{
+public abstract class AMFFilter {
     protected AMFFilter next;
 
-    public AMFFilter()
-    {
+    public AMFFilter() {
     }
 
-    public void setNext(AMFFilter next)
-    {
+    public void setNext(AMFFilter next) {
         this.next = next;
     }
 
-    public AMFFilter getNext()
-    {
+    public AMFFilter getNext() {
         return next;
     }
 
diff --git a/core/src/main/java/flex/messaging/endpoints/amf/BatchProcessFilter.java b/core/src/main/java/flex/messaging/endpoints/amf/BatchProcessFilter.java
index 8376979..8fc2951 100644
--- a/core/src/main/java/flex/messaging/endpoints/amf/BatchProcessFilter.java
+++ b/core/src/main/java/flex/messaging/endpoints/amf/BatchProcessFilter.java
@@ -24,24 +24,19 @@
 /**
  * Filter that breaks down the batched message buffer into individual invocations.
  */
-public class BatchProcessFilter extends AMFFilter
-{
-    public BatchProcessFilter()
-    {
+public class BatchProcessFilter extends AMFFilter {
+    public BatchProcessFilter() {
     }
 
-    public void invoke(final ActionContext context)
-    {
+    public void invoke(final ActionContext context) {
         // Process each action in the body
         int bodyCount = context.getRequestMessage().getBodyCount();
 
         // Report batch size in Debug mode
         //gateway.getLogger().logDebug("Processing batch of " + bodyCount + " request(s)");
 
-        for (context.setMessageNumber(0); context.getMessageNumber() < bodyCount; context.incrementMessageNumber())
-        {
-            try
-            {
+        for (context.setMessageNumber(0); context.getMessageNumber() < bodyCount; context.incrementMessageNumber()) {
+            try {
                 // create the response body
                 MessageBody responseBody = new MessageBody();
                 responseBody.setTargetURI(context.getRequestMessageBody().getResponseURI());
@@ -52,18 +47,15 @@
                 //Check that deserialized message body data type was valid. If not, skip this message.
                 Object o = context.getRequestMessageBody().getData();
 
-                if (o != null && o instanceof RecoverableSerializationException)
-                {
-                    context.getResponseMessageBody().setData(((RecoverableSerializationException)o).createErrorMessage());
+                if (o != null && o instanceof RecoverableSerializationException) {
+                    context.getResponseMessageBody().setData(((RecoverableSerializationException) o).createErrorMessage());
                     context.getResponseMessageBody().setReplyMethod(MessageIOConstants.STATUS_METHOD);
                     continue;
                 }
 
                 // invoke next filter in the chain
                 next.invoke(context);
-            }
-            catch (Exception e)
-            {
+            } catch (Exception e) {
                 // continue invoking on next message body despite error
             }
         }
diff --git a/core/src/main/java/flex/messaging/endpoints/amf/LegacyFilter.java b/core/src/main/java/flex/messaging/endpoints/amf/LegacyFilter.java
index fc52755..3ceb5c8 100644
--- a/core/src/main/java/flex/messaging/endpoints/amf/LegacyFilter.java
+++ b/core/src/main/java/flex/messaging/endpoints/amf/LegacyFilter.java
@@ -55,23 +55,20 @@
  * the header value, if required.
  * </p>
  */
-public class LegacyFilter extends AMFFilter
-{
+public class LegacyFilter extends AMFFilter {
     public static final String LEGACY_ENVELOPE_FLAG_KEY = "_flag";
     public static final String LEGACY_ENVELOPE_FLAG_VALUE = "Envelope";
     public static final String LEGACY_SECURITY_HEADER_NAME = "Credentials";
     public static final String LEGACY_SECURITY_PRINCIPAL = "userid";
     public static final String LEGACY_SECURITY_CREDENTIALS = "password";
-    
+
     private BaseHTTPEndpoint endpoint;
 
-    public LegacyFilter(BaseHTTPEndpoint endpoint)
-    {
+    public LegacyFilter(BaseHTTPEndpoint endpoint) {
         this.endpoint = endpoint;
     }
 
-    public void invoke(final ActionContext context) throws IOException
-    {
+    public void invoke(final ActionContext context) throws IOException {
         MessageBody requestBody = context.getRequestMessageBody();
         context.setLegacy(true);
 
@@ -80,16 +77,12 @@
         List newParams = null;
 
         // Check whether we're a new Flex 2.0 Messaging request
-        if (data != null)
-        {
-            if (data.getClass().isArray())
-            {
+        if (data != null) {
+            if (data.getClass().isArray()) {
                 int paramLength = Array.getLength(data);
-                if (paramLength == 1)
-                {
+                if (paramLength == 1) {
                     Object obj = Array.get(data, 0);
-                    if (obj != null && obj instanceof Message)
-                    {
+                    if (obj != null && obj instanceof Message) {
                         context.setLegacy(false);
                         newParams = new ArrayList();
                         newParams.add(obj);
@@ -97,29 +90,20 @@
                 }
 
                 // It was not a Flex 2.0 Message, but we have an array, use its contents as our params
-                if (newParams == null)
-                {
+                if (newParams == null) {
                     newParams = new ArrayList();
-                    for (int i = 0; i < paramLength; i++)
-                    {
-                        try
-                        {
+                    for (int i = 0; i < paramLength; i++) {
+                        try {
                             newParams.add(Array.get(data, i));
-                        }
-                        catch (Throwable t)
-                        {
+                        } catch (Throwable t) {
                         }
                     }
                 }
-            }
-            else if (data instanceof List)
-            {
-                List paramList = (List)data;
-                if (paramList.size() == 1)
-                {
+            } else if (data instanceof List) {
+                List paramList = (List) data;
+                if (paramList.size() == 1) {
                     Object obj = paramList.get(0);
-                    if (obj != null && obj instanceof Message)
-                    {
+                    if (obj != null && obj instanceof Message) {
                         context.setLegacy(false);
                         newParams = new ArrayList();
                         newParams.add(obj);
@@ -127,24 +111,21 @@
                 }
 
                 // It was not a Flex 2.0 Message, but we have a list, so use it as our params
-                if (newParams == null)
-                {
-                    newParams = (List)data;
+                if (newParams == null) {
+                    newParams = (List) data;
                 }
             }
         }
 
         // We still haven't found any lists of params, so create one with
         // whatever data we have.
-        if (newParams == null)
-        {
+        if (newParams == null) {
             newParams = new ArrayList();
             newParams.add(data);
 
         }
 
-        if (context.isLegacy())
-        {
+        if (context.isLegacy()) {
             newParams = legacyRequest(context, newParams);
         }
 
@@ -154,31 +135,26 @@
         next.invoke(context);
 
 
-        if (context.isLegacy())
-        {
+        if (context.isLegacy()) {
             MessageBody responseBody = context.getResponseMessageBody();
             Object response = responseBody.getData();
 
-            if (response instanceof ErrorMessage)
-            {
-                ErrorMessage error = (ErrorMessage)response;
+            if (response instanceof ErrorMessage) {
+                ErrorMessage error = (ErrorMessage) response;
                 ASObject aso = new ASObject();
                 aso.put("message", error.faultString);
                 aso.put("code", error.faultCode);
                 aso.put("details", error.faultDetail);
                 aso.put("rootCause", error.rootCause);
                 response = aso;
-            }
-            else if (response instanceof Message)
-            {
-                response = ((Message)response).getBody();
+            } else if (response instanceof Message) {
+                response = ((Message) response).getBody();
             }
             responseBody.setData(response);
         }
     }
 
-    private List legacyRequest(ActionContext context, List oldParams)
-    {
+    private List legacyRequest(ActionContext context, List oldParams) {
         List newParams = new ArrayList(1);
         Map headerMap = new HashMap();
         Object body = oldParams;
@@ -188,27 +164,23 @@
         // Legacy Packet Security
         List packetHeaders = context.getRequestMessage().getHeaders();
         packetCredentials(packetHeaders, headerMap);
-        
+
 
         // Legacy Body
-        if (oldParams.size() == 1)
-        {
+        if (oldParams.size() == 1) {
             Object obj = oldParams.get(0);
 
-            if (obj != null && obj instanceof ASObject)
-            {
-                ASObject aso = (ASObject)obj;
+            if (obj != null && obj instanceof ASObject) {
+                ASObject aso = (ASObject) obj;
 
                 // Unwrap legacy Flex 1.5 Envelope type
-                if (isEnvelope(aso))
-                {
+                if (isEnvelope(aso)) {
                     body = aso.get("data");
 
                     // Envelope level headers
                     Object h = aso.get("headers");
-                    if (h != null && h instanceof List)
-                    {
-                        readEnvelopeHeaders((List)h, headerMap);
+                    if (h != null && h instanceof List) {
+                        readEnvelopeHeaders((List) h, headerMap);
                         envelopeCredentials(headerMap);
                     }
                 }
@@ -221,15 +193,13 @@
         return newParams;
     }
 
-    private boolean isEnvelope(ASObject aso)
-    {
+    private boolean isEnvelope(ASObject aso) {
         String flag = null;
         Object f = aso.get(LEGACY_ENVELOPE_FLAG_KEY);
         if (f != null && f instanceof String)
-            flag = (String)f;
+            flag = (String) f;
 
-        if (flag != null && flag.equalsIgnoreCase(LEGACY_ENVELOPE_FLAG_VALUE))
-        {
+        if (flag != null && flag.equalsIgnoreCase(LEGACY_ENVELOPE_FLAG_VALUE)) {
             return true;
         }
 
@@ -237,11 +207,10 @@
     }
 
 
-    private RemotingMessage createMessage(MessageBody messageBody, Object body, Map headerMap)
-    {
+    private RemotingMessage createMessage(MessageBody messageBody, Object body, Map headerMap) {
         RemotingMessage remotingMessage = new RemotingMessage();
         // Assigning an empty String, MessageBroker expects non-null messageId.        
-        remotingMessage.setMessageId("");  
+        remotingMessage.setMessageId("");
         remotingMessage.setBody(body);
         remotingMessage.setHeaders(headerMap);
 
@@ -249,14 +218,12 @@
         String targetURI = messageBody.getTargetURI();
 
         int dotIndex = targetURI.lastIndexOf(".");
-        if (dotIndex > 0)
-        {
+        if (dotIndex > 0) {
             String destination = targetURI.substring(0, dotIndex);
             remotingMessage.setDestination(destination);
         }
 
-        if (targetURI.length() > dotIndex)
-        {
+        if (targetURI.length() > dotIndex) {
             String operation = targetURI.substring(dotIndex + 1);
             remotingMessage.setOperation(operation);
         }
@@ -265,18 +232,15 @@
     }
 
 
-    private Map readEnvelopeHeaders(List headers, Map headerMap)
-    {
+    private Map readEnvelopeHeaders(List headers, Map headerMap) {
         int count = headers.size();
 
-        for (int i = 0; i < count; i++)
-        {
+        for (int i = 0; i < count; i++) {
             Object obj = headers.get(i);
 
             //We currently expect a plain old AS Array
-            if (obj != null && obj instanceof List)
-            {
-                List h = (List)obj;
+            if (obj != null && obj instanceof List) {
+                List h = (List) obj;
 
                 Object name = null;
                 //Object mustUnderstand = null;
@@ -285,12 +249,10 @@
                 int numFields = h.size();
 
                 //The array must have exactly three (3) fields
-                if (numFields == 3)
-                {
+                if (numFields == 3) {
                     name = h.get(0);
 
-                    if (name != null && name instanceof String)
-                    {
+                    if (name != null && name instanceof String) {
                         //mustUnderstand = h.get(1);
                         data = h.get(2);
                         headerMap.put(name, data);
@@ -302,30 +264,24 @@
         return headerMap;
     }
 
-    private void envelopeCredentials(Map headers)
-    {
+    private void envelopeCredentials(Map headers) {
         // Process Legacy Security Credentials
         Object obj = headers.get(LEGACY_SECURITY_HEADER_NAME);
-        if (obj != null && obj instanceof ASObject)
-        {
-            ASObject header = (ASObject)obj;
-            String principal = (String)header.get(LEGACY_SECURITY_PRINCIPAL);
+        if (obj != null && obj instanceof ASObject) {
+            ASObject header = (ASObject) obj;
+            String principal = (String) header.get(LEGACY_SECURITY_PRINCIPAL);
             Object credentials = header.get(LEGACY_SECURITY_CREDENTIALS);
             endpoint.getMessageBroker().getLoginManager().login(principal, credentials.toString());
         }
         headers.remove(LEGACY_SECURITY_HEADER_NAME);
     }
 
-    private void packetCredentials(List packetHeaders, Map headers)
-    {
-        if (packetHeaders.size() > 0)
-        {
-            for (Iterator iter = packetHeaders.iterator(); iter.hasNext();)
-            {
-                MessageHeader header = (MessageHeader)iter.next();
-                if (header.getName().equals(LEGACY_SECURITY_HEADER_NAME))
-                {
-                    Map loginInfo = (Map)header.getData();
+    private void packetCredentials(List packetHeaders, Map headers) {
+        if (packetHeaders.size() > 0) {
+            for (Iterator iter = packetHeaders.iterator(); iter.hasNext(); ) {
+                MessageHeader header = (MessageHeader) iter.next();
+                if (header.getName().equals(LEGACY_SECURITY_HEADER_NAME)) {
+                    Map loginInfo = (Map) header.getData();
                     String principal = loginInfo.get(LEGACY_SECURITY_PRINCIPAL).toString();
                     Object credentials = loginInfo.get(LEGACY_SECURITY_CREDENTIALS);
                     endpoint.getMessageBroker().getLoginManager().login(principal, credentials.toString());
diff --git a/core/src/main/java/flex/messaging/endpoints/amf/MessageBrokerFilter.java b/core/src/main/java/flex/messaging/endpoints/amf/MessageBrokerFilter.java
index d8288f3..473a9fb 100644
--- a/core/src/main/java/flex/messaging/endpoints/amf/MessageBrokerFilter.java
+++ b/core/src/main/java/flex/messaging/endpoints/amf/MessageBrokerFilter.java
@@ -43,20 +43,17 @@
  * chain returns the message to the MessageBroker, which will then
  * locate the correct service to handle the message.
  */
-public class MessageBrokerFilter extends AMFFilter
-{
+public class MessageBrokerFilter extends AMFFilter {
     private static final int UNHANDLED_ERROR = 10000;
     static final String LOG_CATEGORY = LogCategories.MESSAGE_GENERAL;
 
     protected AbstractEndpoint endpoint;
 
-    public MessageBrokerFilter(AbstractEndpoint endpoint)
-    {
+    public MessageBrokerFilter(AbstractEndpoint endpoint) {
         this.endpoint = endpoint;
     }
 
-    public void invoke(final ActionContext context)
-    {
+    public void invoke(final ActionContext context) {
         MessageBody request = context.getRequestMessageBody();
         MessageBody response = context.getResponseMessageBody();
 
@@ -66,16 +63,14 @@
 
         String replyMethodName = MessageIOConstants.STATUS_METHOD;
 
-        try
-        {
+        try {
             // Lookup or create the correct FlexClient.
             endpoint.setupFlexClient(inMessage);
 
             // Assign a clientId if necessary.
             // We don't need to assign clientIds to general poll requests.
             if (inMessage.getClientId() == null &&
-                (!(inMessage instanceof CommandMessage) || ((CommandMessage)inMessage).getOperation() != CommandMessage.POLL_OPERATION))
-            {
+                    (!(inMessage instanceof CommandMessage) || ((CommandMessage) inMessage).getOperation() != CommandMessage.POLL_OPERATION)) {
                 Object clientId = UUIDUtils.createUUID();
                 inMessage.setClientId(clientId);
             }
@@ -85,9 +80,8 @@
             // or preceeded by other messages in the batch; the request-response loop must complete without waiting.
             // If the poll command is the only message in the batch it's ok to wait.
             // If it isn't ok to wait, tag the poll message with a header that short-circuits any potential poll-wait.
-            if (inMessage instanceof CommandMessage)
-            {
-                CommandMessage command = (CommandMessage)inMessage;
+            if (inMessage instanceof CommandMessage) {
+                CommandMessage command = (CommandMessage) inMessage;
                 if ((command.getOperation() == CommandMessage.POLL_OPERATION) && (context.getRequestMessage().getBodyCount() != 1))
                     command.setHeader(CommandMessage.SUPPRESS_POLL_WAIT_HEADER, Boolean.TRUE);
             }
@@ -101,30 +95,23 @@
             outMessage = endpoint.serviceMessage(inMessage);
 
             // if processing of the message resulted in an error, set up context and reply method accordingly
-            if (outMessage instanceof ErrorMessage)
-            {
+            if (outMessage instanceof ErrorMessage) {
                 context.setStatus(MessageIOConstants.STATUS_ERR);
                 replyMethodName = MessageIOConstants.STATUS_METHOD;
-            }
-            else
-            {
+            } else {
                 replyMethodName = MessageIOConstants.RESULT_METHOD;
             }
-        }
-        catch (MessageException e)
-        {
+        } catch (MessageException e) {
             context.setStatus(MessageIOConstants.STATUS_ERR);
             replyMethodName = MessageIOConstants.STATUS_METHOD;
 
             outMessage = e.createErrorMessage();
-            ((ErrorMessage)outMessage).setCorrelationId(inMessage.getMessageId());
-            ((ErrorMessage)outMessage).setDestination(inMessage.getDestination());
-            ((ErrorMessage)outMessage).setClientId(inMessage.getClientId());
+            ((ErrorMessage) outMessage).setCorrelationId(inMessage.getMessageId());
+            ((ErrorMessage) outMessage).setDestination(inMessage.getDestination());
+            ((ErrorMessage) outMessage).setClientId(inMessage.getClientId());
 
-            e.logAtHingePoint(inMessage, (ErrorMessage)outMessage, null /* Use default message intros */);
-        }
-        catch (Throwable t)
-        {
+            e.logAtHingePoint(inMessage, (ErrorMessage) outMessage, null /* Use default message intros */);
+        } catch (Throwable t) {
             // Handle any uncaught failures. The normal exception path on the server
             // is to throw MessageExceptions which are handled in the catch block above,
             // so if that was skipped we have an overlooked or serious problem.
@@ -136,28 +123,24 @@
                 lmeMessage = t.getClass().getName();
 
             MessageException lme = new MessageException();
-            lme.setMessage(UNHANDLED_ERROR, new Object[] {lmeMessage});
+            lme.setMessage(UNHANDLED_ERROR, new Object[]{lmeMessage});
 
             outMessage = lme.createErrorMessage();
-            ((ErrorMessage)outMessage).setCorrelationId(inMessage.getMessageId());
-            ((ErrorMessage)outMessage).setDestination(inMessage.getDestination());
-            ((ErrorMessage)outMessage).setClientId(inMessage.getClientId());
+            ((ErrorMessage) outMessage).setCorrelationId(inMessage.getMessageId());
+            ((ErrorMessage) outMessage).setDestination(inMessage.getDestination());
+            ((ErrorMessage) outMessage).setClientId(inMessage.getClientId());
 
-            if (Log.isError())
-            {
+            if (Log.isError()) {
                 Log.getLogger(LOG_CATEGORY).error("Unhandled error when processing a message: " +
                         t.toString() + StringUtils.NEWLINE +
                         "  incomingMessage: " + inMessage + StringUtils.NEWLINE +
                         "  errorReply: " + outMessage + StringUtils.NEWLINE +
                         ExceptionUtil.exceptionFollowedByRootCausesToString(t) + StringUtils.NEWLINE);
             }
-        }
-        finally
-        {
+        } finally {
             // If MPI is enabled update the MPI metrics on the object referred to by the context
             // and the messages
-            if (context.isRecordMessageSizes() || context.isRecordMessageTimes())
-            {
+            if (context.isRecordMessageSizes() || context.isRecordMessageTimes()) {
                 MessagePerformanceUtils.updateOutgoingMPI(context, inMessage, outMessage);
             }
 
@@ -168,9 +151,8 @@
             if (session != null && session.useSmallMessages()
                     && !context.isLegacy()
                     && context.getVersion() >= MessageIOConstants.AMF3
-                    && outMessage instanceof Message)
-            {
-                outMessage = endpoint.convertToSmallMessage((Message)outMessage);
+                    && outMessage instanceof Message) {
+                outMessage = endpoint.convertToSmallMessage((Message) outMessage);
             }
 
             response.setReplyMethod(replyMethodName);
diff --git a/core/src/main/java/flex/messaging/endpoints/amf/SerializationFilter.java b/core/src/main/java/flex/messaging/endpoints/amf/SerializationFilter.java
index c15ab89..f188dee 100644
--- a/core/src/main/java/flex/messaging/endpoints/amf/SerializationFilter.java
+++ b/core/src/main/java/flex/messaging/endpoints/amf/SerializationFilter.java
@@ -52,8 +52,7 @@
 /**
  * Filter for serializing and deserializing action messages.
  */
-public class SerializationFilter extends AMFFilter
-{
+public class SerializationFilter extends AMFFilter {
     //--------------------------------------------------------------------------
     //
     // Private Static Constants
@@ -78,8 +77,7 @@
      *
      * @param logCategory Log category to use in logging. If <code>null</code>, the default values is <code>Endpoint.General</code>.
      */
-    public SerializationFilter(String logCategory)
-    {
+    public SerializationFilter(String logCategory) {
         if (logCategory == null)
             logCategory = LogCategories.ENDPOINT_GENERAL;
         logger = Log.getLogger(logCategory);
@@ -103,20 +101,18 @@
     //--------------------------------------------------------------------------
 
     @Override
-    public void invoke(final ActionContext context) throws IOException
-    {
+    public void invoke(final ActionContext context) throws IOException {
         boolean success = false;
 
         // Additional AMF packet tracing is enabled only at the debug logging level
         // and only if there's a target listening for it.
-        AmfTrace debugTrace = Log.isDebug() && logger.hasTarget()? new AmfTrace() : null;
+        AmfTrace debugTrace = Log.isDebug() && logger.hasTarget() ? new AmfTrace() : null;
 
         // Create an empty ActionMessage object to hold our response
         context.setResponseMessage(new ActionMessage());
         SerializationContext sc = SerializationContext.getSerializationContext();
 
-        try
-        {
+        try {
             // Deserialize the input stream into an "ActionMessage" object.
             MessageDeserializer deserializer = sc.newMessageDeserializer();
 
@@ -128,13 +124,11 @@
             // If so, convert stream from UTF-8 to raw hex before AMF deserialization.
             String contentType = req.getContentType();
             boolean jsClient = (contentType != null && contentType.startsWith(MessageIOConstants.CONTENT_TYPE_PLAIN));
-            if (jsClient)
-            {
+            if (jsClient) {
                 ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                 BufferedReader reader = new BufferedReader(new InputStreamReader(in, UTF8_CHARSET));
                 int currentByte = -1;
-                while ((currentByte = reader.read()) != -1)
-                {
+                while ((currentByte = reader.read()) != -1) {
                     if (currentByte == 256)
                         currentByte = 0;
                     outputStream.write(currentByte);
@@ -151,15 +145,14 @@
             context.setDeserializedBytes(reqLen);
 
             // set up the incoming MPI info if it is enabled
-            if(context.isMPIenabled())
-            {
+            if (context.isMPIenabled()) {
                 MessagePerformanceInfo mpi = new MessagePerformanceInfo();
                 mpi.recordMessageSizes = context.isRecordMessageSizes();
                 mpi.recordMessageTimes = context.isRecordMessageTimes();
-                if(context.isRecordMessageTimes())
+                if (context.isRecordMessageTimes())
                     mpi.receiveTime = System.currentTimeMillis();
-                if(context.isRecordMessageSizes())
-                    mpi.messageSize =reqLen;
+                if (context.isRecordMessageSizes())
+                    mpi.messageSize = reqLen;
 
                 context.setMPII(mpi);
             }
@@ -168,13 +161,9 @@
             context.setRequestMessage(m);
             deserializer.readMessage(m, context);
             success = true;
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             handleDeserializationException(context, t, logger);
-        }
-        finally
-        {
+        } finally {
             // Use the same ActionMessage version for the response
             ActionMessage respMsg = context.getResponseMessage();
             respMsg.setVersion(context.getVersion());
@@ -183,38 +172,29 @@
                 logger.debug(debugTrace.toString());
         }
 
-        try
-        {
-            if (success)
-            {
+        try {
+            if (success) {
                 next.invoke(context);
             }
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             unhandledError(context, t);
-        }
-        finally
-        {
+        } finally {
             // serialize output
-            if (context.getStatus() != MessageIOConstants.STATUS_NOTAMF)
-            {
+            if (context.getStatus() != MessageIOConstants.STATUS_NOTAMF) {
                 ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
                 ActionMessage respMesg = context.getResponseMessage();
 
                 // Additional AMF packet tracing is enabled only at the debug logging level
                 // and only if there's a target listening for it.
-                debugTrace = Log.isDebug() && logger.hasTarget()? new AmfTrace() : null;
+                debugTrace = Log.isDebug() && logger.hasTarget() ? new AmfTrace() : null;
 
-                try
-                {
+                try {
                     // overhead calculation is only necessary when MPI is enabled
-                    long serializationOverhead=0;
-                    if(context.isRecordMessageTimes())
-                    {
+                    long serializationOverhead = 0;
+                    if (context.isRecordMessageTimes()) {
                         // set server send time
                         context.getMPIO().sendTime = System.currentTimeMillis();
-                        if(context.isRecordMessageSizes())
+                        if (context.isRecordMessageSizes())
                             serializationOverhead = System.currentTimeMillis();
                     }
                     MessageSerializer serializer = sc.newMessageSerializer();
@@ -225,15 +205,12 @@
                     context.setSerializedBytes(outBuffer.size());
 
                     // serialized message again after adding info if mpio with sizing is enabled
-                    if(context.isRecordMessageSizes())
-                    {
-                        try
-                        {
+                    if (context.isRecordMessageSizes()) {
+                        try {
                             context.getMPIO().messageSize = outBuffer.size();
 
                             // reset server send time
-                            if(context.isRecordMessageTimes())
-                            {
+                            if (context.isRecordMessageTimes()) {
                                 serializationOverhead = System.currentTimeMillis() - serializationOverhead;
                                 context.getMPIO().addToOverhead(serializationOverhead);
                                 context.getMPIO().sendTime = System.currentTimeMillis();
@@ -244,21 +221,15 @@
                             respMesg = context.getResponseMessage();
                             serializer.initialize(sc, outBuffer, debugTrace);
                             serializer.writeMessage(respMesg);
-                        }
-                        catch(Exception e)
-                        {
+                        } catch (Exception e) {
                             if (Log.isDebug())
                                 logger.debug("MPI set up error: " + e.toString());
                         }
                     }
                     context.setResponseOutput(outBuffer);
-                }
-                catch (Exception e)
-                {
+                } catch (Exception e) {
                     handleSerializationException(sc, context, e, logger);
-                }
-                finally
-                {
+                } finally {
                     if (debugTrace != null)
                         logger.debug(debugTrace.toString());
                 }
@@ -272,25 +243,19 @@
      * deserialization failure.
      *
      * @param actionContext The action context.
-     * @param t The throwable that needs to be handled.
-     * @param logger The logger to which to log messages.
+     * @param t             The throwable that needs to be handled.
+     * @param logger        The logger to which to log messages.
      * @throws IOException
      */
-    public static void handleDeserializationException(ActionContext actionContext, Throwable t, Logger logger) throws IOException
-    {
-        if (t instanceof EOFException)
-        {
+    public static void handleDeserializationException(ActionContext actionContext, Throwable t, Logger logger) throws IOException {
+        if (t instanceof EOFException) {
             actionContext.setStatus(MessageIOConstants.STATUS_NOTAMF);
-        }
-        else if (t instanceof IOException)
-        {
+        } else if (t instanceof IOException) {
             if (Log.isDebug())
                 logger.debug("IOException reading message - client closed socket before sending the message?");
 
-            throw (IOException)t;
-        }
-        else
-        {
+            throw (IOException) t;
+        } else {
             actionContext.setStatus(MessageIOConstants.STATUS_ERR);
 
             // Create a single message body to hold the error
@@ -307,13 +272,10 @@
 
             String message;
             MessageException methodResult;
-            if (t instanceof MessageException)
-            {
-                methodResult = (MessageException)t;
+            if (t instanceof MessageException) {
+                methodResult = (MessageException) t;
                 message = methodResult.getMessage();
-            }
-            else
-            {
+            } else {
                 //Error deserializing client message.
                 methodResult = new SerializationException();
                 methodResult.setMessage(REQUEST_ERROR);
@@ -336,36 +298,30 @@
      * no way to tell which response failed serialization, so it adds a new response
      * with the serialization failure for each of the corresponding requests.
      *
-     * @param serializer The serializer that generated the error.
+     * @param serializer           The serializer that generated the error.
      * @param serializationContext The serialization context.
-     * @param actionContext The action context.
-     * @param t The throwable that needs to be handled.
-     * @param logger The logger to which to log error messages.
+     * @param actionContext        The action context.
+     * @param t                    The throwable that needs to be handled.
+     * @param logger               The logger to which to log error messages.
      */
     public static void handleSerializationException(SerializationContext serializationContext,
-            ActionContext actionContext, Throwable t, Logger logger)
-    {
+                                                    ActionContext actionContext, Throwable t, Logger logger) {
         ActionMessage responseMessage = new ActionMessage();
         actionContext.setResponseMessage(responseMessage);
 
         int bodyCount = actionContext.getRequestMessage().getBodyCount();
-        for (actionContext.setMessageNumber(0); actionContext.getMessageNumber() < bodyCount; actionContext.incrementMessageNumber())
-        {
+        for (actionContext.setMessageNumber(0); actionContext.getMessageNumber() < bodyCount; actionContext.incrementMessageNumber()) {
             MessageBody responseBody = new MessageBody();
             responseBody.setTargetURI(actionContext.getRequestMessageBody().getResponseURI());
             actionContext.getResponseMessage().addBody(responseBody);
 
             Object methodResult;
 
-            if (t instanceof MessageException)
-            {
-                methodResult = ((MessageException)t).createErrorMessage();
-            }
-            else
-            {
+            if (t instanceof MessageException) {
+                methodResult = ((MessageException) t).createErrorMessage();
+            } else {
                 String message = "An error occurred while serializing server response(s).";
-                if (t.getMessage() != null)
-                {
+                if (t.getMessage() != null) {
                     message = t.getMessage();
                     if (message == null)
                         message = t.toString();
@@ -374,38 +330,30 @@
                 methodResult = new MessageException(message, t).createErrorMessage();
             }
 
-            if (actionContext.isLegacy())
-            {
-                if (methodResult instanceof ErrorMessage)
-                {
-                    ErrorMessage error = (ErrorMessage)methodResult;
+            if (actionContext.isLegacy()) {
+                if (methodResult instanceof ErrorMessage) {
+                    ErrorMessage error = (ErrorMessage) methodResult;
                     ASObject aso = new ASObject();
                     aso.put("message", error.faultString);
                     aso.put("code", error.faultCode);
                     aso.put("details", error.faultDetail);
                     aso.put("rootCause", error.rootCause);
                     methodResult = aso;
+                } else if (methodResult instanceof Message) {
+                    methodResult = ((Message) methodResult).getBody();
                 }
-                else if (methodResult instanceof Message)
-                {
-                    methodResult = ((Message)methodResult).getBody();
-                }
-            }
-            else
-            {
-                try
-                {
+            } else {
+                try {
                     Message inMessage = actionContext.getRequestMessageBody().getDataAsMessage();
                     if (inMessage.getClientId() != null)
-                        ((ErrorMessage)methodResult).setClientId(inMessage.getClientId().toString());
+                        ((ErrorMessage) methodResult).setClientId(inMessage.getClientId().toString());
 
-                    if (inMessage.getMessageId() != null)
-                    {
-                        ((ErrorMessage)methodResult).setCorrelationId(inMessage.getMessageId());
-                        ((ErrorMessage)methodResult).setDestination(inMessage.getDestination());
+                    if (inMessage.getMessageId() != null) {
+                        ((ErrorMessage) methodResult).setCorrelationId(inMessage.getMessageId());
+                        ((ErrorMessage) methodResult).setDestination(inMessage.getDestination());
                     }
+                } catch (MessageException ignore) {
                 }
-                catch (MessageException ignore){}
             }
 
             responseBody.setData(methodResult);
@@ -417,17 +365,14 @@
 
         // Serialize the error messages
         ByteArrayOutputStream outBuffer = new ByteArrayOutputStream();
-        AmfTrace debugTrace = Log.isDebug() && logger.hasTarget()? new AmfTrace() : null;
+        AmfTrace debugTrace = Log.isDebug() && logger.hasTarget() ? new AmfTrace() : null;
         MessageSerializer serializer = serializationContext.newMessageSerializer();
         serializer.initialize(serializationContext, outBuffer, debugTrace);
 
-        try
-        {
+        try {
             serializer.writeMessage(actionContext.getResponseMessage());
             actionContext.setResponseOutput(outBuffer);
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
             //Error serializing response
             MessageException ex = new MessageException();
             ex.setMessage(RESPONSE_ERROR);
@@ -448,8 +393,7 @@
      * body to the client. It will not make it back to a custom responder, but the NetConnection
      * Debugger will show the event.
      */
-    private void unhandledError(ActionContext context, Throwable t)
-    {
+    private void unhandledError(ActionContext context, Throwable t) {
         ActionMessage responseMessage = new ActionMessage();
         context.setResponseMessage(responseMessage);
 
@@ -460,12 +404,9 @@
 
         MessageException methodResult;
 
-        if (t instanceof MessageException)
-        {
-            methodResult = (MessageException)t;
-        }
-        else
-        {
+        if (t instanceof MessageException) {
+            methodResult = (MessageException) t;
+        } else {
             // An unhandled error occurred while processing client request(s).
             methodResult = new SerializationException();
             methodResult.setMessage(UNHANDLED_ERROR);
diff --git a/core/src/main/java/flex/messaging/endpoints/amf/SessionFilter.java b/core/src/main/java/flex/messaging/endpoints/amf/SessionFilter.java
index a8b36cb..0c2e995 100644
--- a/core/src/main/java/flex/messaging/endpoints/amf/SessionFilter.java
+++ b/core/src/main/java/flex/messaging/endpoints/amf/SessionFilter.java
@@ -31,25 +31,20 @@
  * in the event that the client does not support cookies. In that case, an AppendToGatewayUrl
  * header with jsessionid as its value is added to the response message.
  */
-public class SessionFilter extends AMFFilter
-{
-    public SessionFilter()
-    {
+public class SessionFilter extends AMFFilter {
+    public SessionFilter() {
     }
 
-    public void invoke(final ActionContext context) throws IOException
-    {
+    public void invoke(final ActionContext context) throws IOException {
         next.invoke(context);
 
-        try
-        {
+        try {
             HttpServletRequest request = FlexContext.getHttpRequest();
             HttpServletResponse response = FlexContext.getHttpResponse();
 
             StringBuffer reqURL = request.getRequestURL();
 
-            if (reqURL != null)
-            {
+            if (reqURL != null) {
                 if (request.getQueryString() != null)
                     reqURL.append('?').append(request.getQueryString());
 
@@ -60,21 +55,17 @@
 
                 // It's ok to lower case here as URLs must be in ASCII
                 int pos = encFullURL.toLowerCase().indexOf(";jsessionid");
-                if (pos > 0)
-                {
+                if (pos > 0) {
                     StringBuffer sb = new StringBuffer();
                     sb.append(encFullURL.substring(pos));
                     sessionSuffix = sb.toString();
                 }
 
-                if (sessionSuffix != null && oldFullURL.indexOf(sessionSuffix) < 0)
-                {
+                if (sessionSuffix != null && oldFullURL.indexOf(sessionSuffix) < 0) {
                     context.getResponseMessage().addHeader(new MessageHeader(MessageIOConstants.URL_APPEND_HEADER, true /*mustUnderstand*/, sessionSuffix));
                 }
             }
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             //Nothing more we can do... don't send 'URL Append' AMF header.
         }
     }
diff --git a/core/src/main/java/flex/messaging/factories/JavaFactory.java b/core/src/main/java/flex/messaging/factories/JavaFactory.java
index e488919..6286228 100644
--- a/core/src/main/java/flex/messaging/factories/JavaFactory.java
+++ b/core/src/main/java/flex/messaging/factories/JavaFactory.java
@@ -46,8 +46,7 @@
  * session (for session scoped components) so you can use these components in your
  * JSP as well.
  */
-public class JavaFactory implements FlexFactory, DestructibleFlexFactory
-{
+public class JavaFactory implements FlexFactory, DestructibleFlexFactory {
     private static final String ATTRIBUTE_ID = "attribute-id";
 
     private static final int SINGLETON_ERROR = 10656;
@@ -55,18 +54,17 @@
     private static final int INVALID_CLASS_FOUND = 10654;
 
     /**
-     *
      * Default constructor
      */
-    public JavaFactory()
-    {
+    public JavaFactory() {
     }
 
     /**
      * This method can be used to provide additional configuration parameters
      * for the initializing this factory instance itself.
      */
-    public void initialize(String id, ConfigMap configMap) {}
+    public void initialize(String id, ConfigMap configMap) {
+    }
 
     /**
      * This method is called when we initialize the definition of an instance which
@@ -77,51 +75,40 @@
      * scoped components, you do not need to implement this method as the lookup
      * method itself can be used to validate its configuration.
      */
-    public FactoryInstance createFactoryInstance(String id, ConfigMap properties)
-    {
+    public FactoryInstance createFactoryInstance(String id, ConfigMap properties) {
         JavaFactoryInstance instance = new JavaFactoryInstance(this, id, properties);
 
-        if (properties == null)
-        {
+        if (properties == null) {
             // Use destination id as the default attribute id to prevent unwanted sharing.
             instance.setSource(instance.getId());
             instance.setScope(SCOPE_REQUEST);
             instance.setAttributeId(id);
-        }
-        else
-        {
+        } else {
             instance.setSource(properties.getPropertyAsString(SOURCE, instance.getId()));
             instance.setScope(properties.getPropertyAsString(SCOPE, SCOPE_REQUEST));
             // Use destination id as the default attribute id to prevent unwanted sharing.
             instance.setAttributeId(properties.getPropertyAsString(ATTRIBUTE_ID, id));
         }
 
-        if (instance.getScope().equalsIgnoreCase(SCOPE_APPLICATION))
-        {
-            try
-            {
+        if (instance.getScope().equalsIgnoreCase(SCOPE_APPLICATION)) {
+            try {
                 MessageBroker mb = FlexContext.getMessageBroker();
-                ServletContext ctx = mb != null?  mb.getServletContext() : null;
+                ServletContext ctx = mb != null ? mb.getServletContext() : null;
                 if (ctx == null) // Should not be the case; just in case.
                     return instance;
 
-                synchronized (ctx)
-                {
+                synchronized (ctx) {
                     Object inst = ctx.getAttribute(instance.getAttributeId());
-                    if (inst == null)
-                    {
+                    if (inst == null) {
                         inst = instance.createInstance();
                         ctx.setAttribute(instance.getAttributeId(), inst);
-                    }
-                    else
-                    {
+                    } else {
                         Class configuredClass = instance.getInstanceClass();
                         Class instClass = inst.getClass();
                         if (configuredClass != instClass &&
-                                !configuredClass.isAssignableFrom(instClass))
-                        {
+                                !configuredClass.isAssignableFrom(instClass)) {
                             ServiceException e = new ServiceException();
-                            e.setMessage(INVALID_CLASS_FOUND, new Object[] {
+                            e.setMessage(INVALID_CLASS_FOUND, new Object[]{
                                     instance.getAttributeId(), "application", instance.getId(),
                                     instance.getInstanceClass(), inst.getClass()});
                             e.setCode("Server.Processing");
@@ -133,11 +120,9 @@
                     // increment attribute-id reference count on MB
                     mb.incrementAttributeIdRefCount(instance.getAttributeId());
                 }
-            }
-            catch (Throwable t)
-            {
+            } catch (Throwable t) {
                 ConfigurationException ex = new ConfigurationException();
-                ex.setMessage(SINGLETON_ERROR, new Object[] { instance.getSource(), id });
+                ex.setMessage(SINGLETON_ERROR, new Object[]{instance.getSource(), id});
                 ex.setRootCause(t);
 
                 if (Log.isError())
@@ -145,9 +130,7 @@
 
                 throw ex;
             }
-        }
-        else if(instance.getScope().equalsIgnoreCase(SCOPE_SESSION))
-        {
+        } else if (instance.getScope().equalsIgnoreCase(SCOPE_SESSION)) {
             // increment attribute-id reference count on MB for Session scoped instances
             MessageBroker mb = FlexContext.getMessageBroker();
             if (mb != null)
@@ -172,59 +155,46 @@
      * @param inst the FactoryInstance to lookup.
      * @return the constructed and initialized component for this factory instance.
      */
-    public Object lookup(FactoryInstance inst)
-    {
+    public Object lookup(FactoryInstance inst) {
         JavaFactoryInstance factoryInstance = (JavaFactoryInstance) inst;
         Object instance;
 
-        if (factoryInstance.getScope().equalsIgnoreCase(SCOPE_APPLICATION))
-        {
+        if (factoryInstance.getScope().equalsIgnoreCase(SCOPE_APPLICATION)) {
             instance = factoryInstance.applicationInstance;
-        }
-        else if (factoryInstance.getScope().equalsIgnoreCase(SCOPE_SESSION))
-        {
+        } else if (factoryInstance.getScope().equalsIgnoreCase(SCOPE_SESSION)) {
             // See if an instance already exists in this http session first
             FlexSession session = FlexContext.getFlexSession();
-            if (session != null)
-            {
+            if (session != null) {
                 instance = session.getAttribute(factoryInstance.getAttributeId());
-                if (instance != null)
-                {
+                if (instance != null) {
                     Class configuredClass = factoryInstance.getInstanceClass();
                     Class instClass = instance.getClass();
                     if (configuredClass != instClass &&
-                        !configuredClass.isAssignableFrom(instClass))
-                    {
+                            !configuredClass.isAssignableFrom(instClass)) {
                         ServiceException e = new ServiceException();
-                        e.setMessage(INVALID_CLASS_FOUND, new Object[] {
-                                        factoryInstance.getAttributeId(),
-                                        "session",
-                                        factoryInstance.getId(),
-                                        factoryInstance.getInstanceClass(), instance.getClass()});
+                        e.setMessage(INVALID_CLASS_FOUND, new Object[]{
+                                factoryInstance.getAttributeId(),
+                                "session",
+                                factoryInstance.getId(),
+                                factoryInstance.getInstanceClass(), instance.getClass()});
                         e.setCode("Server.Processing");
                         throw e;
                     }
-                }
-                else
-                {
+                } else {
                     // none exists - create it the first time for each session
                     instance = factoryInstance.createInstance();
                     session.setAttribute(factoryInstance.getAttributeId(), instance);
                 }
-            }
-            else
+            } else
                 instance = null;
 
-            if (instance == null)
-            {
+            if (instance == null) {
                 ServiceException e = new ServiceException();
-                e.setMessage(SESSION_NOT_FOUND, new Object[] {factoryInstance.getId()});
+                e.setMessage(SESSION_NOT_FOUND, new Object[]{factoryInstance.getId()});
                 e.setCode("Server.Processing");
                 throw e;
             }
-        }
-        else
-        {
+        } else {
             instance = factoryInstance.createInstance();
         }
         return instance;
@@ -237,36 +207,29 @@
      *
      * @param inst The FactoryInstance to be cleaned up
      */
-    public void destroyFactoryInstance(FactoryInstance inst)
-    {
+    public void destroyFactoryInstance(FactoryInstance inst) {
         JavaFactoryInstance factoryInstance = (JavaFactoryInstance) inst;
 
         // if we are stopping a destination with an Application or Session scoped assembler, we may
         // have to remove the assembler from the ServletContext or Session
-        if (factoryInstance != null)
-        {
+        if (factoryInstance != null) {
             MessageBroker mb = FlexContext.getMessageBroker();
             String attributeId = factoryInstance.getAttributeId();
 
-            if (FlexFactory.SCOPE_APPLICATION.equals(factoryInstance.getScope()))
-            {
+            if (FlexFactory.SCOPE_APPLICATION.equals(factoryInstance.getScope())) {
                 ServletContext ctx = mb.getServletContext();
                 if (ctx == null) // Should never be the case, but just in case.
                     return;
 
-                synchronized (ctx)
-                {
+                synchronized (ctx) {
                     // remove from ServletContext if reference count is zero
                     int refCount = (mb != null) ? mb.decrementAttributeIdRefCount(attributeId) : 0;
-                    if (refCount <= 0)
-                    {
+                    if (refCount <= 0) {
                         // remove assembler from servlet context
                         ctx.removeAttribute(attributeId);
                     }
                 }
-            }
-            else if (FlexFactory.SCOPE_SESSION.equals(factoryInstance.getScope()))
-            {
+            } else if (FlexFactory.SCOPE_SESSION.equals(factoryInstance.getScope())) {
                 FlexSession session = FlexContext.getFlexSession();
 
                 // if this is being stopped during runtime config, we should have a session available to us
@@ -277,8 +240,7 @@
 
                 // remove from Session if reference count is zero
                 int refCount = (mb != null) ? mb.decrementAttributeIdRefCount(attributeId) : 0;
-                if (refCount <= 0)
-                {
+                if (refCount <= 0) {
                     // remove assembler from servlet context
                     session.removeAttribute(attributeId);
                 }
@@ -286,8 +248,7 @@
 
             // Remove this instance from Session created listeners
             // Only helps if listener was created by the factory, but this is common (aka assembler classes)
-            if (factoryInstance.applicationInstance instanceof FlexSessionListener)
-            {
+            if (factoryInstance.applicationInstance instanceof FlexSessionListener) {
                 FlexSession.removeSessionCreatedListener((FlexSessionListener) factoryInstance.applicationInstance);
             }
         }
diff --git a/core/src/main/java/flex/messaging/factories/JavaFactoryInstance.java b/core/src/main/java/flex/messaging/factories/JavaFactoryInstance.java
index 700545a..f97c9b0 100644
--- a/core/src/main/java/flex/messaging/factories/JavaFactoryInstance.java
+++ b/core/src/main/java/flex/messaging/factories/JavaFactoryInstance.java
@@ -35,8 +35,7 @@
  * @see flex.messaging.factories.JavaFactory
  */
 
-public class JavaFactoryInstance extends FactoryInstance
-{
+public class JavaFactoryInstance extends FactoryInstance {
     Object applicationInstance = null;
     Class javaClass = null;
     String attributeId;
@@ -45,12 +44,11 @@
      * Constructs a <code>JavaFactoryInstance</code>, assigning its factory, id,
      * and properties.
      *
-     * @param factory The <code>JavaFactory</code> that created this instance.
-     * @param id The id for the <code>JavaFactoryInstance</code>.
+     * @param factory    The <code>JavaFactory</code> that created this instance.
+     * @param id         The id for the <code>JavaFactoryInstance</code>.
      * @param properties The properties for the <code>JavaFactoryInstance</code>.
      */
-    public JavaFactoryInstance(JavaFactory factory, String id, ConfigMap properties)
-    {
+    public JavaFactoryInstance(JavaFactory factory, String id, ConfigMap properties) {
         super(factory, id, properties);
     }
 
@@ -59,8 +57,7 @@
      *
      * @param attributeId The attribute id for the <code>JavaFactoryInstance</code>.
      */
-    public void setAttributeId(String attributeId)
-    {
+    public void setAttributeId(String attributeId) {
         this.attributeId = attributeId;
     }
 
@@ -69,8 +66,7 @@
      *
      * @return attributeId The attribute id for the <code>JavaFactoryInstance</code>.
      */
-    public String getAttributeId()
-    {
+    public String getAttributeId() {
         return attributeId;
     }
 
@@ -78,8 +74,8 @@
      * Sets the instance class to null, in addition to updating the
      * <code>source</code> property.
      */
-    @Override public void setSource(String source)
-    {
+    @Override
+    public void setSource(String source) {
         super.setSource(source);
         if (javaClass != null)
             javaClass = null;
@@ -91,16 +87,13 @@
      *
      * @return the instance
      */
-    public Object createInstance()
-    {
+    public Object createInstance() {
         Object inst = ClassUtil.createDefaultInstance(getInstanceClass(), null);
 
         MessageBroker mb = FlexContext.getMessageBroker();
-        if (mb != null)
-        {
+        if (mb != null) {
             Destination destination = mb.getRegisteredDestination(getId());
-            if (destination != null && destination.isInitialized())
-            {
+            if (destination != null && destination.isInitialized()) {
                 if (inst instanceof FlexConfigurable)
                     ((FlexConfigurable) inst).initialize(getId(), getProperties());
             }
@@ -112,12 +105,12 @@
     /**
      * Creates an instance class from specified <code>source</code>.
      */
-    @Override public Class getInstanceClass()
-    {
+    @Override
+    public Class getInstanceClass() {
         if (javaClass == null)
             javaClass = ClassUtil.createClass(getSource(),
-                     FlexContext.getMessageBroker() == null ? this.getClass().getClassLoader() :
-                     FlexContext.getMessageBroker().getClassLoader());
+                    FlexContext.getMessageBroker() == null ? this.getClass().getClassLoader() :
+                            FlexContext.getMessageBroker().getClassLoader());
 
         return javaClass;
     }
@@ -126,21 +119,19 @@
      * Updates the session so that these values get replicated to other nodes
      * in the cluster.  Possibly we should make this configurable?
      */
-    @Override public void operationComplete(Object instance)
-    {
-        if (getScope().equalsIgnoreCase(FlexFactory.SCOPE_SESSION))
-        {
+    @Override
+    public void operationComplete(Object instance) {
+        if (getScope().equalsIgnoreCase(FlexFactory.SCOPE_SESSION)) {
             FlexSession session = FlexContext.getFlexSession();
-            if (session != null && session.isValid())
-            {
+            if (session != null && session.isValid()) {
                 session.setAttribute(getAttributeId(), instance);
             }
         }
     }
 
 
-    @Override public String toString()
-    {
+    @Override
+    public String toString() {
         return "JavaFactory instance for id=" + getId() + " source=" + getSource() + " scope=" + getScope();
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/AbstractProxy.java b/core/src/main/java/flex/messaging/io/AbstractProxy.java
index 2f29fb6..06508da 100644
--- a/core/src/main/java/flex/messaging/io/AbstractProxy.java
+++ b/core/src/main/java/flex/messaging/io/AbstractProxy.java
@@ -34,10 +34,8 @@
  * a given property name.
  *
  * @see flex.messaging.io.PropertyProxy
- *
  */
-public abstract class AbstractProxy implements PropertyProxy, Serializable
-{
+public abstract class AbstractProxy implements PropertyProxy, Serializable {
     protected Object defaultInstance;
     protected String alias;
     protected boolean dynamic;
@@ -49,22 +47,23 @@
     protected static final String LOG_CATEGORY = LogCategories.ENDPOINT_TYPE;
     private static final int CONVERSION_ERROR = 10006;
 
-    protected AbstractProxy(Object defaultInstance)
-    {
+    protected AbstractProxy(Object defaultInstance) {
         this.defaultInstance = defaultInstance;
         if (defaultInstance != null)
             alias = defaultInstance.getClass().getName();
     }
 
-    /** {@inheritDoc} */
-    public Object getDefaultInstance()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Object getDefaultInstance() {
         return defaultInstance;
     }
 
-    /** {@inheritDoc} */
-    public void setDefaultInstance(Object instance)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void setDefaultInstance(Object instance) {
         defaultInstance = instance;
     }
 
@@ -75,8 +74,7 @@
      * @param className the class name.
      * @return a Class object for the named class.
      */
-    public static Class getClassFromClassName(String className)
-    {
+    public static Class getClassFromClassName(String className) {
         TypeMarshallingContext typeContext = TypeMarshallingContext.getTypeMarshallingContext();
         return ClassUtil.createClass(className, typeContext.getClassLoader());
     }
@@ -84,146 +82,159 @@
     /**
      * A utility method which creates an instance from a given class name.  It assumes
      * the class has a zero arg constructor.
+     *
      * @param className the class name
-     * for a type that is missing on the server, instead of throwing a server resource not found
-     * exception.
+     *                  for a type that is missing on the server, instead of throwing a server resource not found
+     *                  exception.
      * @return the instance of the named class.
      */
-    public static Object createInstanceFromClassName(String className)
-    {
+    public static Object createInstanceFromClassName(String className) {
         Class<?> desiredClass = getClassFromClassName(className);
         return ClassUtil.createDefaultInstance(desiredClass, null, true /*validate*/);
     }
 
-    /** {@inheritDoc} */
-    public Object createInstance(String className)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Object createInstance(String className) {
         Object instance;
 
-        if (className == null || className.length() == 0)
+        if (className == null || className.length() == 0) {
+            instance = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
+        } else if (className.startsWith(">")) // Handle [RemoteClass] (no server alias)
         {
             instance = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
-        }
-        else if (className.startsWith(">")) // Handle [RemoteClass] (no server alias)
-        {
-            instance = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
-            ((ASObject)instance).setType(className);
-        }
-        else
-        {
+            ((ASObject) instance).setType(className);
+        } else {
             if (getSerializationContext().instantiateTypes || className.startsWith("flex."))
                 return createInstanceFromClassName(className);
 
             // Just return type info with an ASObject...
             instance = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
-            ((ASObject)instance).setType(className);
+            ((ASObject) instance).setType(className);
         }
         return instance;
     }
 
-    /** {@inheritDoc} */
-    public List getPropertyNames()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public List getPropertyNames() {
         return getPropertyNames(getDefaultInstance());
     }
 
-    /** {@inheritDoc} */
-    public Class getType(String propertyName)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Class getType(String propertyName) {
         return getType(getDefaultInstance(), propertyName);
     }
 
-    /** {@inheritDoc} */
-    public Object getValue(String propertyName)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Object getValue(String propertyName) {
         return getValue(getDefaultInstance(), propertyName);
     }
 
-    /** {@inheritDoc} */
-    public void setValue(String propertyName, Object value)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void setValue(String propertyName, Object value) {
         setValue(getDefaultInstance(), propertyName, value);
     }
 
-    /** {@inheritDoc} */
-    public void setAlias(String value)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void setAlias(String value) {
         alias = value;
     }
 
-    /** {@inheritDoc} */
-    public String getAlias()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String getAlias() {
         return alias;
     }
 
-    /** {@inheritDoc} */
-    public void setDynamic(boolean value)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void setDynamic(boolean value) {
         dynamic = value;
     }
 
-    /** {@inheritDoc} */
-    public boolean isDynamic()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isDynamic() {
         return dynamic;
     }
 
-    /** {@inheritDoc} */
-    public boolean isExternalizable()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isExternalizable() {
         return externalizable;
     }
 
-    /** {@inheritDoc} */
-    public void setExternalizable(boolean value)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void setExternalizable(boolean value) {
         externalizable = value;
     }
 
-    /** {@inheritDoc} */
-    public boolean isExternalizable(Object instance)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isExternalizable(Object instance) {
         return instance instanceof Externalizable;
     }
 
-    /** {@inheritDoc} */
-    public SerializationContext getSerializationContext()
-    {
-        return context == null? SerializationContext.getSerializationContext() : context;
+    /**
+     * {@inheritDoc}
+     */
+    public SerializationContext getSerializationContext() {
+        return context == null ? SerializationContext.getSerializationContext() : context;
     }
 
-    /** {@inheritDoc} */
-    public void setSerializationContext(SerializationContext value)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void setSerializationContext(SerializationContext value) {
         context = value;
     }
 
-    /** {@inheritDoc} */
-    public void setIncludeReadOnly(boolean value)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void setIncludeReadOnly(boolean value) {
         includeReadOnly = value;
     }
 
-    /** {@inheritDoc} */
-    public boolean getIncludeReadOnly()
-    {
-        if (includeReadOnly)
-        {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean getIncludeReadOnly() {
+        if (includeReadOnly) {
             return true;
         }
         return getSerializationContext().includeReadOnly;
     }
 
-    /** {@inheritDoc} */
-    public SerializationDescriptor getDescriptor()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public SerializationDescriptor getDescriptor() {
         return descriptor;
     }
 
-    /** {@inheritDoc} */
-    public void setDescriptor(SerializationDescriptor descriptor)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void setDescriptor(SerializationDescriptor descriptor) {
         this.descriptor = descriptor;
     }
 
@@ -231,38 +242,35 @@
      * This is called after the serialization finishes.  We return the same object
      * here... this is an opportunity to replace the instance we use once we have
      * gathered all of the state into a temporary object.
+     *
      * @param instance current instance
      * @return Object the instance after complete serialization
      */
-    public Object instanceComplete(Object instance)
-    {
+    public Object instanceComplete(Object instance) {
         return instance;
     }
 
     /**
      * Returns the instance to serialize in place of the supplied instance.
+     *
      * @param instance the instance to serialize
      * @return Object the instance
      */
-    public Object getInstanceToSerialize(Object instance)
-    {
+    public Object getInstanceToSerialize(Object instance) {
         return instance;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    public Object clone()
-    {
-        try
-        {
-            AbstractProxy clonedProxy= (AbstractProxy) super.clone();
+    public Object clone() {
+        try {
+            AbstractProxy clonedProxy = (AbstractProxy) super.clone();
             clonedProxy.setCloneFieldsFrom(this);
             return clonedProxy;
-        }
-        catch (CloneNotSupportedException e)
-        {
-            if (Log.isError())
-            {
+        } catch (CloneNotSupportedException e) {
+            if (Log.isError()) {
                 Logger log = Log.getLogger(LOG_CATEGORY);
                 log.error("Failed to clone a property proxy: " + toString());
             }
@@ -274,18 +282,17 @@
 
     /**
      * A string including the default instance, class and descriptor info.
+     *
      * @return debug string.
      */
     @Override
-    public String toString()
-    {
+    public String toString() {
         if (defaultInstance != null)
             return "[Proxy(inst=" + defaultInstance + ") proxyClass=" + getClass() + " descriptor=" + descriptor + "]";
         return "[Proxy(proxyClass=" + getClass() + " descriptor=" + descriptor + "]";
     }
 
-    protected void setCloneFieldsFrom(AbstractProxy source)
-    {
+    protected void setCloneFieldsFrom(AbstractProxy source) {
         setDescriptor(source.getDescriptor());
         setDefaultInstance(source.getDefaultInstance());
         context = source.context;
diff --git a/core/src/main/java/flex/messaging/io/ArrayCollection.java b/core/src/main/java/flex/messaging/io/ArrayCollection.java
index dd74e6d..5bb3c9a 100644
--- a/core/src/main/java/flex/messaging/io/ArrayCollection.java
+++ b/core/src/main/java/flex/messaging/io/ArrayCollection.java
@@ -26,8 +26,7 @@
 /**
  * Used to map to client mx.collections.ArrayCollection to java.util.Lists in Java.
  */
-public class ArrayCollection extends ArrayList implements Externalizable
-{
+public class ArrayCollection extends ArrayList implements Externalizable {
     private static final long serialVersionUID = 8037277879661457358L;
 
     private SerializationDescriptor descriptor = null;
@@ -35,8 +34,7 @@
     /**
      * Default constructor.
      */
-    public ArrayCollection()
-    {
+    public ArrayCollection() {
         super();
     }
 
@@ -45,8 +43,7 @@
      *
      * @param c Collection.
      */
-    public ArrayCollection(Collection c)
-    {
+    public ArrayCollection(Collection c) {
         super(c);
     }
 
@@ -55,8 +52,7 @@
      *
      * @param initialCapacity The initial capacity.
      */
-    public ArrayCollection(int initialCapacity)
-    {
+    public ArrayCollection(int initialCapacity) {
         super(initialCapacity);
     }
 
@@ -65,8 +61,7 @@
      *
      * @return The backing Array.
      */
-    public Object[] getSource()
-    {
+    public Object[] getSource() {
         return toArray();
     }
 
@@ -75,8 +70,7 @@
      *
      * @param desc The serialization descriptor.
      */
-    public void setDescriptor(SerializationDescriptor desc)
-    {
+    public void setDescriptor(SerializationDescriptor desc) {
         this.descriptor = desc;
     }
 
@@ -85,10 +79,8 @@
      *
      * @param s The source Array.
      */
-    public void setSource(Object[] s)
-    {
-        if (s == null)
-        {
+    public void setSource(Object[] s) {
+        if (s == null) {
             clear();
             return;
         }
@@ -105,8 +97,7 @@
      *
      * @param s The source Collection.
      */
-    public void setSource(Collection s)
-    {
+    public void setSource(Collection s) {
         addAll(s);
     }
 
@@ -115,12 +106,11 @@
      *
      * @param input The object input.
      */
-    public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
-    {
+    public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException {
         Object s = input.readObject();
         if (s instanceof Collection)
-            s = ((Collection)s).toArray();
-        Object[] source = (Object[])s;
+            s = ((Collection) s).toArray();
+        Object[] source = (Object[]) s;
         setSource(source);
     }
 
@@ -129,32 +119,25 @@
      *
      * @param output The object output.
      */
-    public void writeExternal(ObjectOutput output) throws IOException
-    {
-        if (descriptor == null)
-        {
+    public void writeExternal(ObjectOutput output) throws IOException {
+        if (descriptor == null) {
             output.writeObject(getSource());
             return;
         }
 
         Object[] source = getSource();
-        if (source == null)
-        {
+        if (source == null) {
             output.writeObject(null);
             return;
         }
 
-        for (int i = 0; i < source.length; i++)
-        {
+        for (int i = 0; i < source.length; i++) {
             Object item = source[i];
-            if (item == null)
-            {
+            if (item == null) {
                 source[i] = null;
-            }
-            else
-            {
+            } else {
                 PropertyProxy proxy = PropertyProxyRegistry.getProxy(item);
-                proxy = (PropertyProxy)proxy.clone();
+                proxy = (PropertyProxy) proxy.clone();
                 proxy.setDescriptor(descriptor);
                 proxy.setDefaultInstance(item);
                 source[i] = proxy;
diff --git a/core/src/main/java/flex/messaging/io/ArrayList.java b/core/src/main/java/flex/messaging/io/ArrayList.java
index b3eeb24..897ada1 100644
--- a/core/src/main/java/flex/messaging/io/ArrayList.java
+++ b/core/src/main/java/flex/messaging/io/ArrayList.java
@@ -23,22 +23,18 @@
 /**
  *
  */
-public class ArrayList extends ArrayCollection 
-{
+public class ArrayList extends ArrayCollection {
     private static final long serialVersionUID = -2976024728140087328L;
-    
-    public ArrayList()
-    {
+
+    public ArrayList() {
         super();
     }
 
-    public ArrayList(Collection c)
-    {
+    public ArrayList(Collection c) {
         super(c);
     }
 
-    public ArrayList(int initialCapacity)
-    {
+    public ArrayList(int initialCapacity) {
         super(initialCapacity);
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/BeanProxy.java b/core/src/main/java/flex/messaging/io/BeanProxy.java
index 05ccb01..df28974 100644
--- a/core/src/main/java/flex/messaging/io/BeanProxy.java
+++ b/core/src/main/java/flex/messaging/io/BeanProxy.java
@@ -46,8 +46,7 @@
 /**
  * Uses Bean introspection to collect the properties for a given instance.
  */
-public class BeanProxy extends AbstractProxy
-{
+public class BeanProxy extends AbstractProxy {
     static final long serialVersionUID = 7365078101695257715L;
 
     private static final int FAILED_PROPERTY_READ_ERROR = 10021;
@@ -69,13 +68,12 @@
     protected Class stopClass = Object.class;
 
     protected static final Map ignoreProperties = new HashMap();
-    static
-    {
+
+    static {
         initializeIgnoreProperties();
     }
 
-    private static void initializeIgnoreProperties()
-    {
+    private static void initializeIgnoreProperties() {
         addIgnoreProperty(AbstractMap.class, "empty");
         addIgnoreProperty(AbstractCollection.class, "empty");
         addIgnoreProperty(ASObject.class, "type");
@@ -88,8 +86,7 @@
     /**
      * Constructor.
      */
-    public BeanProxy()
-    {
+    public BeanProxy() {
         this(null);
     }
 
@@ -98,8 +95,7 @@
      *
      * @param defaultInstance defines the alias if provided
      */
-    public BeanProxy(Object defaultInstance)
-    {
+    public BeanProxy(Object defaultInstance) {
         super(defaultInstance);
 
         // Override default behavior here... standard Map implementations
@@ -108,15 +104,17 @@
             alias = getClassName(defaultInstance);
     }
 
-    /** {@inheritDoc} */
-    public String getAlias(Object instance)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String getAlias(Object instance) {
         return getClassName(instance);
     }
 
-    /** {@inheritDoc} */
-    public List getPropertyNames(Object instance)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public List getPropertyNames(Object instance) {
         if (instance == null)
             return null;
 
@@ -124,19 +122,13 @@
         List<String> propertyNames = null;
 
         // Look up property names in cache if we don't have a custom serialization descriptor
-        if (descriptor == null)
-        {
-            if (getIncludeReadOnly())
-            {
-                synchronized (roPropertyNamesCache)
-                {
+        if (descriptor == null) {
+            if (getIncludeReadOnly()) {
+                synchronized (roPropertyNamesCache) {
                     propertyNames = roPropertyNamesCache.get(c);
                 }
-            }
-            else
-            {
-                synchronized (rwPropertyNamesCache)
-                {
+            } else {
+                synchronized (rwPropertyNamesCache) {
                     propertyNames = rwPropertyNamesCache.get(c);
                 }
             }
@@ -150,19 +142,13 @@
 
         // Store property names in cache if we are caching properties
         // and we don't have a custom serialization descriptor
-        if (cacheProperties && descriptor == null)
-        {
-            if (getIncludeReadOnly())
-            {
-                synchronized (roPropertyNamesCache)
-                {
+        if (cacheProperties && descriptor == null) {
+            if (getIncludeReadOnly()) {
+                synchronized (roPropertyNamesCache) {
                     roPropertyNamesCache.put(c, propertyNames);
                 }
-            }
-            else
-            {
-                synchronized (rwPropertyNamesCache)
-                {
+            } else {
+                synchronized (rwPropertyNamesCache) {
                     rwPropertyNamesCache.put(c, propertyNames);
                 }
             }
@@ -171,19 +157,21 @@
     }
 
 
-    /** {@inheritDoc} */
-    public Class getType(Object instance, String propertyName)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Class getType(Object instance, String propertyName) {
         if (instance == null || propertyName == null)
             return null;
 
         BeanProperty bp = getBeanProperty(instance, propertyName);
-        return bp == null? null : bp.getType();
+        return bp == null ? null : bp.getType();
     }
 
-    /** {@inheritDoc} */
-    public Object getValue(Object instance, String propertyName)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Object getValue(Object instance, String propertyName) {
         if (instance == null || propertyName == null)
             return null;
 
@@ -192,11 +180,10 @@
             return getBeanValue(instance, bp);
 
         SerializationContext context = getSerializationContext();
-        if (!ignorePropertyErrors(context))
-        {
+        if (!ignorePropertyErrors(context)) {
             // Property '{propertyName}' not found on class '{alias}'.
             MessageException ex = new MessageException();
-            ex.setMessage(UNKNOWN_PROPERTY_ERROR, new Object[] {propertyName, getAlias(instance)});
+            ex.setMessage(UNKNOWN_PROPERTY_ERROR, new Object[]{propertyName, getAlias(instance)});
             throw ex;
         }
         return null;
@@ -204,143 +191,118 @@
 
     /**
      * Gets the value specified by the BeanProperty.
+     *
      * @param instance Object to get the value from
-     * @param bp the property to get
+     * @param bp       the property to get
      * @return the value of the property if it exists
      */
-    protected final Object getBeanValue(Object instance, BeanProperty bp)
-    {
+    protected final Object getBeanValue(Object instance, BeanProperty bp) {
         String propertyName = bp.getName();
-        if (bp.isRead())
-        {
-            try
-            {
+        if (bp.isRead()) {
+            try {
                 Object value = bp.get(instance);
-                if (value != null && descriptor != null)
-                {
-                    SerializationDescriptor subDescriptor = (SerializationDescriptor)descriptor.get(propertyName);
-                    if (subDescriptor != null)
-                    {
+                if (value != null && descriptor != null) {
+                    SerializationDescriptor subDescriptor = (SerializationDescriptor) descriptor.get(propertyName);
+                    if (subDescriptor != null) {
                         PropertyProxy subProxy = PropertyProxyRegistry.getProxyAndRegister(value);
-                        subProxy = (PropertyProxy)subProxy.clone();
+                        subProxy = (PropertyProxy) subProxy.clone();
                         subProxy.setDescriptor(subDescriptor);
                         subProxy.setDefaultInstance(value);
                         value = subProxy;
                     }
                 }
                 return value;
-            }
-            catch (Exception e)
-            {
+            } catch (Exception e) {
                 SerializationContext context = getSerializationContext();
 
                 // Log failed property set errors
-                if (Log.isWarn() && logPropertyErrors(context))
-                {
+                if (Log.isWarn() && logPropertyErrors(context)) {
                     Logger log = Log.getLogger(LOG_CATEGORY);
                     log.warn("Failed to get property {0} on type {1}.",
-                             new Object[] {propertyName, getAlias(instance)}, e);
+                            new Object[]{propertyName, getAlias(instance)}, e);
                 }
 
-                if (!ignorePropertyErrors(context))
-                {
+                if (!ignorePropertyErrors(context)) {
                     // Failed to get property '{propertyName}' on type '{className}'.
                     MessageException ex = new MessageException();
-                    ex.setMessage(FAILED_PROPERTY_READ_ERROR, new Object[] {propertyName, getAlias(instance)});
+                    ex.setMessage(FAILED_PROPERTY_READ_ERROR, new Object[]{propertyName, getAlias(instance)});
                     ex.setRootCause(e);
                     throw ex;
                 }
             }
-        }
-        else
-        {
+        } else {
             SerializationContext context = getSerializationContext();
-            if (!ignorePropertyErrors(context))
-            {
+            if (!ignorePropertyErrors(context)) {
                 //Property '{propertyName}' not readable from class '{alias}'.
                 MessageException ex = new MessageException();
-                ex.setMessage(NON_READABLE_PROPERTY_ERROR, new Object[] {propertyName, getAlias(instance)});
+                ex.setMessage(NON_READABLE_PROPERTY_ERROR, new Object[]{propertyName, getAlias(instance)});
                 throw ex;
             }
         }
         return null;
     }
 
-    /** {@inheritDoc} */
-    public void setValue(Object instance, String propertyName, Object value)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void setValue(Object instance, String propertyName, Object value) {
         BeanProperty bp = getBeanProperty(instance, propertyName);
 
-        if (bp != null)
-        {
-            if (bp.isWrite())
-            {
-                try
-                {
+        if (bp != null) {
+            if (bp.isWrite()) {
+                try {
                     Class desiredPropClass = bp.getType();
                     TypeMarshaller marshaller = TypeMarshallingContext.getTypeMarshaller();
                     value = marshaller.convert(value, desiredPropClass);
                     ClassUtil.validateAssignment(instance, propertyName, value);
                     bp.set(instance, value);
-                }
-                catch (Exception e)
-                {
+                } catch (Exception e) {
                     SerializationContext context = getSerializationContext();
 
                     // Log ignore failed property set errors
-                    if (Log.isWarn() && logPropertyErrors(context))
-                    {
+                    if (Log.isWarn() && logPropertyErrors(context)) {
                         Logger log = Log.getLogger(LOG_CATEGORY);
                         log.warn("Failed to set property {0} on type {1}.",
-                                new Object[] {propertyName, getAlias(instance)}, e);
+                                new Object[]{propertyName, getAlias(instance)}, e);
                     }
 
-                    if (!ignorePropertyErrors(context))
-                    {
+                    if (!ignorePropertyErrors(context)) {
                         // Failed to get property '{propertyName}' on type '{className}'.
                         MessageException ex = new MessageException();
-                        ex.setMessage(FAILED_PROPERTY_WRITE_ERROR, new Object[] {propertyName, getAlias(instance)});
+                        ex.setMessage(FAILED_PROPERTY_WRITE_ERROR, new Object[]{propertyName, getAlias(instance)});
                         ex.setRootCause(e);
                         throw ex;
                     }
                 }
-            }
-            else
-            {
+            } else {
                 SerializationContext context = getSerializationContext();
 
-                if (Log.isWarn() && logPropertyErrors(context))
-                {
+                if (Log.isWarn() && logPropertyErrors(context)) {
                     Logger log = Log.getLogger(LOG_CATEGORY);
                     log.warn("Property {0} not writable on class {1}",
-                            new Object[] {propertyName, getAlias(instance)});
+                            new Object[]{propertyName, getAlias(instance)});
                 }
 
-                if (!ignorePropertyErrors(context))
-                {
+                if (!ignorePropertyErrors(context)) {
                     //Property '{propertyName}' not writable on class '{alias}'.
                     MessageException ex = new MessageException();
-                    ex.setMessage(NON_WRITABLE_PROPERTY_ERROR, new Object[] {propertyName, getAlias(instance)});
+                    ex.setMessage(NON_WRITABLE_PROPERTY_ERROR, new Object[]{propertyName, getAlias(instance)});
                     throw ex;
                 }
             }
-        }
-        else
-        {
+        } else {
             SerializationContext context = getSerializationContext();
 
-            if (Log.isWarn() && logPropertyErrors(context))
-            {
+            if (Log.isWarn() && logPropertyErrors(context)) {
                 Logger log = Log.getLogger(LOG_CATEGORY);
                 log.warn("Ignoring set property {0} for type {1} as a setter could not be found.",
-                            new Object[] {propertyName, getAlias(instance)});
+                        new Object[]{propertyName, getAlias(instance)});
             }
 
-            if (!ignorePropertyErrors(context))
-            {
+            if (!ignorePropertyErrors(context)) {
                 // Property '{propertyName}' not found on class '{alias}'.
                 MessageException ex = new MessageException();
-                ex.setMessage(UNKNOWN_PROPERTY_ERROR, new Object[] {propertyName, getAlias(instance)});
+                ex.setMessage(UNKNOWN_PROPERTY_ERROR, new Object[]{propertyName, getAlias(instance)});
                 throw ex;
             }
         }
@@ -348,21 +310,21 @@
 
     /**
      * Are we ignoring property errors?
+     *
      * @param context serialization paramters.
      * @return true if ignoring property errors.
      */
-    protected boolean ignorePropertyErrors(SerializationContext context)
-    {
+    protected boolean ignorePropertyErrors(SerializationContext context) {
         return context.ignorePropertyErrors;
     }
 
     /**
      * Should we log property errors?
+     *
      * @param context serialization parameters.
      * @return true if we should log property errors.
      */
-    protected boolean logPropertyErrors(SerializationContext context)
-    {
+    protected boolean logPropertyErrors(SerializationContext context) {
         return context.logPropertyErrors;
     }
 
@@ -375,25 +337,19 @@
      * @param instance the object to examine.
      * @return the classname to use for instances of this type
      */
-    protected String getClassName(Object instance)
-    {
+    protected String getClassName(Object instance) {
         String className;
 
-        if (instance instanceof ASObject)
-        {
-            className = ((ASObject)instance).getType();
-        }
-        else if (instance instanceof ClassAlias)
-        {
-            className = ((ClassAlias)instance).getAlias();
-        }
-        else
-        {
+        if (instance instanceof ASObject) {
+            className = ((ASObject) instance).getType();
+        } else if (instance instanceof ClassAlias) {
+            className = ((ClassAlias) instance).getAlias();
+        } else {
             className = instance.getClass().getName();
             // If there's an alias, use that as the class name.
             ClassAliasRegistry registry = ClassAliasRegistry.getRegistry();
             String aliasedClass = registry.getClassName(className);
-            className = (aliasedClass == null)? className : aliasedClass;
+            className = (aliasedClass == null) ? className : aliasedClass;
         }
 
         return className;
@@ -401,28 +357,22 @@
 
     /**
      * Return a map of properties for a object.
+     *
      * @param instance object to examine.
      * @return a map of Strings to BeanProperty objects.
      */
-    protected Map<String, BeanProperty> getBeanProperties(Object instance)
-    {
+    protected Map<String, BeanProperty> getBeanProperties(Object instance) {
         Class c = instance.getClass();
         Map<String, BeanProperty> props;
 
         // look up instance class in cache if we don't have a custom descriptor.
-        if (descriptor == null)
-        {
-            if (getIncludeReadOnly())
-            {
-                synchronized (roBeanPropertyCache)
-                {
+        if (descriptor == null) {
+            if (getIncludeReadOnly()) {
+                synchronized (roBeanPropertyCache) {
                     props = roBeanPropertyCache.get(c);
                 }
-            }
-            else
-            {
-                synchronized (rwBeanPropertyCache)
-                {
+            } else {
+                synchronized (rwBeanPropertyCache) {
                     props = rwBeanPropertyCache.get(c);
                 }
             }
@@ -436,16 +386,14 @@
             return null;
 
         List excludes = null;
-        if (descriptor != null)
-        {
+        if (descriptor != null) {
             excludes = descriptor.getExcludesForInstance(instance);
             if (excludes == null) // For compatibility with older implementations
                 excludes = descriptor.getExcludes();
         }
 
         // Add standard bean properties first
-        for (PropertyDescriptor pd : pds)
-        {
+        for (PropertyDescriptor pd : pds) {
             String propertyName = pd.getName();
             Method readMethod = pd.getReadMethod();
             Method writeMethod = pd.getWriteMethod();
@@ -474,12 +422,10 @@
 
         // Then add public fields to list if property does not already exist
         Field[] fields = instance.getClass().getFields();
-        for (Field field : fields)
-        {
+        for (Field field : fields) {
             String propertyName = field.getName();
             int modifiers = field.getModifiers();
-            if (isPublicField(modifiers) && !props.containsKey(propertyName))
-            {
+            if (isPublicField(modifiers) && !props.containsKey(propertyName)) {
                 // Skip excluded and ignored properties.
                 if ((excludes != null && excludes.contains(propertyName)) || isPropertyIgnored(c, propertyName))
                     continue;
@@ -489,19 +435,13 @@
         }
 
         // Update the cache if we don't have a custom serialization descriptor and we are caching.
-        if (descriptor == null && cacheProperties)
-        {
-            if (getIncludeReadOnly())
-            {
-                synchronized (roBeanPropertyCache)
-                {
+        if (descriptor == null && cacheProperties) {
+            if (getIncludeReadOnly()) {
+                synchronized (roBeanPropertyCache) {
                     roBeanPropertyCache.put(c, props);
                 }
-            }
-            else
-            {
-                synchronized (rwBeanPropertyCache)
-                {
+            } else {
+                synchronized (rwBeanPropertyCache) {
                     rwBeanPropertyCache.put(c, props);
                 }
             }
@@ -513,12 +453,11 @@
     /**
      * Return true if this property is write only, which means we cannot get a value for it.
      *
-     * @param instance the instance
+     * @param instance     the instance
      * @param propertyName the property name
      * @return true if there is a way to write but not read the property
      */
-    public boolean isWriteOnly(Object instance, String propertyName)
-    {
+    public boolean isWriteOnly(Object instance, String propertyName) {
         if (instance == null || propertyName == null)
             return false;
 
@@ -528,24 +467,23 @@
 
     /**
      * Return a specific property descriptor for a named property.
-     * @param instance the object to use.
+     *
+     * @param instance     the object to use.
      * @param propertyName the property to get.
      * @return a descriptor for the property.
      */
-    protected final BeanProperty getBeanProperty(Object instance, String propertyName)
-    {
+    protected final BeanProperty getBeanProperty(Object instance, String propertyName) {
         Class c = instance.getClass();
         Map props;
 
         // It is faster to use the BeanProperty cache if we are going to cache it.
-        if (descriptor == null && cacheProperties)
-        {
+        if (descriptor == null && cacheProperties) {
             props = getBeanProperties(instance);
-            return props == null? null : (BeanProperty)props.get(propertyName);
+            return props == null ? null : (BeanProperty) props.get(propertyName);
         }
 
         // Otherwise, just build up the property we are asked for
-        PropertyDescriptorCacheEntry pce =  getPropertyDescriptorCacheEntry(c);
+        PropertyDescriptorCacheEntry pce = getPropertyDescriptorCacheEntry(c);
         if (pce == null)
             return null;
 
@@ -554,15 +492,13 @@
             return null;
 
         List excludes = null;
-        if (descriptor != null)
-        {
+        if (descriptor != null) {
             excludes = descriptor.getExcludesForInstance(instance);
             if (excludes == null) // For compatibility with older implementations
                 excludes = descriptor.getExcludes();
         }
 
-        if (pType instanceof PropertyDescriptor)
-        {
+        if (pType instanceof PropertyDescriptor) {
             PropertyDescriptor pd = (PropertyDescriptor) pType;
 
             Method readMethod = pd.getReadMethod();
@@ -578,17 +514,14 @@
                 return null;
 
             return new BeanProperty(propertyName, pd.getPropertyType(), readMethod, writeMethod, null);
-        }
-        else if (pType instanceof Field)
-        {
+        } else if (pType instanceof Field) {
             Field field = (Field) pType;
 
             String pName = field.getName();
             int modifiers = field.getModifiers();
-            if (isPublicField(modifiers) && pName.equals(propertyName))
-            {
+            if (isPublicField(modifiers) && pName.equals(propertyName)) {
                 // Skip excluded and ignored properties.
-                return ((excludes != null && excludes.contains(propertyName)) || isPropertyIgnored(c, propertyName))?
+                return ((excludes != null && excludes.contains(propertyName)) || isPropertyIgnored(c, propertyName)) ?
                         null : new BeanProperty(propertyName, field.getType(), null, null, field);
             }
         }
@@ -598,70 +531,54 @@
 
     /**
      * Return an array of JavaBean property descriptors for a class.
+     *
      * @param c the class to examine.
      * @return an array ot JavaBean PropertyDescriptors.
      */
-    private PropertyDescriptor [] getPropertyDescriptors(Class c)
-    {
+    private PropertyDescriptor[] getPropertyDescriptors(Class c) {
         PropertyDescriptorCacheEntry pce = getPropertyDescriptorCacheEntry(c);
-        return pce == null? null : pce.propertyDescriptors;
+        return pce == null ? null : pce.propertyDescriptors;
     }
 
     /**
      * Return an entry from the property descriptor cache for a class.
+     *
      * @param c the class
      * @return a descriptor cache entry or null
      */
-    private PropertyDescriptorCacheEntry getPropertyDescriptorCacheEntry(Class c)
-    {
+    private PropertyDescriptorCacheEntry getPropertyDescriptorCacheEntry(Class c) {
         PropertyDescriptorCacheEntry pce;
-        if (getIncludeReadOnly())
-        {
-            synchronized (roPropertyDescriptorCache)
-            {
+        if (getIncludeReadOnly()) {
+            synchronized (roPropertyDescriptorCache) {
                 pce = roPropertyDescriptorCache.get(c);
             }
-        }
-        else
-        {
-            synchronized (rwPropertyDescriptorCache)
-            {
+        } else {
+            synchronized (rwPropertyDescriptorCache) {
                 pce = rwPropertyDescriptorCache.get(c);
             }
         }
-        
-        try
-        {
-            if (pce == null)
-            {
+
+        try {
+            if (pce == null) {
                 BeanInfo beanInfo = Introspector.getBeanInfo(c, stopClass);
                 pce = new PropertyDescriptorCacheEntry();
                 pce.propertyDescriptors = beanInfo.getPropertyDescriptors();
                 pce.propertiesByName = createPropertiesByNameMap(pce.propertyDescriptors, c.getFields());
-                if (cachePropertiesDescriptors)
-                {
-                    if (getIncludeReadOnly())
-                    {
-                        synchronized (roPropertyDescriptorCache)
-                        {
+                if (cachePropertiesDescriptors) {
+                    if (getIncludeReadOnly()) {
+                        synchronized (roPropertyDescriptorCache) {
                             roPropertyDescriptorCache.put(c, pce);
                         }
-                    }
-                    else
-                    {
-                        synchronized (rwPropertyDescriptorCache)
-                        {
+                    } else {
+                        synchronized (rwPropertyDescriptorCache) {
                             rwPropertyDescriptorCache.put(c, pce);
                         }
                     }
                 }
             }
-        }
-        catch (IntrospectionException ex)
-        {
+        } catch (IntrospectionException ex) {
             // Log failed property set errors
-            if (Log.isError())
-            {
+            if (Log.isError()) {
                 Logger log = Log.getLogger(LOG_CATEGORY);
                 log.error("Failed to introspect object of type: " + c + " error: " + ExceptionUtil.toString(ex));
             }
@@ -674,18 +591,15 @@
         return pce;
     }
 
-    private Map createPropertiesByNameMap(PropertyDescriptor [] pds, Field [] fields)
-    {
+    private Map createPropertiesByNameMap(PropertyDescriptor[] pds, Field[] fields) {
         Map m = new HashMap(pds.length);
-        for (PropertyDescriptor pd : pds)
-        {
+        for (PropertyDescriptor pd : pds) {
             Method readMethod = pd.getReadMethod();
             if (readMethod != null && isPublicAccessor(readMethod.getModifiers()) &&
                     (getIncludeReadOnly() || pd.getWriteMethod() != null))
                 m.put(pd.getName(), pd);
         }
-        for (Field field : fields)
-        {
+        for (Field field : fields) {
             if (isPublicField(field.getModifiers()) && !m.containsKey(field.getName()))
                 m.put(field.getName(), field);
         }
@@ -694,20 +608,17 @@
 
     /**
      * Is this property on the ignore list for this class?
-     * @param c the class.
+     *
+     * @param c            the class.
      * @param propertyName the property name.
      * @return true if we should ignore this property.
      */
-    public static boolean isPropertyIgnored(Class c, String propertyName)
-    {
+    public static boolean isPropertyIgnored(Class c, String propertyName) {
         boolean result = false;
-        Set propertyOwners = (Set)ignoreProperties.get(propertyName);
-        if (propertyOwners != null)
-        {
-            while (c != null)
-            {
-                if (propertyOwners.contains(c))
-                {
+        Set propertyOwners = (Set) ignoreProperties.get(propertyName);
+        if (propertyOwners != null) {
+            while (c != null) {
+                if (propertyOwners.contains(c)) {
                     result = true;
                     break;
                 }
@@ -719,16 +630,14 @@
 
     /**
      * Add a property to the ignore list for this class.
-     * @param c the class.
+     *
+     * @param c            the class.
      * @param propertyName the property to ignore.
      */
-    public static void addIgnoreProperty(Class c, String propertyName)
-    {
-        synchronized(ignoreProperties)
-        {
-            Set propertyOwners = (Set)ignoreProperties.get(propertyName);
-            if (propertyOwners == null)
-            {
+    public static void addIgnoreProperty(Class c, String propertyName) {
+        synchronized (ignoreProperties) {
+            Set propertyOwners = (Set) ignoreProperties.get(propertyName);
+            if (propertyOwners == null) {
                 propertyOwners = new HashSet();
                 ignoreProperties.put(propertyName, propertyOwners);
             }
@@ -738,37 +647,35 @@
 
     /**
      * Do the provided modifiers indicate that this is public?
+     *
      * @param modifiers the flags to check
      * @return true if public but not final, static or transient.
      */
-    public static boolean isPublicField(int modifiers)
-    {
+    public static boolean isPublicField(int modifiers) {
         return (Modifier.isPublic(modifiers) && !Modifier.isFinal(modifiers)
                 && !Modifier.isStatic(modifiers) && !Modifier.isTransient(modifiers));
     }
 
     /**
      * Do the provided modifiers indicate that this is public?
+     *
      * @param modifiers the flags to check
      * @return true if public but not static.
      */
-    public static boolean isPublicAccessor(int modifiers)
-    {
+    public static boolean isPublicAccessor(int modifiers) {
         return (Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers));
     }
 
     /**
      * A class that holds information about a bean property.
      */
-    protected static class BeanProperty
-    {
+    protected static class BeanProperty {
         private String name;
         private Class type;
         private Method readMethod, writeMethod;
         private Field field;
 
-        protected BeanProperty(String name, Class type, Method read, Method write, Field field)
-        {
+        protected BeanProperty(String name, Class type, Method read, Method write, Field field) {
             this.name = name;
             this.type = type;
             this.writeMethod = write;
@@ -778,46 +685,46 @@
 
         /**
          * The name of the property..
+         *
          * @return the name.
          */
-        public String getName()
-        {
+        public String getName() {
             return name;
         }
 
         /**
          * The type of the property.
+         *
          * @return the type
          */
-        public Class getType()
-        {
+        public Class getType() {
             return type;
         }
 
         /**
          * Is there a setter for this property?
+         *
          * @return true if there is a write method.
          */
-        public boolean isWrite()
-        {
+        public boolean isWrite() {
             return writeMethod != null || field != null;
         }
 
         /**
          * Is there a getter for this property?
+         *
          * @return true if there is a read method.
          */
-        public boolean isRead()
-        {
+        public boolean isRead() {
             return readMethod != null || field != null;
         }
 
         /**
          * Returns the Class object that declared the public field or getter function.
+         *
          * @return an object of the declaring class for the read method or null if the read method is undefined.
          */
-        public Class getReadDeclaringClass()
-        {
+        public Class getReadDeclaringClass() {
             if (readMethod != null)
                 return readMethod.getDeclaringClass();
             if (field != null)
@@ -827,10 +734,10 @@
 
         /**
          * Return a class that represents the type of the property.
+         *
          * @return the type of the property or null if there is no read method defined.
          */
-        public Class getReadType()
-        {
+        public Class getReadType() {
             if (readMethod != null)
                 return readMethod.getReturnType();
             if (field != null)
@@ -839,13 +746,12 @@
         }
 
         /**
-         *
          * Returns a string indicating the setter or field name of the property.
          * The setter is prefixed by 'method ', or the field is prefixed by 'field '.
+         *
          * @return A string suitable for debugging.
          */
-        public String getWriteName()
-        {
+        public String getWriteName() {
             if (writeMethod != null)
                 return "method " + writeMethod.getName();
             if (field != null)
@@ -855,14 +761,14 @@
 
         /**
          * Set the property of the object to the specified value.
-         * @param bean the bean to set the property on.
+         *
+         * @param bean  the bean to set the property on.
          * @param value the value to set.
-         * @throws IllegalAccessException if no access.
+         * @throws IllegalAccessException    if no access.
          * @throws InvocationTargetException if the setter throws an exception.
          */
         public void set(Object bean, Object value) throws IllegalAccessException,
-                InvocationTargetException
-        {
+                InvocationTargetException {
             if (writeMethod != null)
                 writeMethod.invoke(bean, value);
             else if (field != null)
@@ -873,16 +779,16 @@
 
         /**
          * Get the value of this property from the specified object.
+         *
          * @param bean the object to retrieve the value from
          * @return the value of the property.
-         * @throws IllegalAccessException if no access.
+         * @throws IllegalAccessException    if no access.
          * @throws InvocationTargetException if the getter throws an exception.
          */
-        public Object get(Object bean) throws IllegalAccessException, InvocationTargetException
-        {
+        public Object get(Object bean) throws IllegalAccessException, InvocationTargetException {
             Object obj = null;
             if (readMethod != null)
-                obj = readMethod.invoke(bean, (Object[])null);
+                obj = readMethod.invoke(bean, (Object[]) null);
             else if (field != null)
                 obj = field.get(bean);
             return obj;
@@ -892,35 +798,27 @@
     /**
      * Clears all static caches.
      */
-    public static void clear()
-    {
-        synchronized(ignoreProperties)
-        {
+    public static void clear() {
+        synchronized (ignoreProperties) {
             ignoreProperties.clear();
             initializeIgnoreProperties();  // reset to original state
         }
-        synchronized(rwPropertyNamesCache)
-        {
+        synchronized (rwPropertyNamesCache) {
             rwPropertyNamesCache.clear();
         }
-        synchronized(rwBeanPropertyCache)
-        {
+        synchronized (rwBeanPropertyCache) {
             rwBeanPropertyCache.clear();
         }
-        synchronized(rwPropertyDescriptorCache)
-        {
+        synchronized (rwPropertyDescriptorCache) {
             rwPropertyDescriptorCache.clear();
         }
-        synchronized(roPropertyNamesCache)
-        {
+        synchronized (roPropertyNamesCache) {
             roPropertyNamesCache.clear();
         }
-        synchronized(roBeanPropertyCache)
-        {
+        synchronized (roBeanPropertyCache) {
             roBeanPropertyCache.clear();
         }
-        synchronized(roPropertyDescriptorCache)
-        {
+        synchronized (roPropertyDescriptorCache) {
             roPropertyDescriptorCache.clear();
         }
     }
@@ -928,9 +826,8 @@
     /**
      * A cache entry.
      */
-    protected static class PropertyDescriptorCacheEntry
-    {
-        PropertyDescriptor [] propertyDescriptors;
+    protected static class PropertyDescriptorCacheEntry {
+        PropertyDescriptor[] propertyDescriptors;
         Map propertiesByName;
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/ClassAlias.java b/core/src/main/java/flex/messaging/io/ClassAlias.java
index 5bf8cdc..44e9960 100644
--- a/core/src/main/java/flex/messaging/io/ClassAlias.java
+++ b/core/src/main/java/flex/messaging/io/ClassAlias.java
@@ -18,12 +18,11 @@
 
 /**
  * A Class can implement this interface to customize the alias reported by
- * a BeanProxy when describing a complex object's traits. 
+ * a BeanProxy when describing a complex object's traits.
  */
-public interface ClassAlias
-{
+public interface ClassAlias {
     /**
-     * The alias to use for this instance.  
+     * The alias to use for this instance.
      */
     public String getAlias();
 }
diff --git a/core/src/main/java/flex/messaging/io/ClassAliasRegistry.java b/core/src/main/java/flex/messaging/io/ClassAliasRegistry.java
index b97eaaa..d162841 100644
--- a/core/src/main/java/flex/messaging/io/ClassAliasRegistry.java
+++ b/core/src/main/java/flex/messaging/io/ClassAliasRegistry.java
@@ -26,72 +26,62 @@
  * of the Flash Player. The registry is checked when deserializing AMF object
  * types.
  */
-public class ClassAliasRegistry
-{
+public class ClassAliasRegistry {
     private Map aliasRegistry = new HashMap();
     private static final ClassAliasRegistry registry = new ClassAliasRegistry();
 
     /**
      * Constructs an empty registry.
      */
-    private ClassAliasRegistry()
-    {
+    private ClassAliasRegistry() {
     }
 
     /**
      * Returns the registry singleton.
      */
-    public static ClassAliasRegistry getRegistry()
-    {
+    public static ClassAliasRegistry getRegistry() {
         return registry;
     }
 
     /**
      * Looks for a concrete class name for an alias.
-     * 
-     * @param alias The alias used to search the registry. 
+     *
+     * @param alias The alias used to search the registry.
      * @return a concrete class name, if registered for this alias, otherwise
      * null.
      */
-    public String getClassName(String alias)
-    {
-        return (String)aliasRegistry.get(alias);
+    public String getClassName(String alias) {
+        return (String) aliasRegistry.get(alias);
     }
 
     /**
      * Clears all items from the registry.
      */
-    public void clear()
-    {
-        synchronized(aliasRegistry)
-        {
+    public void clear() {
+        synchronized (aliasRegistry) {
             aliasRegistry.clear();
         }
     }
 
     /**
      * Registers a custom alias for a class name.
-     * 
-     * @param alias The alias for the class name.
+     *
+     * @param alias     The alias for the class name.
      * @param className The concrete class name.
      */
-    public void registerAlias(String alias, String className)
-    {
-        synchronized(aliasRegistry)
-        {
+    public void registerAlias(String alias, String className) {
+        synchronized (aliasRegistry) {
             aliasRegistry.put(alias, className);
         }
     }
 
     /**
      * Removes a class alias from the registry.
-     * 
+     *
      * @param alias The alias to be removed from the registry.
      */
-    public void unregisterAlias(String alias)
-    {
-        synchronized(aliasRegistry)
-        {
+    public void unregisterAlias(String alias) {
+        synchronized (aliasRegistry) {
             aliasRegistry.remove(alias);
         }
     }
diff --git a/core/src/main/java/flex/messaging/io/DictionaryProxy.java b/core/src/main/java/flex/messaging/io/DictionaryProxy.java
index 41233d2..1ab9d86 100644
--- a/core/src/main/java/flex/messaging/io/DictionaryProxy.java
+++ b/core/src/main/java/flex/messaging/io/DictionaryProxy.java
@@ -21,53 +21,45 @@
 import java.util.List;
 
 /**
- * Proxies serialization of a Dictionary and considers all keys as String based property 
- * names. Additionally, bean properties from the instance are also included and override 
+ * Proxies serialization of a Dictionary and considers all keys as String based property
+ * names. Additionally, bean properties from the instance are also included and override
  * any Dictionary entries with the same name.
  */
-public class DictionaryProxy extends BeanProxy
-{
+public class DictionaryProxy extends BeanProxy {
     static final long serialVersionUID = 1501461889185692712L;
 
-    public DictionaryProxy()
-    {
+    public DictionaryProxy() {
         super();
         //dynamic = true;
     }
 
-    public DictionaryProxy(Dictionary defaultInstance)
-    {
+    public DictionaryProxy(Dictionary defaultInstance) {
         super(defaultInstance);
     }
 
-    public List getPropertyNames(Object instance)
-    {
+    public List getPropertyNames(Object instance) {
         if (instance == null)
             return null;
 
         List propertyNames = null;
         List excludes = null;
 
-        if (descriptor != null)
-        {
+        if (descriptor != null) {
             excludes = descriptor.getExcludesForInstance(instance);
             if (excludes == null)
                 excludes = descriptor.getExcludes();
         }
 
         // Add all Dictionary keys as properties
-        if (instance instanceof Dictionary)
-        {
-            Dictionary dictionary = (Dictionary)instance;
+        if (instance instanceof Dictionary) {
+            Dictionary dictionary = (Dictionary) instance;
 
             propertyNames = new ArrayList(dictionary.size());
 
             Enumeration keys = dictionary.keys();
-            while (keys.hasMoreElements())
-            {
+            while (keys.hasMoreElements()) {
                 Object key = keys.nextElement();
-                if (key != null)
-                {
+                if (key != null) {
                     if (excludes != null && excludes.contains(key))
                         continue;
 
@@ -78,20 +70,16 @@
 
         // Then, check for bean properties
         List beanProperties = super.getPropertyNames(instance);
-        if (propertyNames == null)
-        {
+        if (propertyNames == null) {
             propertyNames = beanProperties;
-        }
-        else
-        {
+        } else {
             propertyNames.addAll(beanProperties);
         }
 
         return propertyNames;
     }
 
-    public Object getValue(Object instance, String propertyName)
-    {
+    public Object getValue(Object instance, String propertyName) {
         if (instance == null || propertyName == null)
             return null;
 
@@ -99,12 +87,11 @@
         Object value = super.getValue(instance, propertyName);
 
         // Then check for Dictionary entry
-        if (value == null && instance instanceof Dictionary)
-        {
-            Dictionary dictionary = (Dictionary)instance;
+        if (value == null && instance instanceof Dictionary) {
+            Dictionary dictionary = (Dictionary) instance;
             value = dictionary.get(propertyName);
         }
 
-        return value; 
+        return value;
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/ManagedObjectProxy.java b/core/src/main/java/flex/messaging/io/ManagedObjectProxy.java
index 34bde91..5239c57 100644
--- a/core/src/main/java/flex/messaging/io/ManagedObjectProxy.java
+++ b/core/src/main/java/flex/messaging/io/ManagedObjectProxy.java
@@ -24,27 +24,22 @@
 /**
  *
  */
-public class ManagedObjectProxy extends ObjectProxy 
-{
+public class ManagedObjectProxy extends ObjectProxy {
     static final long serialVersionUID = 255140415084514484L;
 
-    public ManagedObjectProxy()
-    {
-       super();
+    public ManagedObjectProxy() {
+        super();
     }
 
-    public ManagedObjectProxy(int initialCapacity)
-    {
+    public ManagedObjectProxy(int initialCapacity) {
         super(initialCapacity);
     }
 
-    public ManagedObjectProxy(int initialCapacity, float loadFactor)
-    {
+    public ManagedObjectProxy(int initialCapacity, float loadFactor) {
         super(initialCapacity, loadFactor);
     }
 
-    public void writeExternal(ObjectOutput out) throws IOException
-    {
+    public void writeExternal(ObjectOutput out) throws IOException {
         int count = this.size();
         out.writeInt(count);
 
@@ -52,20 +47,17 @@
         // for lazy associations to exclude them from serialization.
 
         Iterator it = keySet().iterator();
-        while (it.hasNext())
-        {
+        while (it.hasNext()) {
             Object key = it.next();
             out.writeObject(key);
             out.writeObject(get(key));
         }
     }
 
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
-    {
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
         int count = in.readInt();
 
-        for (int i = 0; i < count; i++)
-        {
+        for (int i = 0; i < count; i++) {
             Object key = in.readObject();
             Object value = in.readObject();
             put(key, value);
diff --git a/core/src/main/java/flex/messaging/io/MapProxy.java b/core/src/main/java/flex/messaging/io/MapProxy.java
index 31bbef6..aa793d5 100644
--- a/core/src/main/java/flex/messaging/io/MapProxy.java
+++ b/core/src/main/java/flex/messaging/io/MapProxy.java
@@ -30,8 +30,7 @@
  * names. Additionally, bean properties from the instance are also included and
  * override any Map entries with the same key name.
  */
-public class MapProxy extends BeanProxy
-{
+public class MapProxy extends BeanProxy {
     static final long serialVersionUID = 7857999941099335210L;
 
     private static final int NULL_KEY_ERROR = 10026;
@@ -39,75 +38,66 @@
     /**
      * Constructor
      */
-    public MapProxy()
-    {
+    public MapProxy() {
         super();
         //dynamic = true;
     }
 
     /**
      * Construct with a default instance type.
+     *
      * @param defaultInstance defines the alias if provided
      */
-    public MapProxy(Object defaultInstance)
-    {
+    public MapProxy(Object defaultInstance) {
         super(defaultInstance);
         //dynamic = true;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    public List getPropertyNames(Object instance)
-    {
+    public List getPropertyNames(Object instance) {
         if (instance == null)
             return null;
 
         List propertyNames = null;
         List excludes = null;
 
-        if (descriptor != null)
-        {
+        if (descriptor != null) {
             excludes = descriptor.getExcludesForInstance(instance);
             if (excludes == null) // For compatibility with older implementations
                 excludes = descriptor.getExcludes();
         }
 
         // Add all Map keys as properties
-        if (instance instanceof Map)
-        {
-            Map map = (Map)instance;
+        if (instance instanceof Map) {
+            Map map = (Map) instance;
 
-            if (map.size() > 0)
-            {
+            if (map.size() > 0) {
                 propertyNames = new ArrayList(map.size());
                 SerializationContext context = getSerializationContext();
 
                 Iterator it = map.keySet().iterator();
-                while (it.hasNext())
-                {
+                while (it.hasNext()) {
                     Object key = it.next();
-                    if (key != null)
-                    {
+                    if (key != null) {
                         if (excludes != null && excludes.contains(key))
                             continue;
 
                         propertyNames.add(key.toString());
-                    }
-                    else
-                    {
+                    } else {
                         // Log null key errors
-                        if (Log.isWarn() && context.logPropertyErrors)
-                        {
+                        if (Log.isWarn() && context.logPropertyErrors) {
                             Logger log = Log.getLogger(LOG_CATEGORY);
                             log.warn("Cannot send a null Map key for type {0}.",
-                                    new Object[] {map.getClass().getName()});
+                                    new Object[]{map.getClass().getName()});
                         }
 
-                        if (!context.ignorePropertyErrors)
-                        {
+                        if (!context.ignorePropertyErrors) {
                             // Cannot send a null Map key for type {0}.
                             MessageException ex = new MessageException();
-                            ex.setMessage(NULL_KEY_ERROR, new Object[] {map.getClass().getName()});
+                            ex.setMessage(NULL_KEY_ERROR, new Object[]{map.getClass().getName()});
                             throw ex;
                         }
                     }
@@ -117,8 +107,7 @@
 
         // Then, check for bean properties
         List beanProperties = super.getPropertyNames(instance);
-        if (beanProperties != null)
-        {
+        if (beanProperties != null) {
             if (propertyNames == null)
                 propertyNames = beanProperties;
             else
@@ -128,10 +117,11 @@
         return propertyNames;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    public Object getValue(Object instance, String propertyName)
-    {
+    public Object getValue(Object instance, String propertyName) {
         if (instance == null || propertyName == null)
             return null;
 
@@ -144,56 +134,56 @@
 
         // Then check for Map entry
         if (value == null && instance instanceof Map)
-            value = getMapValue((Map)instance, propertyName);
+            value = getMapValue((Map) instance, propertyName);
 
         return value;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    public void setValue(Object instance, String propertyName, Object value)
-    {
+    public void setValue(Object instance, String propertyName, Object value) {
         if (instance == null || propertyName == null)
             return;
 
         Map props = getBeanProperties(instance);
-        if (props.containsKey(propertyName))
-        {
+        if (props.containsKey(propertyName)) {
             super.setValue(instance, propertyName, value);
-        }
-        else if (instance instanceof Map)
-        {
+        } else if (instance instanceof Map) {
             ClassUtil.validateAssignment(instance, propertyName, value);
-            ((Map)instance).put(propertyName, value);
+            ((Map) instance).put(propertyName, value);
         }
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    protected boolean ignorePropertyErrors(SerializationContext context)
-    {
+    protected boolean ignorePropertyErrors(SerializationContext context) {
         return true;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    protected boolean logPropertyErrors(SerializationContext context)
-    {
+    protected boolean logPropertyErrors(SerializationContext context) {
         return false;
     }
 
     /**
      * Return the classname of the instance, including ASObject types.
      * If the instance is a Map and is in the java.util package, we return null.
+     *
      * @param instance the object to find the class name of
      * @return the class name of the object.
      */
     @Override
-    protected String getClassName(Object instance)
-    {
+    protected String getClassName(Object instance) {
         return (instance != null && instance instanceof Map
-                && instance.getClass().getName().startsWith("java.util."))?
-                        null : super.getClassName(instance);
+                && instance.getClass().getName().startsWith("java.util.")) ?
+                null : super.getClassName(instance);
     }
 
     /**
@@ -202,14 +192,12 @@
      * is compared against key#toString. This is due to the fact that propertyNames
      * are always stored as Strings.
      *
-     * @param map The Map to check against.
+     * @param map          The Map to check against.
      * @param propertyName The property name to check for.
      * @return The value keyed under property name or null if it does not exist.
      */
-    protected Object getMapValue(Map map, String propertyName)
-    {
-        for (Object entry : map.entrySet())
-        {
+    protected Object getMapValue(Map map, String propertyName) {
+        for (Object entry : map.entrySet()) {
             Object key = ((Map.Entry) entry).getKey();
             if (key.toString().equals(propertyName))
                 return ((Map.Entry) entry).getValue();
diff --git a/core/src/main/java/flex/messaging/io/MessageDeserializer.java b/core/src/main/java/flex/messaging/io/MessageDeserializer.java
index 8262ab8..1e8fd12 100644
--- a/core/src/main/java/flex/messaging/io/MessageDeserializer.java
+++ b/core/src/main/java/flex/messaging/io/MessageDeserializer.java
@@ -27,8 +27,7 @@
  * An interface to allow for either AMF or AMFX based deserializers
  * to process requests.
  */
-public interface MessageDeserializer
-{
+public interface MessageDeserializer {
     void initialize(SerializationContext context, InputStream in, AmfTrace trace);
 
     void readMessage(ActionMessage m, ActionContext context) throws ClassNotFoundException, IOException;
diff --git a/core/src/main/java/flex/messaging/io/MessageIOConstants.java b/core/src/main/java/flex/messaging/io/MessageIOConstants.java
index 844590b..3d7ca82 100644
--- a/core/src/main/java/flex/messaging/io/MessageIOConstants.java
+++ b/core/src/main/java/flex/messaging/io/MessageIOConstants.java
@@ -19,8 +19,7 @@
 /**
  *
  */
-public interface MessageIOConstants
-{
+public interface MessageIOConstants {
     int AMF0 = 0;
     int AMF1 = 1; // There is no AMF1 but FMS uses it for some reason, hence special casing.
     int AMF3 = 3;
diff --git a/core/src/main/java/flex/messaging/io/MessageSerializer.java b/core/src/main/java/flex/messaging/io/MessageSerializer.java
index 5347db7..20bb68f 100644
--- a/core/src/main/java/flex/messaging/io/MessageSerializer.java
+++ b/core/src/main/java/flex/messaging/io/MessageSerializer.java
@@ -25,8 +25,7 @@
 /**
  *
  */
-public interface MessageSerializer
-{
+public interface MessageSerializer {
     void setVersion(int value);
 
     void initialize(SerializationContext context, OutputStream out, AmfTrace trace);
diff --git a/core/src/main/java/flex/messaging/io/ObjectProxy.java b/core/src/main/java/flex/messaging/io/ObjectProxy.java
index 6380de5..2747a0f 100644
--- a/core/src/main/java/flex/messaging/io/ObjectProxy.java
+++ b/core/src/main/java/flex/messaging/io/ObjectProxy.java
@@ -30,36 +30,29 @@
  * server, since the user would expect this type to be deserialized as a
  * java.util.HashMap as it is...
  */
-public class ObjectProxy extends HashMap implements Externalizable
-{
+public class ObjectProxy extends HashMap implements Externalizable {
     static final long serialVersionUID = 6978936573135117900L;
 
-    public ObjectProxy()
-    {
-       super();
+    public ObjectProxy() {
+        super();
     }
 
-    public ObjectProxy(int initialCapacity)
-    {
+    public ObjectProxy(int initialCapacity) {
         super(initialCapacity);
     }
 
-    public ObjectProxy(int initialCapacity, float loadFactor)
-    {
+    public ObjectProxy(int initialCapacity, float loadFactor) {
         super(initialCapacity, loadFactor);
     }
 
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
-    {
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
         Object value = in.readObject();
-        if (value instanceof Map)
-        {
-            putAll((Map)value);
+        if (value instanceof Map) {
+            putAll((Map) value);
         }
     }
 
-    public void writeExternal(ObjectOutput out) throws IOException
-    {
+    public void writeExternal(ObjectOutput out) throws IOException {
         // We can't output "this" to the serializer as it would
         // cause a loop back to writeExternal as this is an Externalizable
         // implementation itself!
diff --git a/core/src/main/java/flex/messaging/io/PageableRowSet.java b/core/src/main/java/flex/messaging/io/PageableRowSet.java
index 6102c33..04a4033 100644
--- a/core/src/main/java/flex/messaging/io/PageableRowSet.java
+++ b/core/src/main/java/flex/messaging/io/PageableRowSet.java
@@ -28,8 +28,7 @@
  *
  * @see javax.sql.RowSet
  */
-public interface PageableRowSet
-{
+public interface PageableRowSet {
     /**
      * Constants for getRecords map keys.
      */
@@ -40,7 +39,7 @@
      * List the column names of the result set.
      *
      * @return String[] An array of the column names as strings, as ordered
-     *         by the result set provider's column number assignment.
+     * by the result set provider's column number assignment.
      */
     String[] getColumnNames() throws SQLException;
 
@@ -49,14 +48,16 @@
      * A map is returned with two fields, the first being the
      * row number the data page started from, and the second
      * being the array of arrays for the actual data page.
+     *
      * @param startIndex the start index of the records
-     * @param count the total count
+     * @param count      the total count
      * @return Map Contains two fields, the page's row index and the actual data array.
      */
     Map getRecords(int startIndex, int count) throws SQLException;
 
     /**
      * Get the total number of rows in the result set
+     *
      * @return int The total number of rows in the result set.
      */
     int getRowCount();
@@ -66,6 +67,7 @@
      * then the recordset should be simply returned to the client in full. However,
      * if it is &lt; the total size, then this object itself is saved in Session data,
      * and tagged with a unique ID.
+     *
      * @return int the initial download count
      */
     int getInitialDownloadCount();
@@ -73,18 +75,21 @@
 
     /**
      * Get the paged result ID.
+     *
      * @return String This paged result's (universally unique) id.
      */
     String getID();
 
     /**
      * Get the name of the service that manages the pages
+     *
      * @return String The name of the service that will manage this paged result.
      */
     String getServiceName();
 
     /**
      * Set the name of the service that manages the pages.
+     *
      * @param serviceName Update the name of the service that manages the pages for this query.
      */
     void setServicename(String serviceName);
diff --git a/core/src/main/java/flex/messaging/io/PageableRowSetProxy.java b/core/src/main/java/flex/messaging/io/PageableRowSetProxy.java
index 2c7d1d2..8e294d7 100644
--- a/core/src/main/java/flex/messaging/io/PageableRowSetProxy.java
+++ b/core/src/main/java/flex/messaging/io/PageableRowSetProxy.java
@@ -27,14 +27,13 @@
 
 /**
  * A wrapped PageableRowSet instance requires custom serialization so this
- * legacy type has been made to fit the PropertyProxy interface. 
- * 
- * TODO: This proxy is similar to features made possible with Externalizable 
- * so PageableRowSet/RecordSet should be moved to an Externalizable 
+ * legacy type has been made to fit the PropertyProxy interface.
+ * <p>
+ * TODO: This proxy is similar to features made possible with Externalizable
+ * so PageableRowSet/RecordSet should be moved to an Externalizable
  * implementation.
  */
-public class PageableRowSetProxy extends AbstractProxy
-{
+public class PageableRowSetProxy extends AbstractProxy {
     static final long serialVersionUID = 1121859941216924326L;
 
     public static final int HUGE_PAGE_SIZE = Integer.MAX_VALUE;
@@ -45,7 +44,7 @@
     public static final String AS_TYPE_NAME = "RecordSet";
 
     public static final Integer RECORD_SET_VERSION = new Integer(1);
-    
+
     /**
      * ActionScript (AS) Object Key Names.
      */
@@ -59,74 +58,60 @@
     public static final String ID = "id";
 
     public static final List propertyNameCache = new ArrayList();
-    static
-    {
+
+    static {
         propertyNameCache.add(SERVER_INFO);
     }
 
-    public PageableRowSetProxy()
-    {
+    public PageableRowSetProxy() {
         super(null);
         alias = AS_TYPE_NAME;
     }
-    
-    public PageableRowSetProxy(RowSet defaultInstance)
-    {
+
+    public PageableRowSetProxy(RowSet defaultInstance) {
         super(defaultInstance);
         alias = AS_TYPE_NAME;
     }
 
-    public PageableRowSetProxy(PageableRowSet defaultInstance)
-    {
+    public PageableRowSetProxy(PageableRowSet defaultInstance) {
         super(defaultInstance);
         alias = AS_TYPE_NAME;
     }
 
-    public String getAlias(Object instance)
-    {
+    public String getAlias(Object instance) {
         return AS_TYPE_NAME;
     }
-    
-    public List getPropertyNames(Object instance)
-    {
+
+    public List getPropertyNames(Object instance) {
         return propertyNameCache;
     }
 
-    public Class getType(Object instance, String propertyName)
-    {
-        if (SERVER_INFO.equals(propertyName))
-        {
+    public Class getType(Object instance, String propertyName) {
+        if (SERVER_INFO.equals(propertyName)) {
             return HashMap.class;
-        }
-        else
-        {
+        } else {
             return null;
         }
     }
 
-    public Object getValue(Object instance, String propertyName)
-    {
+    public Object getValue(Object instance, String propertyName) {
         Object value = null;
-        
-        if (instance instanceof RowSet)
-        {
+
+        if (instance instanceof RowSet) {
             //Wrap in PageableRowSet just for its utility methods and don't create an id.
-            instance = new PagedRowSet((RowSet)instance, HUGE_PAGE_SIZE, false);
+            instance = new PagedRowSet((RowSet) instance, HUGE_PAGE_SIZE, false);
         }
 
-        if (instance instanceof PageableRowSet)
-        {
-            PageableRowSet prs = (PageableRowSet)instance;
-            
-            if (SERVER_INFO.equals(propertyName))
-            {
-                try
-                {
+        if (instance instanceof PageableRowSet) {
+            PageableRowSet prs = (PageableRowSet) instance;
+
+            if (SERVER_INFO.equals(propertyName)) {
+                try {
                     HashMap serverInfo = new HashMap();
                     serverInfo.put(ID, prs.getID());
-    
+
                     Map pageInfo = prs.getRecords(1, prs.getInitialDownloadCount());
-        
+
                     serverInfo.put(TOTAL_COUNT, new Integer(prs.getRowCount()));
                     serverInfo.put(INITIAL_DATA, pageInfo.get(PageableRowSet.PAGE)); //Array of Arrays - the first page returned
                     serverInfo.put(CURSOR, pageInfo.get(PageableRowSet.CURSOR)); //Integer
@@ -134,9 +119,7 @@
                     serverInfo.put(COLUMN_NAMES, prs.getColumnNames());
                     serverInfo.put(VERSION, RECORD_SET_VERSION);
                     value = serverInfo;
-                }
-                catch (SQLException ex)
-                {
+                } catch (SQLException ex) {
                     MessageException e = new MessageException();
                     e.setMessage("Error encountered serializing RowSet.");
                     e.setRootCause(ex);
@@ -148,8 +131,7 @@
         return value;
     }
 
-    public void setValue(Object instance, String propertyName, Object value)
-    {
-       // Client-to-server not supported
+    public void setValue(Object instance, String propertyName, Object value) {
+        // Client-to-server not supported
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/PagedRowSet.java b/core/src/main/java/flex/messaging/io/PagedRowSet.java
index 6224905..ec4a5aa 100644
--- a/core/src/main/java/flex/messaging/io/PagedRowSet.java
+++ b/core/src/main/java/flex/messaging/io/PagedRowSet.java
@@ -35,8 +35,7 @@
  *
  * @version 1.0
  */
-public class PagedRowSet implements PageableRowSet
-{
+public class PagedRowSet implements PageableRowSet {
     private RowSet rowSet;
     private String[] colNames;
     private int pageSize = 50; //Default to 50 records a page
@@ -61,8 +60,7 @@
      * @param r The RowSet to be paged.
      * @param p The initial page size.
      */
-    public PagedRowSet(RowSet r, int p)
-    {
+    public PagedRowSet(RowSet r, int p) {
         serviceName = DEFAULT_PAGING_SERVICE_NAME;
         rowSet = r;
         pageSize = p;
@@ -72,92 +70,69 @@
 
     /**
      * Allows the unique id generation of the RowSet to be toggled.
-     * @see #PagedRowSet(RowSet, int)
      *
-     * @param r the row set
-     * @param p the page size
+     * @param r        the row set
+     * @param p        the page size
      * @param createID should we create an id?
+     * @see #PagedRowSet(RowSet, int)
      */
-    public PagedRowSet(RowSet r, int p, boolean createID)
-    {
+    public PagedRowSet(RowSet r, int p, boolean createID) {
         serviceName = DEFAULT_PAGING_SERVICE_NAME;
         rowSet = r;
         pageSize = p;
-        if (createID)
-        {
+        if (createID) {
             id = UUIDUtils.createUUID();
         }
         init();
     }
-    
-    private void init()
-    {
-        if (rowSet != null)
-        {
+
+    private void init() {
+        if (rowSet != null) {
             //Initialize columns
             initColumns();
 
             //Initialize records
             initRecords();
-        }
-        else
-        {
+        } else {
             colNames = new String[0];
         }
     }
 
 
-    private synchronized void initColumns()
-    {
-        try
-        {
+    private synchronized void initColumns() {
+        try {
             ResultSetMetaData rsmd = rowSet.getMetaData();
-            if (rsmd != null)
-            {
+            if (rsmd != null) {
                 colCount = rsmd.getColumnCount();
             }
-        }
-        catch (SQLException ex)
-        {
+        } catch (SQLException ex) {
             colCount = 0;
         }
     }
 
 
-    private synchronized void initRecords()
-    {
+    private synchronized void initRecords() {
         //Determine rs size
-        if (rowSet != null)
-        {
-            try
-            {
+        if (rowSet != null) {
+            try {
                 int currentIndex = rowSet.getRow();
 
                 //Go to the end and get that row number
-                if (rowSet.last())
-                {
+                if (rowSet.last()) {
                     rowCount = rowSet.getRow();
                 }
 
                 //Put the cursor back
-                if (currentIndex > 0)
-                {
+                if (currentIndex > 0) {
                     rowSet.absolute(currentIndex);
-                }
-                else
-                {
+                } else {
                     rowSet.beforeFirst();
                 }
-            }
-            catch (SQLException ex)
-            {
+            } catch (SQLException ex) {
                 //TODO: Decide whether if absolute() not be supported, try first() as a last resort??
-                try
-                {
+                try {
                     rowSet.first();
-                }
-                catch (SQLException se)
-                {
+                } catch (SQLException se) {
                     //we won't try anymore.
                 }
             }
@@ -169,31 +144,24 @@
      * List the column names of the result set.
      *
      * @return String[] An array of the column names as strings, as ordered
-     *         by the result set provider's column number assignment.
+     * by the result set provider's column number assignment.
      */
-    public synchronized String[] getColumnNames()
-    {
+    public synchronized String[] getColumnNames() {
         //  Cache the column names lookup
-        if (colNames == null)
-        {
-            try
-            {
+        if (colNames == null) {
+            try {
                 //Ensure column count is initialized
-                if (colCount == 0)
-                {
+                if (colCount == 0) {
                     initColumns();
                 }
 
                 colNames = new String[colCount];
 
-                for (int i = 0; i < colCount; i++)
-                {
+                for (int i = 0; i < colCount; i++) {
                     //Note: column numbers start at 1
                     colNames[i] = rowSet.getMetaData().getColumnName(i + 1);
                 }
-            }
-            catch (SQLException ex)
-            {
+            } catch (SQLException ex) {
                 colNames = new String[0];
             }
         }
@@ -210,18 +178,16 @@
      * and an array of arrays of the actual data page itself.
      *
      * @param startIndex starting index
-     * @param count how many records to return
+     * @param count      how many records to return
      * @return Map A map with two fields, the index of the row to start the page, and an array of
-     *         arrays for the actual data page.
+     * arrays for the actual data page.
      * @throws SQLException if unable to get data from the rowset
      */
-    public synchronized Map getRecords(int startIndex, int count) throws SQLException
-    {
+    public synchronized Map getRecords(int startIndex, int count) throws SQLException {
         List aRecords = new ArrayList(); //Don't initialize with count as it could be Integer.MAX_VALUE
 
         //Ensure column count is initialized
-        if (colCount == 0)
-        {
+        if (colCount == 0) {
             initColumns();
         }
 
@@ -230,60 +196,44 @@
             startIndex = 1;
 
         //Populate the page, moving cursor to index
-        if (rowSet.absolute(startIndex))
-        {
+        if (rowSet.absolute(startIndex)) {
             //Loop over the result set for the count specified
-            for (int i = 0; i < count; i++)
-            {
+            for (int i = 0; i < count; i++) {
                 boolean hasNext;
 
                 List row;
 
-                if (colCount > 0)
-                {
+                if (colCount > 0) {
                     row = new ArrayList(rowCount + 1);
                     //Loop over columns to create an array for the row
-                    for (int j = 1; j <= colCount; j++)
-                    {
+                    for (int j = 1; j <= colCount; j++) {
                         Object data = rowSet.getObject(j);
-                        if (data instanceof Clob)
-                        {
+                        if (data instanceof Clob) {
                             Clob clob = (Clob) data;
                             row.add(clob.getSubString(0, (int) clob.length()));
-                        }
-                        else if (data instanceof Blob)
-                        {
+                        } else if (data instanceof Blob) {
                             Blob blob = (Blob) data;
                             byte[] bytes = blob.getBytes(1, (int) blob.length());
                             row.add(bytes);
-                        }
-                        else
+                        } else
                             row.add(data);
                     }
-                }
-                else //HACK: Handle any ColdFusion Query Objects that have no column metadata!
+                } else //HACK: Handle any ColdFusion Query Objects that have no column metadata!
                 {
                     row = new ArrayList();
 
-                    try
-                    {
+                    try {
                         //Get as many columns as possible to build the row
                         //Stop on error or the first null column returned.
-                        for (int j = 1; j <= 50; j++)
-                        {
+                        for (int j = 1; j <= 50; j++) {
                             Object o = rowSet.getObject(j);
-                            if (o != null)
-                            {
+                            if (o != null) {
                                 row.add(o);
-                            }
-                            else
-                            {
+                            } else {
                                 break;
                             }
                         }
-                    }
-                    catch (SQLException ex)
-                    {
+                    } catch (SQLException ex) {
                         //Stop looking and just add the row.
                     }
                 }
@@ -293,8 +243,7 @@
                 hasNext = rowSet.next();
 
                 //Cursor beyond last row, stop!
-                if (!hasNext)
-                {
+                if (!hasNext) {
                     break;
                 }
             }
@@ -312,8 +261,7 @@
      *
      * @return int The total number of rows in the result set.
      */
-    public int getRowCount()
-    {
+    public int getRowCount() {
         return rowCount;
     }
 
@@ -325,17 +273,16 @@
      *
      * @return the page size
      */
-    public int getInitialDownloadCount()
-    {
+    public int getInitialDownloadCount() {
         return pageSize;
     }
 
     /**
      * Return the id of this row set.
+     *
      * @return the id
      */
-    public String getID()
-    {
+    public String getID() {
         return id;
     }
 
@@ -344,8 +291,7 @@
      *
      * @return String The name of the service that will manage this paged result.
      */
-    public String getServiceName()
-    {
+    public String getServiceName() {
         return serviceName;
     }
 
@@ -354,8 +300,7 @@
      *
      * @param serviceName Update the name of the service that manages the pages for this query.
      */
-    public void setServicename(String serviceName)
-    {
+    public void setServicename(String serviceName) {
         this.serviceName = serviceName;
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/PropertyProxy.java b/core/src/main/java/flex/messaging/io/PropertyProxy.java
index 02513f6..a4f035a 100644
--- a/core/src/main/java/flex/messaging/io/PropertyProxy.java
+++ b/core/src/main/java/flex/messaging/io/PropertyProxy.java
@@ -19,39 +19,39 @@
 import java.util.List;
 
 /**
- * A PropertyProxy allows customized serialization and deserialization of complex objects by 
+ * A PropertyProxy allows customized serialization and deserialization of complex objects by
  * providing access to each of the steps in the serialization and deserialization process.
  * A serializer asks a PropertyProxy for the class name, traits
  * and properties during serialization. A deserializer asks a PropertyProxy
- * to create a new instance and set property values. 
- * 
+ * to create a new instance and set property values.
+ * <p>
  * Different PropertyProxy implementations may be written for different
  * types of objects such as Map, Dictionary, Enumerable, Throwable,
- * and Beans. 
+ * and Beans.
  */
-public interface PropertyProxy extends Cloneable
-{
+public interface PropertyProxy extends Cloneable {
     /**
      * The default instance managed by this PropertyProxy. The
      * default instance is used for one-type proxied instances.
-     * 
+     *
      * @return The proxied instance.
      */
     Object getDefaultInstance();
 
     /**
      * Sets the default instance managed by this PropertyProxy.
-     * 
+     *
      * @param defaultInstance The default instance.
      */
     void setDefaultInstance(Object defaultInstance);
-    
+
     /**
-     * Creates a new instance for the given className. ClassName is the 
+     * Creates a new instance for the given className. ClassName is the
      * value of the "alias" for the ActionScript class serialized.
      * If the className is invalid an anonymous ASObject is created. If the className is
      * prefixed with "&gt;" an ASObject is created with the type set however
      * a concrete instance is not instantiated.
+     *
      * @param className the class to create
      * @return an instance of className
      */
@@ -61,7 +61,7 @@
      * The List of property names as Strings that make up the traits
      * of the default instance. These traits determine which properties
      * are to be serialized.
-     * 
+     *
      * @return The set of property names as Strings to be serialized.
      */
     List getPropertyNames();
@@ -70,7 +70,7 @@
      * The List of property names as Strings that make up the traits
      * of the given instance. These traits determine which properties
      * are to be serialized.
-     * 
+     *
      * @param instance the object to examine
      * @return List of property names as Strings to be serialized.
      */
@@ -78,23 +78,25 @@
 
     /**
      * Looks up the Class type of the property by name on the default instance.
+     *
      * @param propertyName The name of the property.
      * @return The property type.
      */
     Class getType(String propertyName);
-    
+
     /**
      * Looks up the Class type of the property by name on the given instance.
-     * @param instance The instance that possesses the property.
+     *
+     * @param instance     The instance that possesses the property.
      * @param propertyName The name of the property.
      * @return The property type.
      */
     Class getType(Object instance, String propertyName);
 
     /**
-     * Looks up the value of the property by name from the default 
+     * Looks up the value of the property by name from the default
      * instance.
-     * 
+     *
      * @param propertyName The name of the property.
      * @return The value of the given property.
      */
@@ -102,8 +104,8 @@
 
     /**
      * Looks up the value of a property by name for the given instance.
-     * 
-     * @param instance The instance that possesses the requested property.
+     *
+     * @param instance     The instance that possesses the requested property.
      * @param propertyName The name of the property.
      * @return The value of the given property.
      */
@@ -111,51 +113,52 @@
 
     /**
      * Updates the value of a propery by name for the default instance.
-     * 
+     *
      * @param propertyName the property name
-     * @param value the new value
+     * @param value        the new value
      */
     void setValue(String propertyName, Object value);
-    
+
     /**
      * Updates the value of a property by name for the given instance.
-     * 
-     * @param instance The instance that possesses the requested property.
+     *
+     * @param instance     The instance that possesses the requested property.
      * @param propertyName The name of the property to update.
-     * @param value The updated value for the property.
+     * @param value        The updated value for the property.
      */
     void setValue(Object instance, String propertyName, Object value);
 
     /**
-     *  This is called after the deserialization of the instance is complete (i.e.
-     *  after the lastSetValue call.  It has the opportunity to return an instance
-     *  to use to replace the instance returned previously in createInstance.
-     *  NOTE however that this approach does not support recursive references back to 
-     *  this same object (i.e. if a property of this object refers back to itself).
-     *  @param instance the instance being deserialized (previously returned from a
-     *  createInstance call)
-     *  @return possibly the same instance to use for this object.
+     * This is called after the deserialization of the instance is complete (i.e.
+     * after the lastSetValue call.  It has the opportunity to return an instance
+     * to use to replace the instance returned previously in createInstance.
+     * NOTE however that this approach does not support recursive references back to
+     * this same object (i.e. if a property of this object refers back to itself).
+     *
+     * @param instance the instance being deserialized (previously returned from a
+     *                 createInstance call)
+     * @return possibly the same instance to use for this object.
      */
     Object instanceComplete(Object instance);
-    
+
     /**
      * Allows an alias to be set for the instance type. By default
      * the classname of the instance is used.
-     * 
+     *
      * @param value The class name alias.
      */
     void setAlias(String value);
 
     /**
      * The class name alias for the default instance.
-     *  
+     *
      * @return The class name alias to be used in serializing the type traits.
      */
     String getAlias();
 
     /**
      * The class name alias for the given instance.
-     *  
+     *
      * @param instance the object to get the alias of.
      * @return The class name alias to be used in serializing the type traits.
      */
@@ -163,19 +166,19 @@
 
     /**
      * Dynamic is a client-only concept for types that allow for arbitrary
-     * public properties to be defined at runtime. This setting isn't yet 
+     * public properties to be defined at runtime. This setting isn't yet
      * relevant for serialization but can still be set in the Object traits.
-     * 
+     *
      * @param value Whether the client type is expected to be dynamic. This setting
-     * is currently not used.
+     *              is currently not used.
      */
     void setDynamic(boolean value);
-    
+
     /**
-     * The trait setting "dynamic" is a client-only concept for types that 
+     * The trait setting "dynamic" is a client-only concept for types that
      * allow for arbitrary public properties to be defined at runtime.
      * The default is false and it is unlikely that it would need to be set.
-     *  
+     *
      * @return The dynamic client trait setting to be used during serialization of the type.
      */
     boolean isDynamic();
@@ -183,7 +186,7 @@
     /**
      * Specifies whether the default instance manages its own serialization through the
      * Externalizable interface.
-     * 
+     *
      * @return Whether the default instance implements java.io.Externalizable.
      */
     boolean isExternalizable();
@@ -191,7 +194,7 @@
     /**
      * Specifies whether the given instance manages its own serialization through the
      * Externalizable interface.
-     * 
+     *
      * @param instance the object to check
      * @return Whether the given instance implements java.io.Externalizable.
      */
@@ -200,24 +203,26 @@
     /**
      * Specifies whether the given instance manages its own serialization through the
      * Externalizable interface. If this property is set to true then the type
-     * must implement java.io.Externalizable. Setting this property to false allows an 
-     * otherwise Externalizable instance to be considered as a normal type for 
+     * must implement java.io.Externalizable. Setting this property to false allows an
+     * otherwise Externalizable instance to be considered as a normal type for
      * custom serialization.
-     * 
+     *
      * @param value if set to true the instance must implement java.io.Externalizable, otherwise
-     * if set to false the proxied type can avoid external serialization
-     * for an otherwise Externalizable type.
+     *              if set to false the proxied type can avoid external serialization
+     *              for an otherwise Externalizable type.
      */
     void setExternalizable(boolean value);
 
     /**
      * The context holds settings that govern serialization behavior.
+     *
      * @return The current serialization context, or a new default instance if undefined.
      */
     SerializationContext getSerializationContext();
-    
+
     /**
      * Sets the context for serialization behavior.
+     *
      * @param value the new context
      */
     void setSerializationContext(SerializationContext value);
@@ -225,15 +230,15 @@
     /**
      * If set to true, read only properties will be included
      * during default serialization. The default is false.
-     * 
-     * @param value whether read only properties should be included. 
+     *
+     * @param value whether read only properties should be included.
      */
     void setIncludeReadOnly(boolean value);
-    
+
     /**
      * Determines whether read only properties from the instance should be included
      * during default serialization. The default is false.
-     * 
+     *
      * @return Whether read only properties should be included during default
      * serialization.
      */
@@ -245,7 +250,7 @@
      * any given level a list of includes and excludes can be specified.
      * Complex child properties can have their own descriptors specified
      * in a nested manner.
-     * 
+     *
      * @return The serialization descriptor for custom serialization.
      */
     SerializationDescriptor getDescriptor();
@@ -253,15 +258,15 @@
     /**
      * Allows non-default inclusion/exclusion of properties for
      * serialization.
-     * 
+     *
      * @param descriptor The descriptor to customize property selection for serialization.
      */
     void setDescriptor(SerializationDescriptor descriptor);
 
     /**
-     * Returns a copy of the PropertyProxy so that it can be used as a template without 
+     * Returns a copy of the PropertyProxy so that it can be used as a template without
      * modifying/creating global references to instances, descriptors etc.
-     * 
+     *
      * @return A copy of the PropertyProxy.
      */
     Object clone();
diff --git a/core/src/main/java/flex/messaging/io/PropertyProxyRegistry.java b/core/src/main/java/flex/messaging/io/PropertyProxyRegistry.java
index a925eb3..e13775f 100644
--- a/core/src/main/java/flex/messaging/io/PropertyProxyRegistry.java
+++ b/core/src/main/java/flex/messaging/io/PropertyProxyRegistry.java
@@ -29,8 +29,8 @@
 
 /**
  * Allows custom PropertyProxy's to be registered on a Class basis.
- *  
- * Class hierarchies can be optionally searched with the first match winning. 
+ * <p>
+ * Class hierarchies can be optionally searched with the first match winning.
  * The search starts by trying an exact Class match, then the immediate
  * interfaces are tried in the order that they are declared on the Class and
  * finally the process is repeated for the superclass, if one exists. If a
@@ -39,24 +39,22 @@
  * implementing class is registered with the selected PropertyProxy to optimize
  * subsequent searches.
  */
-public class PropertyProxyRegistry
-{
+public class PropertyProxyRegistry {
     private final Map<Class, PropertyProxy> classRegistry = new IdentityHashMap<Class, PropertyProxy>();
 
     /**
      * A global registry that maps a Class type to a PropertyProxy.
      */
     private static final PropertyProxyRegistry registry = new PropertyProxyRegistry();
-    static
-    {
+
+    static {
         preRegister();
     }
 
     /**
      * Constructs an empty PropertyProxy registry.
      */
-    public PropertyProxyRegistry()
-    {
+    public PropertyProxyRegistry() {
         // No-op.
     }
 
@@ -65,11 +63,10 @@
      * custom sets of PropertyProxies are required in different scopes then
      * new instances of PropertyProxyRegistry should be manually created,
      * however these will not be used for serialization.
-     * 
+     *
      * @return The global PropertyProxy registry.
      */
-    public static PropertyProxyRegistry getRegistry()
-    {
+    public static PropertyProxyRegistry getRegistry() {
         return registry;
     }
 
@@ -77,19 +74,17 @@
      * Call this on Message broker shutdown ONLY.
      * Clears the registry and removes the static global registry.
      */
-    public static void release()
-    {
+    public static void release() {
         registry.clear();
         preRegister();  // init for restart
     }
 
-    
+
     /**
-     * Pre-registers a few common types that are often proxied to 
+     * Pre-registers a few common types that are often proxied to
      * speed up lookups.
      */
-    private static void preRegister()
-    {
+    private static void preRegister() {
         ThrowableProxy proxy = new ThrowableProxy();
         registry.register(MessageException.class, proxy);
         registry.register(LocalizedException.class, proxy);
@@ -104,30 +99,28 @@
 
     /**
      * Returns a PropertyProxy suitable for the given instance and registers
-     * the selected PropertyProxy for the Class of the instance. Note that 
-     * the PropertyProxy is not cloned so either the PropertyProxy should be 
+     * the selected PropertyProxy for the Class of the instance. Note that
+     * the PropertyProxy is not cloned so either the PropertyProxy should be
      * used as a template else you must first call clone() on the returned
      * PropertyProxy and then set the instance as the default on the resulting
      * clone.
-     * 
-     * @param instance the type to search for a suitable PropertyProxy. 
+     *
+     * @param instance the type to search for a suitable PropertyProxy.
      * @return PropertyProxy suitable for the instance type.
      */
-    public static PropertyProxy getProxyAndRegister(Object instance)
-    {
+    public static PropertyProxy getProxyAndRegister(Object instance) {
         if (instance instanceof PropertyProxy)
-            return (PropertyProxy)instance;
+            return (PropertyProxy) instance;
 
         Class c = instance.getClass();
         PropertyProxy proxy = getRegistry().getProxyAndRegister(c);
 
-        if (proxy == null)
-        {
+        if (proxy == null) {
             proxy = guessProxy(instance);
             getRegistry().register(c, proxy);
         }
 
-        return proxy; 
+        return proxy;
     }
 
     /**
@@ -137,24 +130,22 @@
      * be used as a template else you must first call clone() on the returned
      * PropertyProxy and then set the instance as the default on the resulting
      * clone.
-     * 
-     * @param instance the type to search for a suitable PropertyProxy. 
+     *
+     * @param instance the type to search for a suitable PropertyProxy.
      * @return PropertyProxy suitable for the instance type.
      */
-    public static PropertyProxy getProxy(Object instance)
-    {
+    public static PropertyProxy getProxy(Object instance) {
         if (instance instanceof PropertyProxy)
-            return (PropertyProxy)instance;
+            return (PropertyProxy) instance;
 
         Class c = instance.getClass();
         PropertyProxy proxy = getRegistry().getProxy(c);
 
-        if (proxy == null)
-        {
+        if (proxy == null) {
             proxy = guessProxy(instance);
         }
 
-        proxy = (PropertyProxy)proxy.clone();
+        proxy = (PropertyProxy) proxy.clone();
         proxy.setDefaultInstance(instance);
         return proxy;
     }
@@ -162,31 +153,22 @@
     /**
      * Attempts to select a suitable proxy for the given instance
      * based on common type mappings.
+     *
      * @param instance the object to examine.
      * @return a proxy for getting properties.
      */
-    private static PropertyProxy guessProxy(Object instance)
-    {
+    private static PropertyProxy guessProxy(Object instance) {
         PropertyProxy proxy;
 
-        if (instance instanceof Map)
-        {
+        if (instance instanceof Map) {
             proxy = new MapProxy();
-        }
-        else if (instance instanceof Throwable)
-        {
+        } else if (instance instanceof Throwable) {
             proxy = new ThrowableProxy();
-        }
-        else if (instance instanceof PageableRowSet || instance instanceof RowSet)
-        {
+        } else if (instance instanceof PageableRowSet || instance instanceof RowSet) {
             proxy = new PageableRowSetProxy();
-        }
-        else if (instance instanceof Dictionary)
-        {
+        } else if (instance instanceof Dictionary) {
             proxy = new DictionaryProxy();
-        }
-        else
-        {
+        } else {
             proxy = new BeanProxy();
         }
 
@@ -196,14 +178,13 @@
     /**
      * Locates a custom PropertyProxy for the given Class. The entire class
      * hierarchy is searched. Even if a match is found in the class heirarchy
-     * the PropertyProxy is not registered for the given Class. 
-     * 
+     * the PropertyProxy is not registered for the given Class.
+     *
      * @param c the Class used to search the registry.
      * @return the custom PropertyProxy registered for the Class or
      * null if a PropertyProxy was not found or if the given Class is null.
      */
-    public PropertyProxy getProxy(Class c)
-    {
+    public PropertyProxy getProxy(Class c) {
         return getProxy(c, true, false);
     }
 
@@ -211,13 +192,12 @@
      * Locates a custom PropertyProxy for the given Class. The entire class
      * hierarchy is searched. If a match is found in the class heirarchy the
      * PropertyProxy is registered for the given class.
-     * 
+     *
      * @param c the Class used to search the registry.
      * @return the custom PropertyProxy registered for the Class or
      * null if a PropertyProxy was not found or if the given Class is null.
      */
-    public PropertyProxy getProxyAndRegister(Class c)
-    {
+    public PropertyProxy getProxyAndRegister(Class c) {
         return getProxy(c, true, true);
     }
 
@@ -226,17 +206,16 @@
      * searchHierarchy argument is true the search starts by trying an exact
      * Class match, then the immediate interfaces are tried in the order that
      * they are declared on the Class and finally the process is repeated for
-     * the superclass, if one exists.  
-     * 
-     * @param c the Class used to search the registry.
+     * the superclass, if one exists.
+     *
+     * @param c               the Class used to search the registry.
      * @param searchHierarchy if true the entire class hierarchy is searched.
-     * @param autoRegister if true a successful match is registerd for top
-     * level class
+     * @param autoRegister    if true a successful match is registerd for top
+     *                        level class
      * @return the custom PropertyProxy registered for the Class or
      * null if a PropertyProxy was not found or if the given Class is null.
      */
-    public PropertyProxy getProxy(Class c, boolean searchHierarchy, boolean autoRegister)
-    {
+    public PropertyProxy getProxy(Class c, boolean searchHierarchy, boolean autoRegister) {
         if (c == null)
             return null;
 
@@ -246,48 +225,37 @@
 
         // Locate PropertyProxy by Class reference
         PropertyProxy proxy = null;
-        synchronized(classRegistry)
-        {
-            proxy = classRegistry.get(c); 
+        synchronized (classRegistry) {
+            proxy = classRegistry.get(c);
         }
 
-        if (proxy == null && searchHierarchy)
-        {
+        if (proxy == null && searchHierarchy) {
             // Next, try matching PropertyProxy by interface
             Class[] interfaces = c.getInterfaces();
-            for (int i = 0; i < interfaces.length; i++)
-            {
+            for (int i = 0; i < interfaces.length; i++) {
                 Class interfaceClass = interfaces[i];
-                synchronized(classRegistry)
-                {
+                synchronized (classRegistry) {
                     proxy = classRegistry.get(interfaceClass);
-                }                
-                if (proxy != null && autoRegister)
-                {
+                }
+                if (proxy != null && autoRegister) {
                     register(c, proxy);
                     break;
-                }
-                else
-                {
+                } else {
                     // Recursively check super interfaces too
                     proxy = getProxy(interfaceClass, searchHierarchy, autoRegister);
-                    if (proxy != null)
-                    {
+                    if (proxy != null) {
                         break;
                     }
                 }
             }
         }
 
-        if (proxy == null && searchHierarchy)
-        {
+        if (proxy == null && searchHierarchy) {
             // Finally, recursively search superclass hierarchy
             Class superclass = c.getSuperclass();
-            if (superclass != null)
-            {
+            if (superclass != null) {
                 proxy = getProxy(superclass, searchHierarchy, autoRegister);
-                if (proxy != null && autoRegister)
-                {
+                if (proxy != null && autoRegister) {
                     register(c, proxy);
                 }
             }
@@ -299,37 +267,31 @@
     /**
      * Removes all items from the class registry.
      */
-    public void clear()
-    {
-        synchronized(classRegistry)
-        {
+    public void clear() {
+        synchronized (classRegistry) {
             classRegistry.clear();
         }
     }
 
     /**
      * Register a custom PropertyProxy for a Class.
-     * 
-     * @param c The key for the class registry.
+     *
+     * @param c     The key for the class registry.
      * @param proxy The custom PropertyProxy implementation.
      */
-    public void register(Class c, PropertyProxy proxy)
-    {
-        synchronized(classRegistry)
-        {
+    public void register(Class c, PropertyProxy proxy) {
+        synchronized (classRegistry) {
             classRegistry.put(c, proxy);
         }
     }
 
     /**
      * Removes a custom PropertyProxy from the registry.
-     * 
+     *
      * @param c The Class to be removed from the registry.
      */
-    public void unregister(Class c)
-    {
-        synchronized(classRegistry)
-        {
+    public void unregister(Class c) {
+        synchronized (classRegistry) {
             classRegistry.remove(c);
         }
     }
diff --git a/core/src/main/java/flex/messaging/io/RecoverableSerializationException.java b/core/src/main/java/flex/messaging/io/RecoverableSerializationException.java
index 41fb1f2..87a9b7c 100644
--- a/core/src/main/java/flex/messaging/io/RecoverableSerializationException.java
+++ b/core/src/main/java/flex/messaging/io/RecoverableSerializationException.java
@@ -24,12 +24,10 @@
  * The BatchProcessFilter will add an error message to the response
  * of any messages which have a recoverable serialization exception.
  */
-public class RecoverableSerializationException extends SerializationException
-{
+public class RecoverableSerializationException extends SerializationException {
     static final long serialVersionUID = 2671402324412964558L;
 
-    public RecoverableSerializationException()
-    {
+    public RecoverableSerializationException() {
         super();
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/SerializationDescriptor.java b/core/src/main/java/flex/messaging/io/SerializationDescriptor.java
index c5b4af2..34fa651 100644
--- a/core/src/main/java/flex/messaging/io/SerializationDescriptor.java
+++ b/core/src/main/java/flex/messaging/io/SerializationDescriptor.java
@@ -24,47 +24,41 @@
  * fields and properties should be excluded from an object graph
  * on an instance-by-instance basis. By default, all public instance
  * variables and properties will be serialized.
- *
+ * <p>
  * If excludes need to be specified for a complex child property,
  * the property name is added to this dynamic descriptor and its value
  * set to another descriptor with its own set of excludes.
- *
+ * <p>
  * The absence of excludes implies default serialization. The absence of
  * a child property implies default serialization.
- *  
+ *
  * @see flex.messaging.io.PropertyProxy
  */
-public class SerializationDescriptor extends HashMap
-{
+public class SerializationDescriptor extends HashMap {
     static final long serialVersionUID = 1828426777611186569L;
 
     private List excludes;
 
-    public SerializationDescriptor()
-    {
+    public SerializationDescriptor() {
         super();
     }
 
-    public List getExcludesForInstance(Object instance)
-    {
+    public List getExcludesForInstance(Object instance) {
         return excludes;
     }
 
-    /* 
+    /*
      * Deprecated in favor of getExcludesForInstance(instance).
      */
-    public List getExcludes()
-    {
+    public List getExcludes() {
         return excludes;
     }
 
-    public void setExcludes(List excludes)
-    {
+    public void setExcludes(List excludes) {
         this.excludes = excludes;
     }
 
-    public String toString()
-    {
+    public String toString() {
         return "[ excludes: " + excludes + "]";
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/SerializationException.java b/core/src/main/java/flex/messaging/io/SerializationException.java
index bb5ee87..9fb6530 100644
--- a/core/src/main/java/flex/messaging/io/SerializationException.java
+++ b/core/src/main/java/flex/messaging/io/SerializationException.java
@@ -22,22 +22,20 @@
  * Typically signifies that a fatal exception happened during deserialization or
  * serialization. The messaging framework should try to get a meaningful
  * message back to the client in a response, however this is not always possible,
- * especially for batched AMF messages, so at the very least the error should be 
+ * especially for batched AMF messages, so at the very least the error should be
  * logged.
- * 
+ * <p>
  * A special sub-class RecoverableSerializationException can be thrown for non-fatal
  * serialization exceptions.
- * 
+ *
  * @see flex.messaging.io.RecoverableSerializationException
  */
-public class SerializationException extends MessageException
-{
+public class SerializationException extends MessageException {
     static final long serialVersionUID = -5723542920189973518L;
 
     public static final String CLIENT_PACKET_ENCODING = "Client.Packet.Encoding";
-    
-    public SerializationException()
-    {
+
+    public SerializationException() {
         setCode(CLIENT_PACKET_ENCODING);
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/SerializationProxy.java b/core/src/main/java/flex/messaging/io/SerializationProxy.java
index e525e4b..0918c8b 100644
--- a/core/src/main/java/flex/messaging/io/SerializationProxy.java
+++ b/core/src/main/java/flex/messaging/io/SerializationProxy.java
@@ -27,15 +27,14 @@
 /**
  * This class is the server side portion of a custom serialization
  * mechanism to support partial serialization of Objects.
- *
+ * <p>
  * The client uses the Externalizable interface to guarantee the
  * serialization order of the properties. The name of the remote class
  * is the first property send as it is needed to construct an object shell
  * before deserializing any of the wrapped instance properties so that
  * object references are correctly restored.
  */
-public class SerializationProxy extends MapProxy implements Externalizable
-{
+public class SerializationProxy extends MapProxy implements Externalizable {
     static final long serialVersionUID = -2544463435731984479L;
 
     /**
@@ -45,30 +44,25 @@
      * discarded once the externalizable information has been
      * read and the wrapped instance constructed.
      */
-    public SerializationProxy()
-    {
+    public SerializationProxy() {
         super(null);
         externalizable = false;
     }
-    
-    public SerializationProxy(Object defaultInstance)
-    {
+
+    public SerializationProxy(Object defaultInstance) {
         super(defaultInstance);
         externalizable = false;
     }
 
-    public boolean isExternalizable()
-    {
+    public boolean isExternalizable() {
         return false;
     }
 
-    public boolean isExternalizable(Object instance)
-    {
+    public boolean isExternalizable(Object instance) {
         return false;
     }
 
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
-    {
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
         Object saveObjectTable = null;
         Object saveTraitsTable = null;
         Object saveStringTable = null;
@@ -77,21 +71,16 @@
         if (in instanceof Amf3Input)
             in3 = (Amf3Input) in;
 
-        try 
-        {
-            if (in3 != null)
-            {
+        try {
+            if (in3 != null) {
                 saveObjectTable = in3.saveObjectTable();
                 saveTraitsTable = in3.saveTraitsTable();
                 saveStringTable = in3.saveStringTable();
             }
 
             this.defaultInstance = in.readObject();
-        }
-        finally
-        {
-            if (in3 != null)
-            {
+        } finally {
+            if (in3 != null) {
                 in3.restoreObjectTable(saveObjectTable);
                 in3.restoreTraitsTable(saveTraitsTable);
                 in3.restoreStringTable(saveStringTable);
@@ -99,17 +88,15 @@
         }
     }
 
-    public void writeExternal(ObjectOutput out) throws IOException
-    {
+    public void writeExternal(ObjectOutput out) throws IOException {
         if (out instanceof Amf3Output)
             throw new UnsupportedOperationException("This method should not be used for AMF3 serialization.");
-        
+
         // this method is used to serialize the proxy during cluster serialization    
         out.writeObject(this.defaultInstance);
     }
 
-    public String toString()
-    {
+    public String toString() {
         return "[Proxy(" + defaultInstance + ") descriptor=" + descriptor + "]";
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/StatusInfoProxy.java b/core/src/main/java/flex/messaging/io/StatusInfoProxy.java
index 3d460c6..7e5ecbf 100644
--- a/core/src/main/java/flex/messaging/io/StatusInfoProxy.java
+++ b/core/src/main/java/flex/messaging/io/StatusInfoProxy.java
@@ -38,8 +38,7 @@
  * <li>rootcause: If the exception was a ServletException, the rootcause will be included as a nested Status Info object.</li>
  * </ul>
  */
-public class StatusInfoProxy extends AbstractProxy
-{
+public class StatusInfoProxy extends AbstractProxy {
     static final long serialVersionUID = 8860353096401173320L;
 
     /**
@@ -88,185 +87,146 @@
     public static final String ROOTCAUSE = "rootcause";
 
     public static final List propertyNameCache = new ArrayList();
-    static
-    {
+
+    static {
         propertyNameCache.add(CODE);
         propertyNameCache.add(CLASS);
         propertyNameCache.add(DESCRIPTION);
         propertyNameCache.add(DETAILS);
         propertyNameCache.add(ROOTCAUSE);
     }
-    
+
     protected boolean showStacktraces;
-    
-    public StatusInfoProxy()
-    {
+
+    public StatusInfoProxy() {
         super(null);
     }
 
-    public StatusInfoProxy(Throwable defaultInstance)
-    {
+    public StatusInfoProxy(Throwable defaultInstance) {
         super(defaultInstance);
     }
 
-    public void setShowStacktraces(boolean value)
-    {
+    public void setShowStacktraces(boolean value) {
         showStacktraces = value;
     }
-    
-    public String getAlias(Object instance)
-    {
+
+    public String getAlias(Object instance) {
         // Status Info objects are anonymous
         return null;
     }
 
-    public List getPropertyNames(Object instance)
-    {
+    public List getPropertyNames(Object instance) {
         return propertyNameCache;
     }
-    
-    public Class getType(Object instance, String propertyName)
-    {
+
+    public Class getType(Object instance, String propertyName) {
         Class type = null;
-        
-        if (CODE.equals(propertyName))
-        {
+
+        if (CODE.equals(propertyName)) {
             type = String.class;
-        }
-        else if (CLASS.equals(propertyName))
-        {
+        } else if (CLASS.equals(propertyName)) {
             type = String.class;
-        }
-        else if (DESCRIPTION.equals(propertyName))
-        {
+        } else if (DESCRIPTION.equals(propertyName)) {
             type = String.class;
-        }
-        else if (DETAILS.equals(propertyName))
-        {
+        } else if (DETAILS.equals(propertyName)) {
             type = String.class;
-        }
-        else if (ROOTCAUSE.equals(propertyName))
-        {
+        } else if (ROOTCAUSE.equals(propertyName)) {
             type = Map.class;
         }
-        
+
         return type;
     }
 
-    public Object getValue(Object instance, String propertyName)
-    {
+    public Object getValue(Object instance, String propertyName) {
         Object value = null;
-        
-        if (CODE.equals(propertyName))
-        {
+
+        if (CODE.equals(propertyName)) {
             value = getCode(instance);
-        }
-        else if (CLASS.equals(propertyName))
-        {
+        } else if (CLASS.equals(propertyName)) {
             value = getType(instance);
-        }
-        else if (DESCRIPTION.equals(propertyName))
-        {
+        } else if (DESCRIPTION.equals(propertyName)) {
             value = getDescription(instance);
-        }
-        else if (DETAILS.equals(propertyName))
-        {
+        } else if (DETAILS.equals(propertyName)) {
             value = getDetails(instance);
-        }
-        else if (ROOTCAUSE.equals(propertyName))
-        {
+        } else if (ROOTCAUSE.equals(propertyName)) {
             value = getRootCause(instance);
         }
-        
+
         return value;
     }
 
-    public void setValue(Object instance, String propertyName, Object value)
-    {
+    public void setValue(Object instance, String propertyName, Object value) {
         return; // Throwable is essentially read-only
     }
 
-    private String getCode(Object ex)
-    {
+    private String getCode(Object ex) {
         String code = null;
-        if (ex instanceof MessageException)
-        {
-            code = ((MessageException)ex).getCode();
+        if (ex instanceof MessageException) {
+            code = ((MessageException) ex).getCode();
         }
 
-        if (code == null)
-        {
+        if (code == null) {
             code = "Server.Processing";
         }
 
         return code;
     }
 
-    private String getType(Object ex)
-    {
+    private String getType(Object ex) {
         String type = "";
-        if (ex != null && showStacktraces)
-        {
+        if (ex != null && showStacktraces) {
             type = ex.getClass().getName();
         }
         return type;
     }
 
-    private String getDescription(Object ex)
-    {
+    private String getDescription(Object ex) {
         String desc = null;
-        if (ex instanceof Throwable)
-        {
-            desc = ((Throwable)ex).getMessage();
+        if (ex instanceof Throwable) {
+            desc = ((Throwable) ex).getMessage();
         }
 
         return desc;
     }
-    
-    private String getDetails(Object ex)
-    {
+
+    private String getDetails(Object ex) {
         StringBuffer details = new StringBuffer();
-        if (ex instanceof MessageException)
-        {
-            MessageException e = (MessageException)ex;
+        if (ex instanceof MessageException) {
+            MessageException e = (MessageException) ex;
             if (e.getDetails() != null)
                 details.append(e.getDetails());
         }
-        
+
         if (showStacktraces && ex instanceof Throwable)
-            details.append(getTraceback((Throwable)ex));
+            details.append(getTraceback((Throwable) ex));
 
         return details.toString();
     }
-    
-    private Throwable getRootCauseException(Object ex)
-    {
-    	if (ex == null)
-    		return null;
 
-    	if (ex instanceof ServletException)
-    	{
-    		ex = ((ServletException)ex).getRootCause();
-    	}
+    private Throwable getRootCauseException(Object ex) {
+        if (ex == null)
+            return null;
 
-    	if (ex instanceof Throwable)
-    		return ((Throwable)ex).getCause();
-    	else
-    		return null;
+        if (ex instanceof ServletException) {
+            ex = ((ServletException) ex).getRootCause();
+        }
+
+        if (ex instanceof Throwable)
+            return ((Throwable) ex).getCause();
+        else
+            return null;
     }
 
-    private Map getRootCause(Object ex)
-    {
-    	Throwable t = getRootCauseException(ex);
+    private Map getRootCause(Object ex) {
+        Throwable t = getRootCauseException(ex);
 
-    	if (t != null)
-    		return getExceptionInfo(t);
-    	else
-    		return null;
+        if (t != null)
+            return getExceptionInfo(t);
+        else
+            return null;
     }
 
-    private Map getExceptionInfo(Throwable t)
-    {
+    private Map getExceptionInfo(Throwable t) {
         Map info = new HashMap();
         info.put(CODE, getCode(t));
         info.put(CLASS, getType(t));
@@ -276,12 +236,10 @@
         return info;
     }
 
-    private static String getTraceback(Throwable e)
-    {
+    private static String getTraceback(Throwable e) {
         String trace = "";
 
-        if (e != null)
-        {
+        if (e != null) {
             ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
             PrintWriter pr = new PrintWriter(outputStream);
             pr.println();
diff --git a/core/src/main/java/flex/messaging/io/ThrowableProxy.java b/core/src/main/java/flex/messaging/io/ThrowableProxy.java
index f5285dc..be74e50 100644
--- a/core/src/main/java/flex/messaging/io/ThrowableProxy.java
+++ b/core/src/main/java/flex/messaging/io/ThrowableProxy.java
@@ -20,18 +20,15 @@
  * Throwable instances are treated as a special type of Bean as
  * usually properties are read only but need to be serialized.
  */
-public class ThrowableProxy extends BeanProxy
-{
+public class ThrowableProxy extends BeanProxy {
     static final long serialVersionUID = 6363249716988887262L;
 
-    public ThrowableProxy()
-    {
+    public ThrowableProxy() {
         super();
         setIncludeReadOnly(true);
     }
-    
-    public ThrowableProxy(Throwable defaultInstance)
-    {
+
+    public ThrowableProxy(Throwable defaultInstance) {
         super(defaultInstance);
         setIncludeReadOnly(true);
     }
diff --git a/core/src/main/java/flex/messaging/io/TypeMarshaller.java b/core/src/main/java/flex/messaging/io/TypeMarshaller.java
index ceb5dfa..2866db8 100644
--- a/core/src/main/java/flex/messaging/io/TypeMarshaller.java
+++ b/core/src/main/java/flex/messaging/io/TypeMarshaller.java
@@ -20,12 +20,11 @@
  * A utility to convert between data types, useful for mapping
  * loosely typed client classes to more strongly typed server classes.
  */
-public interface TypeMarshaller
-{
+public interface TypeMarshaller {
     /**
      * Creates an instance of the desired class without populating the type.
-     * 
-     * @param source The raw <tt>Object</tt> to be converted into an instance of the desired class.
+     *
+     * @param source       The raw <tt>Object</tt> to be converted into an instance of the desired class.
      * @param desiredClass The type to which the source needs to be converted.
      * @return An instance of the desired class.
      */
@@ -33,8 +32,8 @@
 
     /**
      * Converts the supplied source instance to an instance of the desired <tt>Class</tt>.
-     * 
-     * @param source The source instance.
+     *
+     * @param source       The source instance.
      * @param desiredClass The type to which the source needs to be converted.
      * @return The converted instance of the desired class.
      */
diff --git a/core/src/main/java/flex/messaging/io/TypeMarshallingContext.java b/core/src/main/java/flex/messaging/io/TypeMarshallingContext.java
index 7a505a0..1c371cb 100644
--- a/core/src/main/java/flex/messaging/io/TypeMarshallingContext.java
+++ b/core/src/main/java/flex/messaging/io/TypeMarshallingContext.java
@@ -27,8 +27,7 @@
 /**
  * A simple context to hold type marshalling specific settings.
  */
-public class TypeMarshallingContext
-{
+public class TypeMarshallingContext {
     private static ThreadLocal<TypeMarshallingContext> contexts = new ThreadLocal<TypeMarshallingContext>();
     private static ThreadLocal<TypeMarshaller> marshallers = new ThreadLocal<TypeMarshaller>();
     private IdentityHashMap knownObjects;
@@ -37,17 +36,16 @@
     /**
      * Constructs a default type marshalling context.
      */
-    public TypeMarshallingContext()
-    {
+    public TypeMarshallingContext() {
     }
 
     /**
      * Establishes a TypeMarshallingContext for the current thread.
      * Users are not expected to call this function.
+     *
      * @param context The current TypeMarshallingContext.
      */
-    public static void setTypeMarshallingContext(TypeMarshallingContext context)
-    {
+    public static void setTypeMarshallingContext(TypeMarshallingContext context) {
         if (context == null)
             contexts.remove();
         else
@@ -56,13 +54,12 @@
 
     /**
      * Get current TypeMarshallingContext object
+     *
      * @return The current thread's TypeMarshallingContext.
      */
-    public static TypeMarshallingContext getTypeMarshallingContext()
-    {
+    public static TypeMarshallingContext getTypeMarshallingContext() {
         TypeMarshallingContext context = contexts.get();
-        if (context == null)
-        {
+        if (context == null) {
             context = new TypeMarshallingContext();
             TypeMarshallingContext.setTypeMarshallingContext(context);
         }
@@ -72,11 +69,10 @@
     /**
      * Establishes a TypeMarshallingContext for the current thread.
      * Users are not expected to call this function.
-     * 
+     *
      * @param marshaller The current TypeMarshaller.
      */
-    public static void setTypeMarshaller(TypeMarshaller marshaller)
-    {
+    public static void setTypeMarshaller(TypeMarshaller marshaller) {
         if (marshaller == null)
             marshallers.remove();
         else
@@ -85,36 +81,33 @@
 
     /**
      * Get current TypeMarshaller.
+     *
      * @return The current thread's TypeMarshaller.
      */
-    public static TypeMarshaller getTypeMarshaller()
-    {
+    public static TypeMarshaller getTypeMarshaller() {
         TypeMarshaller marshaller = marshallers.get();
-        if (marshaller == null)
-        {
+        if (marshaller == null) {
             marshaller = new ASTranslator();
             setTypeMarshaller(marshaller);
         }
 
-        return marshaller; 
+        return marshaller;
     }
 
     /**
      * Returns the custom ClassLoader for this type marshalling session, or
      * defaults to the current MessageBroker's ClassLoader if none has been set.
+     *
      * @return ClassLoader the ClassLoader in use
      */
-    public ClassLoader getClassLoader()
-    {
+    public ClassLoader getClassLoader() {
         if (classLoader != null)
             return classLoader;
 
-        try
-        {
+        try {
             MessageBroker messageBroker = FlexContext.getMessageBroker();
-            return messageBroker != null? messageBroker.getClassLoader() : null;
-        }
-        catch (NoClassDefFoundError exception) // Could happen in client mode.
+            return messageBroker != null ? messageBroker.getClassLoader() : null;
+        } catch (NoClassDefFoundError exception) // Could happen in client mode.
         {
             return null;
         }
@@ -123,20 +116,20 @@
     /**
      * Sets a custom classloader for this type marshalling session that will
      * be used to create new instances of strongly typed objects.
+     *
      * @param loader the ClassLoader to use
      */
-    public void setClassLoader(ClassLoader loader)
-    {
+    public void setClassLoader(ClassLoader loader) {
         classLoader = loader;
     }
 
     /**
      * A map of known objects already encountered in this type marshalling
      * session.
+     *
      * @return IdentityHashMap the known objects
      */
-    public IdentityHashMap getKnownObjects()
-    {
+    public IdentityHashMap getKnownObjects() {
         if (knownObjects == null)
             knownObjects = new IdentityHashMap(64);
 
@@ -146,18 +139,17 @@
     /**
      * Sets the list of the objects already encountered for this type
      * marshalling session.
+     *
      * @param knownObjects the IdentityHashMap object
      */
-    public void setKnownObjects(IdentityHashMap knownObjects)
-    {
+    public void setKnownObjects(IdentityHashMap knownObjects) {
         this.knownObjects = knownObjects;
     }
 
     /**
      * Resets the list of known objects.
      */
-    public void reset()
-    {
+    public void reset() {
         if (knownObjects != null)
             knownObjects.clear();
     }
@@ -166,32 +158,28 @@
      * A utility method to determine whether an anonymous type specifies
      * a strong type name, such as ASObject.getType() or the legacy Flash
      * Remoting convention of using a _remoteClass property.
+     *
      * @param obj the object to check
      * @return The name of the strong type, or null if none was specified.
      */
-    public static String getType(Object obj)
-    {
+    public static String getType(Object obj) {
         String type = null;
 
-        if (obj != null && obj instanceof Map)
-        {
-            Map map = (Map)obj;
+        if (obj != null && obj instanceof Map) {
+            Map map = (Map) obj;
 
             //Check for an Object.registerClass Typed ASObject
-            if (map instanceof ASObject)
-            {
-                ASObject aso = (ASObject)map;
+            if (map instanceof ASObject) {
+                ASObject aso = (ASObject) map;
                 type = aso.getType();
             }
 
             SerializationContext sc = SerializationContext.getSerializationContext();
-            
-            if (type == null && sc.supportRemoteClass)
-            {
+
+            if (type == null && sc.supportRemoteClass) {
                 Object registerClass = map.get(MessageIOConstants.REMOTE_CLASS_FIELD);
-                if (registerClass != null && registerClass instanceof String)
-                {
-                    type = (String)registerClass;
+                if (registerClass != null && registerClass instanceof String) {
+                    type = (String) registerClass;
                 }
             }
         }
@@ -202,37 +190,30 @@
     /**
      * Clears out the thread local state after the request completes.
      */
-    public static void clearThreadLocalObjects()
-    {
-        if (contexts != null)
-        {
+    public static void clearThreadLocalObjects() {
+        if (contexts != null) {
             contexts.remove();
         }
-        if (marshallers != null)
-        {
+        if (marshallers != null) {
             marshallers.remove();
         }
     }
 
     /**
-     *
      * Destroy static thread local storage.
      * Call ONLY on shutdown.
      */
-    public static void releaseThreadLocalObjects()
-    {
+    public static void releaseThreadLocalObjects() {
         clearThreadLocalObjects();
-        
+
         contexts = null;
         marshallers = null;
     }
 
     /**
-     *
      * Create static thread local storage.
      */
-    public static void createThreadLocalObjects()
-    {
+    public static void createThreadLocalObjects() {
         if (contexts == null)
             contexts = new ThreadLocal();
         if (marshallers == null)
diff --git a/core/src/main/java/flex/messaging/io/UnknownTypeException.java b/core/src/main/java/flex/messaging/io/UnknownTypeException.java
index 9788b41..199db6c 100644
--- a/core/src/main/java/flex/messaging/io/UnknownTypeException.java
+++ b/core/src/main/java/flex/messaging/io/UnknownTypeException.java
@@ -19,12 +19,10 @@
 /**
  *
  */
-public class UnknownTypeException extends SerializationException
-{
+public class UnknownTypeException extends SerializationException {
     static final long serialVersionUID = 8407391043989798441L;
 
-    public UnknownTypeException()
-    {
+    public UnknownTypeException() {
         super();
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/ASObject.java b/core/src/main/java/flex/messaging/io/amf/ASObject.java
index 06279e5..9958ae0 100644
--- a/core/src/main/java/flex/messaging/io/amf/ASObject.java
+++ b/core/src/main/java/flex/messaging/io/amf/ASObject.java
@@ -20,59 +20,47 @@
 import java.util.Iterator;
 import java.util.Map;
 
-public class ASObject extends HashMap
-{
+public class ASObject extends HashMap {
     static final long serialVersionUID = 1613529666682805692L;
     private boolean inHashCode = false;
     private boolean inToString = false;
 
     String namedType = null;
 
-    public ASObject()
-    {
+    public ASObject() {
         super();
     }
 
-    public ASObject(String name)
-    {
+    public ASObject(String name) {
         super();
         namedType = name;
     }
 
-    public String getType()
-    {
+    public String getType() {
         return namedType;
     }
 
-    public void setType(String type)
-    {
+    public void setType(String type) {
         namedType = type;
     }
 
-    public int hashCode()
-    {
+    public int hashCode() {
         int h = 0;
-        if (!inHashCode)
-        {
+        if (!inHashCode) {
             inHashCode = true;
-            try
-            {
+            try {
                 Iterator i = entrySet().iterator();
-                while (i.hasNext())
-                {
+                while (i.hasNext()) {
                     h += i.next().hashCode();
                 }
-            }
-            finally
-            {
+            } finally {
                 inHashCode = false;
             }
         }
         return h;
     }
 
-    public String toString()
-    {
+    public String toString() {
         String className = getClass().getName();
         int dotIndex = className.lastIndexOf('.');
 
@@ -80,32 +68,24 @@
         buffer.append(className.substring(dotIndex + 1));
         buffer.append('(').append(System.identityHashCode(this)).append(')');
         buffer.append('{');
-        if (!inToString)
-        {
+        if (!inToString) {
             inToString = true;
-            try
-            {
+            try {
                 boolean pairEmitted = false;
 
                 Iterator i = entrySet().iterator();
-                while (i.hasNext())
-                {
-                    if (pairEmitted)
-                    {
+                while (i.hasNext()) {
+                    if (pairEmitted) {
                         buffer.append(", ");
                     }
                     Map.Entry e = (Map.Entry) (i.next());
                     buffer.append(e.getKey()).append('=').append(e.getValue());
                     pairEmitted = true;
                 }
-            }
-            finally
-            {
+            } finally {
                 inToString = false;
             }
-        }
-        else
-        {
+        } else {
             buffer.append("...");
         }
         buffer.append('}');
diff --git a/core/src/main/java/flex/messaging/io/amf/AbstractAmfInput.java b/core/src/main/java/flex/messaging/io/amf/AbstractAmfInput.java
index a62a546..db130b3 100644
--- a/core/src/main/java/flex/messaging/io/amf/AbstractAmfInput.java
+++ b/core/src/main/java/flex/messaging/io/amf/AbstractAmfInput.java
@@ -35,10 +35,8 @@
  * A deserializer of AMF protocol data.
  *
  * @see ActionMessageOutput
- *
  */
-public abstract class AbstractAmfInput extends AmfIO implements ActionMessageInput
-{
+public abstract class AbstractAmfInput extends AmfIO implements ActionMessageInput {
     /**
      * This is the initial capacity that will be used for AMF arrays, vectors, etc.
      * that have length greater than 1024.
@@ -57,10 +55,10 @@
 
     /**
      * Construct a deserializer without connecting it to an input stream.
+     *
      * @param context serialization parameters.
      */
-    public AbstractAmfInput(SerializationContext context)
-    {
+    public AbstractAmfInput(SerializationContext context) {
         super(context);
 
         readMaxStringBytes();
@@ -68,15 +66,12 @@
 
     /**
      * Internal use
-     *
      */
-    public void setInputStream(InputStream in)
-    {
+    public void setInputStream(InputStream in) {
         this.in = new DataInputStream(in);
     }
 
-    protected Object stringToDocument(String xml)
-    {
+    protected Object stringToDocument(String xml) {
         // FIXME: Temporary workaround for bug 194815
         if (xml != null && xml.indexOf('<') == -1)
             return xml;
@@ -94,13 +89,11 @@
      * @param utflen The UTF string length to check.
      * @throws <tt>SerializationException</tt> if max-string-bytes has been exceeded.
      */
-    protected void checkUTFLength(int utflen)
-    {
-        if (utflen > maxStringBytes)
-        {
+    protected void checkUTFLength(int utflen) {
+        if (utflen > maxStringBytes) {
             // Error deserializing the string with length ''{0}'', it exceeds the max-string-bytes limit of ''{1}''.
             SerializationException ex = new SerializationException();
-            ex.setMessage(10314, new Object[] {utflen, maxStringBytes});
+            ex.setMessage(10314, new Object[]{utflen, maxStringBytes});
             throw ex;
         }
     }
@@ -112,20 +105,18 @@
      * registering a property proxy and instantiating an instance of the desired class.
      * The params array is used as a holder for parameter values that are updated or
      * created in this method, but are needed by its callers.
+     *
      * @param params array of values that may be updated by this method.
      *               [0] - String className - the name or alias of the class to create
      *               [1] - PropertyProxy proxy
      * @return an instance of the appropriate object for deserialization
-     *
      */
-    protected Object createObjectInstance(Object[] params)
-    {
-        String className = (String)params[0];
+    protected Object createObjectInstance(Object[] params) {
+        String className = (String) params[0];
 
         // Check for any registered class aliases
         String aliasedClass = ClassAliasRegistry.getRegistry().getClassName(className);
-        if (aliasedClass != null)
-        {
+        if (aliasedClass != null) {
             className = aliasedClass;
             params[0] = className; //update the params array so that callers get this change
         }
@@ -136,36 +127,26 @@
         if (className != null && className.startsWith(">")) // Handle [RemoteClass] (no server alias)
         {
             object = createDefaultASObject(className);
-        }
-        else if (className != null && className.length() > 0 && (context.instantiateTypes || className.startsWith("flex.")))
-        {
+        } else if (className != null && className.length() > 0 && (context.instantiateTypes || className.startsWith("flex."))) {
             // otherwise attempt to create an instance if we have a className
             Class<?> desiredClass = null;
-            try
-            {
+            try {
                 desiredClass = AbstractProxy.getClassFromClassName(className);
-            }
-            catch (MessageException me)
-            {
+            } catch (MessageException me) {
                 // Type not found and don't want to use ASObject for the missing type.
                 if (!(me.getCode().startsWith(MessageException.CODE_SERVER_RESOURCE_UNAVAILABLE)
-                        && context.createASObjectForMissingType))
-                {
+                        && context.createASObjectForMissingType)) {
                     throw me; // Rethrow.
                 }
                 // if we didn't rethrow the exception, the default ASObject will be created further down.
             }
 
             // Type exists. Create either default instance of desiredClass or an instance from a registered proxy.
-            if (desiredClass != null)
-            {
+            if (desiredClass != null) {
                 proxy = PropertyProxyRegistry.getRegistry().getProxyAndRegister(desiredClass);
-                if (proxy == null)
-                {
+                if (proxy == null) {
                     object = ClassUtil.createDefaultInstance(desiredClass, null, true /*validate*/);
-                }
-                else
-                {
+                } else {
                     object = proxy.createInstance(className); // Validation is performed in the proxy.
                 }
             }
@@ -186,12 +167,11 @@
 
     /**
      * Internal use. Convenience method for creating an ASObject and assigning it a type
+     *
      * @param type named type for the ASObject or null
      * @return a new instance of ASObject
-     *
      */
-    protected ASObject createDefaultASObject(String type)
-    {
+    protected ASObject createDefaultASObject(String type) {
         ASObject object = (ASObject) ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
         if (type != null && type.length() > 0)
             object.setType(type);
@@ -201,28 +181,21 @@
     /**
      *
      */
-    protected void readMaxStringBytes()
-    {
+    protected void readMaxStringBytes() {
         // See if a JVM option is specified for max-string-bytes.
         String maxStringBytes = null;
-        try
-        {
+        try {
             maxStringBytes = System.getProperty(STRING_MAX_STRING_BYTES);
-        }
-        catch (SecurityException se)
-        {
+        } catch (SecurityException se) {
             // Ignore and use the default.
         }
 
         if (maxStringBytes == null)
             return;
 
-        try
-        {
+        try {
             this.maxStringBytes = Integer.parseInt(maxStringBytes);
-        }
-        catch (NumberFormatException ignore)
-        {
+        } catch (NumberFormatException ignore) {
             // Ignore and use the default.
         }
     }
@@ -231,45 +204,52 @@
     // java.io.ObjectInput IMPLEMENTATIONS
     //
 
-    /** {@inheritDoc} */
-    public int available() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public int available() throws IOException {
         return in.available();
     }
 
-    /** {@inheritDoc} */
-    public void close() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void close() throws IOException {
         in.close();
     }
 
-    /** {@inheritDoc} */
-    public int read() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public int read() throws IOException {
         return in.read();
     }
 
-    /** {@inheritDoc} */
-    public int read(byte[] bytes) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public int read(byte[] bytes) throws IOException {
         return in.read(bytes);
     }
 
-    /** {@inheritDoc} */
-    public int read(byte[] bytes, int offset, int length) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public int read(byte[] bytes, int offset, int length) throws IOException {
         return in.read(bytes, offset, length);
     }
 
-    /** {@inheritDoc} */
-    public long skip(long n) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public long skip(long n) throws IOException {
         return in.skip(n);
     }
 
-    /** {@inheritDoc} */
-    public int skipBytes(int n) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public int skipBytes(int n) throws IOException {
         return in.skipBytes(n);
     }
 
@@ -277,90 +257,103 @@
     // java.io.DataInput IMPLEMENTATIONS
     //
 
-    /** {@inheritDoc} */
-    public boolean readBoolean() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean readBoolean() throws IOException {
         return in.readBoolean();
     }
 
-    /** {@inheritDoc} */
-    public byte readByte() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public byte readByte() throws IOException {
         return in.readByte();
     }
 
-    /** {@inheritDoc} */
-    public char readChar() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public char readChar() throws IOException {
         return in.readChar();
     }
 
-    /** {@inheritDoc} */
-    public double readDouble() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public double readDouble() throws IOException {
         return in.readDouble();
     }
 
-    /** {@inheritDoc} */
-    public float readFloat() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public float readFloat() throws IOException {
         return in.readFloat();
     }
 
-    /** {@inheritDoc} */
-    public void readFully(byte[] bytes) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void readFully(byte[] bytes) throws IOException {
         in.readFully(bytes);
     }
 
-    /** {@inheritDoc} */
-    public void readFully(byte[] bytes, int offset, int length) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void readFully(byte[] bytes, int offset, int length) throws IOException {
         in.readFully(bytes, offset, length);
     }
 
-    /** {@inheritDoc} */
-    public int readInt() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public int readInt() throws IOException {
         return in.readInt();
     }
 
     /**
-     *  Reads the next line of text from the input stream.
+     * Reads the next line of text from the input stream.
+     *
      * @deprecated
      */
-    public String readLine() throws IOException
-    {
+    public String readLine() throws IOException {
         return in.readLine();
     }
 
-    /** {@inheritDoc} */
-    public long readLong() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public long readLong() throws IOException {
         return in.readLong();
     }
 
-    /** {@inheritDoc} */
-    public short readShort() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public short readShort() throws IOException {
         return in.readShort();
     }
 
-    /** {@inheritDoc} */
-    public int readUnsignedByte() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public int readUnsignedByte() throws IOException {
         return in.readUnsignedByte();
     }
 
-    /** {@inheritDoc} */
-    public int readUnsignedShort() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public int readUnsignedShort() throws IOException {
         return in.readUnsignedShort();
     }
 
-    /** {@inheritDoc} */
-    public String readUTF() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String readUTF() throws IOException {
         return in.readUTF();
     }
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/io/amf/AbstractAmfOutput.java b/core/src/main/java/flex/messaging/io/amf/AbstractAmfOutput.java
index 0a3fb4f..7a6fe85 100644
--- a/core/src/main/java/flex/messaging/io/amf/AbstractAmfOutput.java
+++ b/core/src/main/java/flex/messaging/io/amf/AbstractAmfOutput.java
@@ -29,10 +29,8 @@
  * An abstract serializer of AMF protocol data.
  *
  * @see ActionMessageOutput
- *
  */
-public abstract class AbstractAmfOutput extends AmfIO implements ActionMessageOutput
-{
+public abstract class AbstractAmfOutput extends AmfIO implements ActionMessageOutput {
     /**
      *
      */
@@ -40,10 +38,10 @@
 
     /**
      * Construct a serializer without connecting it to an output stream.
+     *
      * @param context serialization parameters
      */
-    public AbstractAmfOutput(SerializationContext context)
-    {
+    public AbstractAmfOutput(SerializationContext context) {
         super(context);
     }
 
@@ -52,55 +50,55 @@
      *
      * @param out DataOutputStream to use
      */
-    public void setOutputStream(OutputStream out)
-    {
-        if (out instanceof DataOutputStream)
-        {
+    public void setOutputStream(OutputStream out) {
+        if (out instanceof DataOutputStream) {
             this.out = (DataOutputStream) out;
-        }
-        else
-        {
+        } else {
             this.out = new DataOutputStream(out);
         }
         reset();
     }
 
-    protected String documentToString(Object value) throws IOException
-    {
-        return XMLUtil.documentToString((Document)value);
+    protected String documentToString(Object value) throws IOException {
+        return XMLUtil.documentToString((Document) value);
     }
 
     //
     // java.io.ObjectOutput implementations
     //
 
-    /** {@inheritDoc} */
-    public void close() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void close() throws IOException {
         out.close();
     }
 
-    /** {@inheritDoc} */
-    public void flush() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void flush() throws IOException {
         out.flush();
     }
 
-    /** {@inheritDoc} */
-    public void write(int b) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void write(int b) throws IOException {
         out.write(b);
     }
 
-    /** {@inheritDoc} */
-    public void write(byte bytes[]) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void write(byte bytes[]) throws IOException {
         out.write(bytes);
     }
 
-    /** {@inheritDoc} */
-    public void write(byte bytes[], int offset, int length) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void write(byte bytes[], int offset, int length) throws IOException {
         out.write(bytes, offset, length);
     }
 
@@ -109,69 +107,80 @@
     // java.io.DataOutput implementations
     //
 
-    /** {@inheritDoc} */
-    public void writeBoolean(boolean v) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeBoolean(boolean v) throws IOException {
         out.writeBoolean(v);
     }
 
-    /** {@inheritDoc} */
-    public void writeByte(int v) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeByte(int v) throws IOException {
         out.writeByte(v);
     }
 
-    /** {@inheritDoc} */
-    public void writeBytes(String s) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeBytes(String s) throws IOException {
         out.writeBytes(s);
     }
 
-    /** {@inheritDoc} */
-    public void writeChar(int v) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeChar(int v) throws IOException {
         out.writeChar(v);
     }
 
-    /** {@inheritDoc} */
-    public void writeChars(String s) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeChars(String s) throws IOException {
         out.writeChars(s);
     }
 
-    /** {@inheritDoc} */
-    public void writeDouble(double v) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeDouble(double v) throws IOException {
         out.writeDouble(v);
     }
 
-    /** {@inheritDoc} */
-    public void writeFloat(float v) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeFloat(float v) throws IOException {
         out.writeFloat(v);
     }
 
-    /** {@inheritDoc} */
-    public void writeInt(int v) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeInt(int v) throws IOException {
         out.writeInt(v);
     }
 
-    /** {@inheritDoc} */
-    public void writeLong(long v) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeLong(long v) throws IOException {
         out.writeLong(v);
     }
 
-    /** {@inheritDoc} */
-    public void writeShort(int v) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeShort(int v) throws IOException {
         out.writeShort(v);
     }
 
-    /** {@inheritDoc} */
-    public void writeUTF(String s) throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void writeUTF(String s) throws IOException {
         out.writeUTF(s);
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/ActionContext.java b/core/src/main/java/flex/messaging/io/amf/ActionContext.java
index 3b7d2a5..25725a8 100644
--- a/core/src/main/java/flex/messaging/io/amf/ActionContext.java
+++ b/core/src/main/java/flex/messaging/io/amf/ActionContext.java
@@ -24,10 +24,8 @@
 
 /**
  * A context for reading and writing messages.
- *
  */
-public class ActionContext implements Serializable
-{
+public class ActionContext implements Serializable {
     static final long serialVersionUID = 2300156738426801921L;
     private int messageNumber;
     private ActionMessage requestMessage;
@@ -42,195 +40,158 @@
     public boolean isDebug;
 
     /**
-     *
      * Performance metrics related field, keeps track of bytes deserialized using this context
      */
     private int deserializedBytes;
 
     /**
-     *
      * Performance metrics related field, keeps track of bytes serialized using this context
      */
     private int serializedBytes;
 
     /**
-     *
      * Performance metrics related field, recordMessageSizes flag
      */
     private boolean recordMessageSizes;
 
     /**
-     *
      * Performance metrics related field, recordMessageTimes flag
      */
     private boolean recordMessageTimes;
 
     /**
-     *
      * Performance metrics related field, incoming MPI object, will only be populated when one of
      * the record-message-* params is enabled
      */
     private MessagePerformanceInfo mpii;
 
     /**
-     *
      * Performance metrics related field, outgoing MPI object, will only be populated when one of
      * the record-message-* params is enabled
      */
     private MessagePerformanceInfo mpio;
 
-    public ActionContext()
-    {
+    public ActionContext() {
         status = MessageIOConstants.STATUS_OK;
     }
 
-    public boolean isLegacy()
-    {
+    public boolean isLegacy() {
         return legacy;
     }
 
-    public void setLegacy(boolean legacy)
-    {
+    public void setLegacy(boolean legacy) {
         this.legacy = legacy;
     }
 
-    public int getMessageNumber()
-    {
+    public int getMessageNumber() {
         return messageNumber;
     }
 
-    public void setMessageNumber(int messageNumber)
-    {
+    public void setMessageNumber(int messageNumber) {
         this.messageNumber = messageNumber;
     }
 
-    public MessageBody getRequestMessageBody()
-    {
+    public MessageBody getRequestMessageBody() {
         return requestMessage.getBody(messageNumber);
     }
 
-    public ActionMessage getRequestMessage()
-    {
+    public ActionMessage getRequestMessage() {
         return requestMessage;
     }
 
-    public void setRequestMessage(ActionMessage requestMessage)
-    {
+    public void setRequestMessage(ActionMessage requestMessage) {
         this.requestMessage = requestMessage;
     }
 
-    public ActionMessage getResponseMessage()
-    {
+    public ActionMessage getResponseMessage() {
         return responseMessage;
     }
 
-    public MessageBody getResponseMessageBody()
-    {
+    public MessageBody getResponseMessageBody() {
         return responseMessage.getBody(messageNumber);
     }
 
-    public void setResponseMessage(ActionMessage responseMessage)
-    {
+    public void setResponseMessage(ActionMessage responseMessage) {
         this.responseMessage = responseMessage;
     }
 
-    public void setResponseOutput(ByteArrayOutputStream out)
-    {
+    public void setResponseOutput(ByteArrayOutputStream out) {
         outBuffer = out;
     }
 
-    public ByteArrayOutputStream getResponseOutput()
-    {
+    public ByteArrayOutputStream getResponseOutput() {
         return outBuffer;
     }
 
-    public int getStatus()
-    {
+    public int getStatus() {
         return status;
     }
 
-    public void setStatus(int status)
-    {
+    public void setStatus(int status) {
         this.status = status;
     }
 
-    public void setVersion(int v)
-    {
+    public void setVersion(int v) {
         version = v;
     }
 
-    public int getVersion()
-    {
+    public int getVersion() {
         return version;
     }
 
-    public void incrementMessageNumber()
-    {
+    public void incrementMessageNumber() {
         messageNumber++;
     }
 
-    public int getDeserializedBytes()
-    {
+    public int getDeserializedBytes() {
         return deserializedBytes;
     }
 
-    public void setDeserializedBytes(int deserializedBytes)
-    {
+    public void setDeserializedBytes(int deserializedBytes) {
         this.deserializedBytes = deserializedBytes;
     }
 
-    public int getSerializedBytes()
-    {
+    public int getSerializedBytes() {
         return serializedBytes;
     }
 
-    public void setSerializedBytes(int serializedBytes)
-    {
+    public void setSerializedBytes(int serializedBytes) {
         this.serializedBytes = serializedBytes;
     }
 
-    public MessagePerformanceInfo getMPII()
-    {
+    public MessagePerformanceInfo getMPII() {
         return mpii;
     }
 
-    public void setMPII(MessagePerformanceInfo mpii)
-    {
+    public void setMPII(MessagePerformanceInfo mpii) {
         this.mpii = mpii;
     }
 
-    public MessagePerformanceInfo getMPIO()
-    {
+    public MessagePerformanceInfo getMPIO() {
         return mpio;
     }
 
-    public void setMPIO(MessagePerformanceInfo mpio)
-    {
+    public void setMPIO(MessagePerformanceInfo mpio) {
         this.mpio = mpio;
     }
 
-    public boolean isRecordMessageSizes()
-    {
+    public boolean isRecordMessageSizes() {
         return recordMessageSizes;
     }
 
-    public void setRecordMessageSizes(boolean recordMessageSizes)
-    {
+    public void setRecordMessageSizes(boolean recordMessageSizes) {
         this.recordMessageSizes = recordMessageSizes;
     }
 
-    public boolean isRecordMessageTimes()
-    {
+    public boolean isRecordMessageTimes() {
         return recordMessageTimes;
     }
 
-    public boolean isMPIenabled()
-    {
+    public boolean isMPIenabled() {
         return recordMessageTimes || recordMessageSizes;
     }
 
-    public void setRecordMessageTimes(boolean recordMessageTimes)
-    {
+    public void setRecordMessageTimes(boolean recordMessageTimes) {
         this.recordMessageTimes = recordMessageTimes;
     }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/ActionMessage.java b/core/src/main/java/flex/messaging/io/amf/ActionMessage.java
index 8d30a87..76cf6a9 100644
--- a/core/src/main/java/flex/messaging/io/amf/ActionMessage.java
+++ b/core/src/main/java/flex/messaging/io/amf/ActionMessage.java
@@ -20,8 +20,7 @@
 import java.util.ArrayList;
 
 
-public class ActionMessage implements Serializable
-{
+public class ActionMessage implements Serializable {
     static final long serialVersionUID = 7970778672727624188L;
 
     public static final int CURRENT_VERSION = 3;
@@ -33,74 +32,62 @@
     private ArrayList bodies = null;
 
 
-    public ActionMessage()
-    {
+    public ActionMessage() {
         version = CURRENT_VERSION;
         headers = new ArrayList();
         bodies = new ArrayList();
     }
 
 
-    public ActionMessage(int version)
-    {
+    public ActionMessage(int version) {
         this.version = version;
         headers = new ArrayList();
         bodies = new ArrayList();
     }
 
 
-    public int getVersion()
-    {
+    public int getVersion() {
         return version;
     }
 
-    public void setVersion(int version)
-    {
+    public void setVersion(int version) {
         this.version = version;
     }
 
 
-    public int getHeaderCount()
-    {
+    public int getHeaderCount() {
         return headers.size();
     }
 
 
-    public MessageHeader getHeader(int pos)
-    {
-        return (MessageHeader)headers.get(pos);
+    public MessageHeader getHeader(int pos) {
+        return (MessageHeader) headers.get(pos);
     }
 
-    public ArrayList getHeaders()
-    {
+    public ArrayList getHeaders() {
         return headers;
     }
 
-    public void addHeader(MessageHeader h)
-    {
+    public void addHeader(MessageHeader h) {
         headers.add(h);
     }
 
 
-    public int getBodyCount()
-    {
+    public int getBodyCount() {
         return bodies.size();
     }
 
 
-    public MessageBody getBody(int pos)
-    {
-        return (MessageBody)bodies.get(pos);
+    public MessageBody getBody(int pos) {
+        return (MessageBody) bodies.get(pos);
     }
 
 
-    public ArrayList getBodies()
-    {
+    public ArrayList getBodies() {
         return bodies;
     }
 
-    public void addBody(MessageBody b)
-    {
+    public void addBody(MessageBody b) {
         bodies.add(b);
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/ActionMessageInput.java b/core/src/main/java/flex/messaging/io/amf/ActionMessageInput.java
index 8d8ecd3..f0477e4 100644
--- a/core/src/main/java/flex/messaging/io/amf/ActionMessageInput.java
+++ b/core/src/main/java/flex/messaging/io/amf/ActionMessageInput.java
@@ -23,22 +23,20 @@
 /**
  * This simple interface allows the MessageDeserializer to
  * handle multiple versions of AMF.
- *
+ * <p>
  * Entry point for deserializing an individual ActionMessage
  * request message for AMF, AMFX or RTMP.
  *
  * @see flex.messaging.io.amf.Amf0Input Classic Version 0 Deserializer
  * @see flex.messaging.io.amf.Amf3Input AVM+ Version 3 Deserializer
- *
  * @see flex.messaging.io.amf.ActionMessageOutput The serialization equivalent
  */
-public interface ActionMessageInput extends ObjectInput
-{
+public interface ActionMessageInput extends ObjectInput {
     // java.io.ObjectInput METHODS
 
     /**
      * Reads in an AMF formatted Object.
-     * 
+     *
      * <p>
      * The following is a guide to the ActionScript to Java type mappings:
      * <table cellpadding="2" cellspacing="2" border="1">
@@ -85,19 +83,16 @@
 
     /**
      * Internal use only.
-     *
      */
     void setInputStream(InputStream in);
 
     /**
      * Internal use only.
-     *
      */
     void setDebugTrace(AmfTrace trace);
 
     /**
      * Internal use only.
-     *
      */
     void reset();
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/ActionMessageOutput.java b/core/src/main/java/flex/messaging/io/amf/ActionMessageOutput.java
index 7b319af..b699326 100644
--- a/core/src/main/java/flex/messaging/io/amf/ActionMessageOutput.java
+++ b/core/src/main/java/flex/messaging/io/amf/ActionMessageOutput.java
@@ -26,11 +26,9 @@
  *
  * @see flex.messaging.io.amf.Amf0Input Classic Version 0 Deserializer
  * @see flex.messaging.io.amf.Amf3Input AVM+ Version 3 Deserializer
- *
  * @see flex.messaging.io.amf.ActionMessageOutput The serialization equivalent
  */
-public interface ActionMessageOutput extends ObjectOutput
-{
+public interface ActionMessageOutput extends ObjectOutput {
     // java.io.ObjectOutput METHODS
 
     /**
@@ -68,25 +66,22 @@
      * </p>
      *
      * @param object the Object to be written
-     * @throws IOException  if an I/O error occurs
+     * @throws IOException if an I/O error occurs
      */
     void writeObject(Object object) throws IOException;
 
     /**
      * Internal use only.
-     *
      */
     void writeObjectTraits(TraitsInfo traits) throws IOException;
 
     /**
      * Internal use only.
-     *
      */
     void writeObjectProperty(String name, Object value) throws IOException;
 
     /**
      * Internal use only.
-     *
      */
     void writeObjectEnd() throws IOException;
 
@@ -97,19 +92,16 @@
 
     /**
      * Internal use only.
-     *
      */
     void setDebugTrace(AmfTrace debugBuffer);
 
     /**
      * Internal use only.
-     *
      */
     void setOutputStream(OutputStream out);
 
     /**
      * Internal use only.
-     *
      */
     void reset();
 
diff --git a/core/src/main/java/flex/messaging/io/amf/Amf0Input.java b/core/src/main/java/flex/messaging/io/amf/Amf0Input.java
index 619f453..b233e63 100644
--- a/core/src/main/java/flex/messaging/io/amf/Amf0Input.java
+++ b/core/src/main/java/flex/messaging/io/amf/Amf0Input.java
@@ -35,17 +35,14 @@
 
 /**
  * An Amf0 input object.
- *
  */
-public class Amf0Input extends AbstractAmfInput implements AmfTypes
-{
+public class Amf0Input extends AbstractAmfInput implements AmfTypes {
     /**
      * Unfortunately the Flash Player starts AMF 3 messages off with the legacy
      * AMF 0 format and uses a type, AmfTypes.kAvmPlusObjectType, to indicate
      * that the next object in the stream is to be deserialized differently. The
      * original hope was for two independent encoding versions... but for now
      * we just keep a reference to objectInput here.
-     *
      */
     protected ActionMessageInput avmPlusInput;
 
@@ -54,8 +51,7 @@
      */
     protected List objectsTable;
 
-    public Amf0Input(SerializationContext context)
-    {
+    public Amf0Input(SerializationContext context) {
         super(context);
 
         objectsTable = new ArrayList(64);
@@ -64,13 +60,12 @@
     /**
      * Clear all object reference information so that the instance
      * can be used to deserialize another data structure.
-     *
+     * <p>
      * Reset should be called before reading a top level object,
      * such as a new header or a new body.
      */
     @Override
-    public void reset()
-    {
+    public void reset() {
         super.reset();
 
         objectsTable.clear();
@@ -88,19 +83,16 @@
      * Public entry point to read a top level AMF Object, such as
      * a header value or a message body.
      */
-    public Object readObject() throws ClassNotFoundException, IOException
-    {
+    public Object readObject() throws ClassNotFoundException, IOException {
         int type = in.readByte();
 
         Object value = readObjectValue(type);
         return value;
     }
 
-    protected Object readObjectValue(int type) throws ClassNotFoundException, IOException
-    {
+    protected Object readObjectValue(int type) throws ClassNotFoundException, IOException {
         Object value = null;
-        switch (type)
-        {
+        switch (type) {
             case kNumberType:
                 value = Double.valueOf(readDouble());
                 break;
@@ -115,8 +107,7 @@
 
             case kAvmPlusObjectType:
 
-                if (avmPlusInput == null)
-                {
+                if (avmPlusInput == null) {
                     avmPlusInput = new Amf3Input(context);
                     avmPlusInput.setDebugTrace(trace);
                     avmPlusInput.setInputStream(in);
@@ -138,7 +129,7 @@
 
                 value = readLongUTF();
                 if (isDebug)
-                    trace.writeString((String)value);
+                    trace.writeString((String) value);
                 break;
 
             case kObjectType:
@@ -219,11 +210,10 @@
         return value;
     }
 
-    protected Date readDate() throws IOException
-    {
+    protected Date readDate() throws IOException {
         ClassUtil.validateCreation(Date.class);
 
-        long time = (long)in.readDouble();
+        long time = (long) in.readDouble();
         /*
             We read in the timezone but do nothing with the value as
             we expect dates to be written in the UTC timezone. Client
@@ -240,10 +230,11 @@
         return d;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    public boolean readBoolean() throws IOException
-    {
+    public boolean readBoolean() throws IOException {
         ClassUtil.validateCreation(Boolean.class);
 
         boolean b = super.readBoolean();
@@ -252,10 +243,11 @@
         return b;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    public double readDouble() throws IOException
-    {
+    public double readDouble() throws IOException {
         ClassUtil.validateCreation(Double.class);
 
         double d = super.readDouble();
@@ -267,19 +259,15 @@
     /**
      * Deserialize the bits of an ECMA array w/o a prefixing type byte.
      */
-    protected Map readECMAArrayValue() throws ClassNotFoundException, IOException
-    {
+    protected Map readECMAArrayValue() throws ClassNotFoundException, IOException {
         ClassUtil.validateCreation(HashMap.class);
 
         int size = in.readInt();
         HashMap h;
-        if (size == 0)
-        {
+        if (size == 0) {
             h = new HashMap();
-        }
-        else
-        {
-            int initialCapacity = size < INITIAL_COLLECTION_CAPACITY? size : INITIAL_COLLECTION_CAPACITY;
+        } else {
+            int initialCapacity = size < INITIAL_COLLECTION_CAPACITY ? size : INITIAL_COLLECTION_CAPACITY;
             h = new HashMap(initialCapacity);
         }
 
@@ -290,17 +278,14 @@
 
         String name = in.readUTF();
         int type = in.readByte();
-        while (type != kObjectEndType)
-        {
-            if (type != kObjectEndType)
-            {
+        while (type != kObjectEndType) {
+            if (type != kObjectEndType) {
                 if (isDebug)
                     trace.namedElement(name);
 
                 // Always read value but be careful to ignore erroneous 'length' prop that is sometimes sent by the player.
                 Object value = readObjectValueOneLevelDown(type, true);
-                if (!name.equals("length"))
-                {
+                if (!name.equals("length")) {
                     ClassUtil.validateAssignment(h, name, value);
                     h.put(name, value);
                 }
@@ -316,8 +301,7 @@
         return h;
     }
 
-    protected String readString() throws IOException
-    {
+    protected String readString() throws IOException {
         ClassUtil.validateCreation(String.class);
 
         String s = readUTF();
@@ -330,22 +314,18 @@
     /**
      * Deserialize the bits of an array w/o a prefixing type byte.
      */
-    protected Object readArrayValue() throws ClassNotFoundException, IOException
-    {
+    protected Object readArrayValue() throws ClassNotFoundException, IOException {
         int size = in.readInt();
         // Don't instantiate List/Array right away with the supplied size if it is more than
         // INITIAL_COLLECTION_CAPACITY in case the supplied size has been tampered.
         boolean useListTemporarily = false;
         Object l;
-        if (context.legacyCollection || size > INITIAL_COLLECTION_CAPACITY)
-        {
+        if (context.legacyCollection || size > INITIAL_COLLECTION_CAPACITY) {
             useListTemporarily = !context.legacyCollection;
             ClassUtil.validateCreation(ArrayList.class);
-            int initialCapacity = size < INITIAL_COLLECTION_CAPACITY? size : INITIAL_COLLECTION_CAPACITY;
+            int initialCapacity = size < INITIAL_COLLECTION_CAPACITY ? size : INITIAL_COLLECTION_CAPACITY;
             l = new ArrayList(initialCapacity);
-        }
-        else
-        {
+        } else {
             ClassUtil.validateCreation(Object[].class);
             l = new Object[size];
         }
@@ -354,8 +334,7 @@
         if (isDebug)
             trace.startAMFArray(objectsTable.size() - 1);
 
-        for (int i = 0; i < size; ++i)
-        {
+        for (int i = 0; i < size; ++i) {
             if (isDebug)
                 trace.arrayElement(i);
 
@@ -364,7 +343,7 @@
             Object value = readObjectValueOneLevelDown(type, true);
             ClassUtil.validateAssignment(l, i, value);
             if (l instanceof ArrayList)
-                ((ArrayList)l).add(value);
+                ((ArrayList) l).add(value);
             else
                 Array.set(l, i, value);
         }
@@ -372,9 +351,8 @@
         if (isDebug)
             trace.endAMFArray();
 
-        if (useListTemporarily)
-        {
-            l = ((ArrayList)l).toArray();
+        if (useListTemporarily) {
+            l = ((ArrayList) l).toArray();
             objectsTable.set(objectId, l);
         }
 
@@ -384,16 +362,15 @@
     /**
      * Deserialize the bits of a map w/o a prefixing type byte.
      */
-    protected Object readObjectValue(String className) throws ClassNotFoundException, IOException
-    {
+    protected Object readObjectValue(String className) throws ClassNotFoundException, IOException {
         // Prepare the parameters for createObjectInstance(). Use an array as a holder
         // to simulate two 'by-reference' parameters className and (initially null) proxy
-        Object[] params = new Object[] {className, null};
+        Object[] params = new Object[]{className, null};
         Object object = createObjectInstance(params);
 
         // Retrieve any changes to the className and the proxy parameters
-        className = (String)params[0];
-        PropertyProxy proxy = (PropertyProxy)params[1];
+        className = (String) params[0];
+        PropertyProxy proxy = (PropertyProxy) params[1];
 
         int objectId = rememberObject(object);
 
@@ -403,8 +380,7 @@
         boolean isCollectionClass = isCollectionClass(object);
         String propertyName = in.readUTF();
         int type = in.readByte();
-        while (type != kObjectEndType)
-        {
+        while (type != kObjectEndType) {
             if (isDebug)
                 trace.namedElement(propertyName);
             Object value = readObjectValueOneLevelDown(type, isCollectionClass);
@@ -426,8 +402,7 @@
         // temporary object.  it would be possible to warn users about
         // that problem by tracking if we read any references to this object
         // in the readObject call above.
-        if (newObj != object)
-        {
+        if (newObj != object) {
             objectsTable.set(objectId, newObj);
             object = newObj;
         }
@@ -441,26 +416,23 @@
      *
      * @return the read String
      * @throws java.io.UTFDataFormatException if the UTF-8 encoding is incorrect
-     * @throws IOException            if an I/O error occurs.
+     * @throws IOException                    if an I/O error occurs.
      */
-    protected String readLongUTF() throws IOException
-    {
+    protected String readLongUTF() throws IOException {
         int utflen = in.readInt();
         checkUTFLength(utflen);
 
         int c, char2, char3;
         char[] charr = getTempCharArray(utflen);
-        byte bytearr [] = getTempByteArray(utflen);
+        byte bytearr[] = getTempByteArray(utflen);
         int count = 0;
         int chCount = 0;
 
         in.readFully(bytearr, 0, utflen);
 
-        while (count < utflen)
-        {
-            c = (int)bytearr[count] & 0xff;
-            switch (c >> 4)
-            {
+        while (count < utflen) {
+            c = (int) bytearr[count] & 0xff;
+            switch (c >> 4) {
                 case 0:
                 case 1:
                 case 2:
@@ -471,7 +443,7 @@
                 case 7:
                     /* 0xxxxxxx*/
                     count++;
-                    charr[chCount] = (char)c;
+                    charr[chCount] = (char) c;
                     break;
                 case 12:
                 case 13:
@@ -479,24 +451,24 @@
                     count += 2;
                     if (count > utflen)
                         throw new UTFDataFormatException();
-                    char2 = (int)bytearr[count - 1];
+                    char2 = (int) bytearr[count - 1];
                     if ((char2 & 0xC0) != 0x80)
                         throw new UTFDataFormatException();
-                    charr[chCount] = (char)(((c & 0x1F) << 6) | (char2 & 0x3F));
+                    charr[chCount] = (char) (((c & 0x1F) << 6) | (char2 & 0x3F));
                     break;
                 case 14:
                     /* 1110 xxxx  10xx xxxx  10xx xxxx */
                     count += 3;
                     if (count > utflen)
                         throw new UTFDataFormatException();
-                    char2 = (int)bytearr[count - 2];
-                    char3 = (int)bytearr[count - 1];
+                    char2 = (int) bytearr[count - 2];
+                    char3 = (int) bytearr[count - 1];
                     if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80))
                         throw new UTFDataFormatException();
                     charr[chCount] = (char)
-                        (((c & 0x0F) << 12) |
-                         ((char2 & 0x3F) << 6) |
-                         ((char3 & 0x3F) << 0));
+                            (((c & 0x0F) << 12) |
+                                    ((char2 & 0x3F) << 6) |
+                                    ((char3 & 0x3F) << 0));
                     break;
                 default:
                     /* 10xx xxxx,  1111 xxxx */
@@ -508,8 +480,7 @@
         return new String(charr, 0, chCount);
     }
 
-    protected Object readXml() throws IOException
-    {
+    protected Object readXml() throws IOException {
         String xml = readLongUTF();
 
         if (isDebug) {
@@ -530,15 +501,13 @@
     /**
      * Remember a deserialized object so that you can use it later through a reference.
      */
-    protected int rememberObject(Object obj)
-    {
+    protected int rememberObject(Object obj) {
         int id = objectsTable.size();
         objectsTable.add(obj);
         return id;
     }
 
-    protected Object readObjectValueOneLevelDown(int type, boolean nestCollectionLevelDown) throws ClassNotFoundException, IOException
-    {
+    protected Object readObjectValueOneLevelDown(int type, boolean nestCollectionLevelDown) throws ClassNotFoundException, IOException {
         increaseNestObjectLevel();
         if (nestCollectionLevelDown)
             increaseNestCollectionLevel();
diff --git a/core/src/main/java/flex/messaging/io/amf/Amf0Output.java b/core/src/main/java/flex/messaging/io/amf/Amf0Output.java
index b04713a..c06ec1b 100644
--- a/core/src/main/java/flex/messaging/io/amf/Amf0Output.java
+++ b/core/src/main/java/flex/messaging/io/amf/Amf0Output.java
@@ -44,33 +44,27 @@
 
 /**
  * An Amf0 output object.
- *
  */
-public class Amf0Output extends AbstractAmfOutput implements AmfTypes
-{
+public class Amf0Output extends AbstractAmfOutput implements AmfTypes {
     /**
      * 3-byte marker for object end; used for faster serialization
      * than a combination of writeUTF("") and writeByte(kObjectEndType).
-     *
      */
     public static final byte[] OBJECT_END_MARKER = {0, 0, kObjectEndType};
 
     /**
      * A mapping of object instances to their serialization numbers
      * for storing object references on the stream.
-     *
      */
     protected IdentityHashMap serializedObjects;
 
     /**
      * Number of serialized objects.
-     *
      */
     protected int serializedObjectCount = 0;
 
     /**
      * AVM+ Encoding.
-     *
      */
     protected boolean avmPlus;
 
@@ -81,10 +75,10 @@
 
     /**
      * Construct a serializer without connecting it to an output stream.
+     *
      * @param context the context to use
      */
-    public Amf0Output(SerializationContext context)
-    {
+    public Amf0Output(SerializationContext context) {
         super(context);
         context.supportDatesByReference = false;
 
@@ -97,8 +91,7 @@
      *
      * @param a Whether the client is running in AVMPlus and can handle AMF3 encoding.
      */
-    public void setAvmPlus(boolean a)
-    {
+    public void setAvmPlus(boolean a) {
         avmPlus = a;
     }
 
@@ -106,8 +99,7 @@
      * Reset all object reference information allowing the class to be used to
      * write a "new" data structure.
      */
-    public void reset()
-    {
+    public void reset() {
         super.reset();
 
         serializedObjects.clear();
@@ -122,8 +114,7 @@
      * current SerializationContext, OutputStream and debug trace settings
      * to switch the version of the AMF protocol mid-stream.
      */
-    protected void createAMF3Output()
-    {
+    protected void createAMF3Output() {
         avmPlusOutput = new Amf3Output(context);
         avmPlusOutput.setOutputStream(out);
         avmPlusOutput.setDebugTrace(trace);
@@ -132,115 +123,80 @@
     //
     // java.io.ObjectOutput implementations
     //
-    
+
     /**
      * Serialize an Object using AMF 0.
      */
-    public void writeObject(Object o) throws IOException
-    {
-        if (o == null)
-        {
+    public void writeObject(Object o) throws IOException {
+        if (o == null) {
             writeAMFNull();
             return;
         }
 
-        if (o instanceof String)
-        {
-            writeAMFString((String)o);
-        }
-        else if (o instanceof Number)
-        {
+        if (o instanceof String) {
+            writeAMFString((String) o);
+        } else if (o instanceof Number) {
             if (!context.legacyBigNumbers &&
-                (o instanceof BigInteger || o instanceof BigDecimal))
-            {
+                    (o instanceof BigInteger || o instanceof BigDecimal)) {
                 // Using double to write big numbers such as BigInteger or
                 // BigDecimal can result in information loss so we write
                 // them as String by default...
                 writeAMFString((o).toString());
+            } else {
+                writeAMFDouble(((Number) o).doubleValue());
             }
-            else
-            {
-                writeAMFDouble(((Number)o).doubleValue());
-            }
-        }
-        else if (o instanceof Boolean)
-        {
-            writeAMFBoolean(((Boolean)o).booleanValue());
-        }
-        else if (o instanceof Character)
-        {
+        } else if (o instanceof Boolean) {
+            writeAMFBoolean(((Boolean) o).booleanValue());
+        } else if (o instanceof Character) {
             String s = o.toString();
             writeAMFString(s);
-        }
-        else if (o instanceof Date)
-        {
+        } else if (o instanceof Date) {
             // Note that dates are not considered complex types in AMF 0
-            writeAMFDate((Date)o);
-        }
-        else if (o instanceof Calendar)
-        {
-            writeAMFDate(((Calendar)o).getTime());
+            writeAMFDate((Date) o);
+        } else if (o instanceof Calendar) {
+            writeAMFDate(((Calendar) o).getTime());
         }
         // If there is a proxy for this,write it as a custom object so the default
         // behavior can be overriden.
-        else if (o instanceof Enum && PropertyProxyRegistry.getRegistry().getProxy(o.getClass()) == null)
-        {
-            Enum<?> enumValue = (Enum<?>)o;
+        else if (o instanceof Enum && PropertyProxyRegistry.getRegistry().getProxy(o.getClass()) == null) {
+            Enum<?> enumValue = (Enum<?>) o;
             writeAMFString(enumValue.name());
-        }
-        else
-        {
+        } else {
             // We have a complex object.
 
             // If we're using AMF 3, delegate to AVM+ encoding format
-            if (avmPlus)
-            {
-                if (avmPlusOutput == null)
-                {
+            if (avmPlus) {
+                if (avmPlusOutput == null) {
                     createAMF3Output();
                 }
 
                 out.writeByte(kAvmPlusObjectType);
                 avmPlusOutput.writeObject(o);
-            }
-            else
-            {
+            } else {
                 Class cls = o.getClass();
 
-                if (cls.isArray())
-                {
+                if (cls.isArray()) {
                     writeAMFArray(o, cls.getComponentType());
-                }
-                else if (o instanceof Map && context.legacyMap && !(o instanceof ASObject))
-                {
-                        writeMapAsECMAArray((Map)o);
-                }
-                else if (o instanceof Collection)
-                {
+                } else if (o instanceof Map && context.legacyMap && !(o instanceof ASObject)) {
+                    writeMapAsECMAArray((Map) o);
+                } else if (o instanceof Collection) {
                     if (context.legacyCollection)
-                        writeCollection((Collection)o, null);
+                        writeCollection((Collection) o, null);
                     else
-                        writeArrayCollection((Collection)o, null);
-                }
-                else if (o instanceof org.w3c.dom.Document)
-                {
+                        writeArrayCollection((Collection) o, null);
+                } else if (o instanceof org.w3c.dom.Document) {
                     out.write(kXMLObjectType);
                     String xml = documentToString(o);
                     if (isDebug)
                         trace.write(xml);
 
                     writeUTF(xml, true, false);
-                }
-                else
-                {
+                } else {
                     // Special Case: wrap RowSet in PageableRowSet for Serialization
-                    if (o instanceof RowSet)
-                    {
-                        o = new PagedRowSet((RowSet)o, Integer.MAX_VALUE, false);
-                    }
-                    else if (o instanceof Throwable && context.legacyThrowable)
-                    {
-                        o = new StatusInfoProxy((Throwable)o);
+                    if (o instanceof RowSet) {
+                        o = new PagedRowSet((RowSet) o, Integer.MAX_VALUE, false);
+                    } else if (o instanceof Throwable && context.legacyThrowable) {
+                        o = new StatusInfoProxy((Throwable) o);
                     }
 
                     writeCustomObject(o);
@@ -252,8 +208,7 @@
     /**
      *
      */
-    public void writeObjectTraits(TraitsInfo traits) throws IOException
-    {
+    public void writeObjectTraits(TraitsInfo traits) throws IOException {
         String className = null;
         if (traits != null)
             className = traits.getClassName();
@@ -261,12 +216,9 @@
         if (isDebug)
             trace.startAMFObject(className, serializedObjectCount - 1);
 
-        if (className == null || className.length() == 0)
-        {
+        if (className == null || className.length() == 0) {
             out.write(kObjectType);
-        }
-        else
-        {
+        } else {
             out.write(kTypedObjectType);
             out.writeUTF(className);
         }
@@ -275,8 +227,7 @@
     /**
      *
      */
-    public void writeObjectProperty(String name, Object value) throws IOException
-    {
+    public void writeObjectProperty(String name, Object value) throws IOException {
         if (isDebug)
             trace.namedElement(name);
 
@@ -289,8 +240,7 @@
     /**
      *
      */
-    public void writeObjectEnd() throws IOException
-    {
+    public void writeObjectEnd() throws IOException {
         out.write(OBJECT_END_MARKER, 0, OBJECT_END_MARKER.length);
 
         if (isDebug)
@@ -305,8 +255,7 @@
     /**
      *
      */
-    protected void writeAMFBoolean(boolean b) throws IOException
-    {
+    protected void writeAMFBoolean(boolean b) throws IOException {
         if (isDebug)
             trace.write(b);
 
@@ -318,8 +267,7 @@
     /**
      *
      */
-    protected void writeAMFDouble(double d) throws IOException
-    {
+    protected void writeAMFDouble(double d) throws IOException {
         if (isDebug)
             trace.write(d);
 
@@ -331,14 +279,13 @@
     /**
      *
      */
-    protected void writeAMFDate(Date d) throws IOException
-    {
+    protected void writeAMFDate(Date d) throws IOException {
         if (isDebug)
             trace.write(d);
 
         out.write(kDateType);
         // Write the time as 64bit value in ms
-        out.writeDouble((double)d.getTime());
+        out.writeDouble((double) d.getTime());
         int nCurrentTimezoneOffset = TimeZone.getDefault().getRawOffset();
         out.writeShort(nCurrentTimezoneOffset / 60000);
     }
@@ -346,39 +293,28 @@
     /**
      *
      */
-    protected void writeAMFArray(Object o, Class componentType) throws IOException
-    {
-        if (componentType.isPrimitive())
-        {
+    protected void writeAMFArray(Object o, Class componentType) throws IOException {
+        if (componentType.isPrimitive()) {
             writePrimitiveArray(o);
-        }
-        else if (componentType.equals(Character.class))
-        {
-            writeCharArrayAsString((Character[])o);
-        }
-        else
-        {
-            writeObjectArray((Object[])o, null);
+        } else if (componentType.equals(Character.class)) {
+            writeCharArrayAsString((Character[]) o);
+        } else {
+            writeObjectArray((Object[]) o, null);
         }
     }
 
     /**
      *
      */
-    protected void writeArrayCollection(Collection col, SerializationDescriptor desc) throws IOException
-    {
-        if (!serializeAsReference(col))
-        {
+    protected void writeArrayCollection(Collection col, SerializationDescriptor desc) throws IOException {
+        if (!serializeAsReference(col)) {
             ArrayCollection ac;
 
-            if (col instanceof ArrayCollection)
-            {
-                ac = (ArrayCollection)col;
+            if (col instanceof ArrayCollection) {
+                ac = (ArrayCollection) col;
                 // TODO: QUESTION: Pete ignoring the descriptor here... not sure if
                 // we should modify the user's AC as that could cause corruption?
-            }
-            else
-            {
+            } else {
                 // Wrap any Collection in an ArrayCollection
                 ac = new ArrayCollection(col);
                 if (desc != null)
@@ -394,48 +330,38 @@
     /**
      *
      */
-    protected void writeCustomObject(Object o) throws IOException
-    {
+    protected void writeCustomObject(Object o) throws IOException {
         PropertyProxy proxy = null;
 
-        if (o instanceof PropertyProxy)
-        {
-            proxy = (PropertyProxy)o;
+        if (o instanceof PropertyProxy) {
+            proxy = (PropertyProxy) o;
             o = proxy.getDefaultInstance();
 
             // The proxy may wrap a null default instance, if so, short circuit here.
-            if (o == null)
-            {
+            if (o == null) {
                 writeAMFNull();
                 return;
             }
             // HACK: Short circuit and unwrap if PropertyProxy is wrapping an Array
             // or Collection type since we don't yet have the ability to proxy multiple
             // AMF types. We write an AMF Array directly instead of an AMF Object
-            else if (o instanceof Collection)
-            {
+            else if (o instanceof Collection) {
                 if (context.legacyCollection)
-                    writeCollection((Collection)o, proxy.getDescriptor());
+                    writeCollection((Collection) o, proxy.getDescriptor());
                 else
-                    writeArrayCollection((Collection)o, proxy.getDescriptor());
+                    writeArrayCollection((Collection) o, proxy.getDescriptor());
                 return;
-            }
-            else if (o.getClass().isArray())
-            {
-                writeObjectArray((Object[])o, proxy.getDescriptor());
+            } else if (o.getClass().isArray()) {
+                writeObjectArray((Object[]) o, proxy.getDescriptor());
                 return;
-            }
-            else if (context.legacyMap && o instanceof Map && !(o instanceof ASObject))
-            {
-                writeMapAsECMAArray((Map)o);
+            } else if (context.legacyMap && o instanceof Map && !(o instanceof ASObject)) {
+                writeMapAsECMAArray((Map) o);
                 return;
             }
         }
 
-        if (!serializeAsReference(o))
-        {
-            if (proxy == null)
-            {
+        if (!serializeAsReference(o)) {
+            if (proxy == null) {
                 proxy = PropertyProxyRegistry.getProxyAndRegister(o);
             }
 
@@ -446,14 +372,12 @@
     /**
      *
      */
-    protected void writePropertyProxy(PropertyProxy pp, Object instance) throws IOException
-    {
+    protected void writePropertyProxy(PropertyProxy pp, Object instance) throws IOException {
         /*
          * At this point we substitute the instance we want to serialize.
          */
         Object newInst = pp.getInstanceToSerialize(instance);
-        if (newInst != instance)
-        {
+        if (newInst != instance) {
             // We can't use writeAMFNull here I think since we already added this object
             // to the object table on the server side.  The player won't have any way
             // of knowing we have this reference mapped to null.
@@ -469,15 +393,12 @@
         boolean externalizable = false; //sp.isExternalizable(instance);
         List propertyNames = pp.getPropertyNames(instance);
         // filter write-only properties
-        if (pp instanceof BeanProxy)
-        {
+        if (pp instanceof BeanProxy) {
             BeanProxy bp = (BeanProxy) pp;
             Iterator it = propertyNames.iterator();
-            while (it.hasNext())
-            {
+            while (it.hasNext()) {
                 String propName = (String) it.next();
-                if (bp.isWriteOnly(instance, propName))
-                {   // do not serialize this, as we cannot get the value
+                if (bp.isWriteOnly(instance, propName)) {   // do not serialize this, as we cannot get the value
                     it.remove();
                 }
             }
@@ -485,12 +406,10 @@
         TraitsInfo ti = new TraitsInfo(pp.getAlias(instance), pp.isDynamic(), externalizable, propertyNames);
         writeObjectTraits(ti);
 
-        if (propertyNames != null)
-        {
+        if (propertyNames != null) {
             Iterator it = propertyNames.iterator();
-            while (it.hasNext())
-            {
-                String propName = (String)it.next();
+            while (it.hasNext()) {
+                String propName = (String) it.next();
                 Object value = pp.getValue(instance, propName);
                 writeObjectProperty(propName, value);
             }
@@ -502,10 +421,8 @@
     /**
      *
      */
-    protected void writeMapAsECMAArray(Map m) throws IOException
-    {
-        if (!serializeAsReference(m))
-        {
+    protected void writeMapAsECMAArray(Map m) throws IOException {
+        if (!serializeAsReference(m)) {
             if (isDebug)
                 trace.startECMAArray(serializedObjectCount - 1);
 
@@ -513,8 +430,7 @@
             out.writeInt(0);
 
             Iterator it = m.keySet().iterator();
-            while (it.hasNext())
-            {
+            while (it.hasNext()) {
                 Object key = it.next();
                 Object value = m.get(key);
                 writeObjectProperty(key.toString(), value);
@@ -527,8 +443,7 @@
     /**
      *
      */
-    protected void writeAMFNull() throws IOException
-    {
+    protected void writeAMFNull() throws IOException {
         if (isDebug)
             trace.writeNull();
 
@@ -538,8 +453,7 @@
     /**
      *
      */
-    protected void writeAMFString(String str) throws IOException
-    {
+    protected void writeAMFString(String str) throws IOException {
         if (isDebug)
             trace.writeString(str);
 
@@ -549,28 +463,24 @@
     /**
      *
      */
-    protected void writeObjectArray(Object[] values, SerializationDescriptor descriptor) throws IOException
-    {
-        if (!serializeAsReference(values))
-        {
+    protected void writeObjectArray(Object[] values, SerializationDescriptor descriptor) throws IOException {
+        if (!serializeAsReference(values)) {
             if (isDebug)
                 trace.startAMFArray(serializedObjectCount - 1);
 
             out.write(kStrictArrayType);
             out.writeInt(values.length);
-            for (int i = 0; i < values.length; ++i)
-            {
+            for (int i = 0; i < values.length; ++i) {
                 if (isDebug)
                     trace.arrayElement(i);
 
                 Object item = values[i];
                 if (item != null && descriptor != null && !(item instanceof String)
                         && !(item instanceof Number) && !(item instanceof Boolean)
-                        && !(item instanceof Character))
-                {
+                        && !(item instanceof Character)) {
 
                     PropertyProxy proxy = PropertyProxyRegistry.getProxy(item);
-                    proxy = (PropertyProxy)proxy.clone();
+                    proxy = (PropertyProxy) proxy.clone();
                     proxy.setDescriptor(descriptor);
                     item = proxy;
                 }
@@ -589,12 +499,9 @@
      *
      * @param c Collection to be serialized as an array.
      * @throws java.io.IOException The exception can be generated by the output stream
-     *
      */
-    protected void writeCollection(Collection c, SerializationDescriptor descriptor) throws IOException
-    {
-        if (!serializeAsReference(c))
-        {
+    protected void writeCollection(Collection c, SerializationDescriptor descriptor) throws IOException {
+        if (!serializeAsReference(c)) {
             if (isDebug)
                 trace.startAMFArray(serializedObjectCount - 1);
 
@@ -602,18 +509,16 @@
             out.writeInt(c.size());
             Iterator it = c.iterator();
             int i = 0;
-            while (it.hasNext())
-            {
+            while (it.hasNext()) {
                 if (isDebug)
                     trace.arrayElement(i++);
 
                 Object item = it.next();
                 if (item != null && descriptor != null && !(item instanceof String)
                         && !(item instanceof Number) && !(item instanceof Boolean)
-                        && !(item instanceof Character))
-                {
+                        && !(item instanceof Character)) {
                     PropertyProxy proxy = PropertyProxyRegistry.getProxy(item);
-                    proxy = (PropertyProxy)proxy.clone();
+                    proxy = (PropertyProxy) proxy.clone();
                     proxy.setDescriptor(descriptor);
                     item = proxy;
                 }
@@ -633,50 +538,38 @@
      * Primitives include the following:
      * boolean, char, double, float, long, int, short, byte
      * </p>
-     * @param obj An array of primitives
      *
+     * @param obj An array of primitives
      */
-    protected void writePrimitiveArray(Object obj) throws IOException
-    {
+    protected void writePrimitiveArray(Object obj) throws IOException {
         Class aType = obj.getClass().getComponentType();
 
         //Treat char[] as a String
-        if (aType.equals(Character.TYPE))
-        {
-            char[] c = (char[])obj;
+        if (aType.equals(Character.TYPE)) {
+            char[] c = (char[]) obj;
             writeCharArrayAsString(c);
-        }
-        else if (!serializeAsReference(obj))
-        {
-            if (aType.equals(Boolean.TYPE))
-            {
+        } else if (!serializeAsReference(obj)) {
+            if (aType.equals(Boolean.TYPE)) {
                 out.write(kStrictArrayType);
 
-                boolean[] b = (boolean[])obj;
+                boolean[] b = (boolean[]) obj;
                 out.writeInt(b.length);
 
-                if (isDebug)
-                {
+                if (isDebug) {
                     trace.startAMFArray(serializedObjectCount - 1);
 
-                    for (int i = 0; i < b.length; i++)
-                    {
+                    for (int i = 0; i < b.length; i++) {
                         trace.arrayElement(i);
                         writeAMFBoolean(b[i]);
                     }
 
                     trace.endAMFArray();
-                }
-                else
-                {
-                    for (int i = 0; i < b.length; i++)
-                    {
+                } else {
+                    for (int i = 0; i < b.length; i++) {
                         writeAMFBoolean(b[i]);
                     }
                 }
-            }
-            else
-            {
+            } else {
                 //We have a primitive number, either a double, float, long, int, short or byte.
                 //We write all of these as doubles...
                 out.write(kStrictArrayType);
@@ -684,23 +577,18 @@
                 int length = Array.getLength(obj);
                 out.writeInt(length);
 
-                if (isDebug)
-                {
+                if (isDebug) {
                     trace.startAMFArray(serializedObjectCount - 1);
 
-                    for (int i = 0; i < length; i++)
-                    {
+                    for (int i = 0; i < length; i++) {
                         trace.arrayElement(i);
                         double v = Array.getDouble(obj, i);
                         writeAMFDouble(v);
                     }
 
                     trace.endAMFArray();
-                }
-                else
-                {
-                    for (int i = 0; i < length; i++)
-                    {
+                } else {
+                    for (int i = 0; i < length; i++) {
                         double v = Array.getDouble(obj, i);
                         writeAMFDouble(v);
                     }
@@ -712,13 +600,11 @@
     /**
      *
      */
-    protected void writeCharArrayAsString(Character[] ca) throws IOException
-    {
+    protected void writeCharArrayAsString(Character[] ca) throws IOException {
         int length = ca.length;
         char[] chars = new char[length];
 
-        for (int i = 0; i < length; i++)
-        {
+        for (int i = 0; i < length; i++) {
             Character c = ca[i];
             if (c == null)
                 chars[i] = 0;
@@ -731,16 +617,14 @@
     /**
      *
      */
-    protected void writeCharArrayAsString(char[] ca) throws IOException
-    {
+    protected void writeCharArrayAsString(char[] ca) throws IOException {
         writeAMFString(new String(ca));
     }
 
     /**
      *
      */
-    protected void writeUTF(String str, boolean forceLong, boolean writeType) throws IOException
-    {
+    protected void writeUTF(String str, boolean forceLong, boolean writeType) throws IOException {
         int strlen = str.length();
         int utflen = 0;
         int c, count = 0;
@@ -748,30 +632,21 @@
         char[] charr = getTempCharArray(strlen);
         str.getChars(0, strlen, charr, 0);
 
-        for (int i = 0; i < strlen; i++)
-        {
+        for (int i = 0; i < strlen; i++) {
             c = charr[i];
-            if (c <= 0x007F)
-            {
+            if (c <= 0x007F) {
                 utflen++;
-            }
-            else if (c > 0x07FF)
-            {
+            } else if (c > 0x07FF) {
                 utflen += 3;
-            }
-            else
-            {
+            } else {
                 utflen += 2;
             }
         }
 
         int type;
-        if (forceLong)
-        {
+        if (forceLong) {
             type = kLongStringType;
-        }
-        else
-        {
+        } else {
             if (utflen <= 65535)
                 type = kStringType;
             else
@@ -779,38 +654,29 @@
         }
 
         byte[] bytearr;
-        if (writeType)
-        {
+        if (writeType) {
             bytearr = getTempByteArray(utflen + (type == kStringType ? 3 : 5));
-            bytearr[count++] = (byte)(type);
-        }
-        else
+            bytearr[count++] = (byte) (type);
+        } else
             bytearr = getTempByteArray(utflen + (type == kStringType ? 2 : 4));
 
-        if (type == kLongStringType)
-        {
-            bytearr[count++] = (byte)((utflen >>> 24) & 0xFF);
-            bytearr[count++] = (byte)((utflen >>> 16) & 0xFF);
+        if (type == kLongStringType) {
+            bytearr[count++] = (byte) ((utflen >>> 24) & 0xFF);
+            bytearr[count++] = (byte) ((utflen >>> 16) & 0xFF);
         }
-        bytearr[count++] = (byte)((utflen >>> 8) & 0xFF);
-        bytearr[count++] = (byte)((utflen) & 0xFF);
-        for (int i = 0; i < strlen; i++)
-        {
+        bytearr[count++] = (byte) ((utflen >>> 8) & 0xFF);
+        bytearr[count++] = (byte) ((utflen) & 0xFF);
+        for (int i = 0; i < strlen; i++) {
             c = charr[i];
-            if (c <= 0x007F)
-            {
-                bytearr[count++] = (byte)c;
-            }
-            else if (c > 0x07FF)
-            {
-                bytearr[count++] = (byte)(0xE0 | ((c >> 12) & 0x0F));
-                bytearr[count++] = (byte)(0x80 | ((c >> 6) & 0x3F));
-                bytearr[count++] = (byte)(0x80 | ((c) & 0x3F));
-            }
-            else
-            {
-                bytearr[count++] = (byte)(0xC0 | ((c >> 6) & 0x1F));
-                bytearr[count++] = (byte)(0x80 | ((c) & 0x3F));
+            if (c <= 0x007F) {
+                bytearr[count++] = (byte) c;
+            } else if (c > 0x07FF) {
+                bytearr[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F));
+                bytearr[count++] = (byte) (0x80 | ((c >> 6) & 0x3F));
+                bytearr[count++] = (byte) (0x80 | ((c) & 0x3F));
+            } else {
+                bytearr[count++] = (byte) (0xC0 | ((c >> 6) & 0x1F));
+                bytearr[count++] = (byte) (0x80 | ((c) & 0x3F));
             }
         }
         out.write(bytearr, 0, count);
@@ -819,11 +685,8 @@
     /**
      * Remember the object's serialization number so that it can be referred to
      * as a reference later. Only complex ojects should be stored as references.
-     *
-     *
      */
-    protected void rememberObjectReference(Object obj)
-    {
+    protected void rememberObjectReference(Object obj) {
         serializedObjects.put(obj, new Integer(serializedObjectCount++));
     }
 
@@ -833,42 +696,34 @@
      * in the reference collection for potential future encounter.
      *
      * @return Success/failure indicator as to whether the object could be
-     *         serialized as a reference.
-     *
+     * serialized as a reference.
      */
-    protected boolean serializeAsReference(Object obj) throws IOException
-    {
+    protected boolean serializeAsReference(Object obj) throws IOException {
         Object ref = serializedObjects.get(obj);
-        if (ref != null)
-        {
-            try
-            {
-                int refNum = ((Integer)ref).intValue();
+        if (ref != null) {
+            try {
+                int refNum = ((Integer) ref).intValue();
                 out.write(kReferenceType);
                 out.writeShort(refNum);
 
                 if (isDebug)
                     trace.writeRef(refNum);
-            }
-            catch (ClassCastException e)
-            {
+            } catch (ClassCastException e) {
                 throw new IOException("Object reference value is not an Integer");
             }
-        }
-        else
-        {
+        } else {
             rememberObjectReference(obj);
         }
         return (ref != null);
     }
 
     /**
-    protected void writeUnsupported() throws IOException
-    {
-        if (isDebug)
-            trace.write("UNSUPPORTED");
+     protected void writeUnsupported() throws IOException
+     {
+     if (isDebug)
+     trace.write("UNSUPPORTED");
 
-        out.write(kUnsupportedType);
-    }
-    */
+     out.write(kUnsupportedType);
+     }
+     */
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/Amf3Input.java b/core/src/main/java/flex/messaging/io/amf/Amf3Input.java
index 9bcc805..01fd8fe 100644
--- a/core/src/main/java/flex/messaging/io/amf/Amf3Input.java
+++ b/core/src/main/java/flex/messaging/io/amf/Amf3Input.java
@@ -44,11 +44,8 @@
  * This class intends to matches the Flash Player 8 C++ code
  * in avmglue/DataIO.cpp
  * </p>
- *
- *
  */
-public class Amf3Input extends AbstractAmfInput implements Amf3Types
-{
+public class Amf3Input extends AbstractAmfInput implements Amf3Types {
     /**
      *
      */
@@ -64,8 +61,7 @@
      */
     protected List traitsTable;
 
-    public Amf3Input(SerializationContext context)
-    {
+    public Amf3Input(SerializationContext context) {
         super(context);
 
         stringTable = new ArrayList(64);
@@ -78,58 +74,51 @@
      * such as a new header or a new body.
      */
     @Override
-    public void reset()
-    {
+    public void reset() {
         super.reset();
         stringTable.clear();
         objectTable.clear();
         traitsTable.clear();
     }
 
-    public Object saveObjectTable()
-    {
+    public Object saveObjectTable() {
         Object table = objectTable;
         objectTable = new ArrayList(64);
         return table;
     }
 
-    public void restoreObjectTable(Object table)
-    {
+    public void restoreObjectTable(Object table) {
         objectTable = (ArrayList) table;
     }
 
-    public Object saveTraitsTable()
-    {
+    public Object saveTraitsTable() {
         Object table = traitsTable;
         traitsTable = new ArrayList(10);
         return table;
     }
 
-    public void restoreTraitsTable(Object table)
-    {
+    public void restoreTraitsTable(Object table) {
         traitsTable = (ArrayList) table;
     }
 
-    public Object saveStringTable()
-    {
+    public Object saveStringTable() {
         Object table = stringTable;
         stringTable = new ArrayList(64);
         return table;
     }
 
-    public void restoreStringTable(Object table)
-    {
+    public void restoreStringTable(Object table) {
         stringTable = (ArrayList) table;
     }
 
     /**
      * Public entry point to read a top level AMF Object, such as
      * a header value or a message body.
+     *
      * @return Object the object read
      * @throws ClassNotFoundException, IOException when reading object process failed
      */
-    public Object readObject() throws ClassNotFoundException, IOException
-    {
+    public Object readObject() throws ClassNotFoundException, IOException {
         int type = in.readByte();
         Object value = readObjectValue(type);
         return value;
@@ -138,18 +127,16 @@
     /**
      *
      */
-    protected Object readObjectValue(int type) throws ClassNotFoundException, IOException
-    {
+    protected Object readObjectValue(int type) throws ClassNotFoundException, IOException {
         Object value = null;
 
-        switch (type)
-        {
+        switch (type) {
             case kStringType:
                 ClassUtil.validateCreation(String.class);
 
                 value = readString();
                 if (isDebug)
-                    trace.writeString((String)value);
+                    trace.writeString((String) value);
                 break;
 
             case kObjectType:
@@ -190,57 +177,58 @@
                     trace.write(value);
                 break;
 
-                case kDoubleType:
-                    value = Double.valueOf(readDouble());
-                    break;
+            case kDoubleType:
+                value = Double.valueOf(readDouble());
+                break;
 
-                case kUndefinedType:
-                    if (isDebug)
-                        trace.writeUndefined();
-                    break;
+            case kUndefinedType:
+                if (isDebug)
+                    trace.writeUndefined();
+                break;
 
-                case kNullType:
-                    if (isDebug)
-                        trace.writeNull();
-                    break;
+            case kNullType:
+                if (isDebug)
+                    trace.writeNull();
+                break;
 
-                case kXMLType:
-                case kAvmPlusXmlType:
-                    value = readXml();
-                    break;
+            case kXMLType:
+            case kAvmPlusXmlType:
+                value = readXml();
+                break;
 
-                case kDateType:
-                    value = readDate();
-                    break;
+            case kDateType:
+                value = readDate();
+                break;
 
-                case kByteArrayType:
-                    value = readByteArray();
-                    break;
+            case kByteArrayType:
+                value = readByteArray();
+                break;
 
-                case kDictionaryType:
-                    value = readDictionary();
-                    break;
+            case kDictionaryType:
+                value = readDictionary();
+                break;
 
-                case kTypedVectorInt:
-                case kTypedVectorUint:
-                case kTypedVectorDouble:
-                case kTypedVectorObject:
-                    value = readTypedVector(type);
-                    break;
-                default:
-                    // Unknown object type tag {type}
-                    UnknownTypeException ex = new UnknownTypeException();
-                    ex.setMessage(10301, new Object[]{new Integer(type)});
-                    throw ex;
+            case kTypedVectorInt:
+            case kTypedVectorUint:
+            case kTypedVectorDouble:
+            case kTypedVectorObject:
+                value = readTypedVector(type);
+                break;
+            default:
+                // Unknown object type tag {type}
+                UnknownTypeException ex = new UnknownTypeException();
+                ex.setMessage(10301, new Object[]{new Integer(type)});
+                throw ex;
         }
 
         return value;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    public double readDouble() throws IOException
-    {
+    public double readDouble() throws IOException {
         ClassUtil.validateCreation(Double.class);
 
         double d = super.readDouble();
@@ -252,8 +240,7 @@
     /**
      *
      */
-    protected String readString() throws IOException
-    {
+    protected String readString() throws IOException {
         int ref = readUInt29();
         if ((ref & 1) == 0) // This is a reference
             return getStringReference(ref >> 1);
@@ -275,15 +262,14 @@
     /**
      * Deserialize the bits of a date-time value w/o a prefixing type byte.
      */
-    protected Date readDate() throws IOException
-    {
+    protected Date readDate() throws IOException {
         ClassUtil.validateCreation(Date.class);
 
         int ref = readUInt29();
         if ((ref & 1) == 0) // This is a reference
-            return (Date)getObjectReference(ref >> 1);
+            return (Date) getObjectReference(ref >> 1);
 
-        long time = (long)in.readDouble();
+        long time = (long) in.readDouble();
 
         Date d = new Date(time);
 
@@ -295,8 +281,7 @@
         return d;
     }
 
-    protected Object readDictionary() throws IOException, ClassNotFoundException
-    {
+    protected Object readDictionary() throws IOException, ClassNotFoundException {
         int ref = readUInt29();
 
         if ((ref & 1) == 0) // This is a reference.
@@ -305,21 +290,20 @@
         readBoolean(); // usingWeakTypes - irrelevant in Java.
         int len = (ref >> 1);
 
-        Dictionary dictionary = (Hashtable)ClassUtil.createDefaultInstance(Hashtable.class, null, true /*validate*/);
+        Dictionary dictionary = (Hashtable) ClassUtil.createDefaultInstance(Hashtable.class, null, true /*validate*/);
 
         objectTable.add(dictionary); // Remember the object.
 
         if (isDebug)
             trace.startAMFDictionary(objectTable.size() - 1);
 
-        for (int i = 0; i < len; i++)
-        {
+        for (int i = 0; i < len; i++) {
             if (isDebug) trace.startDictionaryElement();
             Object key = readObjectOneLevelDown(true);
 
             if (isDebug) trace.addDictionaryEquals();
             Object value = readObjectOneLevelDown(true);
-            ClassUtil.validateAssignment(dictionary, key != null? key.toString() : null, value);
+            ClassUtil.validateAssignment(dictionary, key != null ? key.toString() : null, value);
             dictionary.put(key, value);
         }
 
@@ -329,8 +313,7 @@
         return dictionary;
     }
 
-    protected Object readTypedVector(int type) throws IOException, ClassNotFoundException
-    {
+    protected Object readTypedVector(int type) throws IOException, ClassNotFoundException {
         int ref = readUInt29();
 
         if ((ref & 1) == 0) // This is a reference.
@@ -340,8 +323,7 @@
         boolean fixed = readBoolean();
 
         Object vector = null;
-        switch (type)
-        {
+        switch (type) {
             case kTypedVectorInt:
                 vector = readTypedIntVector(len, fixed);
                 break;
@@ -364,31 +346,24 @@
     }
 
     @SuppressWarnings("unchecked")
-    protected Object readTypedIntVector(int len, boolean fixed) throws IOException
-    {
+    protected Object readTypedIntVector(int len, boolean fixed) throws IOException {
         // Don't instantiate Array right away with the supplied size if it is more
         // than INITIAL_ARRAY_CAPACITY in case the supplied size has been tampered.
         boolean useListTemporarily = false;
 
         Object vector;
-        if (fixed)
-        {
+        if (fixed) {
             useListTemporarily = len > INITIAL_COLLECTION_CAPACITY;
-            if (useListTemporarily)
-            {
+            if (useListTemporarily) {
                 ClassUtil.validateCreation(ArrayList.class);
                 vector = new ArrayList<Integer>(INITIAL_COLLECTION_CAPACITY);
-            }
-            else
-            {
+            } else {
                 ClassUtil.validateCreation(Integer[].class);
                 vector = new Integer[len];
             }
-        }
-        else
-        {
+        } else {
             ClassUtil.validateCreation(ArrayList.class);
-            int initialCapacity = len < INITIAL_COLLECTION_CAPACITY? len : INITIAL_COLLECTION_CAPACITY;
+            int initialCapacity = len < INITIAL_COLLECTION_CAPACITY ? len : INITIAL_COLLECTION_CAPACITY;
             vector = new ArrayList<Integer>(initialCapacity);
         }
 
@@ -397,8 +372,7 @@
         if (isDebug)
             trace.startAMFVector(objectTable.size() - 1, VectorType.INT);
 
-        for (int i = 0; i < len; i++)
-        {
+        for (int i = 0; i < len; i++) {
             if (isDebug)
                 trace.arrayElement(i);
 
@@ -414,12 +388,11 @@
             if (vector instanceof Integer[])
                 Array.set(vector, i, item);
             else
-                ((List<Integer>)vector).add(item);
+                ((List<Integer>) vector).add(item);
         }
 
-        if (useListTemporarily)
-        {
-            vector = ((ArrayList<Integer>)vector).toArray();
+        if (useListTemporarily) {
+            vector = ((ArrayList<Integer>) vector).toArray();
             objectTable.set(objectId, vector);
         }
 
@@ -430,31 +403,24 @@
     }
 
     @SuppressWarnings("unchecked")
-    protected Object readTypedUintVector(int len, boolean fixed) throws IOException
-    {
+    protected Object readTypedUintVector(int len, boolean fixed) throws IOException {
         // Don't instantiate Array right away with the supplied size if it is more
         // than INITIAL_ARRAY_CAPACITY in case the supplied size has been tampered.
         boolean useListTemporarily = false;
 
         Object vector;
-        if (fixed)
-        {
+        if (fixed) {
             useListTemporarily = len > INITIAL_COLLECTION_CAPACITY;
-            if (useListTemporarily)
-            {
+            if (useListTemporarily) {
                 ClassUtil.validateCreation(ArrayList.class);
                 vector = new ArrayList<Long>(INITIAL_COLLECTION_CAPACITY);
-            }
-            else
-            {
+            } else {
                 ClassUtil.validateCreation(Long[].class);
                 vector = new Long[len];
             }
-        }
-        else
-        {
+        } else {
             ClassUtil.validateCreation(ArrayList.class);
-            int initialCapacity = len < INITIAL_COLLECTION_CAPACITY? len : INITIAL_COLLECTION_CAPACITY;
+            int initialCapacity = len < INITIAL_COLLECTION_CAPACITY ? len : INITIAL_COLLECTION_CAPACITY;
             vector = new ArrayList<Long>(initialCapacity);
         }
 
@@ -463,8 +429,7 @@
         if (isDebug)
             trace.startAMFVector(objectTable.size() - 1, VectorType.UINT);
 
-        for (int i = 0; i < len; i++)
-        {
+        for (int i = 0; i < len; i++) {
             if (isDebug)
                 trace.arrayElement(i);
 
@@ -484,12 +449,11 @@
             if (vector instanceof Long[])
                 Array.set(vector, i, item);
             else
-                ((List<Long>)vector).add(item);
+                ((List<Long>) vector).add(item);
         }
 
-        if (useListTemporarily)
-        {
-            vector = ((ArrayList<Long>)vector).toArray();
+        if (useListTemporarily) {
+            vector = ((ArrayList<Long>) vector).toArray();
             objectTable.set(objectId, vector);
         }
 
@@ -500,31 +464,24 @@
     }
 
     @SuppressWarnings("unchecked")
-    protected Object readTypedDoubleVector(int len, boolean fixed) throws IOException
-    {
+    protected Object readTypedDoubleVector(int len, boolean fixed) throws IOException {
         // Don't instantiate Array right away with the supplied size if it is more
         // than INITIAL_ARRAY_CAPACITY in case the supplied size has been tampered.
         boolean useListTemporarily = false;
 
         Object vector;
-        if (fixed)
-        {
+        if (fixed) {
             useListTemporarily = len > INITIAL_COLLECTION_CAPACITY;
-            if (useListTemporarily)
-            {
+            if (useListTemporarily) {
                 ClassUtil.validateCreation(ArrayList.class);
                 vector = new ArrayList<Double>(INITIAL_COLLECTION_CAPACITY);
-            }
-            else
-            {
+            } else {
                 ClassUtil.validateCreation(Double[].class);
                 vector = new Double[len];
             }
-        }
-        else
-        {
+        } else {
             ClassUtil.validateCreation(ArrayList.class);
-            int initialCapacity = len < INITIAL_COLLECTION_CAPACITY? len : INITIAL_COLLECTION_CAPACITY;
+            int initialCapacity = len < INITIAL_COLLECTION_CAPACITY ? len : INITIAL_COLLECTION_CAPACITY;
             vector = new ArrayList<Double>(initialCapacity);
         }
 
@@ -533,8 +490,7 @@
         if (isDebug)
             trace.startAMFVector(objectTable.size() - 1, VectorType.DOUBLE);
 
-        for (int i = 0; i < len; i++)
-        {
+        for (int i = 0; i < len; i++) {
             if (isDebug)
                 trace.arrayElement(i);
 
@@ -544,12 +500,11 @@
             if (vector instanceof Double[])
                 Array.set(vector, i, item);
             else
-                ((List<Double>)vector).add(item);
+                ((List<Double>) vector).add(item);
         }
 
-        if (useListTemporarily)
-        {
-            vector = ((ArrayList<Double>)vector).toArray();
+        if (useListTemporarily) {
+            vector = ((ArrayList<Double>) vector).toArray();
             objectTable.set(objectId, vector);
         }
 
@@ -560,8 +515,7 @@
     }
 
     @SuppressWarnings("unchecked")
-    protected Object readTypedObjectVector(int len, boolean fixed) throws IOException, ClassNotFoundException
-    {
+    protected Object readTypedObjectVector(int len, boolean fixed) throws IOException, ClassNotFoundException {
         // TODO - Class name is always empty for some reason, need to figure out if this is expected.
         String className = readString();
         if (className == null || className.length() == 0 || className.equals(EMPTY_STRING))
@@ -572,24 +526,18 @@
         boolean useListTemporarily = false;
 
         Object vector;
-        if (fixed)
-        {
+        if (fixed) {
             useListTemporarily = len > INITIAL_COLLECTION_CAPACITY;
-            if (useListTemporarily)
-            {
+            if (useListTemporarily) {
                 ClassUtil.validateCreation(ArrayList.class);
                 vector = new ArrayList<Object>(INITIAL_COLLECTION_CAPACITY);
-            }
-            else
-            {
+            } else {
                 ClassUtil.validateCreation(Object[].class);
                 vector = new Object[len];
             }
-        }
-        else
-        {
+        } else {
             ClassUtil.validateCreation(ArrayList.class);
-            int initialCapacity = len < INITIAL_COLLECTION_CAPACITY? len : INITIAL_COLLECTION_CAPACITY;
+            int initialCapacity = len < INITIAL_COLLECTION_CAPACITY ? len : INITIAL_COLLECTION_CAPACITY;
             vector = new ArrayList<Object>(initialCapacity);
         }
 
@@ -598,8 +546,7 @@
         if (isDebug)
             trace.startAMFVector(objectTable.size() - 1, VectorType.OBJECT);
 
-        for (int i = 0; i < len; i++)
-        {
+        for (int i = 0; i < len; i++) {
             if (isDebug)
                 trace.arrayElement(i);
             Object item = readObjectOneLevelDown(true);
@@ -607,12 +554,11 @@
             if (vector instanceof Object[])
                 Array.set(vector, i, item);
             else
-                ((List<Object>)vector).add(item);
+                ((List<Object>) vector).add(item);
         }
 
-        if (useListTemporarily)
-        {
-            vector = ((ArrayList<Object>)vector).toArray();
+        if (useListTemporarily) {
+            vector = ((ArrayList<Object>) vector).toArray();
             objectTable.set(objectId, vector);
         }
 
@@ -625,8 +571,7 @@
     /**
      *
      */
-    protected Object readArray() throws ClassNotFoundException, IOException
-    {
+    protected Object readArray() throws ClassNotFoundException, IOException {
         int ref = readUInt29();
 
         if ((ref & 1) == 0) // This is a reference.
@@ -638,15 +583,13 @@
         // First, look for any string based keys. If any non-ordinal indices were used,
         // or if the Array is sparse, we represent the structure as a Map.
         Map map = null;
-        for (; ;)
-        {
+        for (; ; ) {
             String name = readString();
             if (name == null || name.length() == 0)
                 break;
 
-            if (map == null)
-            {
-                map = (HashMap)ClassUtil.createDefaultInstance(HashMap.class, null, true /*validate*/);
+            if (map == null) {
+                map = (HashMap) ClassUtil.createDefaultInstance(HashMap.class, null, true /*validate*/);
                 array = map;
 
                 //Remember Object
@@ -665,24 +608,21 @@
 
         // If we didn't find any string based keys, we have a dense Array, so we
         // represent the structure as a List.
-        if (map == null)
-        {
+        if (map == null) {
             // Don't instantiate List/Array right away with the supplied size if it is more than
             // INITIAL_ARRAY_CAPACITY in case the supplied size has been tampered. This at least
             // requires the user to pass in the actual objects for the List/Array to grow beyond.
             boolean useListTemporarily = false;
 
             // Legacy Flex 1.5 behavior was to return a java.util.Collection for Array
-            if (context.legacyCollection || len > INITIAL_COLLECTION_CAPACITY)
-            {
+            if (context.legacyCollection || len > INITIAL_COLLECTION_CAPACITY) {
                 useListTemporarily = !context.legacyCollection;
                 ClassUtil.validateCreation(ArrayList.class);
-                int initialCapacity = len < INITIAL_COLLECTION_CAPACITY? len : INITIAL_COLLECTION_CAPACITY;
+                int initialCapacity = len < INITIAL_COLLECTION_CAPACITY ? len : INITIAL_COLLECTION_CAPACITY;
                 array = new ArrayList(initialCapacity);
             }
             // Flex 2+ behavior is to return Object[] for AS3 Array
-            else
-            {
+            else {
                 ClassUtil.validateCreation(Object[].class);
                 array = new Object[len];
             }
@@ -691,28 +631,23 @@
             if (isDebug)
                 trace.startAMFArray(objectTable.size() - 1);
 
-            for (int i = 0; i < len; i++)
-            {
+            for (int i = 0; i < len; i++) {
                 if (isDebug)
                     trace.arrayElement(i);
                 Object item = readObjectOneLevelDown(true);
                 ClassUtil.validateAssignment(array, i, item);
                 if (array instanceof ArrayList)
-                    ((ArrayList)array).add(item);
+                    ((ArrayList) array).add(item);
                 else
                     Array.set(array, i, item);
             }
 
-            if (useListTemporarily)
-            {
-                array = ((ArrayList)array).toArray();
+            if (useListTemporarily) {
+                array = ((ArrayList) array).toArray();
                 objectTable.set(objectId, array);
             }
-        }
-        else
-        {
-            for (int i = 0; i < len; i++)
-            {
+        } else {
+            for (int i = 0; i < len; i++) {
                 if (isDebug)
                     trace.arrayElement(i);
                 Object item = readObjectOneLevelDown(true);
@@ -731,8 +666,7 @@
     /**
      *
      */
-    protected Object readScriptObject() throws ClassNotFoundException, IOException
-    {
+    protected Object readScriptObject() throws ClassNotFoundException, IOException {
         int ref = readUInt29();
 
         if ((ref & 1) == 0)
@@ -744,32 +678,27 @@
 
         // Prepare the parameters for createObjectInstance(). Use an array as a holder
         // to simulate two 'by-reference' parameters className and (initially null) proxy
-        Object[] params = new Object[] {className, null};
+        Object[] params = new Object[]{className, null};
         Object object = createObjectInstance(params);
 
         // Retrieve any changes to the className and the proxy parameters
-        className = (String)params[0];
-        PropertyProxy proxy = (PropertyProxy)params[1];
+        className = (String) params[0];
+        PropertyProxy proxy = (PropertyProxy) params[1];
 
         // Remember our instance in the object table
         int objectId = rememberObject(object);
 
-        if (externalizable)
-        {
+        if (externalizable) {
             readExternalizable(className, object);
-        }
-        else
-        {
-            if (isDebug)
-            {
+        } else {
+            if (isDebug) {
                 trace.startAMFObject(className, objectTable.size() - 1);
             }
 
             boolean isCollectionClass = isCollectionClass(object);
             int len = ti.getProperties().size();
 
-            for (int i = 0; i < len; i++)
-            {
+            for (int i = 0; i < len; i++) {
                 String propName = ti.getProperty(i);
 
                 if (isDebug)
@@ -778,10 +707,8 @@
                 proxy.setValue(object, propName, value);
             }
 
-            if (ti.isDynamic())
-            {
-                for (; ;)
-                {
+            if (ti.isDynamic()) {
+                for (; ; ) {
                     String name = readString();
                     if (name == null || name.length() == 0) break;
 
@@ -806,8 +733,7 @@
         // temporary object.  it would be possible to warn users about
         // that problem by tracking if we read any references to this object
         // in the readObject call above.
-        if (newObj != object)
-        {
+        if (newObj != object) {
             objectTable.set(objectId, newObj);
             object = newObj;
         }
@@ -818,20 +744,16 @@
     /**
      *
      */
-    protected void readExternalizable(String className, Object object) throws ClassNotFoundException, IOException
-    {
-        if (object instanceof Externalizable)
-        {
+    protected void readExternalizable(String className, Object object) throws ClassNotFoundException, IOException {
+        if (object instanceof Externalizable) {
             if (isDebug)
                 trace.startExternalizableObject(className, objectTable.size() - 1);
 
-            ((Externalizable)object).readExternal(this);
-        }
-        else
-        {
+            ((Externalizable) object).readExternal(this);
+        } else {
             //Class '{className}' must implement java.io.Externalizable to receive client IExternalizable instances.
             SerializationException ex = new SerializationException();
-            ex.setMessage(10305, new Object[] {object.getClass().getName()});
+            ex.setMessage(10305, new Object[]{object.getClass().getName()});
             throw ex;
         }
     }
@@ -839,16 +761,15 @@
     /**
      *
      */
-    protected byte[] readByteArray() throws IOException
-    {
+    protected byte[] readByteArray() throws IOException {
         ClassUtil.validateCreation(byte[].class);
 
         int ref = readUInt29();
         if ((ref & 1) == 0)
-            return (byte[])getObjectReference(ref >> 1);
+            return (byte[]) getObjectReference(ref >> 1);
 
         int len = (ref >> 1);
-        int initialCapacity = len < INITIAL_COLLECTION_CAPACITY? len : INITIAL_COLLECTION_CAPACITY;
+        int initialCapacity = len < INITIAL_COLLECTION_CAPACITY ? len : INITIAL_COLLECTION_CAPACITY;
         ByteArrayOutputStream outStream = new ByteArrayOutputStream(initialCapacity);
         for (int i = 0; i < len; i++)
             outStream.write(in.read());
@@ -865,8 +786,7 @@
     /**
      *
      */
-    protected TraitsInfo readTraits(int ref) throws IOException
-    {
+    protected TraitsInfo readTraits(int ref) throws IOException {
         if ((ref & 3) == 1) // This is a reference
             return getTraitReference(ref >> 2);
 
@@ -880,8 +800,7 @@
         // Remember Trait Info
         traitsTable.add(ti);
 
-        for (int i = 0; i < count; i++)
-        {
+        for (int i = 0; i < count; i++) {
             String propName = readString();
             ti.addProperty(propName);
         }
@@ -892,8 +811,7 @@
     /**
      *
      */
-    protected String readUTF(int utflen) throws IOException
-    {
+    protected String readUTF(int utflen) throws IOException {
         checkUTFLength(utflen);
         // We should just read the bytes into a buffer
         byte[] bytearr = new byte[utflen];
@@ -919,10 +837,8 @@
      *
      * @return A int capable of holding an unsigned 29 bit integer.
      * @throws IOException
-     *
      */
-    protected int readUInt29() throws IOException
-    {
+    protected int readUInt29() throws IOException {
         int value;
 
         // Each byte must be treated as unsigned
@@ -952,26 +868,22 @@
     /**
      *
      */
-    protected Object readXml() throws IOException
-    {
+    protected Object readXml() throws IOException {
         String xml = null;
 
         int ref = readUInt29();
 
-        if ((ref & 1) == 0)
-        {
+        if ((ref & 1) == 0) {
             // This is a reference
-            xml = (String)getObjectReference(ref >> 1);
-        }
-        else
-        {
+            xml = (String) getObjectReference(ref >> 1);
+        } else {
             // Read the string in
             int len = (ref >> 1);
 
             // writeString() special case the empty string
             // for speed.  Do add a reference
             if (0 == len)
-                xml = (String)ClassUtil.createDefaultInstance(String.class, null);
+                xml = (String) ClassUtil.createDefaultInstance(String.class, null);
             else
                 xml = readUTF(len);
 
@@ -995,8 +907,7 @@
     /**
      *
      */
-    protected Object getObjectReference(int ref)
-    {
+    protected Object getObjectReference(int ref) {
         if (isDebug)
             trace.writeRef(ref);
 
@@ -1006,9 +917,8 @@
     /**
      *
      */
-    protected String getStringReference(int ref)
-    {
-        String str = (String)stringTable.get(ref);
+    protected String getStringReference(int ref) {
+        String str = (String) stringTable.get(ref);
 
         if (Trace.amf && isDebug)
             trace.writeStringRef(ref);
@@ -1019,27 +929,24 @@
     /**
      *
      */
-    protected TraitsInfo getTraitReference(int ref)
-    {
+    protected TraitsInfo getTraitReference(int ref) {
         if (Trace.amf && isDebug)
             trace.writeTraitsInfoRef(ref);
 
-        return (TraitsInfo)traitsTable.get(ref);
+        return (TraitsInfo) traitsTable.get(ref);
     }
 
     /**
      * Remember a deserialized object so that you can use it later through a reference.
      */
-    protected int rememberObject(Object obj)
-    {
+    protected int rememberObject(Object obj) {
         int id = objectTable.size();
         objectTable.add(obj);
         return id;
     }
 
 
-    protected Object readObjectOneLevelDown(boolean nestCollectionLevelDown) throws ClassNotFoundException, IOException
-    {
+    protected Object readObjectOneLevelDown(boolean nestCollectionLevelDown) throws ClassNotFoundException, IOException {
         increaseNestObjectLevel();
         if (nestCollectionLevelDown)
             increaseNestCollectionLevel();
diff --git a/core/src/main/java/flex/messaging/io/amf/Amf3Output.java b/core/src/main/java/flex/messaging/io/amf/Amf3Output.java
index 7919530..379981f 100644
--- a/core/src/main/java/flex/messaging/io/amf/Amf3Output.java
+++ b/core/src/main/java/flex/messaging/io/amf/Amf3Output.java
@@ -54,11 +54,8 @@
  * This class intends to match the Flash Player 8 C++ code
  * in avmglue/DataIO.cpp
  * </p>
- *
- *
  */
-public class Amf3Output extends AbstractAmfOutput implements Amf3Types
-{
+public class Amf3Output extends AbstractAmfOutput implements Amf3Types {
     /**
      *
      */
@@ -74,14 +71,12 @@
      */
     protected HashMap<String, Integer> stringTable;
 
-    public Amf3Output(SerializationContext context)
-    {
+    public Amf3Output(SerializationContext context) {
         super(context);
         context.supportDatesByReference = true;
     }
 
-    public void reset()
-    {
+    public void reset() {
         super.reset();
         if (objectTable != null)
             objectTable.clear();
@@ -97,68 +92,49 @@
 
     /**
      * Serialize an Object using AMF 3.
+     *
      * @param o the object to write
      * @throws IOException if the write failed
      */
-    public void writeObject(Object o) throws IOException
-    {
-        if (o == null)
-        {
+    public void writeObject(Object o) throws IOException {
+        if (o == null) {
             writeAMFNull();
             return;
         }
-        
-        if (!context.legacyExternalizable && o instanceof Externalizable)
-        {
+
+        if (!context.legacyExternalizable && o instanceof Externalizable) {
             writeCustomObject(o);
-        }
-        else if (o instanceof String || o instanceof Character)
-        {
+        } else if (o instanceof String || o instanceof Character) {
             String s = o.toString();
             writeAMFString(s);
-        }
-        else if (o instanceof Number)
-        {
-            if (o instanceof Integer || o instanceof Short || o instanceof Byte)
-            {
-                int i = ((Number)o).intValue();
+        } else if (o instanceof Number) {
+            if (o instanceof Integer || o instanceof Short || o instanceof Byte) {
+                int i = ((Number) o).intValue();
                 writeAMFInt(i);
-            }
-            else if (!context.legacyBigNumbers &&
-                    (o instanceof BigInteger || o instanceof BigDecimal))
-            {
+            } else if (!context.legacyBigNumbers &&
+                    (o instanceof BigInteger || o instanceof BigDecimal)) {
                 // Using double to write big numbers such as BigInteger or
                 // BigDecimal can result in information loss so we write
                 // them as String by default...
                 writeAMFString(o.toString());
-            }
-            else
-            {
-                double d = ((Number)o).doubleValue();
+            } else {
+                double d = ((Number) o).doubleValue();
                 writeAMFDouble(d);
             }
-        }
-        else if (o instanceof Boolean)
-        {
-            writeAMFBoolean(((Boolean)o).booleanValue());
+        } else if (o instanceof Boolean) {
+            writeAMFBoolean(((Boolean) o).booleanValue());
         }
         // We have a complex type...
-        else if (o instanceof Date)
-        {
-            writeAMFDate((Date)o);
-        }
-        else if (o instanceof Calendar)
-        {
-            writeAMFDate(((Calendar)o).getTime());
-        }
-        else if (o instanceof Document)
-        {
+        else if (o instanceof Date) {
+            writeAMFDate((Date) o);
+        } else if (o instanceof Calendar) {
+            writeAMFDate(((Calendar) o).getTime());
+        } else if (o instanceof Document) {
             if (context.legacyXMLDocument)
                 out.write(kXMLType); // Legacy flash.xml.XMLDocument Type
             else
                 out.write(kAvmPlusXmlType); // New E4X XML Type
-            if (!byReference(o))
-            {
+            if (!byReference(o)) {
                 String xml = documentToString(o);
                 if (isDebug)
                     trace.write(xml);
@@ -168,54 +144,39 @@
         }
         // If there is a proxy for this,write it as a custom object so the default
         // behavior can be overriden.
-        else if (o instanceof Enum && PropertyProxyRegistry.getRegistry().getProxy(o.getClass()) == null)
-        {
-            Enum<?> enumValue = (Enum<?>)o;
+        else if (o instanceof Enum && PropertyProxyRegistry.getRegistry().getProxy(o.getClass()) == null) {
+            Enum<?> enumValue = (Enum<?>) o;
             writeAMFString(enumValue.name());
-        }
-        else
-        {
+        } else {
             // We have an Object or Array type...
             Class cls = o.getClass();
 
-            if (context.legacyMap && o instanceof Map && !(o instanceof ASObject))
-            {
-                writeMapAsECMAArray((Map)o);
-            }
-            else if (!context.legacyDictionary && o instanceof Dictionary)
-            {
-                writeDictionary((Dictionary)o);
-            }
-            else if (o instanceof Collection)
-            {
+            if (context.legacyMap && o instanceof Map && !(o instanceof ASObject)) {
+                writeMapAsECMAArray((Map) o);
+            } else if (!context.legacyDictionary && o instanceof Dictionary) {
+                writeDictionary((Dictionary) o);
+            } else if (o instanceof Collection) {
                 if (o instanceof List && context.preferVectors)
-                    writeListAsTypedVector((List)o);
+                    writeListAsTypedVector((List) o);
                 else if (context.legacyCollection)
-                    writeCollection((Collection)o, null);
+                    writeCollection((Collection) o, null);
                 else
-                    writeArrayCollection((Collection)o, null);
-            }
-            else if (cls.isArray())
-            {
+                    writeArrayCollection((Collection) o, null);
+            } else if (cls.isArray()) {
                 Class<?> componentType = cls.getComponentType();
                 // Convert to vector if requested, except for character and byte arrays
                 if (context.preferVectors &&
-                        !(componentType.equals(Byte.class) || componentType.equals(byte.class))&&
+                        !(componentType.equals(Byte.class) || componentType.equals(byte.class)) &&
                         !(componentType.equals(Character.class) || componentType.equals(char.class)))
                     writeArrayAsTypedVector(o, componentType);
                 else
                     writeAMFArray(o, componentType);
-            }
-            else
-            {
+            } else {
                 //Special Case: wrap RowSet in PageableRowSet for Serialization
-                if (o instanceof RowSet)
-                {
-                    o = new PagedRowSet((RowSet)o, Integer.MAX_VALUE, false);
-                }
-                else if (context.legacyThrowable && o instanceof Throwable)
-                {
-                    o = new StatusInfoProxy((Throwable)o);
+                if (o instanceof RowSet) {
+                    o = new PagedRowSet((RowSet) o, Integer.MAX_VALUE, false);
+                } else if (context.legacyThrowable && o instanceof Throwable) {
+                    o = new StatusInfoProxy((Throwable) o);
                 }
 
                 writeCustomObject(o);
@@ -223,26 +184,22 @@
         }
     }
 
-    public void writeObjectTraits(TraitsInfo ti) throws IOException
-    {
+    public void writeObjectTraits(TraitsInfo ti) throws IOException {
         String className = ti.getClassName();
 
-        if (isDebug)
-        {
+        if (isDebug) {
             if (ti.isExternalizable())
                 trace.startExternalizableObject(className, getObjectTableSize());
             else
                 trace.startAMFObject(className, getObjectTableSize());
         }
 
-        if (!byReference(ti))
-        {
+        if (!byReference(ti)) {
             int count = 0;
             List propertyNames = null;
             boolean externalizable = ti.isExternalizable();
 
-            if (!externalizable)
-            {
+            if (!externalizable) {
                 propertyNames = ti.getProperties();
                 if (propertyNames != null)
                     count = propertyNames.size();
@@ -253,10 +210,8 @@
             writeUInt29(3 | (externalizable ? 4 : 0) | (dynamic ? 8 : 0) | (count << 4));
             writeStringWithoutType(className);
 
-            if (!externalizable && propertyNames != null)
-            {
-                for (int i = 0; i < count; i++)
-                {
+            if (!externalizable && propertyNames != null) {
+                for (int i = 0; i < count; i++) {
                     String propName = ti.getProperty(i);
                     writeStringWithoutType(propName);
                 }
@@ -264,8 +219,7 @@
         }
     }
 
-    public void writeObjectProperty(String name, Object value) throws IOException
-    {
+    public void writeObjectProperty(String name, Object value) throws IOException {
         if (isDebug)
             trace.namedElement(name);
         increaseNestObjectLevel();
@@ -273,8 +227,7 @@
         decreaseNestObjectLevel();
     }
 
-    public void writeObjectEnd() throws IOException
-    {
+    public void writeObjectEnd() throws IOException {
         // No action required for AMF 3
 
         if (isDebug)
@@ -288,8 +241,7 @@
     /**
      *
      */
-    protected void writeAMFBoolean(boolean b) throws IOException
-    {
+    protected void writeAMFBoolean(boolean b) throws IOException {
         if (isDebug)
             trace.write(b);
 
@@ -302,12 +254,10 @@
     /**
      *
      */
-    protected void writeAMFDate(Date d) throws IOException
-    {
+    protected void writeAMFDate(Date d) throws IOException {
         out.write(kDateType);
 
-        if (!byReference(d))
-        {
+        if (!byReference(d)) {
             if (isDebug)
                 trace.write(d);
 
@@ -315,15 +265,14 @@
             writeUInt29(1);
 
             // Write the time as 64bit value in ms
-            out.writeDouble((double)d.getTime());
+            out.writeDouble((double) d.getTime());
         }
     }
 
     /**
      *
      */
-    protected void writeAMFDouble(double d) throws IOException
-    {
+    protected void writeAMFDouble(double d) throws IOException {
         if (isDebug)
             trace.write(d);
 
@@ -334,10 +283,8 @@
     /**
      *
      */
-    protected void writeAMFInt(int i) throws IOException
-    {
-        if (i >= INT28_MIN_VALUE && i <= INT28_MAX_VALUE)
-        {
+    protected void writeAMFInt(int i) throws IOException {
+        if (i >= INT28_MIN_VALUE && i <= INT28_MAX_VALUE) {
             if (isDebug)
                 trace.write(i);
 
@@ -348,16 +295,13 @@
             i = i & UINT29_MASK; // Mask is 2^29 - 1
             out.write(kIntegerType);
             writeUInt29(i);
-        }
-        else
-        {
+        } else {
             // Promote large int to a double
             writeAMFDouble(i);
         }
     }
 
-    protected void writeDictionary(Dictionary dictionary) throws IOException
-    {
+    protected void writeDictionary(Dictionary dictionary) throws IOException {
         out.write(kDictionaryType);
 
         if (byReference(dictionary))
@@ -369,8 +313,7 @@
         if (isDebug) trace.startAMFDictionary(objectTable.size() - 1);
 
         Enumeration keys = dictionary.keys();
-        while (keys.hasMoreElements())
-        {
+        while (keys.hasMoreElements()) {
             if (isDebug) trace.startDictionaryElement();
             Object key = keys.nextElement();
             increaseNestObjectLevel();
@@ -387,18 +330,14 @@
             trace.endAMFDictionary();
     }
 
-    protected void writeArrayAsTypedVector(Object array, Class<?> componentType) throws IOException
-    {
+    protected void writeArrayAsTypedVector(Object array, Class<?> componentType) throws IOException {
         int vecType = kTypedVectorObject;
-        if (componentType.isPrimitive())
-        {
+        if (componentType.isPrimitive()) {
             if (int.class.equals(componentType))
                 vecType = kTypedVectorInt;
             else if (double.class.equals(componentType))
                 vecType = kTypedVectorDouble;
-        }
-        else
-        {
+        } else {
             if (Integer.class.equals(componentType))
                 vecType = kTypedVectorInt;
             else if (Double.class.equals(componentType))
@@ -414,19 +353,17 @@
         writeUInt29((length << 1) | 1);
         writeBoolean(true /*fixed*/);
 
-        switch (vecType)
-        {
+        switch (vecType) {
             case kTypedVectorInt:
                 if (isDebug)
                     trace.startAMFVector(objectTable.size() - 1, VectorType.INT);
 
-                for (int i = 0; i < length; i++)
-                {
+                for (int i = 0; i < length; i++) {
                     if (isDebug)
                         trace.arrayElement(i);
 
                     Object element = Array.get(array, i);
-                    int value = ((Integer)element).intValue();
+                    int value = ((Integer) element).intValue();
 
                     if (isDebug)
                         trace.write(value);
@@ -438,13 +375,12 @@
                 if (isDebug)
                     trace.startAMFVector(objectTable.size() - 1, VectorType.DOUBLE);
 
-                for (int i = 0; i < length; i++)
-                {
+                for (int i = 0; i < length; i++) {
                     if (isDebug)
                         trace.arrayElement(i);
 
                     Object element = Array.get(array, i);
-                    double value = ((Double)element).doubleValue();
+                    double value = ((Double) element).doubleValue();
 
                     if (isDebug)
                         trace.write(value);
@@ -460,8 +396,7 @@
                 String className = componentType.getName();
                 writeStringWithoutType(className);
 
-                for (int i = 0; i < length; i++)
-                {
+                for (int i = 0; i < length; i++) {
                     if (isDebug)
                         trace.arrayElement(i);
 
@@ -479,33 +414,26 @@
             trace.endAMFVector();
     }
 
-    protected void writeListAsTypedVector(List list) throws IOException
-    {
+    protected void writeListAsTypedVector(List list) throws IOException {
         // Peek at the first three elements of the list to figure out what type
         // of Vector it should be sent as.
         int vecType = -1;
         Class<?> initialElementClass = null;
         int peekSize = Math.min(list.size(), 3);
-        for (int i = 0; i < peekSize; i++)
-        {
+        for (int i = 0; i < peekSize; i++) {
             Object element = list.get(i);
-            if (i == 0)
-            {
-                initialElementClass = element != null? element.getClass() : null;
-            }
-            else
-            {
-                Class<?> currentElementClass = element != null? element.getClass() : null;
-                if (initialElementClass != currentElementClass)
-                {
+            if (i == 0) {
+                initialElementClass = element != null ? element.getClass() : null;
+            } else {
+                Class<?> currentElementClass = element != null ? element.getClass() : null;
+                if (initialElementClass != currentElementClass) {
                     vecType = kTypedVectorObject;
                     break;
                 }
             }
         }
 
-        if (vecType == -1)
-        {
+        if (vecType == -1) {
             if (initialElementClass == Integer.class)
                 vecType = kTypedVectorInt;
             else if (initialElementClass == Double.class)
@@ -524,19 +452,17 @@
         writeUInt29((length << 1) | 1);
         writeBoolean(false /*fixed*/);
 
-        switch (vecType)
-        {
+        switch (vecType) {
             case kTypedVectorInt:
                 if (isDebug)
                     trace.startAMFVector(objectTable.size() - 1, VectorType.INT);
 
-                for (int i = 0; i < length; i++)
-                {
+                for (int i = 0; i < length; i++) {
                     if (isDebug)
                         trace.arrayElement(i);
 
                     Object element = list.get(i);
-                    int value = ((Integer)element).intValue();
+                    int value = ((Integer) element).intValue();
 
                     if (isDebug)
                         trace.write(value);
@@ -548,13 +474,12 @@
                 if (isDebug)
                     trace.startAMFVector(objectTable.size() - 1, VectorType.DOUBLE);
 
-                for (int i = 0; i < length; i++)
-                {
+                for (int i = 0; i < length; i++) {
                     if (isDebug)
                         trace.arrayElement(i);
 
                     Object element = list.get(i);
-                    double value = ((Double)element).doubleValue();
+                    double value = ((Double) element).doubleValue();
 
                     if (isDebug)
                         trace.write(value);
@@ -567,11 +492,10 @@
                     trace.startAMFVector(objectTable.size() - 1, VectorType.OBJECT);
 
                 // TODO - I don't think this className is used properly on the client currently.
-                String className = initialElementClass != null? initialElementClass.getName() : "";
+                String className = initialElementClass != null ? initialElementClass.getName() : "";
                 writeStringWithoutType(className);
 
-                for (int i = 0; i < length; i++)
-                {
+                for (int i = 0; i < length; i++) {
                     if (isDebug)
                         trace.arrayElement(i);
 
@@ -592,23 +516,19 @@
     /**
      *
      */
-    protected void writeMapAsECMAArray(Map map) throws IOException
-    {
+    protected void writeMapAsECMAArray(Map map) throws IOException {
         out.write(kArrayType);
 
-        if (!byReference(map))
-        {
+        if (!byReference(map)) {
             if (isDebug)
                 trace.startECMAArray(getObjectTableSize());
 
             writeUInt29((0 << 1) | 1);
 
             Iterator it = map.keySet().iterator();
-            while (it.hasNext())
-            {
+            while (it.hasNext()) {
                 Object key = it.next();
-                if (key != null)
-                {
+                if (key != null) {
                     String propName = key.toString();
                     writeStringWithoutType(propName);
 
@@ -631,8 +551,7 @@
     /**
      *
      */
-    protected void writeAMFNull() throws IOException
-    {
+    protected void writeAMFNull() throws IOException {
         if (isDebug)
             trace.writeNull();
 
@@ -642,13 +561,11 @@
     /**
      *
      */
-    protected void writeAMFString(String s) throws IOException
-    {
+    protected void writeAMFString(String s) throws IOException {
         out.write(kStringType);
         writeStringWithoutType(s);
 
-        if (isDebug)
-        {
+        if (isDebug) {
             trace.writeString(s);
         }
     }
@@ -656,10 +573,8 @@
     /**
      *
      */
-    protected void writeStringWithoutType(String s) throws IOException
-    {
-        if (s.length() == 0)
-        {
+    protected void writeStringWithoutType(String s) throws IOException {
+        if (s.length() == 0) {
             // don't create a reference for the empty string,
             // as it's represented by the one byte value 1
             // len = 0, ((len << 1) | 1).
@@ -667,8 +582,7 @@
             return;
         }
 
-        if (!byReference(s))
-        {
+        if (!byReference(s)) {
             writeAMFUTF(s);
             return;
         }
@@ -677,45 +591,32 @@
     /**
      *
      */
-    protected void writeAMFArray(Object o, Class componentType) throws IOException
-    {
-        if (componentType.isPrimitive())
-        {
+    protected void writeAMFArray(Object o, Class componentType) throws IOException {
+        if (componentType.isPrimitive()) {
             writePrimitiveArray(o);
-        }
-        else if (componentType.equals(Byte.class))
-        {
-            writeAMFByteArray((Byte[])o);
-        }
-        else if (componentType.equals(Character.class))
-        {
-            writeCharArrayAsString((Character[])o);
-        }
-        else
-        {
-            writeObjectArray((Object[])o, null);
+        } else if (componentType.equals(Byte.class)) {
+            writeAMFByteArray((Byte[]) o);
+        } else if (componentType.equals(Character.class)) {
+            writeCharArrayAsString((Character[]) o);
+        } else {
+            writeObjectArray((Object[]) o, null);
         }
     }
 
     /**
      *
      */
-    protected void writeArrayCollection(Collection col, SerializationDescriptor desc) throws IOException
-    {
+    protected void writeArrayCollection(Collection col, SerializationDescriptor desc) throws IOException {
         out.write(kObjectType);
 
-        if (!byReference(col))
-        {
+        if (!byReference(col)) {
             ArrayCollection ac;
 
-            if (col instanceof ArrayCollection)
-            {
-                ac = (ArrayCollection)col;
+            if (col instanceof ArrayCollection) {
+                ac = (ArrayCollection) col;
                 // TODO: QUESTION: Pete, ignoring the descriptor here... not sure if
                 // we should modify the user's AC as that could cause corruption?
-            }
-            else
-            {
+            } else {
                 // Wrap any Collection in an ArrayCollection
                 ac = new ArrayCollection(col);
                 if (desc != null)
@@ -731,18 +632,15 @@
     /**
      *
      */
-    protected void writeCustomObject(Object o) throws IOException
-    {
+    protected void writeCustomObject(Object o) throws IOException {
         PropertyProxy proxy = null;
 
-        if (o instanceof PropertyProxy)
-        {
-            proxy = (PropertyProxy)o;
+        if (o instanceof PropertyProxy) {
+            proxy = (PropertyProxy) o;
             o = proxy.getDefaultInstance();
 
             // The proxy may wrap a null default instance, if so, short circuit here.
-            if (o == null)
-            {
+            if (o == null) {
                 writeAMFNull();
                 return;
             }
@@ -751,32 +649,25 @@
             // or Collection or Map with legacyMap as true since we don't yet have
             // the ability to proxy multiple AMF types. We write an AMF Array directly
             // instead of an AMF Object...
-            else if (o instanceof Collection)
-            {
+            else if (o instanceof Collection) {
                 if (context.legacyCollection)
-                    writeCollection((Collection)o, proxy.getDescriptor());
+                    writeCollection((Collection) o, proxy.getDescriptor());
                 else
-                    writeArrayCollection((Collection)o, proxy.getDescriptor());
+                    writeArrayCollection((Collection) o, proxy.getDescriptor());
                 return;
-            }
-            else if (o.getClass().isArray())
-            {
-                writeObjectArray((Object[])o, proxy.getDescriptor());
+            } else if (o.getClass().isArray()) {
+                writeObjectArray((Object[]) o, proxy.getDescriptor());
                 return;
-            }
-            else if (context.legacyMap && o instanceof Map && !(o instanceof ASObject))
-            {
-                writeMapAsECMAArray((Map)o);
+            } else if (context.legacyMap && o instanceof Map && !(o instanceof ASObject)) {
+                writeMapAsECMAArray((Map) o);
                 return;
             }
         }
 
         out.write(kObjectType);
 
-        if (!byReference(o))
-        {
-            if (proxy == null)
-            {
+        if (!byReference(o)) {
+            if (proxy == null) {
                 proxy = PropertyProxyRegistry.getProxyAndRegister(o);
             }
 
@@ -787,14 +678,12 @@
     /**
      *
      */
-    protected void writePropertyProxy(PropertyProxy proxy, Object instance) throws IOException
-    {
+    protected void writePropertyProxy(PropertyProxy proxy, Object instance) throws IOException {
         /*
          * At this point we substitute the instance we want to serialize.
          */
         Object newInst = proxy.getInstanceToSerialize(instance);
-        if (newInst != instance)
-        {
+        if (newInst != instance) {
             // We can't use writeAMFNull here I think since we already added this object
             // to the object table on the server side.  The player won't have any way
             // of knowing we have this reference mapped to null.
@@ -809,21 +698,16 @@
         List propertyNames = null;
         boolean externalizable = proxy.isExternalizable(instance);
 
-        if (!externalizable)
-        {
+        if (!externalizable) {
             propertyNames = proxy.getPropertyNames(instance);
             // filter write-only properties
-            if (proxy instanceof BeanProxy)
-            {
-                BeanProxy bp = (BeanProxy)proxy;
-                if (propertyNames != null && !propertyNames.isEmpty())
-                {
+            if (proxy instanceof BeanProxy) {
+                BeanProxy bp = (BeanProxy) proxy;
+                if (propertyNames != null && !propertyNames.isEmpty()) {
                     List<String> propertiesToRemove = null;
-                    for (int i = 0; i < propertyNames.size(); i++)
-                    {
-                        String propName = (String)propertyNames.get(i);
-                        if (bp.isWriteOnly(instance, propName))
-                        {
+                    for (int i = 0; i < propertyNames.size(); i++) {
+                        String propName = (String) propertyNames.get(i);
+                        if (bp.isWriteOnly(instance, propName)) {
                             if (propertiesToRemove == null)
                                 propertiesToRemove = new ArrayList<String>();
                             propertiesToRemove.add(propName);
@@ -839,16 +723,12 @@
         TraitsInfo ti = new TraitsInfo(proxy.getAlias(instance), proxy.isDynamic(), externalizable, propertyNames);
         writeObjectTraits(ti);
 
-        if (externalizable)
-        {
+        if (externalizable) {
             // Call user defined serialization
-            ((Externalizable)instance).writeExternal(this);
-        }
-        else if (propertyNames != null && !propertyNames.isEmpty())
-        {
-            for (int i = 0; i < propertyNames.size(); i++)
-            {
-                String propName = (String)propertyNames.get(i);
+            ((Externalizable) instance).writeExternal(this);
+        } else if (propertyNames != null && !propertyNames.isEmpty()) {
+            for (int i = 0; i < propertyNames.size(); i++) {
+                String propName = (String) propertyNames.get(i);
                 Object value = proxy.getValue(instance, propName);
                 writeObjectProperty(propName, value);
             }
@@ -866,31 +746,22 @@
      * </p>
      *
      * @param obj An array of primitives
-     *
      */
-    protected void writePrimitiveArray(Object obj) throws IOException
-    {
+    protected void writePrimitiveArray(Object obj) throws IOException {
         Class aType = obj.getClass().getComponentType();
 
-        if (aType.equals(Character.TYPE))
-        {
+        if (aType.equals(Character.TYPE)) {
             //Treat char[] as a String
-            char[] c = (char[])obj;
+            char[] c = (char[]) obj;
             writeCharArrayAsString(c);
-        }
-        else if (aType.equals(Byte.TYPE))
-        {
-            writeAMFByteArray((byte[])obj);
-        }
-        else
-        {
+        } else if (aType.equals(Byte.TYPE)) {
+            writeAMFByteArray((byte[]) obj);
+        } else {
             out.write(kArrayType);
 
-            if (!byReference(obj))
-            {
-                if (aType.equals(Boolean.TYPE))
-                {
-                    boolean[] b = (boolean[])obj;
+            if (!byReference(obj)) {
+                if (aType.equals(Boolean.TYPE)) {
+                    boolean[] b = (boolean[]) obj;
 
                     // Write out an invalid reference, storing the length in the unused 28-bits.
                     writeUInt29((b.length << 1) | 1);
@@ -898,28 +769,21 @@
                     // Send an empty string to imply no named keys
                     writeStringWithoutType(EMPTY_STRING);
 
-                    if (isDebug)
-                    {
+                    if (isDebug) {
                         trace.startAMFArray(getObjectTableSize());
 
-                        for (int i = 0; i < b.length; i++)
-                        {
+                        for (int i = 0; i < b.length; i++) {
                             trace.arrayElement(i);
                             writeAMFBoolean(b[i]);
                         }
 
                         trace.endAMFArray();
-                    }
-                    else
-                    {
-                        for (int i = 0; i < b.length; i++)
-                        {
+                    } else {
+                        for (int i = 0; i < b.length; i++) {
                             writeAMFBoolean(b[i]);
                         }
                     }
-                }
-                else if (aType.equals(Integer.TYPE) || aType.equals(Short.TYPE))
-                {
+                } else if (aType.equals(Integer.TYPE) || aType.equals(Short.TYPE)) {
                     //We have a primitive number, either an int or short
                     //We write all of these as Integers...
                     int length = Array.getLength(obj);
@@ -929,30 +793,23 @@
                     // Send an empty string to imply no named keys
                     writeStringWithoutType(EMPTY_STRING);
 
-                    if (isDebug)
-                    {
+                    if (isDebug) {
                         trace.startAMFArray(getObjectTableSize());
 
-                        for (int i = 0; i < length; i++)
-                        {
+                        for (int i = 0; i < length; i++) {
                             trace.arrayElement(i);
                             int v = Array.getInt(obj, i);
                             writeAMFInt(v);
                         }
 
                         trace.endAMFArray();
-                    }
-                    else
-                    {
-                        for (int i = 0; i < length; i++)
-                        {
+                    } else {
+                        for (int i = 0; i < length; i++) {
                             int v = Array.getInt(obj, i);
                             writeAMFInt(v);
                         }
                     }
-                }
-                else
-                {
+                } else {
                     //We have a primitive number, either a double, float, or long
                     //We write all of these as doubles...
                     int length = Array.getLength(obj);
@@ -962,23 +819,18 @@
                     // Send an empty string to imply no named keys
                     writeStringWithoutType(EMPTY_STRING);
 
-                    if (isDebug)
-                    {
+                    if (isDebug) {
                         trace.startAMFArray(getObjectTableSize());
 
-                        for (int i = 0; i < length; i++)
-                        {
+                        for (int i = 0; i < length; i++) {
                             trace.arrayElement(i);
                             double v = Array.getDouble(obj, i);
                             writeAMFDouble(v);
                         }
 
                         trace.endAMFArray();
-                    }
-                    else
-                    {
-                        for (int i = 0; i < length; i++)
-                        {
+                    } else {
+                        for (int i = 0; i < length; i++) {
                             double v = Array.getDouble(obj, i);
                             writeAMFDouble(v);
                         }
@@ -991,19 +843,16 @@
     /**
      *
      */
-    protected void writeAMFByteArray(byte[] ba) throws IOException
-    {
+    protected void writeAMFByteArray(byte[] ba) throws IOException {
         out.write(kByteArrayType);
 
-        if (!byReference(ba))
-        {
+        if (!byReference(ba)) {
             int length = ba.length;
 
             // Write out an invalid reference, storing the length in the unused 28-bits.
             writeUInt29((length << 1) | 1);
 
-            if (isDebug)
-            {
+            if (isDebug) {
                 trace.startByteArray(getObjectTableSize(), length);
             }
 
@@ -1014,24 +863,20 @@
     /**
      *
      */
-    protected void writeAMFByteArray(Byte[] ba) throws IOException
-    {
+    protected void writeAMFByteArray(Byte[] ba) throws IOException {
         out.write(kByteArrayType);
 
-        if (!byReference(ba))
-        {
+        if (!byReference(ba)) {
             int length = ba.length;
 
             // Write out an invalid reference, storing the length in the unused 28-bits.
             writeUInt29((length << 1) | 1);
 
-            if (isDebug)
-            {
+            if (isDebug) {
                 trace.startByteArray(getObjectTableSize(), length);
             }
 
-            for (int i = 0; i < ba.length; i++)
-            {
+            for (int i = 0; i < ba.length; i++) {
                 Byte b = ba[i];
                 if (b == null)
                     out.write(0);
@@ -1044,13 +889,11 @@
     /**
      *
      */
-    protected void writeCharArrayAsString(Character[] ca) throws IOException
-    {
+    protected void writeCharArrayAsString(Character[] ca) throws IOException {
         int length = ca.length;
         char[] chars = new char[length];
 
-        for (int i = 0; i < length; i++)
-        {
+        for (int i = 0; i < length; i++) {
             Character c = ca[i];
             if (c == null)
                 chars[i] = 0;
@@ -1063,8 +906,7 @@
     /**
      *
      */
-    protected void writeCharArrayAsString(char[] ca) throws IOException
-    {
+    protected void writeCharArrayAsString(char[] ca) throws IOException {
         String str = new String(ca);
         writeAMFString(str);
     }
@@ -1072,12 +914,10 @@
     /**
      *
      */
-    protected void writeObjectArray(Object[] values, SerializationDescriptor descriptor) throws IOException
-    {
+    protected void writeObjectArray(Object[] values, SerializationDescriptor descriptor) throws IOException {
         out.write(kArrayType);
 
-        if (!byReference(values))
-        {
+        if (!byReference(values)) {
             if (isDebug)
                 trace.startAMFArray(getObjectTableSize());
 
@@ -1086,18 +926,16 @@
             // Send an empty string to imply no named keys
             writeStringWithoutType(EMPTY_STRING);
 
-            for (int i = 0; i < values.length; ++i)
-            {
+            for (int i = 0; i < values.length; ++i) {
                 if (isDebug)
                     trace.arrayElement(i);
 
                 Object item = values[i];
                 if (item != null && descriptor != null && !(item instanceof String)
                         && !(item instanceof Number) && !(item instanceof Boolean)
-                        && !(item instanceof Character))
-                {
+                        && !(item instanceof Character)) {
                     PropertyProxy proxy = PropertyProxyRegistry.getProxy(item);
-                    proxy = (PropertyProxy)proxy.clone();
+                    proxy = (PropertyProxy) proxy.clone();
                     proxy.setDescriptor(descriptor);
                     proxy.setDefaultInstance(item);
                     item = proxy;
@@ -1115,15 +953,13 @@
     /**
      *
      */
-    protected void writeCollection(Collection c, SerializationDescriptor descriptor) throws IOException
-    {
+    protected void writeCollection(Collection c, SerializationDescriptor descriptor) throws IOException {
         out.write(kArrayType);
 
         // Note: We process Collections independently of Object[]
         // as we want the reference to be based on the actual
         // Collection.
-        if (!byReference(c))
-        {
+        if (!byReference(c)) {
             if (isDebug)
                 trace.startAMFArray(getObjectTableSize());
 
@@ -1134,8 +970,7 @@
 
             Iterator it = c.iterator();
             int i = 0;
-            while (it.hasNext())
-            {
+            while (it.hasNext()) {
                 if (isDebug)
                     trace.arrayElement(i);
 
@@ -1143,10 +978,9 @@
 
                 if (item != null && descriptor != null && !(item instanceof String)
                         && !(item instanceof Number) && !(item instanceof Boolean)
-                        && !(item instanceof Character))
-                {
+                        && !(item instanceof Character)) {
                     PropertyProxy proxy = PropertyProxyRegistry.getProxy(item);
-                    proxy = (PropertyProxy)proxy.clone();
+                    proxy = (PropertyProxy) proxy.clone();
                     proxy.setDescriptor(descriptor);
                     proxy.setDefaultInstance(item);
                     item = proxy;
@@ -1166,8 +1000,7 @@
     /**
      *
      */
-    protected void writeUInt29(int ref) throws IOException
-    {
+    protected void writeUInt29(int ref) throws IOException {
         // Represent smaller integers with fewer bytes using the most
         // significant bit of each byte. The worst case uses 32-bits
         // to represent a 29-bit number, which is what we would have
@@ -1178,37 +1011,28 @@
         // 0x00004000 - 0x001FFFFF : 1xxxxxxx 1xxxxxxx 0xxxxxxx
         // 0x00200000 - 0x3FFFFFFF : 1xxxxxxx 1xxxxxxx 1xxxxxxx xxxxxxxx
         // 0x40000000 - 0xFFFFFFFF : throw range exception
-        if (ref < 0x80)
-        {
+        if (ref < 0x80) {
             // 0x00000000 - 0x0000007F : 0xxxxxxx
             out.writeByte(ref);
-        }
-        else if (ref < 0x4000)
-        {
+        } else if (ref < 0x4000) {
             // 0x00000080 - 0x00003FFF : 1xxxxxxx 0xxxxxxx
             out.writeByte(((ref >> 7) & 0x7F) | 0x80);
             out.writeByte(ref & 0x7F);
 
-        }
-        else if (ref < 0x200000)
-        {
+        } else if (ref < 0x200000) {
             // 0x00004000 - 0x001FFFFF : 1xxxxxxx 1xxxxxxx 0xxxxxxx
             out.writeByte(((ref >> 14) & 0x7F) | 0x80);
             out.writeByte(((ref >> 7) & 0x7F) | 0x80);
             out.writeByte(ref & 0x7F);
 
-        }
-        else if (ref < 0x40000000)
-        {
+        } else if (ref < 0x40000000) {
             // 0x00200000 - 0x3FFFFFFF : 1xxxxxxx 1xxxxxxx 1xxxxxxx xxxxxxxx
             out.writeByte(((ref >> 22) & 0x7F) | 0x80);
             out.writeByte(((ref >> 15) & 0x7F) | 0x80);
             out.writeByte(((ref >> 8) & 0x7F) | 0x80);
             out.writeByte(ref & 0xFF);
 
-        }
-        else
-        {
+        } else {
             // 0x40000000 - 0xFFFFFFFF : throw range exception
             throw new MessageException("Integer out of range: " + ref);
         }
@@ -1217,8 +1041,7 @@
     /**
      *
      */
-    public void writeAMFUTF(String s) throws IOException
-    {
+    public void writeAMFUTF(String s) throws IOException {
         int strlen = s.length();
         int utflen = 0;
         int c, count = 0;
@@ -1226,19 +1049,13 @@
         char[] charr = getTempCharArray(strlen);
         s.getChars(0, strlen, charr, 0);
 
-        for (int i = 0; i < strlen; i++)
-        {
+        for (int i = 0; i < strlen; i++) {
             c = charr[i];
-            if (c <= 0x007F)
-            {
+            if (c <= 0x007F) {
                 utflen++;
-            }
-            else if (c > 0x07FF)
-            {
+            } else if (c > 0x07FF) {
                 utflen += 3;
-            }
-            else
-            {
+            } else {
                 utflen += 2;
             }
         }
@@ -1247,23 +1064,17 @@
 
         byte[] bytearr = getTempByteArray(utflen);
 
-        for (int i = 0; i < strlen; i++)
-        {
+        for (int i = 0; i < strlen; i++) {
             c = charr[i];
-            if (c <= 0x007F)
-            {
-                bytearr[count++] = (byte)c;
-            }
-            else if (c > 0x07FF)
-            {
-                bytearr[count++] = (byte)(0xE0 | ((c >> 12) & 0x0F));
-                bytearr[count++] = (byte)(0x80 | ((c >> 6) & 0x3F));
-                bytearr[count++] = (byte)(0x80 | ((c >> 0) & 0x3F));
-            }
-            else
-            {
-                bytearr[count++] = (byte)(0xC0 | ((c >> 6) & 0x1F));
-                bytearr[count++] = (byte)(0x80 | ((c >> 0) & 0x3F));
+            if (c <= 0x007F) {
+                bytearr[count++] = (byte) c;
+            } else if (c > 0x07FF) {
+                bytearr[count++] = (byte) (0xE0 | ((c >> 12) & 0x0F));
+                bytearr[count++] = (byte) (0x80 | ((c >> 6) & 0x3F));
+                bytearr[count++] = (byte) (0x80 | ((c >> 0) & 0x3F));
+            } else {
+                bytearr[count++] = (byte) (0xC0 | ((c >> 6) & 0x1F));
+                bytearr[count++] = (byte) (0x80 | ((c >> 0) & 0x3F));
             }
         }
         out.write(bytearr, 0, utflen);
@@ -1275,15 +1086,11 @@
      * in the reference collection for potential future encounter.
      *
      * @return Success/failure indicator as to whether the object could be
-     *         serialized as a reference.
-     *
+     * serialized as a reference.
      */
-    protected boolean byReference(Object o) throws IOException
-    {
-        if (objectTable != null && objectTable.containsKey(o))
-        {
-            try
-            {
+    protected boolean byReference(Object o) throws IOException {
+        if (objectTable != null && objectTable.containsKey(o)) {
+            try {
                 int refNum = objectTable.get(o).intValue();
 
                 if (isDebug)
@@ -1292,9 +1099,7 @@
                 writeUInt29(refNum << 1);
 
                 return true;
-            }
-            catch (ClassCastException e)
-            {
+            } catch (ClassCastException e) {
                 throw new IOException("Object reference is not an Integer");
             }
         }
@@ -1308,20 +1113,16 @@
     /**
      *
      */
-    public void addObjectReference(Object o) throws IOException
-    {
+    public void addObjectReference(Object o) throws IOException {
         byReference(o);
     }
 
     /**
      *
      */
-    protected boolean byReference(String s) throws IOException
-    {
-        if (stringTable != null && stringTable.containsKey(s))
-        {
-            try
-            {
+    protected boolean byReference(String s) throws IOException {
+        if (stringTable != null && stringTable.containsKey(s)) {
+            try {
                 int refNum = stringTable.get(s).intValue();
 
                 writeUInt29(refNum << 1);
@@ -1329,9 +1130,7 @@
                 if (isDebug && Trace.amf)
                     trace.writeStringRef(refNum);
                 return true;
-            }
-            catch (ClassCastException e)
-            {
+            } catch (ClassCastException e) {
                 throw new IOException("String reference is not an Integer");
             }
         }
@@ -1344,12 +1143,9 @@
     /**
      *
      */
-    protected boolean byReference(TraitsInfo ti) throws IOException
-    {
-        if (traitsTable != null && traitsTable.containsKey(ti))
-        {
-            try
-            {
+    protected boolean byReference(TraitsInfo ti) throws IOException {
+        if (traitsTable != null && traitsTable.containsKey(ti)) {
+            try {
                 int refNum = traitsTable.get(ti).intValue();
 
                 writeUInt29((refNum << 2) | 1);
@@ -1357,9 +1153,7 @@
                 if (isDebug && Trace.amf)
                     trace.writeTraitsInfoRef(refNum);
                 return true;
-            }
-            catch (ClassCastException e)
-            {
+            } catch (ClassCastException e) {
                 throw new IOException("TraitsInfo reference is not an Integer");
             }
         }
@@ -1369,8 +1163,7 @@
         return false;
     }
 
-    protected int getObjectTableSize()
-    {
-        return objectTable != null? objectTable.size() - 1 : 0;
+    protected int getObjectTableSize() {
+        return objectTable != null ? objectTable.size() - 1 : 0;
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/Amf3Types.java b/core/src/main/java/flex/messaging/io/amf/Amf3Types.java
index 72e1b82..40917f0 100644
--- a/core/src/main/java/flex/messaging/io/amf/Amf3Types.java
+++ b/core/src/main/java/flex/messaging/io/amf/Amf3Types.java
@@ -21,24 +21,23 @@
  *
  * @see flex.messaging.io.amf.AmfTypes for AMF 0 Type Markers.
  */
-public interface Amf3Types
-{
+public interface Amf3Types {
     // AMF marker constants
-    int kUndefinedType  = 0;
-    int kNullType       = 1;
-    int kFalseType      = 2;
-    int kTrueType       = 3;
-    int kIntegerType    = 4;
-    int kDoubleType     = 5;
-    int kStringType     = 6;
-    int kXMLType        = 7;
-    int kDateType       = 8;
-    int kArrayType      = 9;
-    int kObjectType     = 10;
+    int kUndefinedType = 0;
+    int kNullType = 1;
+    int kFalseType = 2;
+    int kTrueType = 3;
+    int kIntegerType = 4;
+    int kDoubleType = 5;
+    int kStringType = 6;
+    int kXMLType = 7;
+    int kDateType = 8;
+    int kArrayType = 9;
+    int kObjectType = 10;
     int kAvmPlusXmlType = 11;
-    int kByteArrayType  = 12;
+    int kByteArrayType = 12;
     int kTypedVectorInt = 13;
-    int kTypedVectorUint= 14;
+    int kTypedVectorUint = 14;
     int kTypedVectorDouble = 15;
     int kTypedVectorObject = 16;
     int kDictionaryType = 17;
@@ -47,7 +46,6 @@
 
     /**
      * Internal use only.
-     *
      */
     int UINT29_MASK = 0x1FFFFFFF; // 2^29 - 1
 
diff --git a/core/src/main/java/flex/messaging/io/amf/AmfIO.java b/core/src/main/java/flex/messaging/io/amf/AmfIO.java
index 6336a4d..0b8d17b 100644
--- a/core/src/main/java/flex/messaging/io/amf/AmfIO.java
+++ b/core/src/main/java/flex/messaging/io/amf/AmfIO.java
@@ -23,23 +23,21 @@
 import flex.messaging.io.TypeMarshallingContext;
 
 /**
- * Base class for Amf I/O. 
- *
+ * Base class for Amf I/O.
  */
-abstract class AmfIO
-{
+abstract class AmfIO {
     protected final SerializationContext context;
     /*
      *  DEBUG LOGGING.
      */
     protected boolean isDebug;
     protected AmfTrace trace;
-    
+
     // Nest object level, how deep the object graph is right now
     private int nestObjectLevel;
     // Nest collection level, how deep the collection nest is right now, for example 3 dimensional matrix will reach level of 3
     private int nestCollectionLevel;
-    
+
 
     /*
      *  OPTIMIZATION.
@@ -47,8 +45,7 @@
     private char[] tempCharArray = null;
     private byte[] tempByteArray = null;
 
-    AmfIO(SerializationContext context)
-    {
+    AmfIO(SerializationContext context) {
         this.context = context;
         nestObjectLevel = 0;
         nestCollectionLevel = 0;
@@ -56,10 +53,10 @@
 
     /**
      * Turns on "trace" debugging for AMF responses.
+     *
      * @param trace the trace object
      */
-    public void setDebugTrace(AmfTrace trace)
-    {
+    public void setDebugTrace(AmfTrace trace) {
         this.trace = trace;
         isDebug = this.trace != null;
     }
@@ -67,12 +64,11 @@
     /**
      * Clear all object reference information so that the instance
      * can be used to deserialize another data structure.
-     * 
+     * <p>
      * Reset should be called before reading a top level object,
      * such as a new header or a new body.
      */
-    public void reset()
-    {
+    public void reset() {
         nestObjectLevel = 0;
         nestCollectionLevel = 0;
         TypeMarshallingContext marshallingContext = TypeMarshallingContext.getTypeMarshallingContext();
@@ -84,14 +80,13 @@
      * capacity.  This method is for optimization only.  Do not use the array
      * outside the context of this method and do not call this method again
      * while the array is being used.
+     *
      * @param capacity minimum length
-     * @return a character array 
+     * @return a character array
      */
-    final char[] getTempCharArray(int capacity)
-    {
+    final char[] getTempCharArray(int capacity) {
         char[] result = this.tempCharArray;
-        if ((result == null) || (result.length < capacity))
-        {
+        if ((result == null) || (result.length < capacity)) {
             result = new char[capacity * 2];
             tempCharArray = result;
         }
@@ -103,55 +98,47 @@
      * capacity.  This method is for optimization only.  Do not use the array
      * outside the context of this method and do not call this method again
      * while the array is being used.
+     *
      * @param capacity minimum length
      * @return a byte array
      */
-    final byte[] getTempByteArray(int capacity)
-    {
+    final byte[] getTempByteArray(int capacity) {
         byte[] result = this.tempByteArray;
-        if ((result == null) || (result.length < capacity))
-        {
+        if ((result == null) || (result.length < capacity)) {
             result = new byte[capacity * 2];
             tempByteArray = result;
         }
         return result;
     }
-    
-    protected void increaseNestObjectLevel()
-    {
+
+    protected void increaseNestObjectLevel() {
         nestObjectLevel++;
-       
-        if (nestObjectLevel > context.maxObjectNestLevel)
-        {
+
+        if (nestObjectLevel > context.maxObjectNestLevel) {
             SerializationException se = new SerializationException();
-            se.setMessage(10315, new Object[] {context.maxObjectNestLevel});
+            se.setMessage(10315, new Object[]{context.maxObjectNestLevel});
             throw se;
         }
     }
-    
-    protected void decreaseNestObjectLevel()
-    {
+
+    protected void decreaseNestObjectLevel() {
         nestObjectLevel--;
     }
-    
-    protected void increaseNestCollectionLevel()
-    {
+
+    protected void increaseNestCollectionLevel() {
         nestCollectionLevel++;
-        if (nestCollectionLevel > context.maxCollectionNestLevel)
-        {
+        if (nestCollectionLevel > context.maxCollectionNestLevel) {
             SerializationException se = new SerializationException();
-            se.setMessage(10316, new Object[] {context.maxCollectionNestLevel});
+            se.setMessage(10316, new Object[]{context.maxCollectionNestLevel});
             throw se;
         }
     }
-    
-    protected void decreaseNestCollectionLevel()
-    {
+
+    protected void decreaseNestCollectionLevel() {
         nestCollectionLevel--;
     }
-    
-    public static boolean isCollectionClass(Object object)
-    {
+
+    public static boolean isCollectionClass(Object object) {
         if (object == null)
             return false;
         Class clazz = object.getClass();
diff --git a/core/src/main/java/flex/messaging/io/amf/AmfMessageDeserializer.java b/core/src/main/java/flex/messaging/io/amf/AmfMessageDeserializer.java
index 2cc5287..4ba43e6 100644
--- a/core/src/main/java/flex/messaging/io/amf/AmfMessageDeserializer.java
+++ b/core/src/main/java/flex/messaging/io/amf/AmfMessageDeserializer.java
@@ -25,8 +25,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-public class AmfMessageDeserializer implements MessageDeserializer
-{
+public class AmfMessageDeserializer implements MessageDeserializer {
     public static final String CODE_VERSION_MISMATCH = "VersionMismatch";
     private static final int UNSUPPORTED_AMF_VERSION = 10310;
 
@@ -35,12 +34,10 @@
     protected AmfTrace debugTrace;
     protected boolean isDebug;
 
-    public AmfMessageDeserializer()
-    {
+    public AmfMessageDeserializer() {
     }
 
-    public void initialize(SerializationContext context, InputStream in, AmfTrace trace)
-    {
+    public void initialize(SerializationContext context, InputStream in, AmfTrace trace) {
         amfIn = new Amf0Input(context);
         amfIn.setInputStream(in);
 
@@ -49,22 +46,20 @@
         amfIn.setDebugTrace(debugTrace);
     }
 
-    public void readMessage(ActionMessage m, ActionContext context) throws ClassNotFoundException, IOException
-    {
+    public void readMessage(ActionMessage m, ActionContext context) throws ClassNotFoundException, IOException {
         if (isDebug)
             debugTrace.startRequest("Deserializing AMF/HTTP request");
 
         int version = amfIn.readUnsignedShort();
-        
+
         // Treat FMS's AMF1 as AMF0.
         if (version == MessageIOConstants.AMF1)
-            version = MessageIOConstants.AMF0; 
+            version = MessageIOConstants.AMF0;
 
-        if (version != MessageIOConstants.AMF0 && version != MessageIOConstants.AMF3)
-        {
+        if (version != MessageIOConstants.AMF0 && version != MessageIOConstants.AMF3) {
             //Unsupported AMF version {version}.
             MessageException ex = new MessageException();
-            ex.setMessage(UNSUPPORTED_AMF_VERSION, new Object[] {new Integer(version)});
+            ex.setMessage(UNSUPPORTED_AMF_VERSION, new Object[]{new Integer(version)});
             ex.setCode(CODE_VERSION_MISMATCH);
             throw ex;
         }
@@ -77,8 +72,7 @@
 
         // Read headers
         int headerCount = amfIn.readUnsignedShort();
-        for (int i = 0; i < headerCount; ++i)
-        {
+        for (int i = 0; i < headerCount; ++i) {
             MessageHeader header = new MessageHeader();
             m.addHeader(header);
             readHeader(header, i);
@@ -86,8 +80,7 @@
 
         // Read bodies
         int bodyCount = amfIn.readUnsignedShort();
-        for (int i = 0; i < bodyCount; ++i)
-        {
+        for (int i = 0; i < bodyCount; ++i) {
             MessageBody body = new MessageBody();
             m.addBody(body);
             readBody(body, i);
@@ -104,12 +97,11 @@
      * DATA kObject
      *
      * @param header - will hold the deserialized message header
-     * @param index header index for debugging
-     * @throws IOException thrown by the underlying stream
+     * @param index  header index for debugging
+     * @throws IOException            thrown by the underlying stream
      * @throws ClassNotFoundException if we don't find the class for the header data.
      */
-    public void readHeader(MessageHeader header, int index) throws ClassNotFoundException, IOException
-    {
+    public void readHeader(MessageHeader header, int index) throws ClassNotFoundException, IOException {
         String name = amfIn.readUTF();
         header.setName(name);
         boolean mustUnderstand = amfIn.readBoolean();
@@ -123,17 +115,12 @@
         if (isDebug)
             debugTrace.startHeader(name, mustUnderstand, index);
 
-        try
-        {
+        try {
             data = readObject();
-        }
-        catch (RecoverableSerializationException ex)
-        {
+        } catch (RecoverableSerializationException ex) {
             ex.setCode("Client.Header.Encoding");
             data = ex;
-        }
-        catch (MessageException ex)
-        {
+        } catch (MessageException ex) {
             ex.setCode("Client.Header.Encoding");
             throw ex;
         }
@@ -148,13 +135,12 @@
     /**
      * Deserialize a message body from the input stream.
      *
-     * @param body - will hold the deserialized message body
+     * @param body  - will hold the deserialized message body
      * @param index message index for debugging
-     * @throws IOException thrown by the underlying stream
+     * @throws IOException            thrown by the underlying stream
      * @throws ClassNotFoundException if we don't find the class for the body data.
      */
-    public void readBody(MessageBody body, int index) throws ClassNotFoundException, IOException
-    {
+    public void readBody(MessageBody body, int index) throws ClassNotFoundException, IOException {
         String targetURI = amfIn.readUTF();
         body.setTargetURI(targetURI);
         String responseURI = amfIn.readUTF();
@@ -168,17 +154,12 @@
         if (isDebug)
             debugTrace.startMessage(targetURI, responseURI, index);
 
-        try
-        {
+        try {
             data = readObject();
-        }
-        catch (RecoverableSerializationException ex)
-        {
+        } catch (RecoverableSerializationException ex) {
             ex.setCode("Client.Message.Encoding");
             data = ex;
-        }
-        catch (MessageException ex)
-        {
+        } catch (MessageException ex) {
             ex.setCode("Client.Message.Encoding");
             throw ex;
         }
@@ -191,11 +172,11 @@
 
     /**
      * Read Object.
+     *
      * @return Object the object read from AmfInput
      * @throws ClassNotFoundException, IOException when exceptions occurs in reading the object
      */
-    public Object readObject() throws ClassNotFoundException, IOException
-    {
+    public Object readObject() throws ClassNotFoundException, IOException {
         return amfIn.readObject();
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/AmfMessageSerializer.java b/core/src/main/java/flex/messaging/io/amf/AmfMessageSerializer.java
index 118d542..dc53f49 100644
--- a/core/src/main/java/flex/messaging/io/amf/AmfMessageSerializer.java
+++ b/core/src/main/java/flex/messaging/io/amf/AmfMessageSerializer.java
@@ -23,8 +23,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-public class AmfMessageSerializer implements MessageSerializer
-{
+public class AmfMessageSerializer implements MessageSerializer {
     public static final int UNKNOWN_CONTENT_LENGTH = 1; //-1;
 
     protected Amf0Output amfOut;
@@ -33,17 +32,14 @@
     protected AmfTrace debugTrace;
     protected int version;
 
-    public AmfMessageSerializer()
-    {
+    public AmfMessageSerializer() {
     }
 
-    public void setVersion(int value)
-    {
+    public void setVersion(int value) {
         version = value;
     }
 
-    public void initialize(SerializationContext context, OutputStream out, AmfTrace trace)
-    {
+    public void initialize(SerializationContext context, OutputStream out, AmfTrace trace) {
         amfOut = new Amf0Output(context);
         amfOut.setOutputStream(out);
         amfOut.setAvmPlus(version >= MessageIOConstants.AMF3);
@@ -59,8 +55,7 @@
      * @param m message to serialize
      * @throws IOException
      */
-    public void writeMessage(ActionMessage m) throws IOException
-    {
+    public void writeMessage(ActionMessage m) throws IOException {
         if (isDebug)
             debugTrace.startResponse("Serializing AMF/HTTP response");
 
@@ -77,8 +72,7 @@
         // Write out headers
         int headerCount = m.getHeaderCount();
         amfOut.writeShort(headerCount);
-        for (int i = 0; i < headerCount; ++i)
-        {
+        for (int i = 0; i < headerCount; ++i) {
             MessageHeader header = m.getHeader(i);
 
             if (isDebug)
@@ -93,8 +87,7 @@
         // Write out the bodies
         int bodyCount = m.getBodyCount();
         amfOut.writeShort(bodyCount);
-        for (int i = 0; i < bodyCount; ++i)
-        {
+        for (int i = 0; i < bodyCount; ++i) {
             MessageBody body = m.getBody(i);
 
             if (isDebug)
@@ -113,8 +106,7 @@
      * @param h header to serialize
      * @throws IOException if write fails.
      */
-    public void writeHeader(MessageHeader h) throws IOException
-    {
+    public void writeHeader(MessageHeader h) throws IOException {
         amfOut.writeUTF(h.getName());
         amfOut.writeBoolean(h.getMustUnderstand());
         amfOut.writeInt(UNKNOWN_CONTENT_LENGTH);
@@ -128,8 +120,7 @@
      * @param b body to serialize
      * @throws IOException if write fails.
      */
-    public void writeBody(MessageBody b) throws IOException
-    {
+    public void writeBody(MessageBody b) throws IOException {
         if (b.getTargetURI() == null)
             amfOut.writeUTF("null");
         else
@@ -152,8 +143,7 @@
      *
      * @param value - the Object to write to the AMF stream.
      */
-    public void writeObject(Object value) throws IOException
-    {
+    public void writeObject(Object value) throws IOException {
         amfOut.writeObject(value);
     }
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/io/amf/AmfTrace.java b/core/src/main/java/flex/messaging/io/amf/AmfTrace.java
index a8cb406..1a4f2e2 100644
--- a/core/src/main/java/flex/messaging/io/amf/AmfTrace.java
+++ b/core/src/main/java/flex/messaging/io/amf/AmfTrace.java
@@ -23,17 +23,15 @@
  * The AMFTrace class is an AMF extension to the ObjectTrace utility to format
  * AMF input/output in a similar manner to the client-side
  * NetConnection Debugger.
- *
+ * <p>
  * Note that in this version new lines are added after the
  * individual values in complex type properties automatically.
  */
-public class AmfTrace extends ObjectTrace
-{
+public class AmfTrace extends ObjectTrace {
     /**
      * Default constructor.
      */
-    public AmfTrace()
-    {
+    public AmfTrace() {
         buffer = new StringBuffer(4096);
     }
 
@@ -42,8 +40,7 @@
      *
      * @param message start message string
      */
-    public void startRequest(String message)
-    {
+    public void startRequest(String message) {
         m_indent = 0;
         buffer.append(message);
         m_indent++;
@@ -54,8 +51,7 @@
      *
      * @param message start response string
      */
-    public void startResponse(String message)
-    {
+    public void startResponse(String message) {
         m_indent = 0;
         buffer.append(message);
         m_indent++;
@@ -66,8 +62,7 @@
      *
      * @param version the current version
      */
-    public void version(int version)
-    {
+    public void version(int version) {
         newLine();
         buffer.append("Version: ").append(version);
     }
@@ -75,12 +70,11 @@
     /**
      * Starts a header.
      *
-     * @param name header name
+     * @param name           header name
      * @param mustUnderstand mustUnderstand value
-     * @param index header number
+     * @param index          header number
      */
-    public void startHeader(String name, boolean mustUnderstand, int index)
-    {
+    public void startHeader(String name, boolean mustUnderstand, int index) {
         newLine();
         buffer.append(indentString());
         buffer.append("(Header #").append(index).append(" name=").append(name);
@@ -92,20 +86,18 @@
     /**
      * Ends the header.
      */
-    public void endHeader()
-    {
+    public void endHeader() {
         m_indent--;
     }
 
     /**
      * Starts a command.
      *
-     * @param cmd command object
-     * @param iCmd command index
+     * @param cmd   command object
+     * @param iCmd  command index
      * @param trxId transaction id
      */
-    public void startCommand(Object cmd, int iCmd, Object trxId)
-    {
+    public void startCommand(Object cmd, int iCmd, Object trxId) {
         newLine();
         buffer.append(indentString());
         buffer.append("(Command method=").append(cmd).append(" (").append(iCmd).append(")");
@@ -117,20 +109,18 @@
     /**
      * Ends the command.
      */
-    public void endCommand()
-    {
+    public void endCommand() {
         m_indent--;
     }
 
     /**
      * Starts a message.
      *
-     * @param targetURI the target URI
+     * @param targetURI   the target URI
      * @param responseURI the response URI
-     * @param index the message number
+     * @param index       the message number
      */
-    public void startMessage(String targetURI, String responseURI, int index)
-    {
+    public void startMessage(String targetURI, String responseURI, int index) {
         newLine();
         buffer.append(indentString());
         buffer.append("(Message #").append(index).append(" targetURI=").append(targetURI);
@@ -142,19 +132,17 @@
     /**
      * Ends the message.
      */
-    public void endMessage()
-    {
+    public void endMessage() {
         m_indent--;
     }
 
     /**
      * Checks to make sure that this property is allowed to be written.
+     *
      * @return true if caller should not print value
      */
-    private boolean isExcluded()
-    {
-        if (nextElementExclude)
-        {
+    private boolean isExcluded() {
+        if (nextElementExclude) {
             nextElementExclude = false;
             buffer.append(Log.VALUE_SUPRESSED);
             newLine();
@@ -166,8 +154,8 @@
     /**
      * Writes an Object type.
      */
-    @Override public void write(Object o)
-    {
+    @Override
+    public void write(Object o) {
         if (isExcluded())
             return;
 
@@ -180,10 +168,10 @@
 
     /**
      * Writes a boolean type.
+     *
      * @param b value to write
      */
-    public void write(boolean b)
-    {
+    public void write(boolean b) {
         if (isExcluded())
             return;
 
@@ -196,10 +184,10 @@
 
     /**
      * Writes a double type.
+     *
      * @param d value to write
      */
-    public void write(double d)
-    {
+    public void write(double d) {
         if (isExcluded())
             return;
 
@@ -212,10 +200,10 @@
 
     /**
      * Writes a float type.
+     *
      * @param f value to write
      */
-    public void write(float f)
-    {
+    public void write(float f) {
         if (isExcluded())
             return;
 
@@ -228,10 +216,10 @@
 
     /**
      * Writes an integer type.
+     *
      * @param i value to write
      */
-    public void write(int i)
-    {
+    public void write(int i) {
         if (isExcluded())
             return;
 
@@ -244,10 +232,10 @@
 
     /**
      * Writes a long type.
+     *
      * @param l value to write
      */
-    public void write(long l)
-    {
+    public void write(long l) {
         if (isExcluded())
             return;
 
@@ -260,10 +248,10 @@
 
     /**
      * Writes a short type.
+     *
      * @param s value to write
      */
-    public void write(short s)
-    {
+    public void write(short s) {
         if (isExcluded())
             return;
 
@@ -276,10 +264,10 @@
 
     /**
      * Writes a byte type.
+     *
      * @param b value to write.
      */
-    public void write(byte b)
-    {
+    public void write(byte b) {
         if (isExcluded())
             return;
 
@@ -293,8 +281,8 @@
     /**
      * Writes a null type.
      */
-    @Override public void writeNull()
-    {
+    @Override
+    public void writeNull() {
         if (isExcluded())
             return;
 
@@ -308,8 +296,8 @@
     /**
      * Writes a ref type.
      */
-    @Override public void writeRef(int ref)
-    {
+    @Override
+    public void writeRef(int ref) {
         if (isExcluded())
             return;
 
@@ -323,8 +311,8 @@
     /**
      * Writes a String type.
      */
-    @Override public void writeString(String s)
-    {
+    @Override
+    public void writeString(String s) {
         if (isExcluded())
             return;
 
@@ -338,10 +326,10 @@
 
     /**
      * Writes a String ref type.
+     *
      * @param ref string reference number
      */
-    public void writeStringRef(int ref)
-    {
+    public void writeStringRef(int ref) {
         if (isExcluded())
             return;
 
@@ -350,10 +338,10 @@
 
     /**
      * Writes a traits info type.
+     *
      * @param ref trait reference number
      */
-    public void writeTraitsInfoRef(int ref)
-    {
+    public void writeTraitsInfoRef(int ref) {
         if (isExcluded())
             return;
 
@@ -363,8 +351,7 @@
     /**
      * Writes an undefined type.
      */
-    public void writeUndefined()
-    {
+    public void writeUndefined() {
         if (isExcluded())
             return;
 
@@ -380,8 +367,7 @@
      *
      * @param ref the array reference number
      */
-    public void startAMFArray(int ref)
-    {
+    public void startAMFArray(int ref) {
         if (isExcluded())
             return;
 
@@ -398,8 +384,7 @@
      *
      * @param ref the array reference number
      */
-    public void startECMAArray(int ref)
-    {
+    public void startECMAArray(int ref) {
         if (isExcluded())
             return;
 
@@ -414,11 +399,10 @@
     /**
      * Starts a ByteArrray.
      *
-     * @param ref array reference number
+     * @param ref    array reference number
      * @param length length of the array
      */
-    public void startByteArray(int ref, int length)
-    {
+    public void startByteArray(int ref, int length) {
         if (isExcluded())
             return;
 
@@ -431,8 +415,7 @@
     /**
      * Ends a ByteArray.
      */
-    public void endAMFArray()
-    {
+    public void endAMFArray() {
         m_indent--;
         m_nested--;
     }
@@ -441,10 +424,9 @@
      * Starts an ExternalizableObject.
      *
      * @param type the type of the object
-     * @param ref the object number
+     * @param ref  the object number
      */
-    public void startExternalizableObject(String type, int ref)
-    {
+    public void startExternalizableObject(String type, int ref) {
         if (isExcluded())
             return;
 
@@ -463,10 +445,9 @@
      * Starts an AMFObject.
      *
      * @param type the type of the object
-     * @param ref the reference number
+     * @param ref  the reference number
      */
-    public void startAMFObject(String type, int ref)
-    {
+    public void startAMFObject(String type, int ref) {
         if (isExcluded())
             return;
 
@@ -485,8 +466,7 @@
     /**
      * Ends an AMFObject.
      */
-    public void endAMFObject()
-    {
+    public void endAMFObject() {
         m_indent--;
         m_nested--;
     }
@@ -496,8 +476,7 @@
      *
      * @param ref the reference number
      */
-    public void startAMFDictionary(int ref)
-    {
+    public void startAMFDictionary(int ref) {
         if (isExcluded())
             return;
 
@@ -513,24 +492,21 @@
     /**
      * Starts an AMF Dictionary element.
      */
-    public void startDictionaryElement()
-    {
+    public void startDictionaryElement() {
         buffer.append(indentString());
     }
 
     /**
      * Adds an equals sign after a dictionary key.
      */
-    public void addDictionaryEquals()
-    {
+    public void addDictionaryEquals() {
         buffer.append(indentString()).append("  ").append(" = ");
     }
 
     /**
      * Ends an AMF Dictionary.
      */
-    public void endAMFDictionary()
-    {
+    public void endAMFDictionary() {
         m_indent--;
         m_nested--;
     }
@@ -538,23 +514,23 @@
     /**
      * Enum for different Vector types.
      */
-    public enum VectorType
-    {
+    public enum VectorType {
         INT, UINT, DOUBLE, OBJECT;
 
-        @Override public String toString()
-        {
+        @Override
+        public String toString() {
             return super.toString().toLowerCase();
         }
-    };
+    }
+
+    ;
 
     /**
      * Starts an AMF Vector.
      *
      * @param ref The reference number.
      */
-    public void startAMFVector(int ref, VectorType vectorType)
-    {
+    public void startAMFVector(int ref, VectorType vectorType) {
         if (isExcluded())
             return;
 
@@ -569,8 +545,7 @@
     /**
      * Ends an AMF Dictionary.
      */
-    public void endAMFVector()
-    {
+    public void endAMFVector() {
         m_indent--;
         m_nested--;
     }
diff --git a/core/src/main/java/flex/messaging/io/amf/AmfTypes.java b/core/src/main/java/flex/messaging/io/amf/AmfTypes.java
index 01ea6b9..30fd029 100644
--- a/core/src/main/java/flex/messaging/io/amf/AmfTypes.java
+++ b/core/src/main/java/flex/messaging/io/amf/AmfTypes.java
@@ -19,26 +19,25 @@
 /**
  * The amf/rtmp data encoding format constants.
  */
-public interface AmfTypes
-{
+public interface AmfTypes {
     // AMF marker constants
-    int kNumberType        = 0;
-    int kBooleanType       = 1;
-    int kStringType        = 2;
-    int kObjectType        = 3;
-    int kMovieClipType     = 4;
-    int kNullType          = 5;
-    int kUndefinedType     = 6;
-    int kReferenceType     = 7;
-    int kECMAArrayType     = 8;
-    int kObjectEndType     = 9;
-    int kStrictArrayType   = 10;
-    int kDateType          = 11;
-    int kLongStringType    = 12;
-    int kUnsupportedType   = 13;
-    int kRecordsetType     = 14;
-    int kXMLObjectType     = 15;
-    int kTypedObjectType   = 16;
+    int kNumberType = 0;
+    int kBooleanType = 1;
+    int kStringType = 2;
+    int kObjectType = 3;
+    int kMovieClipType = 4;
+    int kNullType = 5;
+    int kUndefinedType = 6;
+    int kReferenceType = 7;
+    int kECMAArrayType = 8;
+    int kObjectEndType = 9;
+    int kStrictArrayType = 10;
+    int kDateType = 11;
+    int kLongStringType = 12;
+    int kUnsupportedType = 13;
+    int kRecordsetType = 14;
+    int kXMLObjectType = 15;
+    int kTypedObjectType = 16;
     int kAvmPlusObjectType = 17;
 }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/MessageBody.java b/core/src/main/java/flex/messaging/io/amf/MessageBody.java
index b3b3efb..95ae020 100644
--- a/core/src/main/java/flex/messaging/io/amf/MessageBody.java
+++ b/core/src/main/java/flex/messaging/io/amf/MessageBody.java
@@ -24,8 +24,7 @@
 import java.lang.reflect.Array;
 import java.util.List;
 
-public class MessageBody implements Serializable
-{
+public class MessageBody implements Serializable {
     private static final int ERR_MSG_INVALID_REQUEST_TYPE = 10037;
 
     static final long serialVersionUID = 3874002169129668459L;
@@ -36,80 +35,69 @@
 
     protected Object data;
 
-    public MessageBody()
-    {
+    public MessageBody() {
     }
 
-    public MessageBody(String targetURI, String responseURI, Object data)
-    {
+    public MessageBody(String targetURI, String responseURI, Object data) {
         setTargetURI(targetURI);
         setResponseURI(responseURI);
         this.data = data;
     }
 
 
-    public String getTargetURI()
-    {
+    public String getTargetURI() {
         return targetURI;
     }
 
-    public void setTargetURI(String uri)
-    {
+    public void setTargetURI(String uri) {
         if (uri == null)
             uri = "";
 
         targetURI = uri;
     }
 
-    public void setReplyMethod(String methodName)
-    {
+    public void setReplyMethod(String methodName) {
         if (targetURI.endsWith(MessageIOConstants.STATUS_METHOD) || targetURI.endsWith(MessageIOConstants.RESULT_METHOD))
             targetURI = targetURI.substring(0, targetURI.lastIndexOf('/'));
 
         targetURI = targetURI + methodName;
     }
 
-    public String getReplyMethod()
-    {
+    public String getReplyMethod() {
         return targetURI.substring((targetURI.lastIndexOf('/') + 1), targetURI.length());
     }
 
 
-    public String getResponseURI()
-    {
+    public String getResponseURI() {
         return responseURI;
     }
 
-    public void setResponseURI(String uri)
-    {
+    public void setResponseURI(String uri) {
         if (uri == null)
             uri = "";
 
         responseURI = uri;
     }
 
-    public Object getData()
-    {
+    public Object getData() {
         return data;
     }
 
-    public Message getDataAsMessage()
-    {
+    public Message getDataAsMessage() {
         if (data instanceof List)
-            data = ((List)data).get(0);
+            data = ((List) data).get(0);
         else if (data.getClass().isArray())
             data = Array.get(data, 0);
 
         if (data instanceof Message)
-            return (Message)data;
+            return (Message) data;
 
         MessageException me = new MessageException();
-        me.setMessage(ERR_MSG_INVALID_REQUEST_TYPE, new Object[] {data.getClass().getName()});
+        me.setMessage(ERR_MSG_INVALID_REQUEST_TYPE, new Object[]{data.getClass().getName()});
         throw me;
     }
 
-    public void setData(Object data)
-    {
+    public void setData(Object data) {
         this.data = data;
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/MessageHeader.java b/core/src/main/java/flex/messaging/io/amf/MessageHeader.java
index 0b6417f..1da3bbc 100644
--- a/core/src/main/java/flex/messaging/io/amf/MessageHeader.java
+++ b/core/src/main/java/flex/messaging/io/amf/MessageHeader.java
@@ -18,57 +18,48 @@
 
 import java.io.Serializable;
 
-public class MessageHeader implements Serializable
-{
+public class MessageHeader implements Serializable {
     static final long serialVersionUID = -4535655145953153945L;
 
     private String name;
     private boolean mustUnderstand;
     private Object data;
 
-    public MessageHeader()
-    {
+    public MessageHeader() {
     }
 
-    public MessageHeader(String name, boolean mustUnderstand, Object data)
-    {
+    public MessageHeader(String name, boolean mustUnderstand, Object data) {
         this.name = name;
         this.mustUnderstand = mustUnderstand;
         this.data = data;
     }
 
 
-    public String getName()
-    {
+    public String getName() {
         return name;
     }
 
 
-    public void setName(String name)
-    {
+    public void setName(String name) {
         this.name = name;
     }
 
 
-    public boolean getMustUnderstand()
-    {
+    public boolean getMustUnderstand() {
         return mustUnderstand;
     }
 
 
-    public void setMustUnderstand(boolean mustUnderstand)
-    {
+    public void setMustUnderstand(boolean mustUnderstand) {
         this.mustUnderstand = mustUnderstand;
     }
 
 
-    public Object getData()
-    {
+    public Object getData() {
         return data;
     }
 
-    public void setData(Object data)
-    {
+    public void setData(Object data) {
         this.data = data;
     }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/SerializedObject.java b/core/src/main/java/flex/messaging/io/amf/SerializedObject.java
index 30b9aef..99deb53 100644
--- a/core/src/main/java/flex/messaging/io/amf/SerializedObject.java
+++ b/core/src/main/java/flex/messaging/io/amf/SerializedObject.java
@@ -29,70 +29,68 @@
  * from non-Java method implementations (e.g .Net), that have already been
  * serialized on the non-Java side.</p>
  */
-public class SerializedObject implements Externalizable
-{
+public class SerializedObject implements Externalizable {
     protected byte[] objectBytes;
     protected int offset;
-    
-    /**
-     * Constructor. 
-     * Construct a SerializedObject with specified object bytes
 
+    /**
+     * Constructor.
+     * Construct a SerializedObject with specified object bytes
+     *
      * @param objectBytes the actual bytes to write to the output stream.
      */
-    public SerializedObject(byte[] objectBytes)
-    {
+    public SerializedObject(byte[] objectBytes) {
         this(objectBytes, 0);
     }
 
     /**
-     * Constructor. 
+     * Constructor.
      * Construct a SerializedObject with specified object bytes and offset
+     *
      * @param objectBytes the actual bytes to write to the output stream.
-     * @param offset the offset into the byte array from which to start writing.
+     * @param offset      the offset into the byte array from which to start writing.
      */
-    public SerializedObject(byte[] objectBytes, int offset)
-    {
+    public SerializedObject(byte[] objectBytes, int offset) {
         this.objectBytes = objectBytes;
         this.offset = offset;
     }
 
     /**
      * Get the object bytes.
+     *
      * @return the object bytes being held.
      */
-    public byte[] getObjectBytes()
-    {
+    public byte[] getObjectBytes() {
         return objectBytes;
     }
 
     /**
      * Not supported. Serialized objects are intended to be "write only" values.
+     *
      * @param in the ObjectInput object
      * @throws IOException, ClassNotFoundException if the read failed
      */
-    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
-    {
+    public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
         throw new UnsupportedOperationException("serialized values can only be written, not read.");
     }
 
     /**
      * Writes the object bytes directly to the output stream.
+     *
      * @param out the ObjectOutput object
      * @throws IOException when the write failed
      */
-    public void writeExternal(ObjectOutput out) throws IOException
-    {
+    public void writeExternal(ObjectOutput out) throws IOException {
         /**
          * So far that the pass through is not working as it will mess up the AMF format
          * We yet to find a viable solution for pass through to work
          * throw Exception to provent the useage of pass through
-        for(int i = offset; i < objectBytes.length; i++)
-        {
-            byte b = objectBytes[i];
-            out.writeByte(b);
-        }
-        */
+         for(int i = offset; i < objectBytes.length; i++)
+         {
+         byte b = objectBytes[i];
+         out.writeByte(b);
+         }
+         */
         throw new UnsupportedOperationException("Pass through does not work, throw exception to provent us using the mechanism.");
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/TraitsInfo.java b/core/src/main/java/flex/messaging/io/amf/TraitsInfo.java
index ccf4011..8a306f9 100644
--- a/core/src/main/java/flex/messaging/io/amf/TraitsInfo.java
+++ b/core/src/main/java/flex/messaging/io/amf/TraitsInfo.java
@@ -25,33 +25,26 @@
  * serializing the traits of a type once, and then
  * sending only the values of each instance of the type
  * as it occurs in the stream.
- *
- *
  */
-public class TraitsInfo
-{
+public class TraitsInfo {
     private final String className;
     private final boolean dynamic;
     private final boolean externalizable;
     private List<String> properties;
 
-    public TraitsInfo(String className)
-    {
+    public TraitsInfo(String className) {
         this(className, false, false, 10);
     }
 
-    public TraitsInfo(String className, int initialCount)
-    {
+    public TraitsInfo(String className, int initialCount) {
         this(className, false, false, initialCount);
     }
 
-    public TraitsInfo(String className, boolean dynamic, boolean externalizable, int initialCount)
-    {
+    public TraitsInfo(String className, boolean dynamic, boolean externalizable, int initialCount) {
         this(className, dynamic, externalizable, new ArrayList<String>(initialCount));
     }
-    
-    public TraitsInfo(String className, boolean dynamic, boolean externalizable, List<String> properties)
-    {
+
+    public TraitsInfo(String className, boolean dynamic, boolean externalizable, List<String> properties) {
         if (className == null)
             className = "";
 
@@ -61,85 +54,69 @@
         this.externalizable = externalizable;
     }
 
-    public boolean isDynamic()
-    {
+    public boolean isDynamic() {
         return dynamic;
     }
 
-    public boolean isExternalizable()
-    {
+    public boolean isExternalizable() {
         return externalizable;
     }
 
-    public int length()
-    {
-        return properties != null? properties.size() : 0;
+    public int length() {
+        return properties != null ? properties.size() : 0;
     }
 
-    public String getClassName()
-    {
+    public String getClassName() {
         return className;
     }
 
-    public void addProperty(String name)
-    {
+    public void addProperty(String name) {
         if (properties == null)
             properties = new ArrayList<String>();
         properties.add(name);
     }
-    
-    public void addAllProperties(Collection props)
-    {
+
+    public void addAllProperties(Collection props) {
         if (properties == null)
             properties = new ArrayList<String>();
         properties.addAll(props);
     }
 
-    public String getProperty(int i)
-    {
-        return properties != null? properties.get(i) : null;
+    public String getProperty(int i) {
+        return properties != null ? properties.get(i) : null;
     }
-    
-    public List<String> getProperties()
-    {
+
+    public List<String> getProperties() {
         return properties;
     }
 
-    public boolean equals(Object obj)
-    {
-        if (obj == this)
-        {
+    public boolean equals(Object obj) {
+        if (obj == this) {
             return true;
         }
 
-        if (obj instanceof TraitsInfo)
-        {
-            TraitsInfo other = (TraitsInfo)obj;
+        if (obj instanceof TraitsInfo) {
+            TraitsInfo other = (TraitsInfo) obj;
 
-            if (!this.className.equals(other.className))
-            {
+            if (!this.className.equals(other.className)) {
                 return false;
             }
 
-            if (!(this.dynamic == other.dynamic))
-            {
+            if (!(this.dynamic == other.dynamic)) {
                 return false;
             }
 
             List thisProperties = this.properties;
             List otherProperties = other.properties;
-            
-            if (thisProperties != otherProperties)
-            {
+
+            if (thisProperties != otherProperties) {
                 int thisCount = thisProperties.size();
 
-                if (thisCount != otherProperties.size())
-                {
+                if (thisCount != otherProperties.size()) {
                     return false;
                 }
 
-                for (int i = 0; i < thisCount; i++)
-                {
+                for (int i = 0; i < thisCount; i++) {
                     Object thisProp = thisProperties.get(i);
                     Object otherProp = otherProperties.get(i);
                     if (thisProp != null && otherProp != null && !thisProp.equals(otherProp))
@@ -157,11 +134,11 @@
      * Instances of types with the same classname and number of properties may
      * return the same hash code, however, an equality test will fully
      * test whether they match exactly on individual property names.
+     *
      * @return int the hash code of the TraitsInfo object
      */
-    public int hashCode()
-    {
-        int size = properties != null? properties.size() : 0;
+    public int hashCode() {
+        int size = properties != null ? properties.size() : 0;
         int c = className.hashCode();
         c = dynamic ? c << 2 : c << 1;
         c = c | (size << 24);
diff --git a/core/src/main/java/flex/messaging/io/amf/client/AMFConnection.java b/core/src/main/java/flex/messaging/io/amf/client/AMFConnection.java
index 134a431..e8eeb31 100644
--- a/core/src/main/java/flex/messaging/io/amf/client/AMFConnection.java
+++ b/core/src/main/java/flex/messaging/io/amf/client/AMFConnection.java
@@ -50,11 +50,10 @@
  * sending AMF formatted requests over HTTP or HTTPS.
  * AMFConnection in Actionscript. AMF connection automatically handles cookies
  * by looking for cookie headers and setting the cookies in subsequent request.
- *
+ * <p>
  * AMF connection class is not thread safe.
  */
-public class AMFConnection
-{
+public class AMFConnection {
     //--------------------------------------------------------------------------
     //
     // Public Static Variables
@@ -86,11 +85,10 @@
     /**
      * Registers a custom alias for a class name bidirectionally.
      *
-     * @param alias The alias for the class name.
+     * @param alias     The alias for the class name.
      * @param className The concrete class name.
      */
-    public static void registerAlias(String alias, String className)
-    {
+    public static void registerAlias(String alias, String className) {
         ClassAliasRegistry registry = ClassAliasRegistry.getRegistry();
         registry.registerAlias(alias, className);
         registry.registerAlias(className, alias);
@@ -105,8 +103,7 @@
     /**
      * Creates a default AMF connection instance.
      */
-    public AMFConnection()
-    {
+    public AMFConnection() {
     }
 
     //--------------------------------------------------------------------------
@@ -155,7 +152,7 @@
     /**
      * Map of Http request header names and values.
      */
-    protected Map<String,String> httpRequestHeaders;
+    protected Map<String, String> httpRequestHeaders;
 
     /**
      * Sequentially incremented counter used to generate a unique responseURI
@@ -193,8 +190,7 @@
      *
      * @return The AMF header processor associated with the AMF connection.
      */
-    public AMFHeaderProcessor getAMFHeaderProcessor()
-    {
+    public AMFHeaderProcessor getAMFHeaderProcessor() {
         return amfHeaderProcessor;
     }
 
@@ -203,8 +199,7 @@
      *
      * @param amfHeaderProcessor The AMF header processor to set.
      */
-    public void setAMFHeaderProcessor(AMFHeaderProcessor amfHeaderProcessor)
-    {
+    public void setAMFHeaderProcessor(AMFHeaderProcessor amfHeaderProcessor) {
         this.amfHeaderProcessor = amfHeaderProcessor;
     }
 
@@ -217,8 +212,7 @@
      *
      * @return The <tt>AmfTrace</tt> associated with the AMF connection.
      */
-    public AmfTrace getAmfTrace()
-    {
+    public AmfTrace getAmfTrace() {
         return amfTrace;
     }
 
@@ -227,8 +221,7 @@
      *
      * @param amfTrace The <tt>AmfTrace</tt> associated with the AMF connection.
      */
-    public void setAmfTrace(AmfTrace amfTrace)
-    {
+    public void setAmfTrace(AmfTrace amfTrace) {
         this.amfTrace = amfTrace;
     }
 
@@ -243,8 +236,7 @@
      *
      * @return The default object encoding of the AMF connection.
      */
-    public static int getDefaultObjectEncoding()
-    {
+    public static int getDefaultObjectEncoding() {
         return DEFAULT_OBJECT_ENCODING;
     }
 
@@ -253,8 +245,7 @@
      *
      * @param value The value to set the default object encoding to.
      */
-    public static void setDefaultObjectEncoding(int value)
-    {
+    public static void setDefaultObjectEncoding(int value) {
         DEFAULT_OBJECT_ENCODING = value;
     }
 
@@ -272,8 +263,7 @@
      *
      * @return The instantitateTypes property.
      */
-    public boolean isInstantiateTypes()
-    {
+    public boolean isInstantiateTypes() {
         return instantiateTypes;
     }
 
@@ -282,8 +272,7 @@
      *
      * @param instantiateTypes The value to set the instantiateTypes property to.
      */
-    public void setInstantiateTypes(boolean instantiateTypes)
-    {
+    public void setInstantiateTypes(boolean instantiateTypes) {
         this.instantiateTypes = instantiateTypes;
     }
 
@@ -298,8 +287,7 @@
      *
      * @return The object encoding for the AMF connection.
      */
-    public int getObjectEncoding()
-    {
+    public int getObjectEncoding() {
         if (!objectEncodingSet)
             return getDefaultObjectEncoding();
         return objectEncoding;
@@ -310,8 +298,7 @@
      *
      * @param objectEncoding The value to set the object encoding to.
      */
-    public void setObjectEncoding(int objectEncoding)
-    {
+    public void setObjectEncoding(int objectEncoding) {
         this.objectEncoding = objectEncoding;
         objectEncodingSet = true;
     }
@@ -326,8 +313,7 @@
      *
      * @return The <tt>Proxy</tt> this AMF connection is using.
      */
-    public Proxy getProxy()
-    {
+    public Proxy getProxy() {
         return proxy;
     }
 
@@ -338,8 +324,7 @@
      *
      * @param proxy The <tt>Proxy</tt> this AMF connection will use.
      */
-    public void setProxy(Proxy proxy)
-    {
+    public void setProxy(Proxy proxy) {
         this.proxy = proxy;
     }
 
@@ -352,8 +337,7 @@
      *
      * @return The HTTP or HTTPs url for the AMF connection.
      */
-    public String getUrl()
-    {
+    public String getUrl() {
         return url;
     }
 
@@ -367,12 +351,11 @@
      * Adds an AMF packet-level header which is sent with every request for
      * the life of this AMF connection.
      *
-     * @param name The name of the header.
+     * @param name           The name of the header.
      * @param mustUnderstand Whether the header must be processed or not.
-     * @param data The value of the header.
+     * @param data           The value of the header.
      */
-    public void addAmfHeader(String name, boolean mustUnderstand, Object data)
-    {
+    public void addAmfHeader(String name, boolean mustUnderstand, Object data) {
         if (amfHeaders == null)
             amfHeaders = new ArrayList<MessageHeader>();
 
@@ -387,8 +370,7 @@
      * @param name The name of the header.
      * @param data The value of the header.
      */
-    public void addAmfHeader(String name, Object data)
-    {
+    public void addAmfHeader(String name, Object data) {
         addAmfHeader(name, false, data);
     }
 
@@ -396,19 +378,14 @@
      * Removes any AMF headers found with the name given.
      *
      * @param name The name of the header(s) to remove.
-     *
      * @return true if a header existed with the given name.
      */
-    public boolean removeAmfHeader(String name)
-    {
+    public boolean removeAmfHeader(String name) {
         boolean exists = false;
-        if (amfHeaders != null)
-        {
-            for (Iterator<MessageHeader> iterator = amfHeaders.iterator(); iterator.hasNext();)
-            {
+        if (amfHeaders != null) {
+            for (Iterator<MessageHeader> iterator = amfHeaders.iterator(); iterator.hasNext(); ) {
                 MessageHeader header = iterator.next();
-                if (name.equals(header.getName()))
-                {
+                if (name.equals(header.getName())) {
                     iterator.remove();
                     exists = true;
                 }
@@ -420,8 +397,7 @@
     /**
      * Removes all AMF headers.
      */
-    public void removeAllAmfHeaders()
-    {
+    public void removeAllAmfHeaders() {
         if (amfHeaders != null)
             amfHeaders = null;
     }
@@ -429,13 +405,12 @@
     /**
      * Adds a Http request header to the underlying connection.
      *
-     * @param name The name of the Http header.
+     * @param name  The name of the Http header.
      * @param value The value of the Http header.
      */
-    public void addHttpRequestHeader(String name, String value)
-    {
+    public void addHttpRequestHeader(String name, String value) {
         if (httpRequestHeaders == null)
-            httpRequestHeaders = new HashMap<String,String>();
+            httpRequestHeaders = new HashMap<String, String>();
 
         httpRequestHeaders.put(name, value);
     }
@@ -444,14 +419,11 @@
      * Removes the Http header found with the name given.
      *
      * @param name The name of the Http header.
-     *
      * @return true if a header existed with the given name.
      */
-    public boolean removeHttpRequestHeader(String name)
-    {
+    public boolean removeHttpRequestHeader(String name) {
         boolean exists = false;
-        if (httpRequestHeaders != null)
-        {
+        if (httpRequestHeaders != null) {
             Object previousValue = httpRequestHeaders.remove(name);
             exists = (previousValue != null);
         }
@@ -461,8 +433,7 @@
     /**
      * Removes all Http request headers.
      */
-    public void removeAllHttpRequestHeaders()
-    {
+    public void removeAllHttpRequestHeaders() {
         if (httpRequestHeaders != null)
             httpRequestHeaders = null;
     }
@@ -471,18 +442,14 @@
      * Makes an AMF request to the server. A connection must have been made
      * prior to making a call.
      *
-     * @param command The method to call on the server.
+     * @param command   The method to call on the server.
      * @param arguments Arguments for the method.
-     *
      * @return The result of the call.
-     *
      * @throws ClientStatusException If there is a client side exception.
      * @throws ServerStatusException If there is a server side exception.
      */
-    public Object call(String command, Object ... arguments) throws ClientStatusException , ServerStatusException
-    {
-        if (!connected)
-        {
+    public Object call(String command, Object... arguments) throws ClientStatusException, ServerStatusException {
+        if (!connected) {
             String message = "AMF connection is not connected";
             ClientStatusException cse = new ClientStatusException(message, ClientStatusException.AMF_CALL_FAILED_CODE);
             throw cse;
@@ -493,8 +460,7 @@
         // TODO: Support customizable batching of messages.
         ActionMessage requestMessage = new ActionMessage(getObjectEncoding());
 
-        if (amfHeaders != null)
-        {
+        if (amfHeaders != null) {
             for (MessageHeader header : amfHeaders)
                 requestMessage.addHeader(header);
         }
@@ -508,28 +474,22 @@
         AmfMessageSerializer amfMessageSerializer = new AmfMessageSerializer();
         amfMessageSerializer.initialize(serializationContext, outBuffer, amfTrace);
 
-        try
-        {
+        try {
             amfMessageSerializer.writeMessage(requestMessage);
             Object result = send(outBuffer);
             return result;
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             if (e instanceof ClientStatusException)
-                throw (ClientStatusException)e;
+                throw (ClientStatusException) e;
             if (e instanceof ServerStatusException)
-                throw (ServerStatusException)e;
+                throw (ServerStatusException) e;
             // Otherwise, wrap into a ClientStatusException.
             throw new ClientStatusException(e, ClientStatusException.AMF_CALL_FAILED_CODE, generateHttpResponseInfo());
-        }
-        finally
-        {
-            try
-            {
+        } finally {
+            try {
                 outBuffer.close();
+            } catch (IOException ignore) {
             }
-            catch (IOException ignore){}
         }
     }
 
@@ -537,15 +497,13 @@
      * Closes the underlying URL connection, sets the url to null, and clears
      * the cookies.
      */
-    public void close()
-    {
+    public void close() {
         // Clear the cookies.
         if (cookies != null)
             cookies.clear();
 
         // Clear the URL connection and URL.
-        if (urlConnection != null)
-        {
+        if (urlConnection != null) {
             urlConnection.disconnect();
             urlConnection = null;
         }
@@ -560,11 +518,9 @@
      * Connects to the URL provided. Any previous connections are closed.
      *
      * @param connectUrl The url to connect to.
-     *
      * @throws ClientStatusException If there is a client side exception.
      */
-    public void connect(String connectUrl) throws ClientStatusException
-    {
+    public void connect(String connectUrl) throws ClientStatusException {
         SerializationContext serializationContext = new SerializationContext();
         serializationContext.createASObjectForMissingType = true;
         // Make sure collections are written out as Arrays (vs. ArrayCollection),
@@ -579,13 +535,11 @@
     /**
      * Connects to the URL provided. Any previous connections are closed.
      *
-     * @param connectUrl The url to connect to.
+     * @param connectUrl           The url to connect to.
      * @param serializationContext The serialization context used to configure the serialization.
-     *
      * @throws ClientStatusException If there is a client side exception.
      */
-    public void connect(String connectUrl, SerializationContext serializationContext) throws ClientStatusException
-    {
+    public void connect(String connectUrl, SerializationContext serializationContext) throws ClientStatusException {
         if (connected)
             close();
 
@@ -593,25 +547,19 @@
 
         // Try to encode the url in case it has spaces etc.
         String encodedUrl = null;
-        try
-        {
+        try {
             URL raw = new URL(url);
             URI uri = new URI(raw.getProtocol(), raw.getUserInfo(), raw.getHost(), raw.getPort(), raw.getPath(), raw.getQuery(), null);
             encodedUrl = uri.toString();
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             // NOWARN
         }
 
-        try
-        {
-            urlObject = new URL(encodedUrl != null? encodedUrl : url);
+        try {
+            urlObject = new URL(encodedUrl != null ? encodedUrl : url);
             this.serializationContext = serializationContext;
             internalConnect();
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
             ClientStatusException exception = new ClientStatusException(e, ClientStatusException.AMF_CONNECT_FAILED_CODE);
             throw exception;
         }
@@ -628,20 +576,15 @@
      *
      * @return The HTTP response info for the server status exception.
      */
-    protected HttpResponseInfo generateHttpResponseInfo()
-    {
+    protected HttpResponseInfo generateHttpResponseInfo() {
         HttpResponseInfo httpResponseInfo = null;
-        try
-        {
-            if (urlConnection != null)
-            {
+        try {
+            if (urlConnection != null) {
                 int responseCode = urlConnection.getResponseCode();
                 String responseMessage = urlConnection.getResponseMessage();
                 httpResponseInfo = new HttpResponseInfo(responseCode, responseMessage, urlConnectionInputStream);
             }
-        }
-        catch (IOException ignore)
-        {
+        } catch (IOException ignore) {
         }
         return httpResponseInfo;
     }
@@ -651,8 +594,7 @@
      *
      * @return The response URI.
      */
-    protected String getResponseURI()
-    {
+    protected String getResponseURI() {
         String responseURI = "/" + responseCounter;
         responseCounter++;
         return responseURI;
@@ -663,12 +605,11 @@
      *
      * @throws IOException If an exception is encountered during URL connection setup.
      */
-    protected void internalConnect() throws IOException
-    {
+    protected void internalConnect() throws IOException {
         if (proxy == null)
-            urlConnection = (HttpURLConnection)urlObject.openConnection();
+            urlConnection = (HttpURLConnection) urlObject.openConnection();
         else
-            urlConnection = (HttpURLConnection)urlObject.openConnection(proxy);
+            urlConnection = (HttpURLConnection) urlObject.openConnection(proxy);
 
         urlConnection.setDoOutput(true);
         setHttpRequestHeaders();
@@ -680,8 +621,7 @@
     /**
      * Processes the HTTP response headers and body.
      */
-    protected Object processHttpResponse(InputStream inputStream) throws ClassNotFoundException, IOException, ClientStatusException, ServerStatusException
-    {
+    protected Object processHttpResponse(InputStream inputStream) throws ClassNotFoundException, IOException, ClientStatusException, ServerStatusException {
         processHttpResponseHeaders();
         return processHttpResponseBody(inputStream);
     }
@@ -691,8 +631,7 @@
      */
     protected Object processHttpResponseBody(InputStream inputStream)
             throws ClassNotFoundException, IOException, ClientStatusException,
-            ServerStatusException
-    {
+            ServerStatusException {
         if (urlConnectionInputStream != null)
             urlConnectionInputStream.close();
         urlConnectionInputStream = new BufferedInputStream(inputStream);
@@ -703,15 +642,11 @@
         actionContext.setRequestMessage(message);
         MessageDeserializer deserializer = new AmfMessageDeserializer();
         deserializer.initialize(serializationContext, urlConnectionInputStream, amfTrace);
-        try
-        {
+        try {
             deserializer.readMessage(message, actionContext);
-        }
-        catch (MessageException me)
-        {
+        } catch (MessageException me) {
             // Means the stream contained non-AMF data, reset the stream and throw.
-            if (AmfMessageDeserializer.CODE_VERSION_MISMATCH.equals(me.getCode()))
-            {
+            if (AmfMessageDeserializer.CODE_VERSION_MISMATCH.equals(me.getCode())) {
                 urlConnectionInputStream.reset();
                 String errorMessage = "Unsupported AMF version";
                 throw new ClientStatusException(errorMessage, ClientStatusException.AMF_CALL_FAILED_CODE, generateHttpResponseInfo());
@@ -724,15 +659,12 @@
     /**
      * Processes the HTTP response headers.
      */
-    protected void processHttpResponseHeaders()
-    {
+    protected void processHttpResponseHeaders() {
         Map<String, List<String>> headers = urlConnection.getHeaderFields();
-        for (Map.Entry<String, List<String>> element : headers.entrySet())
-        {
+        for (Map.Entry<String, List<String>> element : headers.entrySet()) {
             String headerName = element.getKey();
             List<String> headerValues = element.getValue();
-            for (String headerValue : headerValues)
-            {
+            for (String headerValue : headerValues) {
                 if (SET_COOKIE.equals(headerName) || COOKIE.equals(headerName)
                         || SET_COOKIE2.equals(headerName) || COOKIE2.equals(headerName))
                     processSetCookieHeader(headerValue);
@@ -743,8 +675,7 @@
     /**
      * Processes the AMF packet.
      */
-    protected Object processAmfPacket(ActionMessage packet) throws ServerStatusException
-    {
+    protected Object processAmfPacket(ActionMessage packet) throws ServerStatusException {
         processAmfHeaders(packet.getHeaders());
         return processAmfBody(packet.getBodies());
     }
@@ -753,8 +684,7 @@
      * Processes the AMF headers by dispatching them to an AMF header processor,
      * if one exists.
      */
-    protected void processAmfHeaders(ArrayList<MessageHeader> headers)
-    {
+    protected void processAmfHeaders(ArrayList<MessageHeader> headers) {
         // No need to process headers if there's no AMF header processor.
         if (amfHeaderProcessor == null)
             return;
@@ -768,18 +698,13 @@
      * AMF messages is supported at some point but for now we are guaranteed to
      * have a single message.
      */
-    protected Object processAmfBody(ArrayList<MessageBody> messages) throws ServerStatusException
-    {
-        for (MessageBody message : messages)
-        {
+    protected Object processAmfBody(ArrayList<MessageBody> messages) throws ServerStatusException {
+        for (MessageBody message : messages) {
             String targetURI = message.getTargetURI();
 
-            if (targetURI.endsWith(MessageIOConstants.RESULT_METHOD))
-            {
+            if (targetURI.endsWith(MessageIOConstants.RESULT_METHOD)) {
                 return message.getData();
-            }
-            else if (targetURI.endsWith(MessageIOConstants.STATUS_METHOD))
-            {
+            } else if (targetURI.endsWith(MessageIOConstants.STATUS_METHOD)) {
                 String exMessage = "Server error";
                 HttpResponseInfo responseInfo = generateHttpResponseInfo();
                 ServerStatusException exception = new ServerStatusException(exMessage, message.getData(), responseInfo);
@@ -792,8 +717,7 @@
     /**
      * Writes the output buffer and processes the HTTP response.
      */
-    protected Object send(ByteArrayOutputStream outBuffer) throws ClassNotFoundException, IOException, ClientStatusException, ServerStatusException
-    {
+    protected Object send(ByteArrayOutputStream outBuffer) throws ClassNotFoundException, IOException, ClientStatusException, ServerStatusException {
         // Every Http request needs a new HttpURLConnection, hence the internalConnect.
         internalConnect();
 
@@ -810,8 +734,7 @@
      *
      * @param headerValue The value of the set-cookie header.
      */
-    protected void processSetCookieHeader(String headerValue)
-    {
+    protected void processSetCookieHeader(String headerValue) {
         String cookie = headerValue;
         if (cookie.indexOf(COOKIE_SEPERATOR) > 0)
             cookie = headerValue.substring(0, cookie.indexOf(COOKIE_SEPERATOR));
@@ -825,13 +748,10 @@
     /**
      * Sets the Http request headers, including the cookie headers.
      */
-    protected void setHttpRequestHeaders()
-    {
+    protected void setHttpRequestHeaders() {
         setHttpRequestCookieHeader();
-        if (httpRequestHeaders != null)
-        {
-            for (Map.Entry<String, String> element : httpRequestHeaders.entrySet())
-            {
+        if (httpRequestHeaders != null) {
+            for (Map.Entry<String, String> element : httpRequestHeaders.entrySet()) {
                 String key = element.getKey();
                 String value = element.getValue();
                 urlConnection.setRequestProperty(key, value);
@@ -844,15 +764,13 @@
     /**
      * Sets the Http request cookie headers.
      */
-    protected void setHttpRequestCookieHeader()
-    {
+    protected void setHttpRequestCookieHeader() {
         if (cookies == null)
             return;
 
         // Set the cookies, if any.
         StringBuffer cookieHeaderValue = null;
-        for (Map.Entry<String, String> element : cookies.entrySet())
-        {
+        for (Map.Entry<String, String> element : cookies.entrySet()) {
             String name = element.getKey();
             String value = element.getValue();
             if (cookieHeaderValue == null) // First cookie
@@ -873,8 +791,7 @@
     /**
      * An inner class to represent the HTTP response associated with the exception.
      */
-    public static class HttpResponseInfo
-    {
+    public static class HttpResponseInfo {
         private int responseCode;
         private String responseMessage;
         private InputStream responseInputStream;
@@ -883,12 +800,11 @@
          * Creates an HTTP response info with the HTTP code, message, and the
          * input stream.
          *
-         * @param responseCode The HTTP response code.
-         * @param responseMessage the HTTP message.
+         * @param responseCode        The HTTP response code.
+         * @param responseMessage     the HTTP message.
          * @param responseInputStream The underlying input stream.
          */
-        public HttpResponseInfo(int responseCode, String responseMessage, InputStream responseInputStream)
-        {
+        public HttpResponseInfo(int responseCode, String responseMessage, InputStream responseInputStream) {
             this.responseCode = responseCode;
             this.responseMessage = responseMessage;
             this.responseInputStream = responseInputStream;
@@ -899,8 +815,7 @@
          *
          * @return The HTTP response code.
          */
-        public int getResponseCode()
-        {
+        public int getResponseCode() {
             return responseCode;
         }
 
@@ -909,8 +824,7 @@
          *
          * @return The HTTP response message.
          */
-        public String getResponseMessage()
-        {
+        public String getResponseMessage() {
             return responseMessage;
         }
 
@@ -919,8 +833,7 @@
          *
          * @return The underlying response input stream.
          */
-        public InputStream getResponseInputStream()
-        {
+        public InputStream getResponseInputStream() {
             return responseInputStream;
         }
 
@@ -930,10 +843,9 @@
          * @return A String representation of the HTTP response info.
          */
         @Override
-        public String toString()
-        {
+        public String toString() {
             return "HttpResponseInfo " + "\n\tcode: " + responseCode
-                + "\n\tmessage: " + responseMessage;
+                    + "\n\tmessage: " + responseMessage;
         }
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/client/AMFHeaderProcessor.java b/core/src/main/java/flex/messaging/io/amf/client/AMFHeaderProcessor.java
index 6d63cb8..991f7ce 100644
--- a/core/src/main/java/flex/messaging/io/amf/client/AMFHeaderProcessor.java
+++ b/core/src/main/java/flex/messaging/io/amf/client/AMFHeaderProcessor.java
@@ -23,8 +23,7 @@
  * An AMF connection may have an AMF header processor where AMF headers can be
  * passed to as they are encountered in AMF response messages.
  */
-public interface AMFHeaderProcessor
-{
+public interface AMFHeaderProcessor {
     /**
      * The method that will be invoked by the AMF connection when an AMF header
      * is encountered.
diff --git a/core/src/main/java/flex/messaging/io/amf/client/exceptions/ClientStatusException.java b/core/src/main/java/flex/messaging/io/amf/client/exceptions/ClientStatusException.java
index 0f01dd9..7ecdc6d 100644
--- a/core/src/main/java/flex/messaging/io/amf/client/exceptions/ClientStatusException.java
+++ b/core/src/main/java/flex/messaging/io/amf/client/exceptions/ClientStatusException.java
@@ -25,8 +25,7 @@
  * error is encountered such as when a connect or call attempt fails due to
  * wrong url on the client.
  */
-public class ClientStatusException extends Exception
-{
+public class ClientStatusException extends Exception {
     private static final long serialVersionUID = 1412675397183129614L;
 
     /**
@@ -41,11 +40,10 @@
     /**
      * Creates a client status exception with the supplied throwable and code.
      *
-     * @param t The throwable instance used to create the exception.
+     * @param t    The throwable instance used to create the exception.
      * @param code The code of the exception.
      */
-    public ClientStatusException(Throwable t, String code)
-    {
+    public ClientStatusException(Throwable t, String code) {
         super(t);
         this.code = code;
     }
@@ -54,10 +52,9 @@
      * Creates a client status exception with the supplied message and code.
      *
      * @param message The message of the exception.
-     * @param code The code of the exception.
+     * @param code    The code of the exception.
      */
-    public ClientStatusException(String message, String code)
-    {
+    public ClientStatusException(String message, String code) {
         super(message);
         this.code = code;
     }
@@ -66,13 +63,12 @@
      * Creates a client status exception with the supplied message, code,
      * and http response info.
      *
-     * @param message The message of the exception.
-     * @param code The code of the exception.
+     * @param message          The message of the exception.
+     * @param code             The code of the exception.
      * @param httpResponseInfo The HTTP response info object that represents
-     * the HTTP response returned with the exception.
+     *                         the HTTP response returned with the exception.
      */
-    public ClientStatusException(String message, String code, HttpResponseInfo httpResponseInfo)
-    {
+    public ClientStatusException(String message, String code, HttpResponseInfo httpResponseInfo) {
         this(message, code);
         this.httpResponseInfo = httpResponseInfo;
     }
@@ -81,13 +77,12 @@
      * Creates a client status exception with the supplied message, code,
      * and http response info.
      *
-     * @param t The throwable instance used to create the exception.
-     * @param code The code of the exception.
+     * @param t                The throwable instance used to create the exception.
+     * @param code             The code of the exception.
      * @param httpResponseInfo The HTTP response info object that represents
-     * the HTTP response returned with the exception.
+     *                         the HTTP response returned with the exception.
      */
-    public ClientStatusException(Throwable t, String code, HttpResponseInfo httpResponseInfo)
-    {
+    public ClientStatusException(Throwable t, String code, HttpResponseInfo httpResponseInfo) {
         this(t, code);
         this.httpResponseInfo = httpResponseInfo;
     }
@@ -97,8 +92,7 @@
      *
      * @return The code of the exception.
      */
-    public String getCode()
-    {
+    public String getCode() {
         return code;
     }
 
@@ -107,8 +101,7 @@
      *
      * @return The HTTP response info of the exception.
      */
-    public HttpResponseInfo getHttpResponseInfo()
-    {
+    public HttpResponseInfo getHttpResponseInfo() {
         return httpResponseInfo;
     }
 
@@ -118,10 +111,9 @@
      * @return A String that represents the exception.
      */
     @Override
-    public String toString()
-    {
+    public String toString() {
         return "ClientStatusException "
-        + "\n\tmessage: " + getMessage()
-        + "\n\tcode: " + code;
+                + "\n\tmessage: " + getMessage()
+                + "\n\tcode: " + code;
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/client/exceptions/ServerStatusException.java b/core/src/main/java/flex/messaging/io/amf/client/exceptions/ServerStatusException.java
index 5c3f473..02b82ce 100644
--- a/core/src/main/java/flex/messaging/io/amf/client/exceptions/ServerStatusException.java
+++ b/core/src/main/java/flex/messaging/io/amf/client/exceptions/ServerStatusException.java
@@ -16,14 +16,14 @@
  */
 
 package flex.messaging.io.amf.client.exceptions;
+
 import flex.messaging.io.amf.client.AMFConnection.HttpResponseInfo;
 
 /**
  * Server status exceptions are thrown by the AMF connection when a server side
  * error is encountered.
  */
-public class ServerStatusException extends Exception
-{
+public class ServerStatusException extends Exception {
     private static final long serialVersionUID = -5441048669770997132L;
 
     private Object data;
@@ -33,11 +33,10 @@
      * Creates a server status exception with the supplied message and data.
      *
      * @param message The message of the exception.
-     * @param data The data of the exception which is usually an AMF result or
-     * status message.
+     * @param data    The data of the exception which is usually an AMF result or
+     *                status message.
      */
-    public ServerStatusException(String message, Object data)
-    {
+    public ServerStatusException(String message, Object data) {
         this(message, data, null);
     }
 
@@ -45,14 +44,13 @@
      * Creates a server status exception with the supplied message, data, and
      * HTTP response info object.
      *
-     * @param message The message of the exception.
-     * @param data The data of the exception which is usually an AMF result or
-     * status message.
+     * @param message          The message of the exception.
+     * @param data             The data of the exception which is usually an AMF result or
+     *                         status message.
      * @param httpResponseInfo The HTTP response info object that represents
-     * the HTTP response returned with the exception.
+     *                         the HTTP response returned with the exception.
      */
-    public ServerStatusException(String message, Object data, HttpResponseInfo httpResponseInfo)
-    {
+    public ServerStatusException(String message, Object data, HttpResponseInfo httpResponseInfo) {
         super(message);
         this.data = data;
         this.httpResponseInfo = httpResponseInfo;
@@ -63,8 +61,7 @@
      *
      * @return The data of the exception.
      */
-    public Object getData()
-    {
+    public Object getData() {
         return data;
     }
 
@@ -73,8 +70,7 @@
      *
      * @return The HTTP response info of the exception.
      */
-    public HttpResponseInfo getHttpResponseInfo()
-    {
+    public HttpResponseInfo getHttpResponseInfo() {
         return httpResponseInfo;
     }
 
@@ -84,8 +80,7 @@
      * @return A String that represents the exception.
      */
     @Override
-    public String toString()
-    {
+    public String toString() {
         String temp = "ServerStatusException " + "\n\tdata: " + data;
         if (httpResponseInfo != null)
             temp += "\n\tHttpResponseInfo: " + httpResponseInfo;
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/ASTranslator.java b/core/src/main/java/flex/messaging/io/amf/translator/ASTranslator.java
index b193a7c..6880026 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/ASTranslator.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/ASTranslator.java
@@ -27,20 +27,17 @@
  * ASTranslator provides the ability to convert between ASObjects used by
  * Flex and Java objects in your application.
  */
-public class ASTranslator implements TypeMarshaller
-{
-    /** {@inheritDoc} */
-    public Object createInstance(Object source, Class desiredClass)
-    {
+public class ASTranslator implements TypeMarshaller {
+    /**
+     * {@inheritDoc}
+     */
+    public Object createInstance(Object source, Class desiredClass) {
         ActionScriptDecoder decoder = DecoderFactory.getDecoderForShell(desiredClass);
 
         Object instance = null;
-        if (decoder.hasShell())
-        {
+        if (decoder.hasShell()) {
             instance = decoder.createShell(source, desiredClass);
-        }
-        else
-        {
+        } else {
             instance = ClassUtil.createDefaultInstance(desiredClass, null);
         }
 
@@ -51,10 +48,8 @@
      * Translate an object to another object of type class.
      * obj types should be ASObject, Boolean, String, Double, Date, ArrayList
      */
-    public Object convert(Object source, Class desiredClass)
-    {
-        if (source == null && !desiredClass.isPrimitive())
-        {
+    public Object convert(Object source, Class desiredClass) {
+        if (source == null && !desiredClass.isPrimitive()) {
             return null;
         }
 
@@ -66,8 +61,7 @@
         else
             decoder = DecoderFactory.getDecoder(source, desiredClass);
 
-        if (Trace.remote)
-        {
+        if (Trace.remote) {
             Trace.trace("Decoder for " + (source == null ? "null" : source.getClass().toString()) +
                     " with desired " + desiredClass + " is " + decoder.getClass());
         }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/TranslationException.java b/core/src/main/java/flex/messaging/io/amf/translator/TranslationException.java
index e4e41ed..8da158a 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/TranslationException.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/TranslationException.java
@@ -21,23 +21,19 @@
 /**
  *
  */
-public class TranslationException extends MessageException
-{
+public class TranslationException extends MessageException {
     static final long serialVersionUID = 3312487017261810877L;
 
-    public TranslationException(String message)
-    {
+    public TranslationException(String message) {
         super(message);
     }
 
-    public TranslationException(String message, Throwable rootCause)
-    {
+    public TranslationException(String message, Throwable rootCause) {
         super(message);
         setRootCause(rootCause);
     }
 
-    public TranslationException(String message, String details)
-    {
+    public TranslationException(String message, String details) {
         super(message);
         setDetails(details);
     }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ActionScriptDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ActionScriptDecoder.java
index 0ca6c36..753d2d0 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ActionScriptDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ActionScriptDecoder.java
@@ -23,36 +23,34 @@
 
 /**
  * Decode an ActionScript object (of some type) to a Java object (of some type).
- *
- *
  */
-public abstract class ActionScriptDecoder
-{
+public abstract class ActionScriptDecoder {
     /**
      * Does this type have a placeholder shell?
+     *
      * @return boolean true if there is a placeholder shell
      */
-    public boolean hasShell()
-    {
+    public boolean hasShell() {
         return false;
     }
 
     /**
      * Used for calls only interested in creating a placeholder shell for a type.
+     *
      * @param encodedObject the encoded object
-     * @param desiredClass the desired class for the decoded object
+     * @param desiredClass  the desired class for the decoded object
      * @return Object the shell placeholder object
      */
-    public Object createShell(Object encodedObject, Class desiredClass)
-    {
+    public Object createShell(Object encodedObject, Class desiredClass) {
         return null;
     }
 
     /**
      * Used by calls to decode an object has a shell placeholder.
-     * @param shell the placeholder shell
+     *
+     * @param shell         the placeholder shell
      * @param encodedObject the encoded object
-     * @param desiredClass the desired class for the decoded object
+     * @param desiredClass  the desired class for the decoded object
      * @return Object the decoded object
      */
     public abstract Object decodeObject(Object shell, Object encodedObject, Class desiredClass);
@@ -60,24 +58,22 @@
     /**
      * Used by calls wanted to decode an object. If the decoder requires a place holder shell one is created
      * and then the encodedObject is decoded to fill the object shell.
+     *
      * @param encodedObject the encoded object
-     * @param desiredClass the desire class for the decoded object
+     * @param desiredClass  the desire class for the decoded object
      * @return Object the decoded object
      */
-    public Object decodeObject(Object encodedObject, Class desiredClass)
-    {
+    public Object decodeObject(Object encodedObject, Class desiredClass) {
         Object shell = null;
 
-        if (hasShell())
-        {
+        if (hasShell()) {
             shell = createShell(encodedObject, desiredClass);
         }
 
         return decodeObject(shell, encodedObject, desiredClass);
     }
 
-    protected boolean canUseByReference(Object o)
-    {
+    protected boolean canUseByReference(Object o) {
         if (o == null)
             return false;
 
@@ -90,12 +86,9 @@
         else if (o instanceof Boolean)
             return false;
 
-        else if (o instanceof Date)
-        {
+        else if (o instanceof Date) {
             return SerializationContext.getSerializationContext().supportDatesByReference;
-        }
-
-        else if (o instanceof Calendar)
+        } else if (o instanceof Calendar)
             return false;
 
         else if (o instanceof Character)
@@ -104,8 +97,7 @@
         return true;
     }
 
-    protected static Object getDefaultPrimitiveValue(Class type)
-    {
+    protected static Object getDefaultPrimitiveValue(Class type) {
         if (type == Boolean.TYPE)
             return Boolean.FALSE;
         else if (type == Integer.TYPE)
@@ -119,9 +111,9 @@
         else if (type == Character.TYPE)
             return new Character(Character.MIN_VALUE);
         else if (type == Short.TYPE)
-            return new Short((short)0);
+            return new Short((short) 0);
         else if (type == Byte.TYPE)
-            return new Byte((byte)0);
+            return new Byte((byte) 0);
 
         return null;
     }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ArrayDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ArrayDecoder.java
index 8563504..e2ddb40 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ArrayDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ArrayDecoder.java
@@ -23,45 +23,35 @@
 import java.util.Collection;
 
 /**
- *
  * Decodes native Java Array, java.util.Collection, or
  * java.lang.String (to char[]) instances to a native
  * Java Array instance with desired component type.
- *
+ * <p>
  * This class does not handle the case where the source
  * encodedObject is modified while decoding.
  */
-public class ArrayDecoder extends ActionScriptDecoder
-{
-    @Override public boolean hasShell()
-    {
+public class ArrayDecoder extends ActionScriptDecoder {
+    @Override
+    public boolean hasShell() {
         return true;
     }
 
-    @Override public Object createShell(Object encodedObject, Class desiredClass)
-    {
+    @Override
+    public Object createShell(Object encodedObject, Class desiredClass) {
         Class<?> arrayElementClass = desiredClass.getComponentType();
 
         int size = 10;
 
         // If we have an encodedObject as a source then we check it's size to optimize
         // array creation. We may have been called by
-        if (encodedObject != null)
-        {
-            if (encodedObject.getClass().isArray())
-            {
+        if (encodedObject != null) {
+            if (encodedObject.getClass().isArray()) {
                 size = Array.getLength(encodedObject);
-            }
-            else if (encodedObject instanceof Collection)
-            {
-                size = ((Collection<?>)encodedObject).size();
-            }
-            else if (encodedObject instanceof String)
-            {
-                size = ((String)encodedObject).length();
-            }
-            else
-            {
+            } else if (encodedObject instanceof Collection) {
+                size = ((Collection<?>) encodedObject).size();
+            } else if (encodedObject instanceof String) {
+                size = ((String) encodedObject).length();
+            } else {
                 TranslationException ex = new TranslationException("Could not create Array " + arrayElementClass);
                 ex.setCode("Server.Processing");
                 throw ex;
@@ -72,34 +62,32 @@
         return shell;
     }
 
-    @Override public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+    @Override
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         if (shell == null || encodedObject == null)
             return null;
 
         Class<?> arrayElementClass = desiredClass.getComponentType();
 
         if (encodedObject instanceof Collection)
-            return decodeArray(shell, (Collection<?>)encodedObject, arrayElementClass);
+            return decodeArray(shell, (Collection<?>) encodedObject, arrayElementClass);
 
         if (encodedObject.getClass().isArray())
             return decodeArray(shell, encodedObject, arrayElementClass);
 
         if (encodedObject instanceof String && isCharacter(arrayElementClass))
-            return decodeArray(shell, (String)encodedObject, arrayElementClass);
+            return decodeArray(shell, (String) encodedObject, arrayElementClass);
 
         return null; // FIXME: Throw an exception!
     }
 
-    protected Object decodeArray(Object shellArray, String string, Class arrayElementClass)
-    {
+    protected Object decodeArray(Object shellArray, String string, Class arrayElementClass) {
         if (char.class.equals(arrayElementClass))
             return string.toCharArray();
 
-        if (Character.class.equals(arrayElementClass))
-        {
+        if (Character.class.equals(arrayElementClass)) {
             char[] temp = string.toCharArray();
-            Character[] charArray= new Character[temp.length];
+            Character[] charArray = new Character[temp.length];
             for (int i = 0; i < temp.length; i++)
                 charArray[i] = Character.valueOf(temp[i]);
             return charArray;
@@ -108,29 +96,23 @@
         return null;
     }
 
-    protected Object decodeArray(Object shellArray, Collection collection, Class arrayElementClass)
-    {
+    protected Object decodeArray(Object shellArray, Collection collection, Class arrayElementClass) {
         return decodeArray(shellArray, collection.toArray(), arrayElementClass);
     }
 
-    protected Object decodeArray(Object shellArray, Object array, Class arrayElementClass)
-    {
+    protected Object decodeArray(Object shellArray, Object array, Class arrayElementClass) {
         Object encodedValue = null;
         Object decodedValue = null;
 
         int n = 0;
         int len = Array.getLength(array);
 
-        for (int i = 0; i < len; i++)
-        {
+        for (int i = 0; i < len; i++) {
             encodedValue = Array.get(array, i);
 
-            if (encodedValue == null)
-            {
+            if (encodedValue == null) {
                 Array.set(shellArray, n, null);
-            }
-            else
-            {
+            } else {
                 // We may need to honor our loose-typing rules for individual types as,
                 // unlike a Collection, an Array has a fixed element type. We'll use our handy
                 // decoder suite again to find us the right decoder...
@@ -142,12 +124,9 @@
 
                 decodedValue = decoder.decodeObject(encodedValue, arrayElementClass);
 
-                try
-                {
+                try {
                     Array.set(shellArray, n, decodedValue);
-                }
-                catch (IllegalArgumentException ex)
-                {
+                } catch (IllegalArgumentException ex) {
                     // FIXME: At least log this as a error...
                     // TODO: Should we report a failed Array element set?
                     // Perhaps the action here could be configurable on the translation context?
@@ -160,8 +139,7 @@
         return shellArray;
     }
 
-    private boolean isCharacter(Class<?> classType)
-    {
+    private boolean isCharacter(Class<?> classType) {
         return Character.class.equals(classType) || char.class.equals(classType);
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/BooleanDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/BooleanDecoder.java
index ae3e79d..a1c69c5 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/BooleanDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/BooleanDecoder.java
@@ -24,30 +24,19 @@
  * will be (case insensitively) converted to a true Boolean value. All other
  * values will be interpreted as false.
  * </p>
- *
- *
  */
-public class BooleanDecoder extends ActionScriptDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class BooleanDecoder extends ActionScriptDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         Object result = null;
 
-        if (encodedObject == null)
-        {
+        if (encodedObject == null) {
             result = Boolean.FALSE;
-        }
-        else if (encodedObject instanceof Boolean)
-        {
+        } else if (encodedObject instanceof Boolean) {
             result = encodedObject;
-        }
-        else if (encodedObject instanceof String)
-        {
-            String str = (String)encodedObject;
+        } else if (encodedObject instanceof String) {
+            String str = (String) encodedObject;
             result = Boolean.valueOf(str);
-        }
-        else
-        {
+        } else {
             DecoderFactory.invalidType(encodedObject, desiredClass);
         }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/CalendarDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/CalendarDecoder.java
index 285775b..7af5ec1 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/CalendarDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/CalendarDecoder.java
@@ -24,40 +24,29 @@
  * java.lang.Number to instances of java.util.Calendar. If the incoming
  * object was not a Calendar, we create a new Calendar instance using the
  * default timezone and locale.
- *
+ * <p>
  * If the incoming type was an AMF 3 Date we remember the translation
  * to Calendar in our list of known objects as Dates are considered
  * complex objects and can be sent by reference. We want to retain
  * pointers to Date instances in our representation of an ActionScript
  * object graph.
- *
- *
  */
-public class CalendarDecoder extends ActionScriptDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class CalendarDecoder extends ActionScriptDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         Object result = null;
 
-        if (encodedObject instanceof Date)
-        {
+        if (encodedObject instanceof Date) {
             Calendar calendar = Calendar.getInstance();
-            calendar.setTime((Date)encodedObject);
+            calendar.setTime((Date) encodedObject);
             result = calendar;
-        }
-        else if (encodedObject instanceof Calendar)
-        {
+        } else if (encodedObject instanceof Calendar) {
             result = encodedObject;
-        }
-        else if (encodedObject instanceof Number)
-        {
+        } else if (encodedObject instanceof Number) {
             Calendar calendar = Calendar.getInstance();
-            Number number = (Number)encodedObject;
+            Number number = (Number) encodedObject;
             calendar.setTimeInMillis(number.longValue());
             result = calendar;
-        }
-        else
-        {
+        } else {
             DecoderFactory.invalidType(encodedObject, desiredClass);
         }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/CharacterDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/CharacterDecoder.java
index b58c37f..0dd4025 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/CharacterDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/CharacterDecoder.java
@@ -23,38 +23,27 @@
  * Note that a String must be non-zero length and only the first
  * character in the String will be used.
  * </p>
- *
- *
  */
-public class CharacterDecoder extends ActionScriptDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class CharacterDecoder extends ActionScriptDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         Character result = null;
 
-        if (encodedObject == null)
-        {
+        if (encodedObject == null) {
             char c = 0;
             result = new Character(c);
-        }
-        else if (encodedObject instanceof String)
-        {
-            String str = (String)encodedObject;
+        } else if (encodedObject instanceof String) {
+            String str = (String) encodedObject;
 
             char[] chars = str.toCharArray();
 
-            if (chars.length > 0)
-            {
+            if (chars.length > 0) {
                 result = new Character(chars[0]);
             }
-        }
-        else if (encodedObject instanceof Character)
-        {
-            result = (Character)encodedObject;
+        } else if (encodedObject instanceof Character) {
+            result = (Character) encodedObject;
         }
 
-        if (result == null)
-        {
+        if (result == null) {
             DecoderFactory.invalidType(encodedObject, desiredClass);
         }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/CollectionDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/CollectionDecoder.java
index f733adc..802cc11 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/CollectionDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/CollectionDecoder.java
@@ -49,111 +49,78 @@
  * </p>
  *
  * @see java.util.Collection
- *
- *
  */
-public class CollectionDecoder extends ActionScriptDecoder
-{
-    public boolean hasShell()
-    {
+public class CollectionDecoder extends ActionScriptDecoder {
+    public boolean hasShell() {
         return true;
     }
 
-    protected boolean isSuitableCollection(Object encodedObject, Class desiredClass)
-    {
+    protected boolean isSuitableCollection(Object encodedObject, Class desiredClass) {
         return (encodedObject instanceof Collection && desiredClass.isAssignableFrom(encodedObject.getClass()));
     }
 
-    public Object createShell(Object encodedObject, Class desiredClass)
-    {
+    public Object createShell(Object encodedObject, Class desiredClass) {
         Collection col = null;
 
-        try
-        {
-            if (encodedObject != null)
-            {
-                if (isSuitableCollection(encodedObject, desiredClass))
-                {
-                    col = (Collection)encodedObject;
-                }
-                else
-                {
-                    if (desiredClass.isInterface())
-                    {
-                        if (List.class.isAssignableFrom(desiredClass))
-                        {
+        try {
+            if (encodedObject != null) {
+                if (isSuitableCollection(encodedObject, desiredClass)) {
+                    col = (Collection) encodedObject;
+                } else {
+                    if (desiredClass.isInterface()) {
+                        if (List.class.isAssignableFrom(desiredClass)) {
                             col = new ArrayList();
-                        }
-                        else if (SortedSet.class.isAssignableFrom(desiredClass))
-                        {
+                        } else if (SortedSet.class.isAssignableFrom(desiredClass)) {
                             col = new TreeSet();
-                        }
-                        else if (Set.class.isAssignableFrom(desiredClass))
-                        {
+                        } else if (Set.class.isAssignableFrom(desiredClass)) {
                             col = new HashSet();
-                        }
-                        else if (Collection.class.isAssignableFrom(desiredClass))
-                        {
+                        } else if (Collection.class.isAssignableFrom(desiredClass)) {
                             col = new ArrayList();
                         }
-                    }
-                    else
-                    {
-                        col = (Collection)desiredClass.newInstance();
+                    } else {
+                        col = (Collection) desiredClass.newInstance();
                     }
                 }
+            } else {
+                col = (Collection) desiredClass.newInstance();
             }
-            else
-            {
-                col = (Collection)desiredClass.newInstance();
-            }
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             TranslationException ex = new TranslationException("Could not create Collection " + desiredClass, e);
             ex.setCode("Server.Processing");
             throw ex;
         }
 
-        if (col == null)
-        {
+        if (col == null) {
             DecoderFactory.invalidType(encodedObject, desiredClass);
         }
 
         return col;
     }
 
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         if (shell == null || encodedObject == null)
             return null;
 
         // Don't decode if we already have a suitable Collection. 
-        if (isSuitableCollection(encodedObject, desiredClass))
-        {
+        if (isSuitableCollection(encodedObject, desiredClass)) {
             return encodedObject;
         }
 
-        return decodeCollection((Collection)shell, encodedObject);
+        return decodeCollection((Collection) shell, encodedObject);
     }
 
-    protected Collection decodeCollection(Collection collectionShell, Object encodedObject)
-    {
+    protected Collection decodeCollection(Collection collectionShell, Object encodedObject) {
         Object obj = null;
 
-        if (encodedObject instanceof String)
-        {
-            encodedObject = ((String)encodedObject).toCharArray();
-        }
-        else if (encodedObject instanceof Collection)
-        {
-            encodedObject = ((Collection)encodedObject).toArray();
+        if (encodedObject instanceof String) {
+            encodedObject = ((String) encodedObject).toCharArray();
+        } else if (encodedObject instanceof Collection) {
+            encodedObject = ((Collection) encodedObject).toArray();
         }
 
         int len = Array.getLength(encodedObject);
 
-        for (int i = 0; i < len; i++)
-        {
+        for (int i = 0; i < len; i++) {
             obj = Array.get(encodedObject, i);
             collectionShell.add(obj);
         }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/DateDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/DateDecoder.java
index 5aac5cb..5dd103c 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/DateDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/DateDecoder.java
@@ -23,95 +23,63 @@
  * java.lang.Number (via longValue) instances to a java.util.Date,
  * taking into consideration the SQL specific java.sql.Date type
  * which is required by Hibernate users.
- *
+ * <p>
  * If the incoming type was an AMF 3 Date, we remember the translation
  * to Calendar in our list of known objects as Dates are considered
  * complex objects and can be sent by reference. We want to retain
  * pointers to Date instances in our representation of an ActionScript
  * object graph.
- *
- *
  */
-public class DateDecoder extends ActionScriptDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class DateDecoder extends ActionScriptDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         java.util.Date result = null;
 
-        if (java.sql.Date.class.isAssignableFrom(desiredClass))
-        {
-            if (encodedObject instanceof java.util.Date)
-            {
-                java.util.Date date = (java.util.Date)encodedObject;
+        if (java.sql.Date.class.isAssignableFrom(desiredClass)) {
+            if (encodedObject instanceof java.util.Date) {
+                java.util.Date date = (java.util.Date) encodedObject;
                 result = new java.sql.Date(date.getTime());
-            }
-            else if (encodedObject instanceof Calendar)
-            {
-                Calendar calendar = (Calendar)encodedObject;
+            } else if (encodedObject instanceof Calendar) {
+                Calendar calendar = (Calendar) encodedObject;
                 result = new java.sql.Date(calendar.getTimeInMillis());
-            }
-            else if (encodedObject instanceof Number)
-            {
-                Number number = (Number)encodedObject;
+            } else if (encodedObject instanceof Number) {
+                Number number = (Number) encodedObject;
                 result = new java.sql.Date(number.longValue());
             }
-        }
-        else if (java.sql.Timestamp.class.isAssignableFrom(desiredClass))
-        {
-            if (encodedObject instanceof java.util.Date)
-            {
-                java.util.Date date = (java.util.Date)encodedObject;
+        } else if (java.sql.Timestamp.class.isAssignableFrom(desiredClass)) {
+            if (encodedObject instanceof java.util.Date) {
+                java.util.Date date = (java.util.Date) encodedObject;
                 result = new java.sql.Timestamp(date.getTime());
-            }
-            else if (encodedObject instanceof Calendar)
-            {
-                Calendar calendar = (Calendar)encodedObject;
+            } else if (encodedObject instanceof Calendar) {
+                Calendar calendar = (Calendar) encodedObject;
                 result = new java.sql.Timestamp(calendar.getTimeInMillis());
-            }
-            else if (encodedObject instanceof Number)
-            {
-                Number number = (Number)encodedObject;
+            } else if (encodedObject instanceof Number) {
+                Number number = (Number) encodedObject;
                 result = new java.sql.Timestamp(number.longValue());
             }
-        }
-        else if (java.sql.Time.class.isAssignableFrom(desiredClass))
-        {
-            if (encodedObject instanceof java.util.Date)
-            {
-                java.util.Date date = (java.util.Date)encodedObject;
+        } else if (java.sql.Time.class.isAssignableFrom(desiredClass)) {
+            if (encodedObject instanceof java.util.Date) {
+                java.util.Date date = (java.util.Date) encodedObject;
                 result = new java.sql.Time(date.getTime());
-            }
-            else if (encodedObject instanceof Calendar)
-            {
-                Calendar calendar = (Calendar)encodedObject;
+            } else if (encodedObject instanceof Calendar) {
+                Calendar calendar = (Calendar) encodedObject;
                 result = new java.sql.Time(calendar.getTimeInMillis());
-            }
-            else if (encodedObject instanceof Number)
-            {
-                Number number = (Number)encodedObject;
+            } else if (encodedObject instanceof Number) {
+                Number number = (Number) encodedObject;
                 result = new java.sql.Time(number.longValue());
             }
-        }
-        else if (java.util.Date.class.isAssignableFrom(desiredClass))
-        {
-            if (encodedObject instanceof java.util.Date)
-            {
-                result = (java.util.Date)encodedObject;
-            }
-            else if (encodedObject instanceof Calendar)
-            {
-                Calendar calendar = (Calendar)encodedObject;
+        } else if (java.util.Date.class.isAssignableFrom(desiredClass)) {
+            if (encodedObject instanceof java.util.Date) {
+                result = (java.util.Date) encodedObject;
+            } else if (encodedObject instanceof Calendar) {
+                Calendar calendar = (Calendar) encodedObject;
                 result = calendar.getTime();
-            }
-            else if (encodedObject instanceof Number)
-            {
-                Number number = (Number)encodedObject;
+            } else if (encodedObject instanceof Number) {
+                Number number = (Number) encodedObject;
                 result = new java.util.Date(number.longValue());
             }
         }
 
-        if (result == null)
-        {
+        if (result == null) {
             DecoderFactory.invalidType(encodedObject, desiredClass);
         }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/DecoderFactory.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/DecoderFactory.java
index 71f366b..41b24bf 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/DecoderFactory.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/DecoderFactory.java
@@ -30,11 +30,8 @@
  * to convert the encoded object into an instance of the desired class.
  *
  * @see ActionScriptDecoder
- *
- *
  */
-public class DecoderFactory
-{
+public class DecoderFactory {
     // The identity transform
     private static final NativeDecoder nativeDecoder = new NativeDecoder();
 
@@ -77,8 +74,7 @@
      * @param desiredClass the desire class for the decoded object
      * @return The <tt>ActionScriptDecoder</tt> to use for instances of the desired class.
      */
-    public static ActionScriptDecoder getDecoderForShell(Class desiredClass)
-    {
+    public static ActionScriptDecoder getDecoderForShell(Class desiredClass) {
         if (desiredClass == null)
             return nullDecoder;
 
@@ -102,7 +98,7 @@
      * or care about restoring references in the event that an instance was converted to
      * a new type. Since the all MessageDeserializes now convert directly to strongly
      * typed instances it is less likely that references will need to be tracked.
-     *
+     * <p>
      * A case where a reference may have needed to be tracked would be that a Class has
      * several properties of a subtype of Object[] (i.e. Array), Collection or Map but these
      * properties were not of the default type returned by the MessageDeserializer, that
@@ -111,13 +107,11 @@
      * (say HashMap -> TreeMap) would effectively clone these instances.
      *
      * @param encodedObject the encoded object
-     * @param desiredClass the desire class for the decoded object
+     * @param desiredClass  the desire class for the decoded object
      * @return The <tt>ActionScriptDecoder</tt> to use for instances of the desired class.
      */
-    public static ActionScriptDecoder getDecoder(Object encodedObject, Class desiredClass)
-    {
-        if (encodedObject != null)
-        {
+    public static ActionScriptDecoder getDecoder(Object encodedObject, Class desiredClass) {
+        if (encodedObject != null) {
             // If we already have a suitable instance, return immediately!
             if (desiredClass.isAssignableFrom(encodedObject.getClass()))
                 return nativeDecoder;
@@ -170,9 +164,9 @@
 
         if (encodedObject == null)
             return nullDecoder;
-        
+
         if (desiredClass.isEnum())
-            return enumDecoder;        
+            return enumDecoder;
 
         DecoderFactory.invalidType(encodedObject, desiredClass);
 
@@ -186,13 +180,11 @@
      * a lot of information when a complex type is converted.
      *
      * @param encodedObject the encoded object
-     * @param desiredClass the desire class for the decoded object
+     * @param desiredClass  the desire class for the decoded object
      * @return The <tt>ActionScriptDecoder</tt> to use for instances of the desired class.
      */
-    public static ActionScriptDecoder getReferenceAwareDecoder(Object encodedObject, Class desiredClass)
-    {
-        if (encodedObject != null)
-        {
+    public static ActionScriptDecoder getReferenceAwareDecoder(Object encodedObject, Class desiredClass) {
+        if (encodedObject != null) {
             if (String.class.equals(desiredClass))
                 return stringDecoder;
 
@@ -257,71 +249,55 @@
         return nativeDecoder;
     }
 
-    public static boolean isNumber(Class desiredClass)
-    {
+    public static boolean isNumber(Class desiredClass) {
         boolean isNum = false;
 
-        if (desiredClass.isPrimitive())
-        {
+        if (desiredClass.isPrimitive()) {
             if (desiredClass.equals(Integer.TYPE)
                     || desiredClass.equals(Double.TYPE)
                     || desiredClass.equals(Long.TYPE)
                     || desiredClass.equals(Float.TYPE)
                     || desiredClass.equals(Short.TYPE)
-                    || desiredClass.equals(Byte.TYPE))
-            {
+                    || desiredClass.equals(Byte.TYPE)) {
                 isNum = true;
             }
-        }
-        else if (Number.class.isAssignableFrom(desiredClass))
-        {
+        } else if (Number.class.isAssignableFrom(desiredClass)) {
             isNum = true;
         }
 
         return isNum;
     }
 
-    public static boolean isCharacter(Class desiredClass)
-    {
+    public static boolean isCharacter(Class desiredClass) {
         boolean isChar = false;
 
-        if (desiredClass.isPrimitive() && desiredClass.equals(Character.TYPE))
-        {
+        if (desiredClass.isPrimitive() && desiredClass.equals(Character.TYPE)) {
             isChar = true;
-        }
-        else if (desiredClass.equals(Character.class))
-        {
+        } else if (desiredClass.equals(Character.class)) {
             isChar = true;
         }
 
         return isChar;
     }
 
-    public static boolean isBoolean(Class desiredClass)
-    {
+    public static boolean isBoolean(Class desiredClass) {
         boolean isBool = false;
 
-        if (desiredClass.isPrimitive() && desiredClass.equals(Boolean.TYPE))
-        {
+        if (desiredClass.isPrimitive() && desiredClass.equals(Boolean.TYPE)) {
             isBool = true;
-        }
-        else if (desiredClass.equals(Boolean.class))
-        {
+        } else if (desiredClass.equals(Boolean.class)) {
             isBool = true;
         }
 
         return isBool;
     }
 
-    public static boolean isCharArray(Class desiredClass)
-    {
+    public static boolean isCharArray(Class desiredClass) {
         boolean isCharArray = false;
 
-        if (desiredClass.isArray())
-        {
+        if (desiredClass.isArray()) {
             Class type = desiredClass.getComponentType();
-            if (type != null && type.equals(Character.TYPE))
-            {
+            if (type != null && type.equals(Character.TYPE)) {
                 isCharArray = true;
             }
         }
@@ -329,43 +305,35 @@
         return isCharArray;
     }
 
-    public static boolean isTypedObject(Object encodedObject)
-    {
+    public static boolean isTypedObject(Object encodedObject) {
         boolean typed = false;
 
-        if (encodedObject instanceof ASObject)
-        {
+        if (encodedObject instanceof ASObject) {
             typed = TypeMarshallingContext.getType(encodedObject) != null;
         }
 
         return typed;
     }
 
-    public static void invalidType(Object object, Class desiredClass)
-    {
+    public static void invalidType(Object object, Class desiredClass) {
         String inputType = null;
 
-        if (object != null)
-        {
+        if (object != null) {
             inputType = object.getClass().getName();
         }
 
         StringBuffer message = new StringBuffer("Cannot convert ");
-        if (inputType != null)
-        {
+        if (inputType != null) {
             message.append("type ").append(inputType).append(" ");
         }
 
         if (object != null && (object instanceof String
                 || object instanceof Number
                 || object instanceof Boolean
-                || object instanceof Date))
-        {
+                || object instanceof Date)) {
             message.append("with value '").append(object.toString()).append("' ");
-        }
-        else if (object instanceof ASObject)
-        {
-            ASObject aso = (ASObject)object;
+        } else if (object instanceof ASObject) {
+            ASObject aso = (ASObject) object;
             message.append("with remote type specified as '").append(aso.getType()).append("' ");
         }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/EnumDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/EnumDecoder.java
index 926ae26..fa009d4 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/EnumDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/EnumDecoder.java
@@ -18,18 +18,16 @@
 
 /**
  * Decode an ActionScript enumeration object (generally a string) to a Java enum.
- *
  */
-public class EnumDecoder extends ActionScriptDecoder
-{
+public class EnumDecoder extends ActionScriptDecoder {
     /**
      * Does this type have a placeholder shell?
      * True for Enumerations.
+     *
      * @return boolean true if it has a shell
      */
     @Override
-    public boolean hasShell()
-    {
+    public boolean hasShell() {
         return true;
     }
 
@@ -37,12 +35,11 @@
      * Create the enumeration object based on the string.
      *
      * @param encodedObject the object
-     * @param desiredClass ignored
+     * @param desiredClass  ignored
      * @return Object the created shell object
      */
     @Override
-    public Object createShell(Object encodedObject, Class desiredClass)
-    {
+    public Object createShell(Object encodedObject, Class desiredClass) {
         if (encodedObject instanceof Enum)
             return encodedObject;
 
@@ -58,14 +55,14 @@
      * Decode an object.
      * For the enum type, the createShell has already done the work, so we just
      * return the shell itself.
-     * @param shell the shell object
+     *
+     * @param shell         the shell object
      * @param encodedObject the encodedObject
-     * @param desiredClass the desired class for decoded object
+     * @param desiredClass  the desired class for decoded object
      * @return Object the decoded object
      */
     @Override
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
-        return (shell == null || encodedObject == null)? null : shell;
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
+        return (shell == null || encodedObject == null) ? null : shell;
     }
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/MapDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/MapDecoder.java
index 60cbe15..577d9e6 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/MapDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/MapDecoder.java
@@ -25,72 +25,51 @@
 
 /**
  * Decodes an ActionScript object to a Java Map.
- *
- *
  */
-public class MapDecoder extends ActionScriptDecoder
-{
-    public boolean hasShell()
-    {
+public class MapDecoder extends ActionScriptDecoder {
+    public boolean hasShell() {
         return true;
     }
 
-    protected boolean isSuitableMap(Object encodedObject, Class desiredClass)
-    {
+    protected boolean isSuitableMap(Object encodedObject, Class desiredClass) {
         return (encodedObject != null && encodedObject instanceof Map && desiredClass.isAssignableFrom(encodedObject.getClass()));
     }
 
-    public Object createShell(Object encodedObject, Class desiredClass)
-    {
-        try
-        {
-            if (isSuitableMap(encodedObject, desiredClass))
-            {
+    public Object createShell(Object encodedObject, Class desiredClass) {
+        try {
+            if (isSuitableMap(encodedObject, desiredClass)) {
                 return encodedObject;
-            }
-            else
-            {
-                if (desiredClass.isInterface() || !Map.class.isAssignableFrom(desiredClass))
-                {
-                    if (SortedMap.class.isAssignableFrom(desiredClass))
-                    {
+            } else {
+                if (desiredClass.isInterface() || !Map.class.isAssignableFrom(desiredClass)) {
+                    if (SortedMap.class.isAssignableFrom(desiredClass)) {
                         return new TreeMap();
-                    }
-                    else
-                    {
+                    } else {
                         return new HashMap();
                     }
-                }
-                else
-                {
+                } else {
                     return desiredClass.newInstance();
                 }
             }
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             TranslationException ex = new TranslationException("Could not create Map " + desiredClass, e);
             ex.setCode("Server.Processing");
             throw ex;
         }
     }
 
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         if (shell == null || encodedObject == null)
             return null;
 
         // Don't decode if we already have a suitable Map.
-        if (isSuitableMap(encodedObject, desiredClass))
-        {
+        if (isSuitableMap(encodedObject, desiredClass)) {
             return encodedObject;
         }
 
-        return decodeMap((Map)shell, (Map)encodedObject);
+        return decodeMap((Map) shell, (Map) encodedObject);
     }
 
-    protected Map decodeMap(Map shell, Map map)
-    {
+    protected Map decodeMap(Map shell, Map map) {
         if (shell != map)
             shell.putAll(map);
         else
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/NativeDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/NativeDecoder.java
index 8f9a775..e45184e 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/NativeDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/NativeDecoder.java
@@ -18,13 +18,9 @@
 
 /**
  * Decodes an ActionScript native object to a Java native object.
- *
- *
  */
-public class NativeDecoder extends ActionScriptDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class NativeDecoder extends ActionScriptDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         return encodedObject;
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/NullDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/NullDecoder.java
index 26e1b7d..700012c 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/NullDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/NullDecoder.java
@@ -19,10 +19,8 @@
 /**
  *
  */
-public class NullDecoder extends ActionScriptDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class NullDecoder extends ActionScriptDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         return null;
     }
 }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/NumberDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/NumberDecoder.java
index 90ce221..52fc4c6 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/NumberDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/NumberDecoder.java
@@ -23,31 +23,21 @@
 
 /**
  * Decode an ActionScript type (a string or a double) to a Java number (of any type).
- *
- *
  */
-public class NumberDecoder extends ActionScriptDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class NumberDecoder extends ActionScriptDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         Object result = null;
 
-        if (encodedObject != null && encodedObject instanceof String)
-        {
-            String str = ((String)encodedObject).trim();
-            try
-            {
+        if (encodedObject != null && encodedObject instanceof String) {
+            String str = ((String) encodedObject).trim();
+            try {
                 // Short-ciruit String -> BigInteger,BigDecimal to avoid loss
                 // of precision that occurs if we go through Double
-                if (!SerializationContext.getSerializationContext().legacyBigNumbers)
-                {
-                    if (BigInteger.class.equals(desiredClass))
-                    {
+                if (!SerializationContext.getSerializationContext().legacyBigNumbers) {
+                    if (BigInteger.class.equals(desiredClass)) {
                         result = new BigInteger(str);
                         return result;
-                    }
-                    else if (BigDecimal.class.equals(desiredClass))
-                    {
+                    } else if (BigDecimal.class.equals(desiredClass)) {
                         result = new BigDecimal(str);
                         return result;
                     }
@@ -55,23 +45,19 @@
 
                 Double dbl = new Double(str);
                 encodedObject = dbl;
-            }
-            catch (NumberFormatException nfe)
-            {
+            } catch (NumberFormatException nfe) {
                 DecoderFactory.invalidType(encodedObject, desiredClass);
             }
         }
 
-        if (encodedObject instanceof Number || encodedObject == null)
-        {
+        if (encodedObject instanceof Number || encodedObject == null) {
             Double dbl;
 
-            if (desiredClass.isPrimitive())
-            {
+            if (desiredClass.isPrimitive()) {
                 if (encodedObject == null)
                     dbl = new Double(0);
                 else
-                    dbl = new Double(((Number)encodedObject).doubleValue());
+                    dbl = new Double(((Number) encodedObject).doubleValue());
 
                 if (Object.class.equals(desiredClass) || Double.TYPE.equals(desiredClass))
                     result = dbl;
@@ -85,10 +71,8 @@
                     result = new Short(dbl.shortValue());
                 else if (Byte.TYPE.equals(desiredClass))
                     result = new Byte(dbl.byteValue());
-            }
-            else if (encodedObject != null)
-            {
-                dbl = new Double(((Number)encodedObject).doubleValue());
+            } else if (encodedObject != null) {
+                dbl = new Double(((Number) encodedObject).doubleValue());
 
                 if (Object.class.equals(desiredClass) || Number.class.equals(desiredClass) ||
                         Double.class.equals(desiredClass))
@@ -103,8 +87,7 @@
                     result = dbl.isNaN() ? null : new Short(dbl.shortValue());
                 else if (Byte.class.equals(desiredClass))
                     result = dbl.isNaN() ? null : new Byte(dbl.byteValue());
-                else if (BigDecimal.class.equals(desiredClass))
-                {
+                else if (BigDecimal.class.equals(desiredClass)) {
                     // Though this is a little slower than using the
                     // double constructor for BigDecimal, it yields a rounded
                     // result which is more predicable (see the Javadoc for
@@ -113,35 +96,26 @@
                         result = new BigDecimal(dbl.doubleValue());
                     else
                         result = new BigDecimal(String.valueOf(dbl));
-                }
-                else if (BigInteger.class.equals(desiredClass))
-                {
+                } else if (BigInteger.class.equals(desiredClass)) {
                     // Must have no special characters or whitespace
                     String val = null;
                     long l = dbl.longValue();
-                    if (l > Integer.MAX_VALUE)
-                    {
+                    if (l > Integer.MAX_VALUE) {
                         Long lo = new Long(dbl.longValue());
                         val = lo.toString().toUpperCase();
                         int suffix = val.indexOf('L');
                         if (suffix != -1)
                             val = val.substring(0, suffix);
-                    }
-                    else
-                    {
+                    } else {
                         Integer i = new Integer(dbl.intValue());
                         val = i.toString();
                     }
                     result = new BigInteger(val.trim());
                 }
-            }
-            else
-            {
+            } else {
                 result = null;
             }
-        }
-        else
-        {
+        } else {
             DecoderFactory.invalidType(encodedObject, desiredClass);
         }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareArrayDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareArrayDecoder.java
index 7101cfe..c9a9ce4 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareArrayDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareArrayDecoder.java
@@ -24,59 +24,44 @@
 /**
  *
  */
-public class ReferenceAwareArrayDecoder extends ArrayDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class ReferenceAwareArrayDecoder extends ArrayDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         if (shell == null || encodedObject == null)
             return null;
 
         Class arrayElementClass = desiredClass.getComponentType();
 
-        if (encodedObject instanceof Collection)
-        {
-            return decodeArray(shell, (Collection)encodedObject, arrayElementClass);
-        }
-        else if (encodedObject.getClass().isArray())
-        {
+        if (encodedObject instanceof Collection) {
+            return decodeArray(shell, (Collection) encodedObject, arrayElementClass);
+        } else if (encodedObject.getClass().isArray()) {
             return decodeArray(shell, encodedObject, arrayElementClass);
-        }
-        else if (encodedObject instanceof String && Character.class.equals(arrayElementClass))
-        {
-            return decodeArray(shell, (String)encodedObject, arrayElementClass);
-        }
-        else
-        {
+        } else if (encodedObject instanceof String && Character.class.equals(arrayElementClass)) {
+            return decodeArray(shell, (String) encodedObject, arrayElementClass);
+        } else {
             return shell;
         }
     }
 
-    protected Object decodeArray(Object shellArray, Collection collection, Class arrayElementClass)
-    {
+    protected Object decodeArray(Object shellArray, Collection collection, Class arrayElementClass) {
         Object[] array = collection.toArray();
         TypeMarshallingContext.getTypeMarshallingContext().getKnownObjects().put(array, shellArray);
         return decodeArray(shellArray, array, arrayElementClass);
     }
 
-    protected Object decodeArray(Object shellArray, Object array, Class arrayElementClass)
-    {
+    protected Object decodeArray(Object shellArray, Object array, Class arrayElementClass) {
         Object encodedValue = null;
         Object decodedValue = null;
         TypeMarshallingContext context = TypeMarshallingContext.getTypeMarshallingContext();
-        
+
         ActionScriptDecoder decoder = null;
         int n = 0;
         int len = Array.getLength(array);
-        for (int i = 0; i < len; i++)
-        {
+        for (int i = 0; i < len; i++) {
             encodedValue = Array.get(array, i);
 
-            if (encodedValue == null)
-            {
+            if (encodedValue == null) {
                 Array.set(shellArray, n, null);
-            }
-            else
-            {
+            } else {
                 //Check whether we need to restore a client
                 //side reference to a known object
                 Object ref = null;
@@ -84,27 +69,20 @@
                 if (canUseByReference(encodedValue))
                     ref = context.getKnownObjects().get(encodedValue);
 
-                if (ref == null)
-                {
+                if (ref == null) {
                     decoder = DecoderFactory.getReferenceAwareDecoder(encodedValue, arrayElementClass);
                     decodedValue = decoder.decodeObject(encodedValue, arrayElementClass);
 
-                    if (canUseByReference(decodedValue))
-                    {
+                    if (canUseByReference(decodedValue)) {
                         context.getKnownObjects().put(encodedValue, decodedValue);
                     }
-                }
-                else
-                {
+                } else {
                     decodedValue = ref;
                 }
 
-                try
-                {
+                try {
                     Array.set(shellArray, n, decodedValue);
-                }
-                catch (IllegalArgumentException ex)
-                {
+                } catch (IllegalArgumentException ex) {
                     Array.set(shellArray, n, null);
                 }
             }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareCalendarDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareCalendarDecoder.java
index e9d6dfb..52c7dc5 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareCalendarDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareCalendarDecoder.java
@@ -22,10 +22,8 @@
 /**
  *
  */
-public class ReferenceAwareCalendarDecoder extends CalendarDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class ReferenceAwareCalendarDecoder extends CalendarDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         Object result = super.decodeObject(shell, encodedObject, desiredClass);
 
         // Only AMF 3 Dates can be sent by reference so we only
@@ -33,8 +31,7 @@
         // to the encodedObject if the incoming type was a Date object.
         if (result != null
                 && SerializationContext.getSerializationContext().supportDatesByReference
-                && encodedObject instanceof java.util.Date)
-        {
+                && encodedObject instanceof java.util.Date) {
             TypeMarshallingContext context = TypeMarshallingContext.getTypeMarshallingContext();
             context.getKnownObjects().put(encodedObject, result);
         }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareCollectionDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareCollectionDecoder.java
index 60b5681..7fb79ab 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareCollectionDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareCollectionDecoder.java
@@ -26,29 +26,24 @@
  * over every item before it is added to the decoded collection
  * to restore references to any instances that may have undergone
  * translation to another type.
- *
+ * <p>
  * Note that tracking references is an expensive exercise and will
  * scale poorly with larger amounts of data.`
- *
- *
  */
-public class ReferenceAwareCollectionDecoder extends CollectionDecoder
-{
+public class ReferenceAwareCollectionDecoder extends CollectionDecoder {
     /**
      * We want to iterate through all of the contents of the Collection
      * to check for references that need to be restored and translations
      * that may still be required (in the case of typed ASObjects).
-     *
+     * <p>
      * Return false to ensure we create a new collection and copy
      * all of the contents.
      */
-    protected boolean isSuitableCollection(Object encodedObject, Class desiredClass)
-    {
+    protected boolean isSuitableCollection(Object encodedObject, Class desiredClass) {
         return false;
     }
 
-    protected Collection decodeCollection(Collection shell, Object encodedObject)
-    {
+    protected Collection decodeCollection(Collection shell, Object encodedObject) {
         Collection decodedCollection = shell;
         Object decodedObject = null;
         Object obj = null;
@@ -56,15 +51,11 @@
         TypeMarshallingContext context = TypeMarshallingContext.getTypeMarshallingContext();
         ActionScriptDecoder decoder = null;
 
-        if (encodedObject instanceof String)
-        {
-            encodedObject = ((String)encodedObject).toCharArray();
-        }
-        else
-        {
-            if (encodedObject instanceof Collection)
-            {
-                encodedObject = ((Collection)encodedObject).toArray();
+        if (encodedObject instanceof String) {
+            encodedObject = ((String) encodedObject).toCharArray();
+        } else {
+            if (encodedObject instanceof Collection) {
+                encodedObject = ((Collection) encodedObject).toArray();
             }
 
             context.getKnownObjects().put(encodedObject, shell);
@@ -72,16 +63,12 @@
 
         int len = Array.getLength(encodedObject);
 
-        for (int i = 0; i < len; i++)
-        {
+        for (int i = 0; i < len; i++) {
             obj = Array.get(encodedObject, i);
 
-            if (obj == null)
-            {
+            if (obj == null) {
                 decodedCollection.add(null);
-            }
-            else
-            {
+            } else {
                 //Check whether we need to restore a client
                 //side reference to a known object
                 Object ref = null;
@@ -89,18 +76,14 @@
                 if (canUseByReference(obj))
                     ref = context.getKnownObjects().get(obj);
 
-                if (ref == null)
-                {
+                if (ref == null) {
                     decoder = DecoderFactory.getReferenceAwareDecoder(obj, obj.getClass());
                     decodedObject = decoder.decodeObject(obj, obj.getClass());
 
-                    if (canUseByReference(decodedObject))
-                    {
+                    if (canUseByReference(decodedObject)) {
                         context.getKnownObjects().put(obj, decodedObject);
                     }
-                }
-                else
-                {
+                } else {
                     decodedObject = ref;
                 }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareDateDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareDateDecoder.java
index 849a85e..6e90866 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareDateDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareDateDecoder.java
@@ -22,10 +22,8 @@
 /**
  *
  */
-public class ReferenceAwareDateDecoder extends DateDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class ReferenceAwareDateDecoder extends DateDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         Object result = super.decodeObject(shell, encodedObject, desiredClass);
 
         // Only AMF 3 Dates can be sent by reference so we only
@@ -33,8 +31,7 @@
         // to the encodedObject if the incoming type was a Date object.
         if (result != null
                 && SerializationContext.getSerializationContext().supportDatesByReference
-                && encodedObject instanceof java.util.Date)
-        {
+                && encodedObject instanceof java.util.Date) {
             TypeMarshallingContext context = TypeMarshallingContext.getTypeMarshallingContext();
             context.getKnownObjects().put(encodedObject, result);
         }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareMapDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareMapDecoder.java
index 85dcb85..95b8b7c 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareMapDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareMapDecoder.java
@@ -24,14 +24,12 @@
 /**
  *
  */
-public class ReferenceAwareMapDecoder extends MapDecoder
-{
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+public class ReferenceAwareMapDecoder extends MapDecoder {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         if (shell == null) return null;
 
-        Map shellMap = (Map)shell;
-        Map encodedMap = (Map)encodedObject;
+        Map shellMap = (Map) shell;
+        Map encodedMap = (Map) encodedObject;
 
         TypeMarshallingContext context = TypeMarshallingContext.getTypeMarshallingContext();
         context.getKnownObjects().put(encodedObject, shell);
@@ -40,13 +38,11 @@
         Object key = null;
         Object value = null;
         Object decodedValue = null;
-        for (Iterator keys = encodedMap.keySet().iterator(); keys.hasNext();)
-        {
+        for (Iterator keys = encodedMap.keySet().iterator(); keys.hasNext(); ) {
             key = keys.next();
             value = encodedMap.get(key);
 
-            if (value == null)
-            {
+            if (value == null) {
                 shellMap.put(key, null);
                 continue;
             }
@@ -58,18 +54,14 @@
             if (canUseByReference(value))
                 ref = context.getKnownObjects().get(value);
 
-            if (ref == null)
-            {
+            if (ref == null) {
                 decoder = DecoderFactory.getReferenceAwareDecoder(value, value.getClass());
                 decodedValue = decoder.decodeObject(value, value.getClass());
 
-                if (canUseByReference(decodedValue))
-                {
+                if (canUseByReference(decodedValue)) {
                     context.getKnownObjects().put(value, decodedValue);
                 }
-            }
-            else
-            {
+            } else {
                 decodedValue = ref;
             }
 
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareTypedObjectDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareTypedObjectDecoder.java
index 4d38d38..f195606 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareTypedObjectDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/ReferenceAwareTypedObjectDecoder.java
@@ -28,10 +28,8 @@
 /**
  *
  */
-public class ReferenceAwareTypedObjectDecoder extends TypedObjectDecoder
-{
-    protected Object decodeTypedObject(Object bean, Object encodedObject)
-    {
+public class ReferenceAwareTypedObjectDecoder extends TypedObjectDecoder {
+    protected Object decodeTypedObject(Object bean, Object encodedObject) {
         TypeMarshallingContext context = TypeMarshallingContext.getTypeMarshallingContext();
         context.getKnownObjects().put(encodedObject, bean);
 
@@ -39,12 +37,10 @@
         PropertyProxy encodedProxy = PropertyProxyRegistry.getProxy(encodedObject);
 
         List propertyNames = beanProxy.getPropertyNames(bean);
-        if (propertyNames != null)
-        {
+        if (propertyNames != null) {
             Iterator it = propertyNames.iterator();
-            while (it.hasNext())
-            {
-                String propName = (String)it.next();
+            while (it.hasNext()) {
+                String propName = (String) it.next();
 
                 Class wClass = beanProxy.getType(bean, propName);
 
@@ -52,44 +48,35 @@
                 Object value = encodedProxy.getValue(encodedObject, propName);
 
                 Object decodedObject = null;
-                try
-                {
-                    if (value != null)
-                    {
+                try {
+                    if (value != null) {
                         //Check whether we need to restore a client
                         //side reference to a known object
                         Object ref = null;
-    
+
                         if (canUseByReference(value))
                             ref = context.getKnownObjects().get(value);
-    
-                        if (ref == null)
-                        {
+
+                        if (ref == null) {
                             ActionScriptDecoder decoder = DecoderFactory.getReferenceAwareDecoder(value, wClass);
                             decodedObject = decoder.decodeObject(value, wClass);
-    
-                            if (canUseByReference(decodedObject))
-                            {
+
+                            if (canUseByReference(decodedObject)) {
                                 context.getKnownObjects().put(value, decodedObject);
                             }
-                        }
-                        else
-                        {
+                        } else {
                             decodedObject = ref;
                         }
                     }
-    
+
                     // TODO: Perhaps we could update NumberDecoder, CharacterDecoder and
                     // BooleanDecoder to do this for us?
-                    if (decodedObject == null && wClass.isPrimitive())
-                    {
+                    if (decodedObject == null && wClass.isPrimitive()) {
                         decodedObject = getDefaultPrimitiveValue(wClass);
                     }
-    
+
                     beanProxy.setValue(bean, propName, decodedObject);
-                }
-                catch (Exception e)
-                {
+                } catch (Exception e) {
                     TranslationException ex = new TranslationException("Could not set object " + decodedObject + " on " + bean.getClass() + "'s " + propName);
                     ex.setCode("Server.Processing");
                     ex.setRootCause(e);
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/StringDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/StringDecoder.java
index 2b3219b..fa0b74e 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/StringDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/StringDecoder.java
@@ -18,34 +18,21 @@
 
 /**
  * Decode an ActionScript String, Number or Boolean to a Java String.
- *
- *
  */
-public class StringDecoder extends ActionScriptDecoder
-{
-    public StringDecoder()
-    {
+public class StringDecoder extends ActionScriptDecoder {
+    public StringDecoder() {
     }
 
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
-        if (encodedObject instanceof String)
-        {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
+        if (encodedObject instanceof String) {
             return encodedObject;
-        }
-        else if (encodedObject instanceof Number)
-        {
-            return String.valueOf(((Number)encodedObject).doubleValue());
-        }
-        else if (encodedObject instanceof Boolean)
-        {
-            Boolean bool = (Boolean)encodedObject;
-            if (bool.booleanValue())
-            {
+        } else if (encodedObject instanceof Number) {
+            return String.valueOf(((Number) encodedObject).doubleValue());
+        } else if (encodedObject instanceof Boolean) {
+            Boolean bool = (Boolean) encodedObject;
+            if (bool.booleanValue()) {
                 return "true";
-            }
-            else
-            {
+            } else {
                 return "false";
             }
         }
diff --git a/core/src/main/java/flex/messaging/io/amf/translator/decoder/TypedObjectDecoder.java b/core/src/main/java/flex/messaging/io/amf/translator/decoder/TypedObjectDecoder.java
index c6d9388..b2c5f26 100644
--- a/core/src/main/java/flex/messaging/io/amf/translator/decoder/TypedObjectDecoder.java
+++ b/core/src/main/java/flex/messaging/io/amf/translator/decoder/TypedObjectDecoder.java
@@ -28,33 +28,25 @@
 /**
  * Decodes an ASObject to a Java object based on the
  * type information returned from the ASObject.getType().
- *
+ * <p>
  * If the TranslationContext has been set up to support
  * _remoteClass then this property may be used as a back up.
- *
- *
  */
-public class TypedObjectDecoder extends ActionScriptDecoder
-{
-    public boolean hasShell()
-    {
+public class TypedObjectDecoder extends ActionScriptDecoder {
+    public boolean hasShell() {
         return true;
     }
 
-    public Object createShell(Object encodedObject, Class desiredClass)
-    {
+    public Object createShell(Object encodedObject, Class desiredClass) {
         Object shell = null;
 
         Class cls;
         String type = TypeMarshallingContext.getType(encodedObject);
 
-        if (type != null)
-        {
+        if (type != null) {
             TypeMarshallingContext context = TypeMarshallingContext.getTypeMarshallingContext();
-             cls = ClassUtil.createClass(type, context.getClassLoader());
-        }
-        else
-        {
+            cls = ClassUtil.createClass(type, context.getClassLoader());
+        } else {
             cls = desiredClass;
         }
 
@@ -63,8 +55,7 @@
         return shell;
     }
 
-    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass)
-    {
+    public Object decodeObject(Object shell, Object encodedObject, Class desiredClass) {
         Object bean = shell;
         if (bean == null)
             return null;
@@ -72,18 +63,15 @@
         return decodeTypedObject(bean, encodedObject);
     }
 
-    protected Object decodeTypedObject(Object bean, Object encodedObject)
-    {
+    protected Object decodeTypedObject(Object bean, Object encodedObject) {
         PropertyProxy beanProxy = PropertyProxyRegistry.getProxyAndRegister(bean);
         PropertyProxy encodedProxy = PropertyProxyRegistry.getProxyAndRegister(encodedObject);
 
         List propertyNames = beanProxy.getPropertyNames(bean);
-        if (propertyNames != null)
-        {
+        if (propertyNames != null) {
             Iterator it = propertyNames.iterator();
-            while (it.hasNext())
-            {
-                String propName = (String)it.next();
+            while (it.hasNext()) {
+                String propName = (String) it.next();
 
                 Class wClass = beanProxy.getType(bean, propName);
 
@@ -91,10 +79,8 @@
                 Object value = encodedProxy.getValue(encodedObject, propName);
 
                 Object decodedObject = null;
-                try
-                {
-                    if (value != null)
-                    {
+                try {
+                    if (value != null) {
                         // We may need to honor our loose-typing rules for individual types as,
                         // unlike a Collection, an Array has a fixed element type. We'll use our handy
                         // decoder suite again to find us the right decoder...
@@ -104,15 +90,12 @@
 
                     // TODO: Perhaps we could update NumberDecoder, CharacterDecoder and
                     // BooleanDecoder to do this for us?
-                    if (decodedObject == null && wClass.isPrimitive())
-                    {
+                    if (decodedObject == null && wClass.isPrimitive()) {
                         decodedObject = getDefaultPrimitiveValue(wClass);
                     }
 
                     beanProxy.setValue(bean, propName, decodedObject);
-                }
-                catch (Exception e)
-                {
+                } catch (Exception e) {
                     TranslationException ex = new TranslationException("Could not set object " + decodedObject + " on " + bean.getClass() + "'s " + propName);
                     ex.setCode("Server.Processing");
                     ex.setRootCause(e);
diff --git a/core/src/main/java/flex/messaging/io/amfx/AmfxInput.java b/core/src/main/java/flex/messaging/io/amfx/AmfxInput.java
index 83911ff..3d909a9 100644
--- a/core/src/main/java/flex/messaging/io/amfx/AmfxInput.java
+++ b/core/src/main/java/flex/messaging/io/amfx/AmfxInput.java
@@ -58,14 +58,13 @@
  * the XML elements that occur in an AMFX request. The AmfxMessageDeserializer enforces
  * a naming convention for these handlers of xyz_start for the start handler and xyz_end
  * for the end handler of element xyz.
- *
+ * <p>
  * Note that this context MUST be reset if reused between AMFX packet parsings.
  *
  * @see AmfxMessageDeserializer
  * @see AmfxOutput
  */
-public class AmfxInput
-{
+public class AmfxInput {
     /**
      * This is the initial capacity that will be used for AMF arrays that have
      * length greater than 1024.
@@ -106,8 +105,7 @@
      *
      * @param context the <code>SerialziationContext</code> object
      */
-    public AmfxInput(SerializationContext context)
-    {
+    public AmfxInput(SerializationContext context) {
         this.context = context;
 
         stringTable = new ArrayList(64);
@@ -128,8 +126,7 @@
     /**
      * Reset the AmfxInput object.
      */
-    public void reset()
-    {
+    public void reset() {
         stringTable.clear();
         objectTable.clear();
         traitsTable.clear();
@@ -150,8 +147,7 @@
      *
      * @param trace current <code>AmfTrace</code> setting
      */
-    public void setDebugTrace(AmfTrace trace)
-    {
+    public void setDebugTrace(AmfTrace trace) {
         this.trace = trace;
         isDebug = this.trace != null;
     }
@@ -161,8 +157,7 @@
      *
      * @param msg current <code>ActionMessage</code>
      */
-    public void setActionMessage(ActionMessage msg)
-    {
+    public void setActionMessage(ActionMessage msg) {
         message = msg;
     }
 
@@ -172,8 +167,7 @@
      * @return currently return null, not supported
      * @throws IOException when reading the object has the IOException
      */
-    public Object readObject() throws IOException
-    {
+    public Object readObject() throws IOException {
         return null;
     }
 
@@ -184,8 +178,7 @@
      *
      * @param s the String to append
      */
-    public void text(String s)
-    {
+    public void text(String s) {
         text.append(s);
     }
 
@@ -199,18 +192,13 @@
      *
      * @param attributes current Attributes
      */
-    public void start_amfx(Attributes attributes)
-    {
+    public void start_amfx(Attributes attributes) {
         String ver = attributes.getValue("ver");
         int version = ActionMessage.CURRENT_VERSION;
-        if (ver != null)
-        {
-            try
-            {
+        if (ver != null) {
+            try {
                 version = Integer.parseInt(ver);
-            }
-            catch (NumberFormatException ex)
-            {
+            } catch (NumberFormatException ex) {
                 throw new MessageException("Unknown version: " + ver);
             }
         }
@@ -223,10 +211,8 @@
 
     /**
      * End the Amfx process.
-     *
      */
-    public void end_amfx()
-    {
+    public void end_amfx() {
     }
 
     /**
@@ -234,8 +220,7 @@
      *
      * @param attributes current Attributes
      */
-    public void start_header(Attributes attributes)
-    {
+    public void start_header(Attributes attributes) {
         if (currentHeader != null || currentBody != null)
             throw new MessageException("Unexpected header tag.");
 
@@ -246,8 +231,7 @@
 
         String mu = attributes.getValue("mustUnderstand");
         boolean mustUnderstand = false;
-        if (mu != null)
-        {
+        if (mu != null) {
             mustUnderstand = Boolean.valueOf(mu).booleanValue();
             currentHeader.setMustUnderstand(mustUnderstand);
         }
@@ -258,10 +242,8 @@
 
     /**
      * End process of message headers.
-     *
      */
-    public void end_header()
-    {
+    public void end_header() {
         message.addHeader(currentHeader);
         currentHeader = null;
 
@@ -274,8 +256,7 @@
      *
      * @param attributes current Attributes
      */
-    public void start_body(Attributes attributes)
-    {
+    public void start_body(Attributes attributes) {
         if (currentBody != null || currentHeader != null)
             throw new MessageException("Unexpected body tag.");
 
@@ -287,10 +268,8 @@
 
     /**
      * End process of the message body.
-     *
      */
-    public void end_body()
-    {
+    public void end_body() {
         message.addBody(currentBody);
         currentBody = null;
 
@@ -308,21 +287,16 @@
      *
      * @param attributes current Attributes
      */
-    public void start_array(Attributes attributes)
-    {
+    public void start_array(Attributes attributes) {
         int length = 10;
         String len = attributes.getValue("length");
-        if (len != null)
-        {
-            try
-            {
+        if (len != null) {
+            try {
                 len = len.trim();
                 length = Integer.parseInt(len);
                 if (length < 0)
                     throw new NumberFormatException();
-            }
-            catch (NumberFormatException ex)
-            {
+            } catch (NumberFormatException ex) {
                 throw new MessageException("Invalid array length: " + len);
             }
         }
@@ -333,24 +307,18 @@
 
         Object array;
         boolean useListTemporarily = false;
-        if (isECMA)
-        {
+        if (isECMA) {
             array = ClassUtil.createDefaultInstance(HashMap.class, null, true /*validate*/);
-        }
-        else
-        {
+        } else {
             // Don't instantiate List/Array right away with the supplied size if it is more than
             // INITIAL_ARRAY_CAPACITY in case the supplied size has been tampered. This at least
             // requires the user to pass in the actual objects for the List/Array to grow beyond.
-            if (context.legacyCollection || length > INITIAL_ARRAY_CAPACITY)
-            {
+            if (context.legacyCollection || length > INITIAL_ARRAY_CAPACITY) {
                 useListTemporarily = !context.legacyCollection;
                 ClassUtil.validateCreation(ArrayList.class);
-                int initialCapacity = length < INITIAL_ARRAY_CAPACITY? length : INITIAL_ARRAY_CAPACITY;
+                int initialCapacity = length < INITIAL_ARRAY_CAPACITY ? length : INITIAL_ARRAY_CAPACITY;
                 array = new ArrayList(initialCapacity);
-            }
-            else
-            {
+            } else {
                 ClassUtil.validateCreation(Object[].class);
                 array = new Object[length];
             }
@@ -369,13 +337,10 @@
             objectStack.push(array);
         proxyStack.push(null);
 
-        if (isECMA)
-        {
+        if (isECMA) {
             if (isDebug)
                 trace.startECMAArray(objectTable.size() - 1);
-        }
-        else
-        {
+        } else {
             if (isDebug)
                 trace.startAMFArray(objectTable.size() - 1);
         }
@@ -383,30 +348,24 @@
 
     /**
      * End process of Action Script type Array.
-     *
      */
-    public void end_array()
-    {
-        try
-        {
+    public void end_array() {
+        try {
             Object obj = objectStack.pop();
-            if (obj instanceof ObjectPropertyValueTuple)
-            {
+            if (obj instanceof ObjectPropertyValueTuple) {
                 // Means List was being used temporarily to guard against array length tampering.
                 // Convert back to Object array and set it on the parent object using the proxy
                 // and property saved in the tuple.
-                ObjectPropertyValueTuple tuple = (ObjectPropertyValueTuple)obj;
+                ObjectPropertyValueTuple tuple = (ObjectPropertyValueTuple) obj;
                 int objectId = objectTable.indexOf(tuple.value);
-                Object newValue = ((ArrayList)tuple.value).toArray();
+                Object newValue = ((ArrayList) tuple.value).toArray();
                 objectTable.set(objectId, newValue);
                 tuple.proxy.setValue(tuple.obj, tuple.property, newValue);
             }
             proxyStack.pop();
             ecmaArrayIndexStack.pop();
             strictArrayIndexStack.pop();
-        }
-        catch (EmptyStackException ex)
-        {
+        } catch (EmptyStackException ex) {
             throw new MessageException("Unexpected end of array");
         }
 
@@ -414,26 +373,21 @@
             trace.endAMFArray();
     }
 
-    public void start_dictionary(Attributes attributes)
-    {
+    public void start_dictionary(Attributes attributes) {
         int length = 10;
         String len = attributes.getValue("length");
-        if (len != null)
-        {
-            try
-            {
+        if (len != null) {
+            try {
                 len = len.trim();
                 length = Integer.parseInt(len);
                 if (length < 0)
                     throw new NumberFormatException();
-            }
-            catch (NumberFormatException ex)
-            {
+            } catch (NumberFormatException ex) {
                 throw new MessageException("Invalid array length: " + len);
             }
         }
 
-        Hashtable dictionary = (Hashtable)ClassUtil.createDefaultInstance(Hashtable.class, null, true /*validate*/);
+        Hashtable dictionary = (Hashtable) ClassUtil.createDefaultInstance(Hashtable.class, null, true /*validate*/);
         setValue(dictionary);
 
         objectTable.add(dictionary);
@@ -444,15 +398,11 @@
             trace.startAMFDictionary(objectTable.size() - 1);
     }
 
-    public void end_dictionary()
-    {
-        try
-        {
+    public void end_dictionary() {
+        try {
             objectStack.pop();
             proxyStack.pop();
-        }
-        catch (EmptyStackException ex)
-        {
+        } catch (EmptyStackException ex) {
             throw new MessageException("Unexpected end of dictionary");
         }
 
@@ -467,17 +417,14 @@
      *
      * @param attributes current Attributes
      */
-    public void start_bytearray(Attributes attributes)
-    {
+    public void start_bytearray(Attributes attributes) {
         text.delete(0, text.length());
     }
 
     /**
      * End process of the Action Script type ByteArray.
-     *
      */
-    public void end_bytearray()
-    {
+    public void end_bytearray() {
         ClassUtil.validateCreation(byte[].class);
 
         String bs = text.toString().trim();
@@ -497,22 +444,18 @@
      *
      * @param attributes current Attributes
      */
-    public void start_date(Attributes attributes)
-    {
+    public void start_date(Attributes attributes) {
         text.delete(0, text.length());
     }
 
     /**
      * End process of the Action Script type Date.
-     *
      */
-    public void end_date()
-    {
+    public void end_date() {
         ClassUtil.validateCreation(Date.class);
 
         String d = text.toString().trim();
-        try
-        {
+        try {
             long l = Long.parseLong(d);
             Date date = new Date(l);
             setValue(date);
@@ -521,9 +464,7 @@
 
             if (isDebug)
                 trace.write(date);
-        }
-        catch (NumberFormatException ex)
-        {
+        } catch (NumberFormatException ex) {
             throw new MessageException("Invalid date: " + d);
         }
     }
@@ -533,30 +474,24 @@
      *
      * @param attributes current Attributes
      */
-    public void start_double(Attributes attributes)
-    {
+    public void start_double(Attributes attributes) {
         text.delete(0, text.length());
     }
 
     /**
      * End process of the Action Script type Double.
-     *
      */
-    public void end_double()
-    {
+    public void end_double() {
         ClassUtil.validateCreation(Double.class);
 
         String ds = text.toString().trim();
-        try
-        {
+        try {
             Double d = Double.valueOf(ds);
             setValue(d);
 
             if (isDebug)
                 trace.write(d.doubleValue());
-        }
-        catch (NumberFormatException ex)
-        {
+        } catch (NumberFormatException ex) {
             throw new MessageException("Invalid double: " + ds);
         }
     }
@@ -566,8 +501,7 @@
      *
      * @param attributes current Attributes
      */
-    public void start_false(Attributes attributes)
-    {
+    public void start_false(Attributes attributes) {
         ClassUtil.validateCreation(Boolean.class);
         setValue(Boolean.FALSE);
         if (isDebug)
@@ -576,10 +510,8 @@
 
     /**
      * Start process of the Action Script type False.
-     *
      */
-    public void end_false()
-    {
+    public void end_false() {
     }
 
     /**
@@ -587,11 +519,9 @@
      *
      * @param attributes current Attributes
      */
-    public void start_item(Attributes attributes)
-    {
+    public void start_item(Attributes attributes) {
         String name = attributes.getValue("name");
-        if (name != null)
-        {
+        if (name != null) {
             name = name.trim();
             if (name.length() <= 0)
                 throw new MessageException("Array item names cannot be the empty string.");
@@ -600,16 +530,13 @@
             if (!(Character.isLetterOrDigit(c) || c == '_'))
                 throw new MessageException("Invalid item name: " + name +
                         ". Array item names must start with a letter, a digit or the underscore '_' character.");
-        }
-        else
-        {
+        } else {
             throw new MessageException("Array item must have a name attribute.");
         }
 
         //Check that we're expecting an ECMA array
         Object o = objectStackPeek();
-        if (!(o instanceof Map))
-        {
+        if (!(o instanceof Map)) {
             throw new MessageException("Unexpected array item name: " + name +
                     ". Please set the ecma attribute to 'true'.");
         }
@@ -619,10 +546,8 @@
 
     /**
      * End process of Item.
-     *
      */
-    public void end_item()
-    {
+    public void end_item() {
         arrayPropertyStack.pop();
     }
 
@@ -631,30 +556,24 @@
      *
      * @param attributes current Attributes
      */
-    public void start_int(Attributes attributes)
-    {
+    public void start_int(Attributes attributes) {
         text.delete(0, text.length());
     }
 
     /**
      * End process of the Action Script type Int.
-     *
      */
-    public void end_int()
-    {
+    public void end_int() {
         ClassUtil.validateCreation(Integer.class);
 
         String is = text.toString().trim();
-        try
-        {
+        try {
             Integer i = Integer.valueOf(is);
             setValue(i);
 
             if (isDebug)
                 trace.write(i.intValue());
-        }
-        catch (NumberFormatException ex)
-        {
+        } catch (NumberFormatException ex) {
             throw new MessageException("Invalid int: " + is);
         }
     }
@@ -664,8 +583,7 @@
      *
      * @param attributes current Attributes
      */
-    public void start_null(Attributes attributes)
-    {
+    public void start_null(Attributes attributes) {
         setValue(null);
 
         if (isDebug)
@@ -674,10 +592,8 @@
 
     /**
      * Start process of the Action Script type NULL.
-     *
      */
-    public void end_null()
-    {
+    public void end_null() {
     }
 
     // <object type="com.my.Class">
@@ -687,47 +603,36 @@
      *
      * @param attributes current Attributes
      */
-    public void start_object(Attributes attributes)
-    {
+    public void start_object(Attributes attributes) {
         PropertyProxy proxy = null;
 
         String type = attributes.getValue("type");
-        if (type != null)
-        {
+        if (type != null) {
             type = type.trim();
         }
 
         Object object;
 
-        if (type != null && type.length() > 0)
-        {
+        if (type != null && type.length() > 0) {
             // Check for any registered class aliases
             String aliasedClass = ClassAliasRegistry.getRegistry().getClassName(type);
             if (aliasedClass != null)
                 type = aliasedClass;
 
-            if (type == null || type.length() == 0)
+            if (type == null || type.length() == 0) {
+                object = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
+            } else if (type.startsWith(">")) // Handle [RemoteClass] (no server alias)
             {
                 object = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
-            }
-            else if (type.startsWith(">")) // Handle [RemoteClass] (no server alias)
-            {
-                object = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
-                ((ASObject)object).setType(type);
-            }
-            else if (context.instantiateTypes || type.startsWith("flex."))
-            {
+                ((ASObject) object).setType(type);
+            } else if (context.instantiateTypes || type.startsWith("flex.")) {
                 object = getInstantiatedObject(type, proxy);
-            }
-            else
-            {
+            } else {
                 // Just return type info with an ASObject...
                 object = ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
-                ((ASObject)object).setType(type);
+                ((ASObject) object).setType(type);
             }
-        }
-        else
-        {
+        } else {
             // TODO: QUESTION: Pete, Investigate why setValue for ASObject is delayed to endObject
             ClassUtil.validateCreation(ASObject.class);
             object = new ASObject(type);
@@ -746,23 +651,20 @@
 
 
     // </object>
+
     /**
      * End process of type Object.
-     *
      */
-    public void end_object()
-    {
+    public void end_object() {
         if (!traitsStack.empty())
             traitsStack.pop();
 
-        if (!objectStack.empty())
-        {
+        if (!objectStack.empty()) {
             Object obj = objectStack.pop();
             PropertyProxy proxy = (PropertyProxy) proxyStack.pop();
 
             Object newObj = proxy == null ? obj : proxy.instanceComplete(obj);
-            if (newObj != obj)
-            {
+            if (newObj != obj) {
                 int i;
                 // Find the index in the list of the old objct and replace it with
                 // the new one.
@@ -776,9 +678,7 @@
                 obj = newObj;
             }
             setValue(obj);
-        }
-        else
-        {
+        } else {
             throw new MessageException("Unexpected end of object.");
         }
 
@@ -791,31 +691,22 @@
      *
      * @param attributes current Attributes
      */
-    public void start_ref(Attributes attributes)
-    {
+    public void start_ref(Attributes attributes) {
         String id = attributes.getValue("id");
-        if (id != null)
-        {
-            try
-            {
+        if (id != null) {
+            try {
                 int i = Integer.parseInt(id);
                 Object o = objectTable.get(i);
                 setValue(o);
 
                 if (isDebug)
                     trace.writeRef(i);
-            }
-            catch (NumberFormatException ex)
-            {
+            } catch (NumberFormatException ex) {
                 throw new MessageException("Invalid object reference: " + id);
-            }
-            catch (IndexOutOfBoundsException ex)
-            {
+            } catch (IndexOutOfBoundsException ex) {
                 throw new MessageException("Unknown object reference: " + id);
             }
-        }
-        else
-        {
+        } else {
             throw new MessageException("Unknown object reference: " + id);
         }
 
@@ -823,10 +714,8 @@
 
     /**
      * End process of reference.
-     *
      */
-    public void end_ref()
-    {
+    public void end_ref() {
     }
 
     /**
@@ -834,39 +723,27 @@
      *
      * @param attributes current Attributes
      */
-    public void start_string(Attributes attributes)
-    {
+    public void start_string(Attributes attributes) {
         String id = attributes.getValue("id");
-        if (id != null)
-        {
+        if (id != null) {
             isStringReference = true;
 
-            try
-            {
+            try {
                 int i = Integer.parseInt(id);
-                String s = (String)stringTable.get(i);
-                if (isTraitProperty)
-                {
-                    TraitsContext traitsContext = (TraitsContext)traitsStack.peek();
+                String s = (String) stringTable.get(i);
+                if (isTraitProperty) {
+                    TraitsContext traitsContext = (TraitsContext) traitsStack.peek();
                     traitsContext.add(s);
-                }
-                else
-                {
+                } else {
                     ClassUtil.validateCreation(String.class);
                     setValue(s);
                 }
-            }
-            catch (NumberFormatException ex)
-            {
+            } catch (NumberFormatException ex) {
                 throw new MessageException("Invalid string reference: " + id);
-            }
-            catch (IndexOutOfBoundsException ex)
-            {
+            } catch (IndexOutOfBoundsException ex) {
                 throw new MessageException("Unknown string reference: " + id);
             }
-        }
-        else
-        {
+        } else {
             text.delete(0, text.length());
             isStringReference = false;
         }
@@ -874,18 +751,14 @@
 
     /**
      * End process of the Action Script type String.
-     *
      */
-    public void end_string()
-    {
-        if (!isStringReference)
-        {
+    public void end_string() {
+        if (!isStringReference) {
             String s = text.toString();
 
             // Special case the empty string as it isn't counted as in
             // the string reference table
-            if (s.length() > 0)
-            {
+            if (s.length() > 0) {
                 // Traits won't contain CDATA
                 if (!isTraitProperty)
                     s = unescapeCloseCDATA(s);
@@ -893,13 +766,10 @@
                 stringTable.add(s);
             }
 
-            if (isTraitProperty)
-            {
-                TraitsContext traitsContext = (TraitsContext)traitsStack.peek();
+            if (isTraitProperty) {
+                TraitsContext traitsContext = (TraitsContext) traitsStack.peek();
                 traitsContext.add(s);
-            }
-            else
-            {
+            } else {
                 ClassUtil.validateCreation(String.class);
                 setValue(s);
 
@@ -914,54 +784,41 @@
      *
      * @param attributes current Attributes
      */
-    public void start_traits(Attributes attributes)
-    {
-        if (!objectStack.empty())
-        {
+    public void start_traits(Attributes attributes) {
+        if (!objectStack.empty()) {
             List traitsList = new ArrayList();
             TraitsContext traitsContext = new TraitsContext(traitsList);
             traitsStack.push(traitsContext);
 
             String id = attributes.getValue("id");
-            if (id != null)
-            {
-                try
-                {
+            if (id != null) {
+                try {
                     int i = Integer.parseInt(id);
-                    List l = (List)traitsTable.get(i);
+                    List l = (List) traitsTable.get(i);
 
                     Iterator it = l.iterator();
-                    while (it.hasNext())
-                    {
-                        String prop = (String)it.next();
+                    while (it.hasNext()) {
+                        String prop = (String) it.next();
                         traitsList.add(prop);
                     }
-                }
-                catch (NumberFormatException ex)
-                {
+                } catch (NumberFormatException ex) {
                     throw new MessageException("Invalid traits reference: " + id);
-                }
-                catch (IndexOutOfBoundsException ex)
-                {
+                } catch (IndexOutOfBoundsException ex) {
                     throw new MessageException("Unknown traits reference: " + id);
                 }
-            }
-            else
-            {
+            } else {
                 boolean externalizable = false;
 
                 String ext = attributes.getValue("externalizable");
-                if (ext != null)
-                {
+                if (ext != null) {
                     externalizable = "true".equals(ext.trim());
                 }
 
                 Object obj = objectStackPeek();
-                if (externalizable && !(obj instanceof Externalizable))
-                {
+                if (externalizable && !(obj instanceof Externalizable)) {
                     //Class '{className}' must implement java.io.Externalizable to receive client IExternalizable instances.
                     SerializationException ex = new SerializationException();
-                    ex.setMessage(10305, new Object[] {obj.getClass().getName()});
+                    ex.setMessage(10305, new Object[]{obj.getClass().getName()});
                     throw ex;
                 }
 
@@ -969,19 +826,15 @@
             }
 
             isTraitProperty = true;
-        }
-        else
-        {
+        } else {
             throw new MessageException("Unexpected traits");
         }
     }
 
     /**
      * End process of Traits.
-     *
      */
-    public void end_traits()
-    {
+    public void end_traits() {
         isTraitProperty = false;
     }
 
@@ -990,8 +843,7 @@
      *
      * @param attributes current Attributes
      */
-    public void start_true(Attributes attributes)
-    {
+    public void start_true(Attributes attributes) {
         ClassUtil.validateCreation(Boolean.class);
 
         setValue(Boolean.TRUE);
@@ -1002,10 +854,8 @@
 
     /**
      * Start process of the Action Script type True.
-     *
      */
-    public void end_true()
-    {
+    public void end_true() {
     }
 
     /**
@@ -1013,8 +863,7 @@
      *
      * @param attributes current Attributes
      */
-    public void start_undefined(Attributes attributes)
-    {
+    public void start_undefined(Attributes attributes) {
         setValue(null);
 
         if (isDebug)
@@ -1023,10 +872,8 @@
 
     /**
      * End process of the Action Script type undefined.
-     *
      */
-    public void end_undefined()
-    {
+    public void end_undefined() {
     }
 
     /**
@@ -1034,17 +881,14 @@
      *
      * @param attributes current Attributes
      */
-    public void start_xml(Attributes attributes)
-    {
+    public void start_xml(Attributes attributes) {
         text.delete(0, text.length());
     }
 
     /**
      * End process of XML.
-     *
      */
-    public void end_xml()
-    {
+    public void end_xml() {
         String xml = text.toString();
         xml = unescapeCloseCDATA(xml);
 
@@ -1054,24 +898,20 @@
         setValue(value);
     }
 
-    private String unescapeCloseCDATA(String s)
-    {
+    private String unescapeCloseCDATA(String s) {
         //Only check if string could possibly have an encoded closing for a CDATA "]]>"
-        if (s.length() > 5 && s.indexOf("]]&gt;") != -1)
-        {
+        if (s.length() > 5 && s.indexOf("]]&gt;") != -1) {
             s = s.replaceAll("]]&gt;", "]]>");
         }
 
         return s;
     }
 
-    private Object setValue(Object value)
-    {
-        if (objectStack.empty())
-        {
+    private Object setValue(Object value) {
+        if (objectStack.empty()) {
             if (currentHeader != null)
                 currentHeader.setData(value);
-            else if (currentBody  != null)
+            else if (currentBody != null)
                 currentBody.setData(value);
             else
                 throw new MessageException("Unexpected value: " + value);
@@ -1084,61 +924,43 @@
         Object obj = objectStackPeek();
 
         // <object type="..."> <traits externalizable="true">
-        if (obj instanceof Externalizable)
-        {
-            if (value != null && value.getClass().isArray() && Byte.TYPE.equals(value.getClass().getComponentType()))
-            {
-                Externalizable extern = (Externalizable)obj;
+        if (obj instanceof Externalizable) {
+            if (value != null && value.getClass().isArray() && Byte.TYPE.equals(value.getClass().getComponentType())) {
+                Externalizable extern = (Externalizable) obj;
                 Amf3Input objIn = new Amf3Input(context);
-                byte[] ba = (byte[])value;
+                byte[] ba = (byte[]) value;
                 ByteArrayInputStream baIn = new ByteArrayInputStream(ba);
-                try
-                {
+                try {
                     //objIn.setDebugTrace(trace);
                     objIn.setInputStream(baIn);
                     extern.readExternal(objIn);
-                }
-                catch (ClassNotFoundException ex)
-                {
+                } catch (ClassNotFoundException ex) {
                     throw new MessageException("Error while reading Externalizable class " + extern.getClass().getName(), ex);
-                }
-                catch (IOException ex)
-                {
+                } catch (IOException ex) {
                     throw new MessageException("Error while reading Externalizable class " + extern.getClass().getName(), ex);
-                }
-                finally
-                {
-                    try
-                    {
+                } finally {
+                    try {
                         objIn.close();
-                    }
-                    catch (IOException ex)
-                    {
+                    } catch (IOException ex) {
                     }
                 }
-            }
-            else
-            {
+            } else {
                 throw new MessageException("Error while reading Externalizable class. Value must be a byte array.");
             }
         }
 
         // <object>
-        else if (obj instanceof ASObject)
-        {
+        else if (obj instanceof ASObject) {
             String prop;
 
-            TraitsContext traitsContext = (TraitsContext)traitsStack.peek();
-            try
-            {
+            TraitsContext traitsContext = (TraitsContext) traitsStack.peek();
+            try {
                 prop = traitsContext.next();
-            }
-            catch (IndexOutOfBoundsException ex)
-            {
+            } catch (IndexOutOfBoundsException ex) {
                 throw new MessageException("Object has no trait info for value: " + value);
             }
 
-            ASObject aso = (ASObject)obj;
+            ASObject aso = (ASObject) obj;
             ClassUtil.validateAssignment(aso, prop, value);
             aso.put(prop, value);
 
@@ -1147,9 +969,8 @@
         }
 
         // <array ecma="false"> in ArrayList form
-        else if (obj instanceof ArrayList && !(obj instanceof ArrayCollection))
-        {
-            ArrayList list = (ArrayList)obj;
+        else if (obj instanceof ArrayList && !(obj instanceof ArrayCollection)) {
+            ArrayList list = (ArrayList) obj;
             ClassUtil.validateAssignment(list, list.size(), value);
             list.add(value);
 
@@ -1158,41 +979,30 @@
         }
 
         // <array ecma="false"> in Object[] form
-        else if (obj.getClass().isArray())
-        {
-            if (!strictArrayIndexStack.empty())
-            {
-                int[] indexObj = (int[])strictArrayIndexStack.peek();
+        else if (obj.getClass().isArray()) {
+            if (!strictArrayIndexStack.empty()) {
+                int[] indexObj = (int[]) strictArrayIndexStack.peek();
                 int index = indexObj[0];
 
-                if (Array.getLength(obj) > index)
-                {
+                if (Array.getLength(obj) > index) {
                     ClassUtil.validateAssignment(obj, index, value);
                     Array.set(obj, index, value);
-                }
-                else
-                {
+                } else {
                     throw new MessageException("Index out of bounds at: " + index + " cannot set array value: " + value + "");
                 }
                 indexObj[0]++;
             }
-        }
-
-        else if (obj instanceof Map)
-        {
+        } else if (obj instanceof Map) {
             if (obj instanceof Dictionary) // <dictionary>
             {
-                Dictionary dict = (Dictionary)obj;
+                Dictionary dict = (Dictionary) obj;
 
-                if (!dictionaryStack.empty())
-                {
+                if (!dictionaryStack.empty()) {
                     Object key = dictionaryStack.pop();
                     if (isDebug) trace.addDictionaryEquals();
                     ClassUtil.validateAssignment(dict, key.toString(), value);
                     dict.put(key, value);
-                }
-                else
-                {
+                } else {
                     if (isDebug) trace.startDictionaryElement();
                     dictionaryStack.push(value);
                 }
@@ -1200,12 +1010,11 @@
                 return value;
             }
 
-            Map map = (Map)obj; // <array ecma="true">
+            Map map = (Map) obj; // <array ecma="true">
 
             // <item name="prop">
-            if (!arrayPropertyStack.empty())
-            {
-                String prop = (String)arrayPropertyStack.peek();
+            if (!arrayPropertyStack.empty()) {
+                String prop = (String) arrayPropertyStack.peek();
                 ClassUtil.validateAssignment(map, prop, value);
                 map.put(prop, value);
 
@@ -1216,9 +1025,8 @@
             }
 
             // Mixed content, auto-generate string for ECMA Array index
-            if (!ecmaArrayIndexStack.empty())
-            {
-                int[] index = (int[])ecmaArrayIndexStack.peek();
+            if (!ecmaArrayIndexStack.empty()) {
+                int[] index = (int[]) ecmaArrayIndexStack.peek();
 
                 String prop = String.valueOf(index[0]);
                 index[0]++;
@@ -1232,30 +1040,24 @@
         }
 
         // <object type="...">
-        else
-        {
+        else {
             value = setObjectValue(obj, value);
         }
 
         return value;
     }
 
-    private Object setObjectValue(Object obj, Object value)
-    {
+    private Object setObjectValue(Object obj, Object value) {
         String prop;
 
-        TraitsContext traitsContext = (TraitsContext)traitsStack.peek();
-        try
-        {
+        TraitsContext traitsContext = (TraitsContext) traitsStack.peek();
+        try {
             prop = traitsContext.next();
-        }
-        catch (IndexOutOfBoundsException ex)
-        {
+        } catch (IndexOutOfBoundsException ex) {
             throw new MessageException("Object has no trait info for value: " + value, ex);
         }
 
-        try
-        {
+        try {
             // Then check if there's a more suitable proxy now that we have an instance
             PropertyProxy proxy = (PropertyProxy) proxyStack.peek();
             if (proxy == null)
@@ -1265,22 +1067,18 @@
             // Reset value in case it was changed by the proxy except empty lists.
             // Proxy converts empty lists to empty arrays in remoting messages.
             // Emply arrays are useless as containers and cause errors.
-            if (!(value instanceof ArrayList && ((ArrayList)value).size() == 0))
-            {
+            if (!(value instanceof ArrayList && ((ArrayList) value).size() == 0)) {
                 Object newValue = proxy.getValue(obj, prop);
                 if (value != newValue)
                     value = newValue;
             }
 
             if (value instanceof ArrayList && !(value instanceof ArrayCollection)
-                    && !context.legacyCollection)
-            {
+                    && !context.legacyCollection) {
                 // Means List is being used temporarily, see start_array method for explanation.
                 objectStack.push(new ObjectPropertyValueTuple(proxy, obj, prop, value));
             }
-        }
-        catch (Exception ex)
-        {
+        } catch (Exception ex) {
             throw new MessageException("Failed to set property '" + prop + "' with value: " + value, ex);
         }
 
@@ -1296,26 +1094,20 @@
      *
      * @return The Object at the top of the object stack.
      */
-    private Object objectStackPeek()
-    {
+    private Object objectStackPeek() {
         Object obj = objectStack.peek();
-        return (obj instanceof ObjectPropertyValueTuple)? ((ObjectPropertyValueTuple)obj).value : obj;
+        return (obj instanceof ObjectPropertyValueTuple) ? ((ObjectPropertyValueTuple) obj).value : obj;
     }
 
-    private Object getInstantiatedObject(String className, PropertyProxy proxy)
-    {
+    private Object getInstantiatedObject(String className, PropertyProxy proxy) {
         Class<?> desiredClass = null;
-        try
-        {
+        try {
             desiredClass = AbstractProxy.getClassFromClassName(className);
-        }
-        catch (MessageException me)
-        {
+        } catch (MessageException me) {
             // Type not found but don't mind using ASObject for the missing type.
             if (me.getCode().startsWith(MessageException.CODE_SERVER_RESOURCE_UNAVAILABLE)
-                    && context.createASObjectForMissingType)
-            {
-                ASObject object = (ASObject)ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
+                    && context.createASObjectForMissingType) {
+                ASObject object = (ASObject) ClassUtil.createDefaultInstance(ASObject.class, null, true /*validate*/);
                 object.setType(className);
                 return object;
             }
@@ -1324,8 +1116,8 @@
 
         // Type exists.
         proxy = PropertyProxyRegistry.getRegistry().getProxyAndRegister(desiredClass);
-        return proxy == null? ClassUtil.createDefaultInstance(desiredClass, null, true /*validate*/) :
-                    proxy.createInstance(className); // Validation is performed in the proxy.
+        return proxy == null ? ClassUtil.createDefaultInstance(desiredClass, null, true /*validate*/) :
+                proxy.createInstance(className); // Validation is performed in the proxy.
     }
 
     /**
@@ -1337,15 +1129,13 @@
      * pass in the actual array members for the List to grow. This helper class is needed to
      * convert the temporary List into Object[] if needed.
      */
-    private static class ObjectPropertyValueTuple
-    {
+    private static class ObjectPropertyValueTuple {
         private PropertyProxy proxy;
         private Object obj;
         private String property;
         private Object value;
 
-        private ObjectPropertyValueTuple(PropertyProxy proxy, Object obj, String property, Object value)
-        {
+        private ObjectPropertyValueTuple(PropertyProxy proxy, Object obj, String property, Object value) {
             this.proxy = proxy;
             this.obj = obj;
             this.property = property;
@@ -1353,18 +1143,15 @@
         }
     }
 
-    private class TraitsContext
-    {
+    private class TraitsContext {
         private List traits;
         private int counter;
 
-        private TraitsContext(List traits)
-        {
+        private TraitsContext(List traits) {
             this.traits = traits;
         }
 
-        private void add(String trait)
-        {
+        private void add(String trait) {
             trait = trait.trim();
 
             if (trait.length() <= 0)
@@ -1379,9 +1166,8 @@
             traits.add(trait);
         }
 
-        private String next()
-        {
-            String trait = (String)traits.get(counter);
+        private String next() {
+            String trait = (String) traits.get(counter);
             counter++;
             return trait;
         }
diff --git a/core/src/main/java/flex/messaging/io/amfx/AmfxMessageDeserializer.java b/core/src/main/java/flex/messaging/io/amfx/AmfxMessageDeserializer.java
index b5a3c09..84be0f1 100644
--- a/core/src/main/java/flex/messaging/io/amfx/AmfxMessageDeserializer.java
+++ b/core/src/main/java/flex/messaging/io/amfx/AmfxMessageDeserializer.java
@@ -39,8 +39,7 @@
 /**
  * SAX based AMFX Parser.
  */
-public class AmfxMessageDeserializer extends DefaultHandler implements MessageDeserializer
-{
+public class AmfxMessageDeserializer extends DefaultHandler implements MessageDeserializer {
     protected InputStream in;
 
     protected Locator locator;
@@ -56,10 +55,8 @@
     /**
      * Constructor.
      * Create a new AmfxMessageDeserializer object
-     *
      */
-    public AmfxMessageDeserializer()
-    {
+    public AmfxMessageDeserializer() {
     }
 
     /**
@@ -68,11 +65,10 @@
      * AMFX data should not be made.
      *
      * @param context SerializationContext object
-     * @param in InputStream to process
-     * @param trace AmfTrace object
+     * @param in      InputStream to process
+     * @param trace   AmfTrace object
      */
-    public void initialize(SerializationContext context, InputStream in, AmfTrace trace)
-    {
+    public void initialize(SerializationContext context, InputStream in, AmfTrace trace) {
         amfxIn = new AmfxInput(context);
         this.in = in;
 
@@ -88,20 +84,18 @@
      *
      * @param context the SerializationContext object
      */
-    public void setSerializationContext(SerializationContext context)
-    {
+    public void setSerializationContext(SerializationContext context) {
         amfxIn = new AmfxInput(context);
     }
 
     /**
      * Read message from the ActionMessage and ActionContext.
      *
-     * @param m current ActionMessage
+     * @param m       current ActionMessage
      * @param context current ActionContext
      * @throws IOException when the read message process failed
      */
-    public void readMessage(ActionMessage m, ActionContext context) throws IOException
-    {
+    public void readMessage(ActionMessage m, ActionContext context) throws IOException {
         if (isDebug)
             debugTrace.startRequest("Deserializing AMFX/HTTP request");
 
@@ -116,70 +110,54 @@
 
     /**
      * Read Object.
+     *
      * @return Object the object read from AmfxInput
      * @throws ClassNotFoundException, IOException when exceptions occurs in reading the object
      */
-    public Object readObject() throws ClassNotFoundException, IOException
-    {
+    public Object readObject() throws ClassNotFoundException, IOException {
         return amfxIn.readObject();
     }
 
-    protected void parse(ActionMessage m)
-    {
-        try
-        {
+    protected void parse(ActionMessage m) {
+        try {
             SAXParserFactory factory = SAXParserFactory.newInstance();
             factory.setValidating(false);
             factory.setNamespaceAware(true);
             SAXParser parser = factory.newSAXParser();
             parser.parse(in, this);
-        }
-        catch (MessageException ex)
-        {
+        } catch (MessageException ex) {
             clientMessageEncodingException(m, ex);
-        }
-        catch (SAXParseException e)
-        {
-            if (e.getException() != null)
-            {
+        } catch (SAXParseException e) {
+            if (e.getException() != null) {
                 clientMessageEncodingException(m, e.getException());
-            }
-            else
-            {
+            } else {
                 clientMessageEncodingException(m, e);
             }
-        }
-        catch (Exception ex)
-        {
+        } catch (Exception ex) {
             clientMessageEncodingException(m, ex);
         }
     }
 
     /**
      * Implement {@link org.xml.sax.EntityResolver#resolveEntity(String, String)}.
-     * 
+     * <p>
      * AMFX does not need or use external entities, so disallow external entities
-     * to prevent external entity injection attacks. 
+     * to prevent external entity injection attacks.
      *
      * @param publicId the public Id
      * @param systemId the system Id
      * @return InputSource the InputSource after entity resolution
      * @throws SAXException, IOException if the process failed
      */
-    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
-    {
+    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
         throw new MessageException("External entities are not allowed");
     }
-     
-    protected void clientMessageEncodingException(ActionMessage m, Throwable t)
-    {
+
+    protected void clientMessageEncodingException(ActionMessage m, Throwable t) {
         MessageException me;
-        if (t instanceof MessageException)
-        {
-            me = (MessageException)t;
-        }
-        else
-        {
+        if (t instanceof MessageException) {
+            me = (MessageException) t;
+        } else {
             me = new MessageException("Error occurred parsing AMFX: " + t.getMessage());
         }
 
@@ -190,41 +168,28 @@
     /**
      * Start process of an Element.
      *
-     * @param uri the URI of the element
-     * @param localName the local name of the element
-     * @param qName the qualify name of the element
+     * @param uri        the URI of the element
+     * @param localName  the local name of the element
+     * @param qName      the qualify name of the element
      * @param attributes the Attributes in the element
      * @throws SAXException if the process failed
      */
-    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
-    {
-        try
-        {
+    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+        try {
             String methodName = "start_" + localName;
             Method method = amfxIn.getClass().getMethod(methodName, attribArr);
             method.invoke(amfxIn, new Object[]{attributes});
-        }
-        catch (NoSuchMethodException e)
-        {
+        } catch (NoSuchMethodException e) {
             fatalError(new SAXParseException("Unknown type: " + qName, locator));
-        }
-        catch (IllegalAccessException e)
-        {
+        } catch (IllegalAccessException e) {
             fatalError(new SAXParseException(e.getMessage(), locator, e));
-        }
-        catch (InvocationTargetException e)
-        {
+        } catch (InvocationTargetException e) {
             Throwable t = e.getTargetException();
-            if (t instanceof SAXException)
-            {
-                throw (SAXException)t;
-            }
-            else if (t instanceof Exception)
-            {
-                fatalError(new SAXParseException(t.getMessage(), locator, (Exception)t));
-            }
-            else
-            {
+            if (t instanceof SAXException) {
+                throw (SAXException) t;
+            } else if (t instanceof Exception) {
+                fatalError(new SAXParseException(t.getMessage(), locator, (Exception) t));
+            } else {
                 fatalError(new SAXParseException(e.getMessage(), locator, e));
             }
         }
@@ -233,40 +198,27 @@
     /**
      * End process of an Element.
      *
-     * @param uri the URI of the element
+     * @param uri       the URI of the element
      * @param localName the local name of the element
-     * @param qName the qualify name of the element
+     * @param qName     the qualify name of the element
      * @throws SAXException if the process failed
      */
-    public void endElement(String uri, String localName, String qName) throws SAXException
-    {
-        try
-        {
+    public void endElement(String uri, String localName, String qName) throws SAXException {
+        try {
             String methodName = "end_" + localName;
             Method method = amfxIn.getClass().getMethod(methodName, new Class[]{});
             method.invoke(amfxIn, new Object[]{});
-        }
-        catch (NoSuchMethodException e)
-        {
+        } catch (NoSuchMethodException e) {
             fatalError(new SAXParseException("Unfinished type: " + qName, locator));
-        }
-        catch (IllegalAccessException e)
-        {
+        } catch (IllegalAccessException e) {
             fatalError(new SAXParseException(e.getMessage(), locator, e));
-        }
-        catch (InvocationTargetException e)
-        {
+        } catch (InvocationTargetException e) {
             Throwable t = e.getTargetException();
-            if (t instanceof SAXException)
-            {
-                throw (SAXException)t;
-            }
-            else if (t instanceof Error)
-            {
-                throw (Error)t;
-            }
-            else
-            {
+            if (t instanceof SAXException) {
+                throw (SAXException) t;
+            } else if (t instanceof Error) {
+                throw (Error) t;
+            } else {
                 fatalError(new SAXParseException(t.getMessage(), locator));
             }
         }
@@ -275,16 +227,14 @@
     /**
      * Process a char array.
      *
-     * @param ch the char array
-     * @param start the start position in the char array
+     * @param ch     the char array
+     * @param start  the start position in the char array
      * @param length the length of chars to process
      * @throws SAXException if the process failed
      */
-    public void characters(char ch[], int start, int length) throws SAXException
-    {
+    public void characters(char ch[], int start, int length) throws SAXException {
         String chars = new String(ch, start, length);
-        if (chars.length() > 0)
-        {
+        if (chars.length() > 0) {
             amfxIn.text(chars);
         }
     }
@@ -294,8 +244,7 @@
      *
      * @param l the DocumentLocator object
      */
-    public void setDocumentLocator(Locator l)
-    {
+    public void setDocumentLocator(Locator l) {
         locator = l;
     }
 
@@ -306,8 +255,7 @@
      * @param exception SAXParseException
      * @throws SAXException rethrow the SAXException
      */
-    public void error(SAXParseException exception) throws SAXException
-    {
+    public void error(SAXParseException exception) throws SAXException {
         throw new MessageException(exception.getMessage());
     }
 
@@ -317,10 +265,9 @@
      * @param exception SAXParseException
      * @throws SAXException rethrow the SAXException
      */
-    public void fatalError(SAXParseException exception) throws SAXException
-    {
+    public void fatalError(SAXParseException exception) throws SAXException {
         if ((exception.getException() != null) && (exception.getException() instanceof MessageException))
-            throw (MessageException)exception.getException();
+            throw (MessageException) exception.getException();
         throw new MessageException(exception.getMessage());
     }
 
@@ -330,8 +277,7 @@
      * @param exception SAXParseException
      * @throws SAXException rethrow the SAXException
      */
-    public void warning(SAXParseException exception) throws SAXException
-    {
+    public void warning(SAXParseException exception) throws SAXException {
         throw new MessageException(exception.getMessage());
     }
 
diff --git a/core/src/main/java/flex/messaging/io/amfx/AmfxMessageSerializer.java b/core/src/main/java/flex/messaging/io/amfx/AmfxMessageSerializer.java
index e30c862..8a090d2 100644
--- a/core/src/main/java/flex/messaging/io/amfx/AmfxMessageSerializer.java
+++ b/core/src/main/java/flex/messaging/io/amfx/AmfxMessageSerializer.java
@@ -29,8 +29,7 @@
 /**
  *
  */
-public class AmfxMessageSerializer implements MessageSerializer, AmfxTypes
-{
+public class AmfxMessageSerializer implements MessageSerializer, AmfxTypes {
     protected AmfxOutput amfxOut;
     protected int version;
 
@@ -42,15 +41,13 @@
 
     public static final String XML_DIRECTIVE = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n";
 
-    public AmfxMessageSerializer()
-    {
+    public AmfxMessageSerializer() {
     }
 
     /**
-     * @param value - The default version of AMFX encoding to be used. 
+     * @param value - The default version of AMFX encoding to be used.
      */
-    public void setVersion(int value)
-    {
+    public void setVersion(int value) {
         version = value;
     }
 
@@ -60,21 +57,19 @@
      * AMFX data should not be made.
      *
      * @param context The SerializationContext specifying the custom options.
-     * @param out The OutputStream to write out the AMFX data.
-     * @param trace If not null, turns on "trace" debugging for AMFX responses.
+     * @param out     The OutputStream to write out the AMFX data.
+     * @param trace   If not null, turns on "trace" debugging for AMFX responses.
      */
-    public void initialize(SerializationContext context, OutputStream out, AmfTrace trace)
-    {
+    public void initialize(SerializationContext context, OutputStream out, AmfTrace trace) {
         amfxOut = new AmfxOutput(context);
         amfxOut.setOutputStream(out);
         debugTrace = trace;
         isDebug = debugTrace != null;
         amfxOut.setDebugTrace(trace);
-        
+
     }
 
-    public void writeMessage(ActionMessage m) throws IOException
-    {
+    public void writeMessage(ActionMessage m) throws IOException {
         if (isDebug)
             debugTrace.startResponse("Serializing AMFX/HTTP response");
 
@@ -88,8 +83,7 @@
 
         // Write out headers
         int headerCount = m.getHeaderCount();
-        for (int i = 0; i < headerCount; ++i)
-        {
+        for (int i = 0; i < headerCount; ++i) {
             MessageHeader header = m.getHeader(i);
 
             if (isDebug)
@@ -103,8 +97,7 @@
 
         // Write out the body
         int bodyCount = m.getBodyCount();
-        for (int i = 0; i < bodyCount; ++i)
-        {
+        for (int i = 0; i < bodyCount; ++i) {
             MessageBody body = m.getBody(i);
 
             if (isDebug)
@@ -122,8 +115,7 @@
             debugTrace.endMessage();
     }
 
-    protected void writeOpenAMFX(int version) throws IOException
-    {
+    protected void writeOpenAMFX(int version) throws IOException {
         int buflen = 14; // <amfx ver="3">
         StringBuffer sb = new StringBuffer(buflen);
         sb.append("<").append(AMFX_TYPE).append(" ver=\"");
@@ -133,21 +125,18 @@
         amfxOut.writeUTF(sb);
     }
 
-    protected void writeCloseAMFX() throws IOException
-    {
+    protected void writeCloseAMFX() throws IOException {
         amfxOut.writeUTF(AMFX_CLOSE_TAG);
     }
 
-    protected void writeHeader(MessageHeader h) throws IOException
-    {
+    protected void writeHeader(MessageHeader h) throws IOException {
         int buflen = 127; // <header name="..." mustUnderstand="true">
         StringBuffer sb = new StringBuffer(buflen);
         sb.append("<").append(HEADER_TYPE).append(" name=\"");
         sb.append(h.getName());
         sb.append("\"");
 
-        if (h.getMustUnderstand())
-        {
+        if (h.getMustUnderstand()) {
             sb.append(" mustUnderstand=\"");
             sb.append(h.getMustUnderstand());
             sb.append("\"");
@@ -162,14 +151,10 @@
         amfxOut.writeUTF(HEADER_CLOSE_TAG);
     }
 
-    protected void writeBody(MessageBody b) throws IOException
-    {
-        if (b.getTargetURI() == null && b.getResponseURI() == null)
-        {
+    protected void writeBody(MessageBody b) throws IOException {
+        if (b.getTargetURI() == null && b.getResponseURI() == null) {
             amfxOut.writeUTF(BODY_OPEN_TAG);
-        }
-        else
-        {
+        } else {
             int buflen = 127; // <body targetURI="..." responseURI="...">
             StringBuffer sb = new StringBuffer(buflen);
             sb.append("<").append(BODY_TYPE);
@@ -190,8 +175,7 @@
         amfxOut.writeUTF(BODY_CLOSE_TAG);
     }
 
-    public void writeObject(Object value) throws IOException
-    {
+    public void writeObject(Object value) throws IOException {
         amfxOut.writeObject(value);
     }
 
diff --git a/core/src/main/java/flex/messaging/io/amfx/AmfxOutput.java b/core/src/main/java/flex/messaging/io/amfx/AmfxOutput.java
index b416e51..e5572a7 100644
--- a/core/src/main/java/flex/messaging/io/amfx/AmfxOutput.java
+++ b/core/src/main/java/flex/messaging/io/amfx/AmfxOutput.java
@@ -64,8 +64,7 @@
  * @see AmfxMessageSerializer
  * @see AmfxInput
  */
-public class AmfxOutput extends AbstractAmfOutput implements AmfxTypes
-{
+public class AmfxOutput extends AbstractAmfOutput implements AmfxTypes {
     /**
      * A mapping of object instances to their serialization numbers
      * for storing object references on the stream.
@@ -74,8 +73,7 @@
     protected HashMap traitsTable;
     protected HashMap stringTable;
 
-    public AmfxOutput(SerializationContext context)
-    {
+    public AmfxOutput(SerializationContext context) {
         super(context);
 
         objectTable = new IdentityHashMap(64);
@@ -83,8 +81,7 @@
         stringTable = new HashMap(64);
     }
 
-    public void reset()
-    {
+    public void reset() {
         super.reset();
         objectTable.clear();
         traitsTable.clear();
@@ -96,8 +93,7 @@
      * current SerializationContext, OutputStream and debug trace settings
      * to switch the version of the AMF protocol mid-stream.
      */
-    protected Amf3Output createAMF3Output()
-    {
+    protected Amf3Output createAMF3Output() {
         return new Amf3Output(context);
     }
 
@@ -105,59 +101,40 @@
     // java.io.ObjectOutput IMPLEMENTATIONS
     //
 
-    public void writeObject(Object o) throws IOException
-    {
-        if (o == null)
-        {
+    public void writeObject(Object o) throws IOException {
+        if (o == null) {
             writeAMFNull();
             return;
         }
 
-        if (!context.legacyExternalizable && o instanceof Externalizable)
-        {
+        if (!context.legacyExternalizable && o instanceof Externalizable) {
             writeCustomObject(o);
-        }
-        else if (o instanceof String || o instanceof Character)
-        {
+        } else if (o instanceof String || o instanceof Character) {
             String s = o.toString();
             writeString(s);
-        }
-        else if (o instanceof Number)
-        {
-            if (o instanceof Integer || o instanceof Short || o instanceof Byte)
-            {
-                int i = ((Number)o).intValue();
+        } else if (o instanceof Number) {
+            if (o instanceof Integer || o instanceof Short || o instanceof Byte) {
+                int i = ((Number) o).intValue();
                 writeAMFInt(i);
-            }
-            else if (!context.legacyBigNumbers &&
-                    (o instanceof BigInteger || o instanceof BigDecimal))
-            {
+            } else if (!context.legacyBigNumbers &&
+                    (o instanceof BigInteger || o instanceof BigDecimal)) {
                 // Using double to write big numbers such as BigInteger or
                 // BigDecimal can result in information loss so we write
                 // them as String by default...
                 writeString(o.toString());
-            }
-            else
-            {
-                double d = ((Number)o).doubleValue();
+            } else {
+                double d = ((Number) o).doubleValue();
                 writeAMFDouble(d);
             }
-        }
-        else if (o instanceof Boolean)
-        {
-            writeAMFBoolean(((Boolean)o).booleanValue());
+        } else if (o instanceof Boolean) {
+            writeAMFBoolean(((Boolean) o).booleanValue());
         }
         // We have a complex type...
-        else if (o instanceof Date)
-        {
-            writeDate((Date)o);
-        }
-        else if (o instanceof Calendar)
-        {
-            writeDate(((Calendar)o).getTime());
-        }
-        else if (o instanceof Document)
-        {
+        else if (o instanceof Date) {
+            writeDate((Date) o);
+        } else if (o instanceof Calendar) {
+            writeDate(((Calendar) o).getTime());
+        } else if (o instanceof Document) {
             String xml = documentToString(o);
 
             int len = xml.length() + 15; // <xml>...</xml>
@@ -174,45 +151,30 @@
         }
         // If there is a proxy for this,write it as a custom object so the default
         // behavior can be overriden.
-        else if (o instanceof Enum && PropertyProxyRegistry.getRegistry().getProxy(o.getClass()) == null)
-        {
-            Enum<?> enumValue = (Enum<?>)o;
+        else if (o instanceof Enum && PropertyProxyRegistry.getRegistry().getProxy(o.getClass()) == null) {
+            Enum<?> enumValue = (Enum<?>) o;
             writeString(enumValue.name());
-        }
-        else
-        {
+        } else {
             //We have an Object or Array type...
             Class cls = o.getClass();
 
-            if (o instanceof Map && context.legacyMap && !(o instanceof ASObject))
-            {
-                writeMapAsECMAArray((Map)o);
-            }
-            else if (!context.legacyDictionary && o instanceof Dictionary)
-            {
-                writeDictionary((Dictionary)o);
-            }
-            else if (o instanceof Collection)
-            {
+            if (o instanceof Map && context.legacyMap && !(o instanceof ASObject)) {
+                writeMapAsECMAArray((Map) o);
+            } else if (!context.legacyDictionary && o instanceof Dictionary) {
+                writeDictionary((Dictionary) o);
+            } else if (o instanceof Collection) {
                 if (context.legacyCollection)
-                    writeCollection((Collection)o, null);
+                    writeCollection((Collection) o, null);
                 else
-                    writeArrayCollection((Collection)o, null);
-            }
-            else if (cls.isArray())
-            {
+                    writeArrayCollection((Collection) o, null);
+            } else if (cls.isArray()) {
                 writeAMFArray(o, cls.getComponentType());
-            }
-            else
-            {
+            } else {
                 //Special Case: wrap RowSet in PageableRowSet for Serialization
-                if (o instanceof RowSet)
-                {
-                    o = new PagedRowSet((RowSet)o, Integer.MAX_VALUE, false);
-                }
-                else if (o instanceof Throwable && context.legacyThrowable)
-                {
-                    o = new StatusInfoProxy((Throwable)o);
+                if (o instanceof RowSet) {
+                    o = new PagedRowSet((RowSet) o, Integer.MAX_VALUE, false);
+                } else if (o instanceof Throwable && context.legacyThrowable) {
+                    o = new StatusInfoProxy((Throwable) o);
                 }
 
                 writeCustomObject(o);
@@ -220,16 +182,12 @@
         }
     }
 
-    public void writeObjectTraits(TraitsInfo ti) throws IOException
-    {
+    public void writeObjectTraits(TraitsInfo ti) throws IOException {
         String className = ti.getClassName();
 
-        if (className == null || className.length() == 0)
-        {
+        if (className == null || className.length() == 0) {
             writeUTF(OBJECT_OPEN_TAG);
-        }
-        else
-        {
+        } else {
             int len = 127; // <object type="...">
             StringBuffer sb = new StringBuffer(len);
             sb.append("<").append(OBJECT_TYPE).append(" type=\"");
@@ -244,32 +202,22 @@
 
         // We treat an empty anonymous Object as a special case
         // of <traits/> and thus do not serialize by reference.
-        if (ti.length() == 0 && className == null)
-        {
+        if (ti.length() == 0 && className == null) {
             writeUTF(EMPTY_TRAITS_TAG);
-        }
-        else if (!byReference(ti))
-        {
+        } else if (!byReference(ti)) {
             // We assume all Java objects are not dynamic
             //boolean dynamic = ti.isDynamic();
-            if (ti.isExternalizable())
-            {
+            if (ti.isExternalizable()) {
                 writeUTF(TRAITS_EXTERNALIZALBE_TAG);
-            }
-            else
-            {
+            } else {
                 int count = ti.getProperties().size();
 
-                if (count <= 0)
-                {
+                if (count <= 0) {
                     writeUTF(EMPTY_TRAITS_TAG);
-                }
-                else
-                {
+                } else {
                     writeUTF(TRAITS_OPEN_TAG);
 
-                    for (int i = 0; i < count; i++)
-                    {
+                    for (int i = 0; i < count; i++) {
                         String propName = ti.getProperty(i);
                         writeString(propName, true);
                     }
@@ -281,16 +229,14 @@
     }
 
 
-    public void writeObjectProperty(String name, Object value) throws IOException
-    {
+    public void writeObjectProperty(String name, Object value) throws IOException {
         if (isDebug)
             trace.namedElement(name);
 
         writeObject(value);
     }
 
-    public void writeObjectEnd() throws IOException
-    {
+    public void writeObjectEnd() throws IOException {
         writeUTF(OBJECT_CLOSE_TAG);
 
         if (isDebug)
@@ -301,8 +247,7 @@
     // java.io.DataOutput IMPLEMENTATIONS
     //
 
-    public void writeUTF(String s) throws IOException
-    {
+    public void writeUTF(String s) throws IOException {
         byte[] bytes = s.getBytes(UTF_8);
         out.write(bytes);
     }
@@ -314,8 +259,7 @@
     /**
      *
      */
-    protected void writeAMFBoolean(boolean b) throws IOException
-    {
+    protected void writeAMFBoolean(boolean b) throws IOException {
         if (b)
             writeUTF(TRUE_TAG); // <true/>
         else
@@ -328,8 +272,7 @@
     /**
      *
      */
-    protected void writeAMFDouble(double d) throws IOException
-    {
+    protected void writeAMFDouble(double d) throws IOException {
         int buflen = 40; // <double>...</double>
         StringBuffer sb = new StringBuffer(buflen);
         sb.append(DOUBLE_OPEN_TAG);
@@ -345,10 +288,8 @@
     /**
      *
      */
-    protected void writeAMFInt(int i) throws IOException
-    {
-        if (i >= Amf3Types.INT28_MIN_VALUE && i <= Amf3Types.INT28_MAX_VALUE)
-        {
+    protected void writeAMFInt(int i) throws IOException {
+        if (i >= Amf3Types.INT28_MIN_VALUE && i <= Amf3Types.INT28_MAX_VALUE) {
             int buflen = 25; // <int>...</int>
             StringBuffer sb = new StringBuffer(buflen);
             sb.append(INTEGER_OPEN_TAG);
@@ -359,9 +300,7 @@
 
             if (isDebug)
                 trace.write(i);
-        }
-        else
-        {
+        } else {
             // Promote large int to a double; technically not needed for AMFX
             // but doing it for consistency with AMF.
             writeAMFDouble(i);
@@ -371,8 +310,7 @@
     /**
      *
      */
-    protected void writeByteArray(byte[] ba) throws IOException
-    {
+    protected void writeByteArray(byte[] ba) throws IOException {
         int length = ba.length * 2;
 
         int len = 23 + length; // <bytearray>number of bytes * 2 for encoding</bytearray>
@@ -394,13 +332,11 @@
     /**
      *
      */
-    protected void writeByteArray(Byte[] ba) throws IOException
-    {
+    protected void writeByteArray(Byte[] ba) throws IOException {
         int length = ba.length;
         byte[] bytes = new byte[length];
 
-        for (int i = 0; i < length; i++)
-        {
+        for (int i = 0; i < length; i++) {
             Byte b = ba[i];
             if (b == null)
                 bytes[i] = 0;
@@ -414,8 +350,7 @@
     /**
      *
      */
-    public void writeUTF(StringBuffer sb) throws IOException
-    {
+    public void writeUTF(StringBuffer sb) throws IOException {
         byte[] bytes = sb.toString().getBytes(UTF_8);
         out.write(bytes);
     }
@@ -423,10 +358,8 @@
     /**
      *
      */
-    protected void writeDate(Date d) throws IOException
-    {
-        if (!byReference(d))
-        {
+    protected void writeDate(Date d) throws IOException {
+        if (!byReference(d)) {
             int buflen = 30; // <date>...</date>
             long time = d.getTime();
             StringBuffer sb = new StringBuffer(buflen);
@@ -441,8 +374,7 @@
         }
     }
 
-    protected void writeDictionary(Dictionary dictionary) throws IOException
-    {
+    protected void writeDictionary(Dictionary dictionary) throws IOException {
         StringBuffer sb = new StringBuffer(25);
         sb.append("<").append(DICTIONARY_TYPE).append(" length=\"");
         sb.append(dictionary.size());
@@ -452,8 +384,7 @@
         if (isDebug) trace.startAMFDictionary(objectTable.size() - 1);
 
         Enumeration keys = dictionary.keys();
-        while (keys.hasMoreElements())
-        {
+        while (keys.hasMoreElements()) {
             if (isDebug) trace.startDictionaryElement();
             Object key = keys.nextElement();
             writeObject(key);
@@ -471,8 +402,7 @@
     /**
      *
      */
-    protected void writeMapAsECMAArray(Map map) throws IOException
-    {
+    protected void writeMapAsECMAArray(Map map) throws IOException {
         int len = 20; // <array ecma="true">
 
         StringBuffer sb = new StringBuffer(len);
@@ -483,11 +413,9 @@
             trace.startAMFArray(objectTable.size() - 1);
 
         Iterator it = map.keySet().iterator();
-        while (it.hasNext())
-        {
+        while (it.hasNext()) {
             Object key = it.next();
-            if (key != null)
-            {
+            if (key != null) {
                 String propName = key.toString();
                 sb = new StringBuffer();
 
@@ -513,8 +441,7 @@
     /**
      *
      */
-    protected void writeAMFNull() throws IOException
-    {
+    protected void writeAMFNull() throws IOException {
         writeUTF(NULL_TAG);
 
         if (isDebug)
@@ -524,8 +451,7 @@
     /**
      *
      */
-    protected void writeString(String s) throws IOException
-    {
+    protected void writeString(String s) throws IOException {
         writeString(s, false);
 
         if (isDebug)
@@ -539,43 +465,30 @@
     /**
      *
      */
-    protected void writeAMFArray(Object o, Class componentType) throws IOException
-    {
-        if (componentType.isPrimitive())
-        {
+    protected void writeAMFArray(Object o, Class componentType) throws IOException {
+        if (componentType.isPrimitive()) {
             writePrimitiveArray(o);
-        }
-        else if (componentType.equals(Byte.class))
-        {
-            writeByteArray((Byte[])o);
-        }
-        else if (componentType.equals(Character.class))
-        {
-            writeCharArrayAsString((Character[])o);
-        }
-        else
-        {
-            writeObjectArray((Object[])o, null);
+        } else if (componentType.equals(Byte.class)) {
+            writeByteArray((Byte[]) o);
+        } else if (componentType.equals(Character.class)) {
+            writeCharArrayAsString((Character[]) o);
+        } else {
+            writeObjectArray((Object[]) o, null);
         }
     }
 
     /**
      *
      */
-    protected void writeArrayCollection(Collection col, SerializationDescriptor desc) throws IOException
-    {
-        if (!byReference(col))
-        {
+    protected void writeArrayCollection(Collection col, SerializationDescriptor desc) throws IOException {
+        if (!byReference(col)) {
             ArrayCollection ac;
 
-            if (col instanceof ArrayCollection)
-            {
-                ac = (ArrayCollection)col;
+            if (col instanceof ArrayCollection) {
+                ac = (ArrayCollection) col;
                 // TODO: QUESTION: Pete, ignoring the descriptor here... not sure if
                 // we should modify the user's AC as that could cause corruption?
-            }
-            else
-            {
+            } else {
                 // Wrap any Collection in an ArrayCollection
                 ac = new ArrayCollection(col);
                 if (desc != null)
@@ -591,48 +504,38 @@
     /**
      *
      */
-    protected void writeCustomObject(Object o) throws IOException
-    {
+    protected void writeCustomObject(Object o) throws IOException {
         PropertyProxy proxy = null;
 
-        if (o instanceof PropertyProxy)
-        {
-            proxy = (PropertyProxy)o;
+        if (o instanceof PropertyProxy) {
+            proxy = (PropertyProxy) o;
             o = proxy.getDefaultInstance();
 
             // The proxy may wrap a null default instance, if so, short circuit here.
-            if (o == null)
-            {
+            if (o == null) {
                 writeAMFNull();
                 return;
             }
             // HACK: Short circuit and unwrap if PropertyProxy is wrapping an Array
             // or Collection type since we don't yet have the ability to proxy multiple
             // AMF types. We write an AMF Array directly instead of an AMF Object
-            else if (o instanceof Collection)
-            {
+            else if (o instanceof Collection) {
                 if (context.legacyCollection)
-                    writeCollection((Collection)o, proxy.getDescriptor());
+                    writeCollection((Collection) o, proxy.getDescriptor());
                 else
-                    writeArrayCollection((Collection)o, proxy.getDescriptor());
+                    writeArrayCollection((Collection) o, proxy.getDescriptor());
                 return;
-            }
-            else if (o.getClass().isArray())
-            {
-                writeObjectArray((Object[])o, proxy.getDescriptor());
+            } else if (o.getClass().isArray()) {
+                writeObjectArray((Object[]) o, proxy.getDescriptor());
                 return;
-            }
-            else if (context.legacyMap && o instanceof Map && !(o instanceof ASObject))
-            {
-                writeMapAsECMAArray((Map)o);
+            } else if (context.legacyMap && o instanceof Map && !(o instanceof ASObject)) {
+                writeMapAsECMAArray((Map) o);
                 return;
             }
         }
 
-        if (!byReference(o))
-        {
-            if (proxy == null)
-            {
+        if (!byReference(o)) {
+            if (proxy == null) {
                 proxy = PropertyProxyRegistry.getProxyAndRegister(o);
             }
 
@@ -643,14 +546,12 @@
     /**
      *
      */
-    protected void writePropertyProxy(PropertyProxy pp, Object instance) throws IOException
-    {
+    protected void writePropertyProxy(PropertyProxy pp, Object instance) throws IOException {
         /*
          * At this point we substitute the instance we want to serialize.
          */
         Object newInst = pp.getInstanceToSerialize(instance);
-        if (newInst != instance)
-        {
+        if (newInst != instance) {
             // We can't use writeAMFNull here I think since we already added this object
             // to the object table on the server side.  The player won't have any way
             // of knowing we have this reference mapped to null.
@@ -665,16 +566,13 @@
         List propertyNames = null;
         boolean externalizable = pp.isExternalizable(instance);
 
-        if (!externalizable)
-        {
+        if (!externalizable) {
             propertyNames = pp.getPropertyNames(instance);
             // filter write-only properties
-            if (pp instanceof BeanProxy)
-            {
+            if (pp instanceof BeanProxy) {
                 BeanProxy bp = (BeanProxy) pp;
                 Iterator it = propertyNames.iterator();
-                while (it.hasNext())
-                {
+                while (it.hasNext()) {
                     String propName = (String) it.next();
                     if (bp.isWriteOnly(instance, propName))
                         it.remove();
@@ -685,21 +583,17 @@
         TraitsInfo ti = new TraitsInfo(pp.getAlias(instance), pp.isDynamic(), externalizable, propertyNames);
         writeObjectTraits(ti);
 
-        if (externalizable)
-        {
+        if (externalizable) {
             ByteArrayOutputStream bout = new ByteArrayOutputStream();
             Amf3Output objOut = createAMF3Output();
             objOut.setOutputStream(bout);
             //objOut.setDebugTrace(trace);
-            ((Externalizable)instance).writeExternal(objOut);
+            ((Externalizable) instance).writeExternal(objOut);
             writeByteArray(bout.toByteArray());
-        }
-        else if (propertyNames != null)
-        {
+        } else if (propertyNames != null) {
             Iterator it = propertyNames.iterator();
-            while (it.hasNext())
-            {
-                String propName = (String)it.next();
+            while (it.hasNext()) {
+                String propName = (String) it.next();
                 Object value = pp.getValue(instance, propName);
                 writeObjectProperty(propName, value);
             }
@@ -711,14 +605,10 @@
     /**
      *
      */
-    protected void writeString(String s, boolean isTrait) throws IOException
-    {
-        if (s.length() == 0)
-        {
+    protected void writeString(String s, boolean isTrait) throws IOException {
+        if (s.length() == 0) {
             writeUTF(EMPTY_STRING_TAG);
-        }
-        else if (!byReference(s))
-        {
+        } else if (!byReference(s)) {
             int len = s.length() + 35; // <string>...</string> + <![CDATA[ ]]>
 
             StringBuffer sb = new StringBuffer(len);
@@ -739,53 +629,38 @@
     /**
      * XML defines the following set as valid characters to appear in a document:
      * U+0009, U+000A, U+000D, [U+0020-U+D7FF], [U+E000-U+FFFD], and [U+10000-U+10FFFF].
-     *
+     * <p>
      * Java only supports characters up to 0xFFFE so codepoints beyond the BMP are
      * not considered.
-     *
+     * <p>
      * Characters not in this set will be escaped using a numerical character reference
      * in hexadecimal form, i.e. &amp;#xFFFF.
-     *
+     * <p>
      * A CDATA section is not used because numerical character references cannot be
      * used in such a context.
      *
      * @param sb The StringBuffer to which the escaped String should be written.
-     * @param s The source String to escape for XML.
-     *
+     * @param s  The source String to escape for XML.
      */
-    protected void writeEscapedString(StringBuffer sb, String s)
-    {
+    protected void writeEscapedString(StringBuffer sb, String s) {
         StringBuffer temp = new StringBuffer(s.length());
 
         char[] chars = s.toCharArray();
-        for (int i = 0; i < chars.length; i++)
-        {
+        for (int i = 0; i < chars.length; i++) {
             char c = chars[i];
-            if (c >= 0x0020)
-            {
-                if (c == '&')
-                {
+            if (c >= 0x0020) {
+                if (c == '&') {
                     temp.append("&amp;");
-                }
-                else if (c == '<')
-                {
+                } else if (c == '<') {
                     temp.append("&lt;");
-                }
-                else if (c > 0xD7FF && (c < 0xE000 || c > 0xFFFD))
-                {
+                } else if (c > 0xD7FF && (c < 0xE000 || c > 0xFFFD)) {
                     temp.append("&#x").append(Integer.toHexString(c)).append(";");
-                }
-                else
-                {
+                } else {
                     temp.append(c);
                 }
-            }
-            else if (c == 0x0009 || c == 0x000A || c == 0x000D)
-            {
+            } else if (c == 0x0009 || c == 0x000A || c == 0x000D) {
                 temp.append(c);
-            }
-            else
-            {
+            } else {
                 temp.append("&#x").append(Integer.toHexString(c)).append(";");
             }
         }
@@ -796,13 +671,11 @@
     /**
      *
      */
-    protected void writeCharArrayAsString(Character[] ca) throws IOException
-    {
+    protected void writeCharArrayAsString(Character[] ca) throws IOException {
         int length = ca.length;
         char[] chars = new char[length];
 
-        for (int i = 0; i < length; i++)
-        {
+        for (int i = 0; i < length; i++) {
             Character c = ca[i];
             if (c == null)
                 chars[i] = 0;
@@ -815,8 +688,7 @@
     /**
      *
      */
-    protected void writeCharArrayAsString(char[] ca) throws IOException
-    {
+    protected void writeCharArrayAsString(char[] ca) throws IOException {
         String str = new String(ca);
         writeString(str);
     }
@@ -824,10 +696,8 @@
     /**
      *
      */
-    protected void writeCollection(Collection c, SerializationDescriptor descriptor) throws IOException
-    {
-        if (!byReference(c))
-        {
+    protected void writeCollection(Collection c, SerializationDescriptor descriptor) throws IOException {
+        if (!byReference(c)) {
             writeObjectArrayDirectly(c.toArray(), descriptor);
         }
     }
@@ -835,10 +705,8 @@
     /**
      *
      */
-    protected void writeObjectArray(Object[] values, SerializationDescriptor descriptor) throws IOException
-    {
-        if (!byReference(values))
-        {
+    protected void writeObjectArray(Object[] values, SerializationDescriptor descriptor) throws IOException {
+        if (!byReference(values)) {
             writeObjectArrayDirectly(values, descriptor);
         }
     }
@@ -846,8 +714,7 @@
     /**
      *
      */
-    protected void writeObjectArrayDirectly(Object[] values, SerializationDescriptor descriptor) throws IOException
-    {
+    protected void writeObjectArrayDirectly(Object[] values, SerializationDescriptor descriptor) throws IOException {
         int len = 25; // <array length="...">
 
         StringBuffer sb = new StringBuffer(len);
@@ -859,8 +726,7 @@
         if (isDebug)
             trace.startAMFArray(objectTable.size() - 1);
 
-        for (int i = 0; i < values.length; ++i)
-        {
+        for (int i = 0; i < values.length; ++i) {
             if (isDebug)
                 trace.arrayElement(i);
 
@@ -882,24 +748,17 @@
      * </p>
      *
      * @param obj An array of primitives
-     *
      */
-    protected void writePrimitiveArray(Object obj) throws IOException
-    {
+    protected void writePrimitiveArray(Object obj) throws IOException {
         Class aType = obj.getClass().getComponentType();
 
-        if (aType.equals(Character.TYPE))
-        {
+        if (aType.equals(Character.TYPE)) {
             //Treat char[] as a String
-            char[] c = (char[])obj;
+            char[] c = (char[]) obj;
             writeCharArrayAsString(c);
-        }
-        else if (aType.equals(Byte.TYPE))
-        {
-            writeByteArray((byte[])obj);
-        }
-        else if (!byReference(obj))
-        {
+        } else if (aType.equals(Byte.TYPE)) {
+            writeByteArray((byte[]) obj);
+        } else if (!byReference(obj)) {
             int length = Array.getLength(obj);
 
             int buflen = 25; // <array length="...">
@@ -912,37 +771,29 @@
             if (isDebug)
                 trace.startAMFArray(objectTable.size() - 1);
 
-            if (aType.equals(Boolean.TYPE))
-            {
-                boolean[] b = (boolean[])obj;
+            if (aType.equals(Boolean.TYPE)) {
+                boolean[] b = (boolean[]) obj;
 
-                for (int i = 0; i < b.length; i++)
-                {
+                for (int i = 0; i < b.length; i++) {
                     if (isDebug)
                         trace.arrayElement(i);
 
                     writeAMFBoolean(b[i]);
                 }
-            }
-            else if (aType.equals(Integer.TYPE) || aType.equals(Short.TYPE))
-            {
+            } else if (aType.equals(Integer.TYPE) || aType.equals(Short.TYPE)) {
                 //We have a primitive number, either an int or short
                 //We write all of these as Integers...
-                for (int i = 0; i < length; i++)
-                {
+                for (int i = 0; i < length; i++) {
                     if (isDebug)
                         trace.arrayElement(i);
 
                     int v = Array.getInt(obj, i);
                     writeAMFInt(v);
                 }
-            }
-            else
-            {
+            } else {
                 //We have a primitive number, either a double, float, or long
                 //We write all of these as doubles...
-                for (int i = 0; i < length; i++)
-                {
+                for (int i = 0; i < length; i++) {
                     if (isDebug)
                         trace.arrayElement(i);
 
@@ -965,18 +816,14 @@
      * in the reference collection for potential future encounter.
      *
      * @return Success/failure indicator as to whether the object could be
-     *         serialized as a reference.
-     *
+     * serialized as a reference.
      */
-    protected boolean byReference(Object o) throws IOException
-    {
+    protected boolean byReference(Object o) throws IOException {
         Object ref = objectTable.get(o);
 
-        if (ref != null)
-        {
-            try
-            {
-                int refNum = ((Integer)ref).intValue();
+        if (ref != null) {
+            try {
+                int refNum = ((Integer) ref).intValue();
 
                 int len = 20; // <ref id="..."/>
 
@@ -989,14 +836,10 @@
 
                 if (isDebug)
                     trace.writeRef(refNum);
-            }
-            catch (ClassCastException e)
-            {
+            } catch (ClassCastException e) {
                 throw new IOException("Object reference is not an Integer");
             }
-        }
-        else
-        {
+        } else {
             objectTable.put(o, new Integer(objectTable.size()));
         }
 
@@ -1006,15 +849,12 @@
     /**
      *
      */
-    protected boolean byReference(String s) throws IOException
-    {
+    protected boolean byReference(String s) throws IOException {
         Object ref = stringTable.get(s);
 
-        if (ref != null)
-        {
-            try
-            {
-                int refNum = ((Integer)ref).intValue();
+        if (ref != null) {
+            try {
+                int refNum = ((Integer) ref).intValue();
 
                 int len = 20; // <string id="..."/>
 
@@ -1027,14 +867,10 @@
 
                 if (Trace.amf && isDebug)
                     trace.writeStringRef(refNum);
-            }
-            catch (ClassCastException e)
-            {
+            } catch (ClassCastException e) {
                 throw new IOException("String reference is not an Integer");
             }
-        }
-        else
-        {
+        } else {
             stringTable.put(s, new Integer(stringTable.size()));
         }
 
@@ -1044,8 +880,7 @@
     /**
      *
      */
-    protected boolean byReference(TraitsInfo ti) throws IOException
-    {
+    protected boolean byReference(TraitsInfo ti) throws IOException {
         // We treat an empty anonymous Object as a special case
         // of <traits/> and thus do not serialize by reference.
         if (ti.length() == 0 && ti.getClassName() == null)
@@ -1053,11 +888,9 @@
 
         Object ref = traitsTable.get(ti);
 
-        if (ref != null)
-        {
-            try
-            {
-                int refNum = ((Integer)ref).intValue();
+        if (ref != null) {
+            try {
+                int refNum = ((Integer) ref).intValue();
 
                 int len = 20; // <traits id="..."/>
 
@@ -1070,14 +903,10 @@
 
                 if (Trace.amf && isDebug)
                     trace.writeTraitsInfoRef(refNum);
-            }
-            catch (ClassCastException e)
-            {
+            } catch (ClassCastException e) {
                 throw new IOException("Traits reference is not an Integer");
             }
-        }
-        else
-        {
+        } else {
             traitsTable.put(ti, new Integer(traitsTable.size()));
         }
 
diff --git a/core/src/main/java/flex/messaging/io/amfx/AmfxTypes.java b/core/src/main/java/flex/messaging/io/amfx/AmfxTypes.java
index 82ffed0..ee9368b 100644
--- a/core/src/main/java/flex/messaging/io/amfx/AmfxTypes.java
+++ b/core/src/main/java/flex/messaging/io/amfx/AmfxTypes.java
@@ -19,81 +19,80 @@
 /**
  * AMFX is an XML representation of AMF 3.
  */
-public interface AmfxTypes
-{
+public interface AmfxTypes {
     // AMFX Packet Structure
-    String AMFX_TYPE         = "amfx";
-    String HEADER_TYPE       = "header";
-    String BODY_TYPE         = "body";
+    String AMFX_TYPE = "amfx";
+    String HEADER_TYPE = "header";
+    String BODY_TYPE = "body";
 
     // AMFX ActionScript types
-    String UNDEFINED_TYPE    = "undefined";
-    String NULL_TYPE         = "null";
-    String FALSE_TYPE        = "false";
-    String TRUE_TYPE         = "true";
-    String INTEGER_TYPE      = "int";
-    String ITEM_TYPE      = "item";
-    String DOUBLE_TYPE       = "double";
-    String STRING_TYPE       = "string";
-    String XML_TYPE          = "xmldocument";
-    String DATE_TYPE         = "date";
-    String DICTIONARY_TYPE   = "dictionary";
-    String ARRAY_TYPE        = "array";
-    String OBJECT_TYPE       = "object";
+    String UNDEFINED_TYPE = "undefined";
+    String NULL_TYPE = "null";
+    String FALSE_TYPE = "false";
+    String TRUE_TYPE = "true";
+    String INTEGER_TYPE = "int";
+    String ITEM_TYPE = "item";
+    String DOUBLE_TYPE = "double";
+    String STRING_TYPE = "string";
+    String XML_TYPE = "xmldocument";
+    String DATE_TYPE = "date";
+    String DICTIONARY_TYPE = "dictionary";
+    String ARRAY_TYPE = "array";
+    String OBJECT_TYPE = "object";
     String AVM_PLUS_XML_TYPE = "xml";
-    String BYTE_ARRAY_TYPE   = "bytearray";
+    String BYTE_ARRAY_TYPE = "bytearray";
 
     // Special metadata types
-    String REF_TYPE          = "ref";
-    String TRAITS_TYPE       = "traits";
+    String REF_TYPE = "ref";
+    String TRAITS_TYPE = "traits";
 
 
     // AMFX special tag constants
-    String EMPTY_STRING_TAG  = "<string/>";
-    String FALSE_TAG         = "<false/>";
-    String NULL_TAG          = "<null/>";
-    String TRUE_TAG          = "<true/>";
-    String UNDEFINED_TAG     = "<undefined/>";
+    String EMPTY_STRING_TAG = "<string/>";
+    String FALSE_TAG = "<false/>";
+    String NULL_TAG = "<null/>";
+    String TRUE_TAG = "<true/>";
+    String UNDEFINED_TAG = "<undefined/>";
 
-    String EMPTY_TRAITS_TAG  = "<traits/>";
+    String EMPTY_TRAITS_TAG = "<traits/>";
 
     // AMFX tag constants
-    String AMFX_OPEN_TAG     = "<amfx>";
-    String AMFX_CLOSE_TAG    = "</amfx>";
-    String HEADER_OPEN_TAG   = "<header>";
-    String HEADER_CLOSE_TAG  = "</header>";
-    String BODY_OPEN_TAG     = "<body>";
-    String BODY_CLOSE_TAG    = "</body>";
+    String AMFX_OPEN_TAG = "<amfx>";
+    String AMFX_CLOSE_TAG = "</amfx>";
+    String HEADER_OPEN_TAG = "<header>";
+    String HEADER_CLOSE_TAG = "</header>";
+    String BODY_OPEN_TAG = "<body>";
+    String BODY_CLOSE_TAG = "</body>";
 
 
-    String ARRAY_OPEN_TAG     = "<array>";
-    String ARRAY_CLOSE_TAG   = "</array>";
-    String BYTE_ARRAY_OPEN_TAG   = "<bytearray>";
-    String BYTE_ARRAY_CLOSE_TAG   = "</bytearray>";
-    String DATE_OPEN_TAG     = "<date>";
-    String DATE_CLOSE_TAG    = "</date>";
+    String ARRAY_OPEN_TAG = "<array>";
+    String ARRAY_CLOSE_TAG = "</array>";
+    String BYTE_ARRAY_OPEN_TAG = "<bytearray>";
+    String BYTE_ARRAY_CLOSE_TAG = "</bytearray>";
+    String DATE_OPEN_TAG = "<date>";
+    String DATE_CLOSE_TAG = "</date>";
     String DICTIONARY_CLOSE_TAG = "</dictionary>";
-    String DOUBLE_OPEN_TAG   = "<double>";
-    String DOUBLE_CLOSE_TAG  = "</double>";
-    String INTEGER_OPEN_TAG  = "<int>";
+    String DOUBLE_OPEN_TAG = "<double>";
+    String DOUBLE_CLOSE_TAG = "</double>";
+    String INTEGER_OPEN_TAG = "<int>";
     String INTEGER_CLOSE_TAG = "</int>";
-    String ITEM_OPEN_TAG     = "<item>";
-    String ITEM_CLOSE_TAG    = "</item>";
-    String OBJECT_OPEN_TAG   = "<object>";
-    String OBJECT_CLOSE_TAG  = "</object>";
-    String STRING_OPEN_TAG   = "<string>";
-    String STRING_CLOSE_TAG  = "</string>";
-    String XML_OPEN_TAG      = "<xml>";
-    String XML_CLOSE_TAG     = "</xml>";
-    String XML_DOC_OPEN_TAG  = "<xmldocument>";
+    String ITEM_OPEN_TAG = "<item>";
+    String ITEM_CLOSE_TAG = "</item>";
+    String OBJECT_OPEN_TAG = "<object>";
+    String OBJECT_CLOSE_TAG = "</object>";
+    String STRING_OPEN_TAG = "<string>";
+    String STRING_CLOSE_TAG = "</string>";
+    String XML_OPEN_TAG = "<xml>";
+    String XML_CLOSE_TAG = "</xml>";
+    String XML_DOC_OPEN_TAG = "<xmldocument>";
     String XML_DOC_CLOSE_TAG = "</xmldocument>";
 
-    String TRAITS_OPEN_TAG   = "<traits>";
-    String TRAITS_CLOSE_TAG  = "</traits>";
+    String TRAITS_OPEN_TAG = "<traits>";
+    String TRAITS_CLOSE_TAG = "</traits>";
 
-    String TRAITS_EXTERNALIZALBE_TAG   = "<traits externalizable=\"true\" />";
+    String TRAITS_EXTERNALIZALBE_TAG = "<traits externalizable=\"true\" />";
 
     // AMFX Strings always use UTF-8
-    String UTF_8             = "UTF-8";
+    String UTF_8 = "UTF-8";
 
 }
diff --git a/core/src/main/java/flex/messaging/log/HTTPRequestLog.java b/core/src/main/java/flex/messaging/log/HTTPRequestLog.java
index f065680..8aba6b0 100644
--- a/core/src/main/java/flex/messaging/log/HTTPRequestLog.java
+++ b/core/src/main/java/flex/messaging/log/HTTPRequestLog.java
@@ -28,28 +28,26 @@
 /**
  * Static class to log HTTP request data when it is wrapped by our LoggingHttpServletRequestWrapper.
  */
-public class HTTPRequestLog
-{
+public class HTTPRequestLog {
     /**
      * Request attribute for storing error info.
      */
     public static final String HTTP_ERROR_INFO = "org.apache.flex.blazeds.internal._exception_info";
-    
+
     // Default file name
     private static String filename;
 
     /**
      * Called to set up filename for HTTP request logging.
      * If the init parameter <b>HttpErrorLog</b> is set in the servlet context, its value is set as the output filename
-     *@param context the ServletContext object
+     *
+     * @param context the ServletContext object
      * @return true if request logging is enabled.
      */
-    public static boolean init(ServletContext context)
-    {
+    public static boolean init(ServletContext context) {
         // Get the HttpRequest log file information.
         String logfile = context.getInitParameter("HttpErrorLog");
-        if (logfile == null || logfile.length() == 0)
-        {
+        if (logfile == null || logfile.length() == 0) {
             return false;
         }
         filename = logfile;
@@ -61,45 +59,40 @@
      *
      * @param fileName the file name
      */
-    public static void setFileName(String fileName)
-    {
-        if (fileName != null)
-        {
+    public static void setFileName(String fileName) {
+        if (fileName != null) {
             filename = fileName;
         }
     }
 
     /**
      * Get the file name.
+     *
      * @return String the file name
      */
-    public static String getFileName()
-    {
+    public static String getFileName() {
         return filename;
     }
 
     /**
      * Log the HTTP request if logging turned on and we have a filename.
-     * @param header the header name
+     *
+     * @param header  the header name
      * @param httpReq the HttpServletRequest
      */
-    public static synchronized void outputRequest(String header, HttpServletRequest httpReq)
-    {
+    public static synchronized void outputRequest(String header, HttpServletRequest httpReq) {
         // If things aren't set up, do nothing.
-        if (!(httpReq instanceof LoggingHttpServletRequestWrapper) || filename == null)
-        {
+        if (!(httpReq instanceof LoggingHttpServletRequestWrapper) || filename == null) {
             return;
         }
 
         LoggingHttpServletRequestWrapper req = (LoggingHttpServletRequestWrapper) httpReq;
         FileWriter fw = null;
-        try
-        {
+        try {
             // Open the file
             fw = new FileWriter(filename, true);
             fw.write("#===== Request Client Infomation =====#" + "\n");
-            if (header != null)
-            {
+            if (header != null) {
                 fw.write("Error             : " + header + "\n");
             }
             fw.write("Timestamp         : " + new Date(System.currentTimeMillis()).toString() + "\n");
@@ -114,12 +107,11 @@
             outputBody(fw, req);
 
             fw.close();
-        }
-        catch (IOException ex)
-        {
-            if (fw != null)
-            {
-                try { fw.close(); } catch (IOException e) { /* ignore */ }
+        } catch (IOException ex) {
+            if (fw != null) {
+                try {
+                    fw.close();
+                } catch (IOException e) { /* ignore */ }
             }
             System.out.println("Unable to write HTTP request data to file " + filename + ": " + ex.toString());
         }
@@ -127,46 +119,41 @@
 
     /**
      * Output 1 line message (Auto file open).
+     *
      * @param message the message to print
      */
-    public static void outputPrint(String message)
-    {
+    public static void outputPrint(String message) {
         FileWriter fw = null;
-        try
-        {
+        try {
             fw = new FileWriter(filename, true);
             fw.write(message + "\n");
             fw.close();
-        }
-        catch (IOException ex)
-        {
-            if (fw != null)
-            {
-                try { fw.close(); } catch (IOException e) { /* ignore */ }
+        } catch (IOException ex) {
+            if (fw != null) {
+                try {
+                    fw.close();
+                } catch (IOException e) { /* ignore */ }
             }
             System.out.println("Unable to log message '" + message + "' to file " + filename + " : " + ex.toString());
         }
     }
 
-    
+
     /**
      * Display the request header.
      */
-    private static void outputHeaders(FileWriter fw, LoggingHttpServletRequestWrapper req) throws IOException
-    {
+    private static void outputHeaders(FileWriter fw, LoggingHttpServletRequestWrapper req) throws IOException {
         // Get the header
         Enumeration reqHeaderNum = req.getHeaderNames();
 
         // Do nothing if there is no header
-        if (reqHeaderNum == null)
-        {
+        if (reqHeaderNum == null) {
             fw.write("No headers" + "\n");
             return;
         }
 
         // Repeat the header element
-        while (reqHeaderNum.hasMoreElements())
-        {
+        while (reqHeaderNum.hasMoreElements()) {
             // Get the key
             String key = (String) reqHeaderNum.nextElement();
 
@@ -178,14 +165,12 @@
     /**
      * Output header information.
      */
-    private static void outputHeaderElements(FileWriter fw, LoggingHttpServletRequestWrapper req, String key) throws IOException
-    {
+    private static void outputHeaderElements(FileWriter fw, LoggingHttpServletRequestWrapper req, String key) throws IOException {
         // Output the header information
         Enumeration e = req.getHeaders(key);
         String keyname = key;
 
-        while (e.hasMoreElements())
-        {
+        while (e.hasMoreElements()) {
             fw.write(keyname + " : " + e.nextElement() + "\n");
             // Output key name only for the first time
             keyname = "        ";
@@ -195,8 +180,7 @@
     /**
      * Output the body information.
      */
-    private static void outputBody(FileWriter fw, LoggingHttpServletRequestWrapper req) throws IOException
-    {
+    private static void outputBody(FileWriter fw, LoggingHttpServletRequestWrapper req) throws IOException {
         // Get the body size
         int leng = req.getContentLength();
         // Do nothing if there is no body
@@ -207,8 +191,7 @@
 
         // Put data
         InputStream in = req.getInputStream();
-        if (in.read(rbuf, 0, leng) > 0)
-        {
+        if (in.read(rbuf, 0, leng) > 0) {
             // Output data
             outputBinary(fw, rbuf);
         }
@@ -217,14 +200,12 @@
     /**
      * Output body information.
      */
-    private static void outputBinary(FileWriter fw, byte buf[]) throws IOException
-    {
+    private static void outputBinary(FileWriter fw, byte buf[]) throws IOException {
 
         int adrs = 0;
 
         // Do every 16 bytes
-        for (int j = 0; j < buf.length; j += 16)
-        {
+        for (int j = 0; j < buf.length; j += 16) {
 
             // Change the number to hex.
             String adrsStr = "00000000" + Integer.toHexString(adrs);
@@ -234,16 +215,12 @@
             adrs += 16;
 
             // Output in hex.
-            for (int i = 0; i < 16; i++)
-            {
+            for (int i = 0; i < 16; i++) {
 
                 // If it is out of the limit, display in white space
-                if (i + j >= buf.length)
-                {
+                if (i + j >= buf.length) {
                     fw.write("   ");
-                }
-                else
-                {
+                } else {
                     int n = (int) buf[i + j];
                     if (n < 0) n += 256;
                     // Change the data into hex
@@ -255,8 +232,7 @@
 
             // Output in string
             fw.write("    ");
-            for (int i = 0; i < 16; i++)
-            {
+            for (int i = 0; i < 16; i++) {
 
                 // If it is out of limit, break.
                 if (i + j >= buf.length) break;
@@ -264,13 +240,11 @@
                 // If it is a special character, output "."
                 if (buf[i + j] < 0x20 ||
                         (buf[i + j] & 0xff) > 0xde ||
-                        (buf[i + j] > 0x7e && (buf[i + j] & 0xff) < 0xa1))
-                {
+                        (buf[i + j] > 0x7e && (buf[i + j] & 0xff) < 0xa1)) {
                     fw.write(".");
                 }
                 // Output string
-                else
-                {
+                else {
                     String s = String.valueOf((char) buf[i + j]);
                     fw.write(s);
                 }
diff --git a/core/src/main/java/flex/messaging/log/LoggingHttpServletRequestWrapper.java b/core/src/main/java/flex/messaging/log/LoggingHttpServletRequestWrapper.java
index e5fa369..49168d4 100644
--- a/core/src/main/java/flex/messaging/log/LoggingHttpServletRequestWrapper.java
+++ b/core/src/main/java/flex/messaging/log/LoggingHttpServletRequestWrapper.java
@@ -27,10 +27,9 @@
 
 /**
  * Theis class wraps the servlet request so we can capture the body bytes
- * and log them if an unexpected error occurs in the request. 
+ * and log them if an unexpected error occurs in the request.
  */
-public class LoggingHttpServletRequestWrapper extends HttpServletRequestWrapper
-{
+public class LoggingHttpServletRequestWrapper extends HttpServletRequestWrapper {
     /**
      * Body data.
      */
@@ -38,10 +37,10 @@
 
     /**
      * Constructor.
+     *
      * @param parent the parent HttpServletRequest to wrap
      */
-    public LoggingHttpServletRequestWrapper(HttpServletRequest parent)
-    {
+    public LoggingHttpServletRequestWrapper(HttpServletRequest parent) {
         super(parent);
     }
 
@@ -50,14 +49,12 @@
      *
      * @throws IOException if there is a problem reading the request data
      */
-    public void doReadBody() throws IOException
-    {
+    public void doReadBody() throws IOException {
 
         // Get length of the content
         int length = super.getContentLength();
 
-        if (length > 0)
-        {
+        if (length > 0) {
             // Instantiate ByteArrayOutputStream
             ByteArrayOutputStream out = new ByteArrayOutputStream(length);
             InputStream in = super.getInputStream();
@@ -68,12 +65,10 @@
             // To process the body message
             // -------------------------------
             int remain = length;
-            while (remain > 0)
-            {
+            while (remain > 0) {
                 // Keep the data
                 int readLen = in.read(bodyByte);
-                if (readLen <= 0)
-                {
+                if (readLen <= 0) {
                     break;
                 }
                 // Write the body information
@@ -91,13 +86,12 @@
 
     /**
      * Returns an input stream backed by the saved body data.
+     *
      * @return ServletInputStream the Servlet input stream object
      * @throws IOException if we can not get the Servlet input stream
      */
-    public ServletInputStream getInputStream() throws IOException
-    {
-        if (this._bodyInfoData != null)
-        {
+    public ServletInputStream getInputStream() throws IOException {
+        if (this._bodyInfoData != null) {
             return new ExServletInputStream(new ByteArrayInputStream(this._bodyInfoData));
         }
         return super.getInputStream();
@@ -110,8 +104,7 @@
      * <p>
      * Used to allow the servlet request wrapper to return a stream backed by the already consumed body data.</p>
      */
-    private static class ExServletInputStream extends ServletInputStream
-    {
+    private static class ExServletInputStream extends ServletInputStream {
         /**
          * InputStream Object.
          */
@@ -119,10 +112,10 @@
 
         /**
          * Constructor.
+         *
          * @param inputStream the input stream
          */
-        ExServletInputStream(InputStream inputStream)
-        {
+        ExServletInputStream(InputStream inputStream) {
             this._inputStream = inputStream;
         }
 
@@ -130,53 +123,43 @@
         // --------------------------------
         // The following methods are overridden.
         // --------------------------------
-        public int readLine(byte[] b, int off, int len) throws IOException
-        {
+        public int readLine(byte[] b, int off, int len) throws IOException {
             throw new UnsupportedOperationException("This method is not extended");
         }
 
-        public int read(byte[] b, int off, int len) throws IOException
-        {
+        public int read(byte[] b, int off, int len) throws IOException {
             return this._inputStream.read(b, off, len);
         }
 
-        public int read(byte[] b) throws IOException
-        {
+        public int read(byte[] b) throws IOException {
             return this._inputStream.read(b);
         }
 
-        public void mark(int readlimit)
-        {
+        public void mark(int readlimit) {
             this._inputStream.mark(readlimit);
         }
 
-        public long skip(long n) throws IOException
-        {
+        public long skip(long n) throws IOException {
             return this._inputStream.skip(n);
         }
 
-        public void reset() throws IOException
-        {
+        public void reset() throws IOException {
             this._inputStream.reset();
         }
 
-        public int read() throws IOException
-        {
+        public int read() throws IOException {
             return this._inputStream.read();
         }
 
-        public boolean markSupported()
-        {
+        public boolean markSupported() {
             return _inputStream.markSupported();
         }
 
-        public void close() throws IOException
-        {
+        public void close() throws IOException {
             this._inputStream.close();
         }
 
-        public int available() throws IOException
-        {
+        public int available() throws IOException {
             return this._inputStream.available();
         }
         // --------------------------------
diff --git a/core/src/main/java/flex/messaging/log/ServletLogTarget.java b/core/src/main/java/flex/messaging/log/ServletLogTarget.java
index ca867b9..1753664 100644
--- a/core/src/main/java/flex/messaging/log/ServletLogTarget.java
+++ b/core/src/main/java/flex/messaging/log/ServletLogTarget.java
@@ -22,18 +22,16 @@
  * This is a log target which uses the servlet context in order to log
  * messages.
  */
-public class ServletLogTarget extends LineFormattedTarget
-{
+public class ServletLogTarget extends LineFormattedTarget {
     static ServletContext context;
 
     /**
      * This method must be called during startup to give this target a reference
      * to the ServletContext.
-     * @param ctx the servlet context
      *
+     * @param ctx the servlet context
      */
-    public static void setServletContext(ServletContext ctx)
-    {
+    public static void setServletContext(ServletContext ctx) {
         context = ctx;
     }
 
@@ -46,8 +44,7 @@
     /**
      * Default constructor.
      */
-    public ServletLogTarget()
-    {
+    public ServletLogTarget() {
         super();
     }
 
@@ -55,22 +52,18 @@
 
     /**
      * Log a message via the servlet context.
+     *
      * @param message the message to log.
      */
     @Override
-    protected void internalLog(String message)
-    {
-        if (context == null)
-        {
-            if (!warned)
-            {
+    protected void internalLog(String message) {
+        if (context == null) {
+            if (!warned) {
                 System.out.println("**** No servlet context set in ServletLogTarget - logging disabled.");
                 warned = true;
             }
-        }
-        else
-        {
-          context.log(message);
+        } else {
+            context.log(message);
         }
     }
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/messages/AbstractMessage.java b/core/src/main/java/flex/messaging/messages/AbstractMessage.java
index a9f43db..658c180 100644
--- a/core/src/main/java/flex/messaging/messages/AbstractMessage.java
+++ b/core/src/main/java/flex/messaging/messages/AbstractMessage.java
@@ -33,10 +33,9 @@
 /**
  * This is the default implementation of Message, which
  * provides a convenient base for behavior and associations
- * common to all endpoints. 
+ * common to all endpoints.
  */
-public abstract class AbstractMessage implements Message, Cloneable
-{
+public abstract class AbstractMessage implements Message, Cloneable {
     /**
      * This number was generated using the 'serialver' command line tool.
      * This number should remain consistent with the version used by
@@ -61,7 +60,7 @@
     protected String messageId;
     protected long timestamp;
     protected long timeToLive;
-    
+
     protected Map headers;
     protected Object body;
 
@@ -70,136 +69,122 @@
 
     /**
      * Returns the client id.
-     * 
+     *
      * @return The client id.
      */
-    public Object getClientId()
-    {
+    public Object getClientId() {
         return clientId;
     }
 
     /**
      * Sets the client id.
-     * 
+     *
      * @param clientId The client id.
      */
-    public void setClientId(Object clientId)
-    {
+    public void setClientId(Object clientId) {
         this.clientId = clientId;
         clientIdBytes = null;
-    }    
+    }
 
     /**
      * Returns the message id.
-     * 
+     *
      * @return The message id.
      */
-    public String getMessageId()
-    {
+    public String getMessageId() {
         return messageId;
     }
 
     /**
      * Sets the message id.
-     * 
+     *
      * @param messageId The message id.
      */
-    public void setMessageId(String messageId)
-    {
+    public void setMessageId(String messageId) {
         this.messageId = messageId;
         messageIdBytes = null;
     }
 
     /**
      * Returns the timestamp.
-     * 
+     *
      * @return The timestamp.
      */
-    public long getTimestamp()
-    {
+    public long getTimestamp() {
         return timestamp;
     }
 
     /**
      * Sets the timestamp.
-     * 
+     *
      * @param timestamp The timestamp.
      */
-    public void setTimestamp(long timestamp)
-    {
+    public void setTimestamp(long timestamp) {
         this.timestamp = timestamp;
     }
 
     /**
      * Returns the time to live.
-     * 
+     *
      * @return The time to live.
      */
-    public long getTimeToLive()
-    {
+    public long getTimeToLive() {
         return timeToLive;
     }
 
     /**
      * Sets the time to live.
-     * 
+     *
      * @param timeToLive The time to live.
      */
-    public void setTimeToLive(long timeToLive)
-    {
+    public void setTimeToLive(long timeToLive) {
         this.timeToLive = timeToLive;
     }
 
     /**
      * Returns the body.
-     * 
+     *
      * @return the body.
      */
-    public Object getBody()
-    {
+    public Object getBody() {
         return body;
     }
-    
+
 
     /**
      * Sets the body.
-     * 
+     *
      * @param body The body.
      */
-    public void setBody(Object body)
-    {
+    public void setBody(Object body) {
         this.body = body;
     }
 
     /**
      * Returns the destination id.
-     * 
+     *
      * @return The destination id.
      */
-    public String getDestination()
-    {
+    public String getDestination() {
         return destination;
     }
 
     /**
      * Sets the destination id.
-     * 
+     *
      * @param destination The destination id.
      */
-    public void setDestination(String destination)
-    {
+    public void setDestination(String destination) {
         this.destination = destination;
     }
 
     /**
      * Returns the headers.
-     * 
+     *
      * @return The headers.
      */
-    public Map getHeaders()
-    {
-        if (headers == null)
-        {
+    public Map getHeaders() {
+        if (headers == null) {
             headers = new HashMap();
         }
         return headers;
@@ -207,13 +192,11 @@
 
     /**
      * Sets the headers.
-     * 
+     *
      * @param newHeaders The new headers to set.
      */
-    public void setHeaders(Map newHeaders)
-    {
-        for (Iterator iter = newHeaders.entrySet().iterator(); iter.hasNext(); )
-        {
+    public void setHeaders(Map newHeaders) {
+        for (Iterator iter = newHeaders.entrySet().iterator(); iter.hasNext(); ) {
             Map.Entry entry = (Map.Entry) iter.next();
             String propName = (String) entry.getKey();
             setHeader(propName, entry.getValue());
@@ -222,22 +205,21 @@
 
     /**
      * Returns the header value associated with the header name, or null.
+     *
      * @param headerName the header name
      * @return The header value associaged with the header name.
      */
-    public Object getHeader(String headerName)
-    {
-        return headers != null? headers.get(headerName) : null;
+    public Object getHeader(String headerName) {
+        return headers != null ? headers.get(headerName) : null;
     }
 
     /**
      * Sets the header name and value.
-     * 
+     *
      * @param headerName The header name.
-     * @param value The header value.
+     * @param value      The header value.
      */
-    public void setHeader(String headerName, Object value)
-    {
+    public void setHeader(String headerName, Object value) {
         if (headers == null)
             headers = new HashMap();
 
@@ -249,32 +231,28 @@
 
     /**
      * Determines whether the header exists.
+     *
      * @param headerName the header name
      * @return True if the header exists.
      */
-    public boolean headerExists(String headerName)
-    {
+    public boolean headerExists(String headerName) {
         return (headers != null && headers.containsKey(headerName));
     }
 
-    public boolean equals(Object o)
-    {
-        if (o instanceof Message)
-        {
+    public boolean equals(Object o) {
+        if (o instanceof Message) {
             if (messageId == null)
                 return this == o;
 
             Message m = (Message) o;
-            if (m.getMessageId().equals(this.getMessageId()))
-            {
+            if (m.getMessageId().equals(this.getMessageId())) {
                 return true;
             }
         }
-        return false;        
+        return false;
     }
 
-    public int hashCode()
-    {
+    public int hashCode() {
         if (messageId == null)
             return super.hashCode();
         return messageId.hashCode();
@@ -282,77 +260,66 @@
 
     /**
      * Returns a category to use when logging against this message type.
+     *
      * @return String the log category
      */
-    public String logCategory() 
-    {
-       return LogCategories.MESSAGE_GENERAL;
+    public String logCategory() {
+        return LogCategories.MESSAGE_GENERAL;
     }
 
-    public String toString()
-    {
+    public String toString() {
         return toString(1);
     }
 
-    public String toString(int indent)
-    {
-        return toStringHeader(indent) + toStringFields(indent+1);
+    public String toString(int indent) {
+        return toStringHeader(indent) + toStringFields(indent + 1);
     }
 
     /**
-     *
-     * 
      * While this class itself does not implement java.io.Externalizable,
      * SmallMessage implementations will typically use Externalizable to
      * serialize themselves in a smaller form. This method supports this
      * functionality by implementing Externalizable.readExternal(ObjectInput) to
      * deserialize the properties for this abstract base class.
      */
-    public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
-    {
+    public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException {
         short[] flagsArray = readFlags(input);
 
-        for (int i = 0; i < flagsArray.length; i++)
-        {
+        for (int i = 0; i < flagsArray.length; i++) {
             short flags = flagsArray[i];
             short reservedPosition = 0;
 
-            if (i == 0)
-            {
+            if (i == 0) {
                 if ((flags & BODY_FLAG) != 0)
                     readExternalBody(input);
-        
+
                 if ((flags & CLIENT_ID_FLAG) != 0)
                     clientId = input.readObject();
-        
+
                 if ((flags & DESTINATION_FLAG) != 0)
-                    destination = (String)input.readObject();
-        
+                    destination = (String) input.readObject();
+
                 if ((flags & HEADERS_FLAG) != 0)
-                    headers = (Map)input.readObject();
-        
+                    headers = (Map) input.readObject();
+
                 if ((flags & MESSAGE_ID_FLAG) != 0)
-                    messageId = (String)input.readObject();
-        
+                    messageId = (String) input.readObject();
+
                 if ((flags & TIMESTAMP_FLAG) != 0)
-                    timestamp = ((Number)input.readObject()).longValue();
-        
+                    timestamp = ((Number) input.readObject()).longValue();
+
                 if ((flags & TIME_TO_LIVE_FLAG) != 0)
-                    timeToLive = ((Number)input.readObject()).longValue();
+                    timeToLive = ((Number) input.readObject()).longValue();
 
                 reservedPosition = 7;
-            }
-            else if (i == 1)
-            {
-                if ((flags & CLIENT_ID_BYTES_FLAG) != 0)
-                {
-                    clientIdBytes = (byte[])input.readObject();
+            } else if (i == 1) {
+                if ((flags & CLIENT_ID_BYTES_FLAG) != 0) {
+                    clientIdBytes = (byte[]) input.readObject();
                     clientId = UUIDUtils.fromByteArray(clientIdBytes);
                 }
-        
-                if ((flags & MESSAGE_ID_BYTES_FLAG) != 0)
-                {
-                    messageIdBytes = (byte[])input.readObject();
+
+                if ((flags & MESSAGE_ID_BYTES_FLAG) != 0) {
+                    messageIdBytes = (byte[]) input.readObject();
                     messageId = UUIDUtils.fromByteArray(messageIdBytes);
                 }
 
@@ -361,12 +328,9 @@
 
             // For forwards compatibility, read in any other flagged objects to
             // preserve the integrity of the input stream...
-            if ((flags >> reservedPosition) != 0)
-            {
-                for (short j = reservedPosition; j < 6; j++)
-                {
-                    if (((flags >> j) & 1) != 0)
-                    {
+            if ((flags >> reservedPosition) != 0) {
+                for (short j = reservedPosition; j < 6; j++) {
+                    if (((flags >> j) & 1) != 0) {
                         input.readObject();
                     }
                 }
@@ -375,20 +339,17 @@
     }
 
     /**
-     *
-     * 
      * While this class itself does not implement java.io.Externalizable,
      * SmallMessage implementations will typically use Externalizable to
      * serialize themselves in a smaller form. This method supports this
      * functionality by implementing Externalizable.writeExternal(ObjectOutput)
      * to efficiently serialize the properties for this abstract base class.
      */
-    public void writeExternal(ObjectOutput output) throws IOException
-    {
+    public void writeExternal(ObjectOutput output) throws IOException {
         short flags = 0;
 
         if (clientIdBytes == null && clientId != null && clientId instanceof String)
-            clientIdBytes = UUIDUtils.toByteArray((String)clientId);
+            clientIdBytes = UUIDUtils.toByteArray((String) clientId);
 
         if (messageIdBytes == null && messageId != null)
             messageIdBytes = UUIDUtils.toByteArray(messageId);
@@ -458,19 +419,15 @@
             output.writeObject(messageIdBytes);
     }
 
-    public Object clone() 
-    {
+    public Object clone() {
         AbstractMessage m = null;
-        try 
-        {
+        try {
             m = (AbstractMessage) super.clone();
 
             /* NOTE: this is not cloning the body - just the headers */
             if (headers != null)
                 m.headers = (HashMap) ((HashMap) headers).clone();
-        }
-        catch (CloneNotSupportedException exc) 
-        {
+        } catch (CloneNotSupportedException exc) {
             // can't happen..
         }
         return m;
@@ -478,66 +435,60 @@
 
     /**
      * Implements Comparable. Compares this message with the other message,
-     * according to the message priority header value (if one exists). 
+     * according to the message priority header value (if one exists).
+     *
      * @param otherMessage the message to compare with
      * @return int return 1 if the priority is lower than the other message, 0 if equal and -1 if higher
      */
-    public int compareTo(Message otherMessage) 
-    {
+    public int compareTo(Message otherMessage) {
         Object priorityHeader = getHeader(PRIORITY_HEADER);
-        int thisPriority = priorityHeader == null? DEFAULT_PRIORITY : ((Integer)priorityHeader).intValue();
+        int thisPriority = priorityHeader == null ? DEFAULT_PRIORITY : ((Integer) priorityHeader).intValue();
         priorityHeader = otherMessage.getHeader(PRIORITY_HEADER);
-        int otherPriority = priorityHeader == null? DEFAULT_PRIORITY : ((Integer)priorityHeader).intValue();
+        int otherPriority = priorityHeader == null ? DEFAULT_PRIORITY : ((Integer) priorityHeader).intValue();
         // Note that lower priority goes last.
-        return (thisPriority < otherPriority? 1 : (thisPriority == otherPriority? 0 : -1));
+        return (thisPriority < otherPriority ? 1 : (thisPriority == otherPriority ? 0 : -1));
     }
 
-    static final String [] indentLevels = 
-        {"", "  ", "    ", "      ", "        ","          "};
+    static final String[] indentLevels =
+            {"", "  ", "    ", "      ", "        ", "          "};
 
-    protected String getIndent(int indentLevel) 
-    {
+    protected String getIndent(int indentLevel) {
         if (indentLevel < indentLevels.length) return indentLevels[indentLevel];
         StringBuffer sb = new StringBuffer();
-        sb.append(indentLevels[indentLevels.length-1]);
+        sb.append(indentLevels[indentLevels.length - 1]);
         indentLevel -= indentLevels.length - 1;
         for (int i = 0; i < indentLevel; i++)
             sb.append("  ");
         return sb.toString();
     }
 
-    protected String getFieldSeparator(int indentLevel) 
-    {
+    protected String getFieldSeparator(int indentLevel) {
         String indStr = getIndent(indentLevel);
-        if (indentLevel > 0) 
+        if (indentLevel > 0)
             indStr = StringUtils.NEWLINE + indStr;
-        else 
+        else
             indStr = " ";
         return indStr;
     }
 
-    protected String toStringHeader(int indentLevel) 
-    {
+    protected String toStringHeader(int indentLevel) {
         String s = "Flex Message";
         s += " (" + getClass().getName() + ") ";
         return s;
     }
 
-    protected String toStringFields(int indentLevel)
-    {
-        if (headers != null)
-        {
-            String sep = getFieldSeparator(indentLevel); 
+    protected String toStringFields(int indentLevel) {
+        if (headers != null) {
+            String sep = getFieldSeparator(indentLevel);
             StringBuilder sb = new StringBuilder();
-            for (Iterator i = headers.entrySet().iterator(); i.hasNext();)
-            {
+            for (Iterator i = headers.entrySet().iterator(); i.hasNext(); ) {
                 Map.Entry e = (Map.Entry) i.next();
                 String key = e.getKey().toString();
                 sb.append(sep).append("hdr(").append(key).append(") = ");
                 if (Log.isExcludedProperty(key))
                     sb.append(Log.VALUE_SUPRESSED);
                 else
-                    sb.append(bodyToString(e.getValue(), indentLevel+1));
+                    sb.append(bodyToString(e.getValue(), indentLevel + 1));
             }
             return sb.toString();
         }
@@ -545,76 +496,64 @@
     }
 
     /**
-     * This is usually an array so might as well format it nicely in 
+     * This is usually an array so might as well format it nicely in
      * this case.
      */
-    protected final String bodyToString(Object body, int indentLevel) 
-    {
+    protected final String bodyToString(Object body, int indentLevel) {
         return bodyToString(body, indentLevel, null);
     }
 
     /**
-     * This is usually an array so might as well format it nicely in 
+     * This is usually an array so might as well format it nicely in
      * this case.
      */
-    protected final String bodyToString(Object body, int indentLevel, Map visited) 
-    {
-        try 
-        {
+    protected final String bodyToString(Object body, int indentLevel, Map visited) {
+        try {
             indentLevel = indentLevel + 1;
             if (visited == null && indentLevel > 18)
                 return StringUtils.NEWLINE + getFieldSeparator(indentLevel) + "<..max-depth-reached..>";
             return internalBodyToString(body, indentLevel, visited);
-        }
-        catch (RuntimeException exc) 
-        {
+        } catch (RuntimeException exc) {
             return "Exception in body toString: " + ExceptionUtil.toString(exc);
         }
     }
 
-    protected String internalBodyToString(Object body, int indentLevel)     
-    {
+    protected String internalBodyToString(Object body, int indentLevel) {
         return internalBodyToString(body, indentLevel, null);
     }
 
-    protected String internalBodyToString(Object body, int indentLevel, Map visited)
-    {
-        if (body instanceof Object[]) 
-        {
+    protected String internalBodyToString(Object body, int indentLevel, Map visited) {
+        if (body instanceof Object[]) {
             if ((visited = checkVisited(visited, body)) == null)
                 return "<--";
 
             String sep = getFieldSeparator(indentLevel);
             StringBuffer sb = new StringBuffer();
-            Object [] arr = (Object[]) body;
-            sb.append(getFieldSeparator(indentLevel-1));
+            Object[] arr = (Object[]) body;
+            sb.append(getFieldSeparator(indentLevel - 1));
             sb.append("[");
             sb.append(sep);
-            for (int i = 0; i < arr.length; i++)
-            {
-                if (i != 0) 
-                {
+            for (int i = 0; i < arr.length; i++) {
+                if (i != 0) {
                     sb.append(",");
                     sb.append(sep);
                 }
-                sb.append(bodyToString(arr[i],indentLevel,visited));
+                sb.append(bodyToString(arr[i], indentLevel, visited));
             }
-            sb.append(getFieldSeparator(indentLevel-1));
+            sb.append(getFieldSeparator(indentLevel - 1));
             sb.append("]");
             return sb.toString();
         }
         // This is here so we can format maps with Object[] as values properly
         // and with the proper indent
-        else if (body instanceof Map)
-        {
+        else if (body instanceof Map) {
             if ((visited = checkVisited(visited, body)) == null)
                 return "<--";
             Map bodyMap = (Map) body;
             StringBuffer buf = new StringBuffer();
             buf.append("{");
             Iterator it = bodyMap.entrySet().iterator();
-            while(it.hasNext())
-            {
+            while (it.hasNext()) {
                 Map.Entry e = (Map.Entry) it.next();
                 Object key = e.getKey();
                 Object value = e.getValue();
@@ -632,51 +571,42 @@
             }
             buf.append("}");
             return buf.toString();
-        }
-        else if (body instanceof AbstractMessage) 
-        {
-            return ((AbstractMessage)body).toString(indentLevel);
-        }
-        else if (body != null)
+        } else if (body instanceof AbstractMessage) {
+            return ((AbstractMessage) body).toString(indentLevel);
+        } else if (body != null)
             return body.toString();
         else return "null";
     }
 
     /**
-     *
      * Used by the readExtenral method to read the body.
-     *  
+     *
      * @param input Object input.
      * @throws IOException
      * @throws ClassNotFoundException
      */
-    protected void readExternalBody(ObjectInput input) throws IOException, ClassNotFoundException
-    {
+    protected void readExternalBody(ObjectInput input) throws IOException, ClassNotFoundException {
         body = input.readObject();
     }
 
     /**
-     *
      * To support efficient serialization for SmallMessage implementations,
      * this utility method reads in the property flags from an ObjectInput
      * stream. Flags are read in one byte at a time. Flags make use of
      * sign-extension so that if the high-bit is set to 1 this indicates that
      * another set of flags follows.
-     * 
-     * @return The array of property flags. 
+     *
+     * @return The array of property flags.
      */
-    protected short[] readFlags(ObjectInput input) throws IOException
-    {
+    protected short[] readFlags(ObjectInput input) throws IOException {
         boolean hasNextFlag = true;
         short[] flagsArray = new short[2];
         int i = 0;
 
-        while (hasNextFlag)
-        {
-            short flags = (short)input.readUnsignedByte();
-            if (i == flagsArray.length)
-            {
-                short[] tempArray = new short[i*2];
+        while (hasNextFlag) {
+            short flags = (short) input.readUnsignedByte();
+            if (i == flagsArray.length) {
+                short[] tempArray = new short[i * 2];
                 System.arraycopy(flagsArray, 0, tempArray, 0, flagsArray.length);
                 flagsArray = tempArray;
             }
@@ -692,19 +622,16 @@
     }
 
     /**
-     *
      * Used by writeExternal method to write the body.
-     * 
+     *
      * @param output The object output.
      * @throws IOException
      */
-    protected void writeExternalBody(ObjectOutput output) throws IOException
-    {
+    protected void writeExternalBody(ObjectOutput output) throws IOException {
         output.writeObject(body);
     }
 
-    private Map checkVisited(Map visited, Object obj)
-    {
+    private Map checkVisited(Map visited, Object obj) {
         if (visited == null)
             visited = new IdentityHashMap();
         else if (visited.get(obj) != null)
diff --git a/core/src/main/java/flex/messaging/messages/AcknowledgeMessage.java b/core/src/main/java/flex/messaging/messages/AcknowledgeMessage.java
index 0466ae5..4f7421d 100644
--- a/core/src/main/java/flex/messaging/messages/AcknowledgeMessage.java
+++ b/core/src/main/java/flex/messaging/messages/AcknowledgeMessage.java
@@ -23,13 +23,11 @@
 import flex.messaging.util.UUIDUtils;
 
 /**
- *
  * This is the type of message returned by the MessageBroker
  * to endpoints after the broker has routed an endpoint's message
  * to a service.
  */
-public class AcknowledgeMessage extends AsyncMessage
-{
+public class AcknowledgeMessage extends AsyncMessage {
     /**
      * This number was generated using the 'serialver' command line tool.
      * This number should remain consistent with the version used by
@@ -40,8 +38,7 @@
     /**
      * Default constructor.
      */
-    public AcknowledgeMessage()
-    {
+    public AcknowledgeMessage() {
         this.messageId = UUIDUtils.createUUID(false);
         this.timestamp = System.currentTimeMillis();
     }
@@ -49,24 +46,19 @@
     /**
      *
      */
-    public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
-    {
+    public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException {
         super.readExternal(input);
 
         short[] flagsArray = readFlags(input);
-        for (int i = 0; i < flagsArray.length; i++)
-        {
+        for (int i = 0; i < flagsArray.length; i++) {
             short flags = flagsArray[i];
             short reservedPosition = 0;
 
             // For forwards compatibility, read in any other flagged objects
             // to preserve the integrity of the input stream...
-            if ((flags >> reservedPosition) != 0)
-            {
-                for (short j = reservedPosition; j < 6; j++)
-                {
-                    if (((flags >> j) & 1) != 0)
-                    {
+            if ((flags >> reservedPosition) != 0) {
+                for (short j = reservedPosition; j < 6; j++) {
+                    if (((flags >> j) & 1) != 0) {
                         input.readObject();
                     }
                 }
@@ -77,8 +69,7 @@
     /**
      *
      */
-    public Message getSmallMessage()
-    {
+    public Message getSmallMessage() {
         if (getClass() == AcknowledgeMessage.class)
             return new AcknowledgeMessageExt(this);
         return null;
@@ -87,8 +78,7 @@
     /**
      *
      */
-    public void writeExternal(ObjectOutput output) throws IOException
-    {
+    public void writeExternal(ObjectOutput output) throws IOException {
         super.writeExternal(output);
 
         short flags = 0;
diff --git a/core/src/main/java/flex/messaging/messages/AcknowledgeMessageExt.java b/core/src/main/java/flex/messaging/messages/AcknowledgeMessageExt.java
index 9c6e40a..ba0f552 100644
--- a/core/src/main/java/flex/messaging/messages/AcknowledgeMessageExt.java
+++ b/core/src/main/java/flex/messaging/messages/AcknowledgeMessageExt.java
@@ -26,29 +26,24 @@
  *
  */
 public class AcknowledgeMessageExt extends AcknowledgeMessage implements
-        Externalizable, ClassAlias
-{
-    private static final long serialVersionUID = -8764729006642310394L;                                                                                           
+        Externalizable, ClassAlias {
+    private static final long serialVersionUID = -8764729006642310394L;
     public static final String CLASS_ALIAS = "DSK";
 
-    public AcknowledgeMessageExt()
-    {
+    public AcknowledgeMessageExt() {
         this(null);
     }
 
-    public AcknowledgeMessageExt(AcknowledgeMessage message)
-    {
+    public AcknowledgeMessageExt(AcknowledgeMessage message) {
         super();
         _message = message;
     }
 
-    public String getAlias()
-    {
+    public String getAlias() {
         return CLASS_ALIAS;
     }
 
-    public void writeExternal(ObjectOutput output) throws IOException
-    {
+    public void writeExternal(ObjectOutput output) throws IOException {
         if (_message != null)
             _message.writeExternal(output);
         else
diff --git a/core/src/main/java/flex/messaging/messages/AsyncMessage.java b/core/src/main/java/flex/messaging/messages/AsyncMessage.java
index efb4b9a..eaea03b 100644
--- a/core/src/main/java/flex/messaging/messages/AsyncMessage.java
+++ b/core/src/main/java/flex/messaging/messages/AsyncMessage.java
@@ -27,8 +27,7 @@
  * This type of message contains information necessary to perform
  * point-to-point or publish-subscribe messaging.
  */
-public class AsyncMessage extends AbstractMessage implements SmallMessage
-{
+public class AsyncMessage extends AbstractMessage implements SmallMessage {
     /**
      * This number was generated using the 'serialver' command line tool.
      * This number should remain consistent with the version used by
@@ -52,8 +51,7 @@
     /**
      * Default constructor for <code>AsyncMessage</code>.
      */
-    public AsyncMessage()
-    {
+    public AsyncMessage() {
         // No-op.
     }
 
@@ -62,8 +60,7 @@
      *
      * @return The correlation id.
      */
-    public String getCorrelationId()
-    {
+    public String getCorrelationId() {
         return correlationId;
     }
 
@@ -72,40 +69,35 @@
      *
      * @param correlationId The correlationId for the message.
      */
-    public void setCorrelationId(String correlationId)
-    {
+    public void setCorrelationId(String correlationId) {
         this.correlationId = correlationId;
     }
 
     /**
      *
      */
-    public Message getSmallMessage()
-    {
-        return getClass() == AsyncMessage.class? new AsyncMessageExt(this) : null;
+    public Message getSmallMessage() {
+        return getClass() == AsyncMessage.class ? new AsyncMessageExt(this) : null;
     }
 
     /**
      *
      */
-    @Override public void readExternal(ObjectInput input)throws IOException, ClassNotFoundException
-    {
+    @Override
+    public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException {
         super.readExternal(input);
 
         short[] flagsArray = readFlags(input);
-        for (int i = 0; i < flagsArray.length; i++)
-        {
+        for (int i = 0; i < flagsArray.length; i++) {
             short flags = flagsArray[i];
             short reservedPosition = 0;
 
-            if (i == 0)
-            {
+            if (i == 0) {
                 if ((flags & CORRELATION_ID_FLAG) != 0)
-                    correlationId = (String)input.readObject();
+                    correlationId = (String) input.readObject();
 
-                if ((flags & CORRELATION_ID_BYTES_FLAG) != 0)
-                {
-                    correlationIdBytes = (byte[])input.readObject();
+                if ((flags & CORRELATION_ID_BYTES_FLAG) != 0) {
+                    correlationIdBytes = (byte[]) input.readObject();
                     correlationId = UUIDUtils.fromByteArray(correlationIdBytes);
                 }
 
@@ -114,10 +106,8 @@
 
             // For forwards compatibility, read in any other flagged objects
             // to preserve the integrity of the input stream...
-            if ((flags >> reservedPosition) != 0)
-            {
-                for (short j = reservedPosition; j < 6; j++)
-                {
+            if ((flags >> reservedPosition) != 0) {
+                for (short j = reservedPosition; j < 6; j++) {
                     if (((flags >> j) & 1) != 0)
                         input.readObject();
                 }
@@ -128,8 +118,8 @@
     /**
      *
      */
-    @Override public void writeExternal(ObjectOutput output) throws IOException
-    {
+    @Override
+    public void writeExternal(ObjectOutput output) throws IOException {
         super.writeExternal(output);
 
         if (correlationIdBytes == null && correlationId != null)
@@ -152,8 +142,8 @@
             output.writeObject(correlationIdBytes);
     }
 
-    @Override protected String toStringFields(int indentLevel)
-    {
+    @Override
+    protected String toStringFields(int indentLevel) {
         String sep = getFieldSeparator(indentLevel);
         String s = sep + "clientId = " + (Log.isExcludedProperty("clientId") ? Log.VALUE_SUPRESSED : clientId);
         s += sep + "correlationId = " + (Log.isExcludedProperty("correlationId") ? Log.VALUE_SUPRESSED : correlationId);
diff --git a/core/src/main/java/flex/messaging/messages/AsyncMessageExt.java b/core/src/main/java/flex/messaging/messages/AsyncMessageExt.java
index 1c79363..9119269 100644
--- a/core/src/main/java/flex/messaging/messages/AsyncMessageExt.java
+++ b/core/src/main/java/flex/messaging/messages/AsyncMessageExt.java
@@ -25,29 +25,24 @@
 /**
  *
  */
-public class AsyncMessageExt extends AsyncMessage implements Externalizable, ClassAlias
-{
+public class AsyncMessageExt extends AsyncMessage implements Externalizable, ClassAlias {
     private static final long serialVersionUID = -5371460213241777011L;
     public static final String CLASS_ALIAS = "DSA";
 
-    public AsyncMessageExt()
-    {
+    public AsyncMessageExt() {
         super();
     }
 
-    public AsyncMessageExt(AsyncMessage message)
-    {
+    public AsyncMessageExt(AsyncMessage message) {
         super();
         _message = message;
     }
 
-    public String getAlias()
-    {
+    public String getAlias() {
         return CLASS_ALIAS;
     }
 
-    public void writeExternal(ObjectOutput output) throws IOException
-    {
+    public void writeExternal(ObjectOutput output) throws IOException {
         if (_message != null)
             _message.writeExternal(output);
         else
diff --git a/core/src/main/java/flex/messaging/messages/BatchableMessage.java b/core/src/main/java/flex/messaging/messages/BatchableMessage.java
index df11fb5..bc5e6bb 100644
--- a/core/src/main/java/flex/messaging/messages/BatchableMessage.java
+++ b/core/src/main/java/flex/messaging/messages/BatchableMessage.java
@@ -18,15 +18,12 @@
 
 /**
  * Implemented by messages that may be batched.
- *
- *
  */
-public interface BatchableMessage
-{
+public interface BatchableMessage {
     /**
      * Returns true if the message is batched.
-     * 
+     *
      * @return true if this message is batched
-    */
+     */
     boolean isBatched();
 }
diff --git a/core/src/main/java/flex/messaging/messages/CommandMessage.java b/core/src/main/java/flex/messaging/messages/CommandMessage.java
index 7e2ca85..72c3036 100644
--- a/core/src/main/java/flex/messaging/messages/CommandMessage.java
+++ b/core/src/main/java/flex/messaging/messages/CommandMessage.java
@@ -28,43 +28,44 @@
  * client and server. Subscribe/unsubscribe operations result in
  * CommandMessage transmissions, as do polling operations.
  */
-public class CommandMessage extends AsyncMessage
-{
-    /** Log category for <code>CommandMessage</code>.*/
+public class CommandMessage extends AsyncMessage {
+    /**
+     * Log category for <code>CommandMessage</code>.
+     */
     public static final String LOG_CATEGORY = LogCategories.MESSAGE_COMMAND;
 
     // THESE VALUES MUST BE THE SAME ON CLIENT AND SERVER
     /**
-     *  This operation is used to subscribe to a remote destination.
+     * This operation is used to subscribe to a remote destination.
      */
     public static final int SUBSCRIBE_OPERATION = 0;
 
     /**
-     *  This operation is used to unsubscribe from a remote destination.
+     * This operation is used to unsubscribe from a remote destination.
      */
     public static final int UNSUBSCRIBE_OPERATION = 1;
 
     /**
-     *  This operation is used to poll a remote destination for pending,
-     *  undelivered messages.
+     * This operation is used to poll a remote destination for pending,
+     * undelivered messages.
      */
     public static final int POLL_OPERATION = 2;
 
     /**
-     *  This operation is used by a remote destination to sync missed or cached messages
-     *  back to a client as a result of a client issued poll command.
+     * This operation is used by a remote destination to sync missed or cached messages
+     * back to a client as a result of a client issued poll command.
      */
     public static final int CLIENT_SYNC_OPERATION = 4;
 
     /**
-     *  This operation is used to test connectivity over the current channel to
-     *  the remote endpoint.
+     * This operation is used to test connectivity over the current channel to
+     * the remote endpoint.
      */
     public static final int CLIENT_PING_OPERATION = 5;
 
     /**
-     *  This operation is used to request a list of failover endpoint URIs
-     *  for the remote destination based on cluster membership.
+     * This operation is used to request a list of failover endpoint URIs
+     * for the remote destination based on cluster membership.
      */
     public static final int CLUSTER_REQUEST_OPERATION = 7;
 
@@ -98,14 +99,14 @@
      * This operation is used to indicate that a channel has disconnected.
      */
     public static final int DISCONNECT_OPERATION = 12;
-    
-    /**
-     *  This operation is used to trigger a client connect attempt.
-     */
-    public static final int TRIGGER_CONNECT_OPERATION = 13;     
 
     /**
-     *  This is the default operation for new CommandMessage instances.
+     * This operation is used to trigger a client connect attempt.
+     */
+    public static final int TRIGGER_CONNECT_OPERATION = 13;
+
+    /**
+     * This is the default operation for new CommandMessage instances.
      */
     public static final int UNKNOWN_OPERATION = 10000;
 
@@ -128,10 +129,10 @@
     public static final String SUBSCRIPTION_INVALIDATED_HEADER = "DSSubscriptionInvalidated";
 
     /**
-     *  Durable JMS subscriptions are preserved when an unsubscribe message
-     *  has this parameter set to true in its header.
+     * Durable JMS subscriptions are preserved when an unsubscribe message
+     * has this parameter set to true in its header.
      */
-    public static final String PRESERVE_DURABLE_HEADER= "DSPreserveDurable";
+    public static final String PRESERVE_DURABLE_HEADER = "DSPreserveDurable";
 
     /**
      * Header to indicate that the Channel needs the configuration from the
@@ -171,7 +172,6 @@
     public static final String NO_OP_POLL_HEADER = "DSNoOpPoll";
 
     /**
-     *
      * Internal header used to tag poll messages when a poll-wait must be suppressed.
      */
     public static final String SUPPRESS_POLL_WAIT_HEADER = "DSSuppressPollWait";
@@ -183,11 +183,11 @@
     public static final String CREDENTIALS_CHARSET_HEADER = "DSCredentialsCharset";
 
     /**
-     * Header to indicate the maximum number of messages a Consumer wants to 
+     * Header to indicate the maximum number of messages a Consumer wants to
      * receive per second.
      */
     public static final String MAX_FREQUENCY_HEADER = "DSMaxFrequency";
-    
+
     /**
      * Header that indicates the message is a heartbeat.
      */
@@ -197,14 +197,13 @@
      * Header that indicates the client application has successfully registered for push notifications.
      */
     public static final String PUSH_NOTIFICATION_REGISTERED_HEADER = "DSApplicationRegisteredForPush";
-    
+
     /**
      * Header that provides additional meta-information when the client has registered for push notifications.
      */
     public static final String PUSH_REGISTRATION_INFORMATION = "DSPushRegisteredInformation";
 
     /**
-     *
      * The position of the operation flag within all flags.
      * Constant used during serialization.
      */
@@ -221,10 +220,10 @@
      * The operation names that map to each of the operation constants above.
      * The constants in this list should remain parallel to the above constants
      */
-    static final String [] operationNames  = {
-        "subscribe", "unsubscribe", "poll", "unused3", "client_sync", "client_ping",
-        "unused6", "cluster_request", "login", "logout", "subscription_invalidate",
-        "multi_subscribe", "disconnect", "trigger_connect", "state_change"
+    static final String[] operationNames = {
+            "subscribe", "unsubscribe", "poll", "unused3", "client_sync", "client_ping",
+            "unused6", "cluster_request", "login", "logout", "subscription_invalidate",
+            "multi_subscribe", "disconnect", "trigger_connect", "state_change"
     };
 
     /**
@@ -238,8 +237,7 @@
      * timestamp for the message is set to the current system timestamp.
      * The operation is set to a default value of <code>UNKNOWN_OPERATION</code>.
      */
-    public CommandMessage()
-    {
+    public CommandMessage() {
         this.messageId = UUIDUtils.createUUID();
         this.timestamp = System.currentTimeMillis();
     }
@@ -251,8 +249,7 @@
      *
      * @param operation The operation for the <code>CommandMessage</code>; one of the operation constants.
      */
-    public CommandMessage(int operation)
-    {
+    public CommandMessage(int operation) {
         this();
         this.operation = operation;
     }
@@ -262,8 +259,7 @@
      *
      * @return The operation for this <code>CommandMessage</code>.
      */
-    public int getOperation()
-    {
+    public int getOperation() {
         return operation;
     }
 
@@ -272,21 +268,18 @@
      *
      * @param operation The operation for this <code>CommandMessage</code>.
      */
-    public void setOperation(int operation)
-    {
+    public void setOperation(int operation) {
         this.operation = operation;
     }
 
     /**
      *
      */
-    public Message getSmallMessage()
-    {
+    public Message getSmallMessage() {
         // We shouldn't use small messages for PING or LOGIN operations as the
         // messaging version handshake would not yet be complete... for now just
         // optimize POLL operations.
-        if (operation == POLL_OPERATION)
-        {
+        if (operation == POLL_OPERATION) {
             return new CommandMessageExt(this);
         }
 
@@ -294,12 +287,10 @@
     }
 
     /**
-     *
      * Debugging function which returns the name of the operation for
      * a given operation code.
      */
-    public static String operationToString(int operation)
-    {
+    public static String operationToString(int operation) {
         if (operation < 0 || operation >= operationNames.length)
             return "invalid." + operation;
         return operationNames[operation];
@@ -308,32 +299,26 @@
     /**
      *
      */
-    public void readExternal(ObjectInput input)throws IOException, ClassNotFoundException
-    {
+    public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException {
         super.readExternal(input);
 
         short[] flagsArray = readFlags(input);
-        for (int i = 0; i < flagsArray.length; i++)
-        {
+        for (int i = 0; i < flagsArray.length; i++) {
             short flags = flagsArray[i];
             short reservedPosition = 0;
 
-            if (i == 0)
-            {
+            if (i == 0) {
                 if ((flags & OPERATION_FLAG) != 0)
-                    operation = ((Number)input.readObject()).intValue();
+                    operation = ((Number) input.readObject()).intValue();
 
                 reservedPosition = 1;
             }
 
             // For forwards compatibility, read in any other flagged objects
             // to preserve the integrity of the input stream...
-            if ((flags >> reservedPosition) != 0)
-            {
-                for (short j = reservedPosition; j < 6; j++)
-                {
-                    if (((flags >> j) & 1) != 0)
-                    {
+            if ((flags >> reservedPosition) != 0) {
+                for (short j = reservedPosition; j < 6; j++) {
+                    if (((flags >> j) & 1) != 0) {
                         input.readObject();
                     }
                 }
@@ -342,24 +327,19 @@
     }
 
     /**
-     *
      * Utility method to pretty print a <code>CommandMessage</code>.
      *
      * @param indentLevel This method may be invoked recursively so this argument
-     *        allows nested messages to print relative to the current print stack.
+     *                    allows nested messages to print relative to the current print stack.
      */
-    protected String toStringFields(int indentLevel)
-    {
+    protected String toStringFields(int indentLevel) {
         String sep = getFieldSeparator(indentLevel);
         String s = sep + "operation = " + operationToString(operation);
         if (operation == SUBSCRIBE_OPERATION)
             s += sep + "selector = " + getHeader(SELECTOR_HEADER);
-        if (operation != LOGIN_OPERATION)
-        {
+        if (operation != LOGIN_OPERATION) {
             s += super.toStringFields(indentLevel);
-        }
-        else
-        {
+        } else {
             s += sep + "clientId =  " + clientId;
             s += sep + "destination =  " + destination;
             s += sep + "messageId =  " + messageId;
@@ -373,8 +353,7 @@
     /**
      *
      */
-    public void writeExternal(ObjectOutput output) throws IOException
-    {
+    public void writeExternal(ObjectOutput output) throws IOException {
         super.writeExternal(output);
 
         short flags = 0;
@@ -389,11 +368,9 @@
     }
 
     /**
-     *
      * Utility method to build the log category to use for logging <code>CommandMessage</code>s.
      */
-    public String logCategory()
-    {
+    public String logCategory() {
         return LOG_CATEGORY + "." + operationToString(operation);
     }
 }
diff --git a/core/src/main/java/flex/messaging/messages/CommandMessageExt.java b/core/src/main/java/flex/messaging/messages/CommandMessageExt.java
index 4507a89..d015b15 100644
--- a/core/src/main/java/flex/messaging/messages/CommandMessageExt.java
+++ b/core/src/main/java/flex/messaging/messages/CommandMessageExt.java
@@ -25,29 +25,24 @@
 /**
  *
  */
-public class CommandMessageExt extends CommandMessage implements Externalizable, ClassAlias
-{
+public class CommandMessageExt extends CommandMessage implements Externalizable, ClassAlias {
     private static final long serialVersionUID = -5371460213241777011L;
     public static final String CLASS_ALIAS = "DSC";
 
-    public CommandMessageExt()
-    {
+    public CommandMessageExt() {
         super();
     }
 
-    public CommandMessageExt(CommandMessage message)
-    {
+    public CommandMessageExt(CommandMessage message) {
         super();
         _message = message;
     }
 
-    public String getAlias()
-    {
+    public String getAlias() {
         return CLASS_ALIAS;
     }
 
-    public void writeExternal(ObjectOutput output) throws IOException
-    {
+    public void writeExternal(ObjectOutput output) throws IOException {
         if (_message != null)
             _message.writeExternal(output);
         else
diff --git a/core/src/main/java/flex/messaging/messages/ErrorMessage.java b/core/src/main/java/flex/messaging/messages/ErrorMessage.java
index 326dcce..dd525e6 100644
--- a/core/src/main/java/flex/messaging/messages/ErrorMessage.java
+++ b/core/src/main/java/flex/messaging/messages/ErrorMessage.java
@@ -23,11 +23,8 @@
 
 /**
  * A message describing a MessageException.
- *
- *
  */
-public class ErrorMessage extends AcknowledgeMessage
-{
+public class ErrorMessage extends AcknowledgeMessage {
     /**
      * This number was generated using the 'serialver' command line tool.
      * This number should remain consistent with the version used by
@@ -41,36 +38,30 @@
     public Object rootCause;
     public Map extendedData;
 
-    public ErrorMessage(MessageException mxe)
-    {
+    public ErrorMessage(MessageException mxe) {
         faultCode = mxe.getCode();
         faultString = mxe.getMessage();
         faultDetail = mxe.getDetails();
-        if (mxe.getRootCause() != null)
-        {
+        if (mxe.getRootCause() != null) {
             rootCause = mxe.getRootCauseErrorMessage();
         }
         Map extendedData = mxe.getExtendedData();
-        if (extendedData != null)
-        {
+        if (extendedData != null) {
             this.extendedData = extendedData;
         }
     }
 
-    public ErrorMessage()
-    {
+    public ErrorMessage() {
     }
 
     /**
      *
      */
-    public Message getSmallMessage()
-    {
+    public Message getSmallMessage() {
         return null;
     }
 
-    protected String toStringFields(int indentLevel) 
-    {
+    protected String toStringFields(int indentLevel) {
         String sep = getFieldSeparator(indentLevel);
         String s = super.toStringFields(indentLevel);
         s += sep + "code =  " + faultCode;
diff --git a/core/src/main/java/flex/messaging/messages/HTTPMessage.java b/core/src/main/java/flex/messaging/messages/HTTPMessage.java
index 9ee65d7..ac1be1a 100644
--- a/core/src/main/java/flex/messaging/messages/HTTPMessage.java
+++ b/core/src/main/java/flex/messaging/messages/HTTPMessage.java
@@ -31,13 +31,9 @@
  * The method takes values such as GET, POST,
  * HEAD etc.
  * </p>
- *
- *
  */
-public class HTTPMessage extends RPCMessage
-{
-    public HTTPMessage()
-    {
+public class HTTPMessage extends RPCMessage {
+    public HTTPMessage() {
     }
 
     /**
@@ -53,85 +49,67 @@
     protected Map httpHeaders;
     protected boolean recordHeaders;
 
-    public String getContentType()
-    {
+    public String getContentType() {
         return contentType;
     }
 
-    public void setContentType(String type)
-    {
+    public void setContentType(String type) {
         contentType = type;
     }
 
-    public String getMethod()
-    {
+    public String getMethod() {
         return method;
     }
 
-    public void setMethod(String m)
-    {
-        if (m != null)
-        {
+    public void setMethod(String m) {
+        if (m != null) {
             method = m.trim().toUpperCase();
-        }
-        else
-        {
+        } else {
             method = m;
         }
     }
 
-    public Map getHttpHeaders()
-    {
+    public Map getHttpHeaders() {
         return httpHeaders;
     }
 
-    public void setHttpHeaders(Map h)
-    {
+    public void setHttpHeaders(Map h) {
         httpHeaders = h;
     }
 
-    public void setUrl(String s)
-    {
-        try
-        {
+    public void setUrl(String s) {
+        try {
             url = URLDecoder.decode(s, "UTF-8");
-        }
-        catch (UnsupportedEncodingException e)
-        {
+        } catch (UnsupportedEncodingException e) {
             url = s;
         }
     }
 
-    public String getUrl()
-    {
+    public String getUrl() {
         return url;
     }
 
-    public boolean getRecordHeaders()
-    {
+    public boolean getRecordHeaders() {
         return recordHeaders;
     }
 
-    public void setRecordHeaders(boolean recordHeaders)
-    {
+    public void setRecordHeaders(boolean recordHeaders) {
         this.recordHeaders = recordHeaders;
     }
 
-    protected String toStringFields(int indentLevel)
-    {
+    protected String toStringFields(int indentLevel) {
         String sep = getFieldSeparator(indentLevel);
         StringBuilder sb = new StringBuilder();
         sb.append(sep).append("method = ").append(getMethod()).
-           append(sep).append("url = ").append(getUrl()).
-           append(sep).append("headers = ").append(getHeaders());
+                append(sep).append("url = ").append(getUrl()).
+                append(sep).append("headers = ").append(getHeaders());
         sb.append(super.toStringFields(indentLevel));
         return sb.toString();
     }
 
-    protected String internalBodyToString(Object body, int indentLevel) 
-    {
+    protected String internalBodyToString(Object body, int indentLevel) {
         return body instanceof String ?
-            StringUtils.prettifyString((String) body) :
-            super.internalBodyToString(body, indentLevel);
+                StringUtils.prettifyString((String) body) :
+                super.internalBodyToString(body, indentLevel);
     }
 }
diff --git a/core/src/main/java/flex/messaging/messages/Message.java b/core/src/main/java/flex/messaging/messages/Message.java
index 85c4397..a399b1f 100644
--- a/core/src/main/java/flex/messaging/messages/Message.java
+++ b/core/src/main/java/flex/messaging/messages/Message.java
@@ -30,8 +30,8 @@
 {
     // Message header name constants
     /**
-     *  This header is used to transport the FlexClient Id value in messages
-     *  sent clients to the server.
+     * This header is used to transport the FlexClient Id value in messages
+     * sent clients to the server.
      */
     String FLEX_CLIENT_ID_HEADER = "DSId";
 
@@ -47,7 +47,6 @@
     String ENDPOINT_HEADER = "DSEndpoint";
 
     /**
-     *
      * Used internally to enable/disable validation of the channel endpoint that a
      * message for a destination arrived over.
      */
@@ -76,9 +75,9 @@
     String REMOTE_CREDENTIALS_CHARSET_HEADER = "DSRemoteCredentialsCharset";
 
     /**
-     * Messages sent with a defined request timeout use this header. 
-     * The request timeout value is set on outbound messages by services or 
-     * channels and the value controls how long the corresponding MessageResponder 
+     * Messages sent with a defined request timeout use this header.
+     * The request timeout value is set on outbound messages by services or
+     * channels and the value controls how long the corresponding MessageResponder
      * will wait for an acknowledgement, result or fault response for the message
      * before timing out the request.
      */
@@ -90,9 +89,9 @@
     String SYNC_HEADER = "sync";
 
     /**
-     *  A status code can provide context about the nature of a response
-     *  message. For example, messages received from an HTTP based channel may
-     *  need to report the HTTP response status code (if available).
+     * A status code can provide context about the nature of a response
+     * message. For example, messages received from an HTTP based channel may
+     * need to report the HTTP response status code (if available).
      */
     String STATUS_CODE_HEADER = "DSStatusCode";
 
@@ -213,7 +212,7 @@
     /**
      * Sets a header on the message.
      *
-     * @param name The name of the header to set.
+     * @param name  The name of the header to set.
      * @param value The value for the header.
      */
     void setHeader(String name, Object value);
diff --git a/core/src/main/java/flex/messaging/messages/MessagePerformanceInfo.java b/core/src/main/java/flex/messaging/messages/MessagePerformanceInfo.java
index e61545e..a302d54 100644
--- a/core/src/main/java/flex/messaging/messages/MessagePerformanceInfo.java
+++ b/core/src/main/java/flex/messaging/messages/MessagePerformanceInfo.java
@@ -19,8 +19,6 @@
 import java.io.Serializable;
 
 /**
- *
- *
  * The MessagePerformanceInfo class is used to capture various metrics about
  * the sizing and timing of a message sent from a client to the server and its
  * response message, as well as pushed messages from the server to the client.
@@ -31,126 +29,94 @@
  * headers[MPII] - info for the client to server message poll message (non RTMP)
  * headers[MPIO] - info for the pushed message from server to client,
  * headers[MPIP] - info for the message from the client that caused the push message
- *
+ * <p>
  * It has a symmetric AS counterpart - MessagePerformanceInfo.as
  */
-public class MessagePerformanceInfo implements Serializable, Cloneable 
-{
+public class MessagePerformanceInfo implements Serializable, Cloneable {
     private static final long serialVersionUID = -8556484221291213962L;
 
     /**
-     *
-     *
-      * Size of message in Bytes (message types depends on what header this MPI is in)
-      */
+     * Size of message in Bytes (message types depends on what header this MPI is in)
+     */
     public long messageSize;
 
     /**
-     *
-     *
-      * Millisecond timestamp of when this message was sent
-      * (origin depends on on what header this MPI is in)
-      */
+     * Millisecond timestamp of when this message was sent
+     * (origin depends on on what header this MPI is in)
+     */
     public long sendTime;
 
     /**
-     *
-     *
-      * Millisecond timestamp of when this message was received
-      * (destination depends on on what header this MPI is in)
-      */
+     * Millisecond timestamp of when this message was received
+     * (destination depends on on what header this MPI is in)
+     */
     public long receiveTime;
 
     /**
-     *
-     *
-      * Amount of time in milliseconds that this message was being processed on the server
-      * in order to calculate and populate MPI metrics
-      */
+     * Amount of time in milliseconds that this message was being processed on the server
+     * in order to calculate and populate MPI metrics
+     */
     public long overheadTime;
 
     /**
-     *
-     *
-      * "OUT" when this message originated on the server
-      */
+     * "OUT" when this message originated on the server
+     */
     public String infoType;
 
     /**
-     *
-     *
-      * True if this is info for a message that was pushed from server to client
-      */
+     * True if this is info for a message that was pushed from server to client
+     */
     public boolean pushedFlag;
 
     /**
-     *
-     *
      * Flag is true when record-message-sizes is enabled for the communication channel
-      */
+     */
     public boolean recordMessageSizes;
 
     /**
-     *
-     *
      * Flag is true when record-message-times is enabled for the communication channel
-      */
+     */
     public boolean recordMessageTimes;
 
     /**
-     *
-     *
      * Millisecond timestamp of when the server became ready to push this message out
      * to clients
-      */
+     */
     public long serverPrePushTime;
 
     /**
-     *
-     *
      * Millisecond timestamp of when the server called into the adapter associated with the
      * destination of this message
-      */
+     */
     public long serverPreAdapterTime;
 
     /**
-     *
-     *
      * Millisecond timestamp of when server processing returned from the adapater associated
      * with the destination of this message
-      */
+     */
     public long serverPostAdapterTime;
 
     /**
-     *
-     *
      * Millisecond timestamp of when the adapter associated with the destination of this message
      * made a call to an external component (for example a JMS server)
-      */
+     */
     public long serverPreAdapterExternalTime;
 
     /**
-     *
-     *
      * Millisecond timestamp of when processing came back to the adapter associated with the destination
      * of this message from a call to an external component (for example a JMS server)
-      */
+     */
     public long serverPostAdapterExternalTime;
 
     /**
+     * Copies the immutable fields of this MPI isntance over to create a new one
      *
-     *
-      * Copies the immutable fields of this MPI isntance over to create a new one
-      * @return cloned instance of this MessagePerformanceInfo instance
-      */
-    public Object clone()
-    {
-        try
-        {
+     * @return cloned instance of this MessagePerformanceInfo instance
+     */
+    public Object clone() {
+        try {
             return super.clone();
-        }        
-        catch (CloneNotSupportedException e)
-        {
+        } catch (CloneNotSupportedException e) {
             // This cannot happen since the super class is Object but since 
             // the exception has to be caught anyway, code is left in
             MessagePerformanceInfo mpii = new MessagePerformanceInfo();
@@ -171,23 +137,18 @@
     }
 
     /**
+     * Increase the overhead counter for this MPI
      *
-     *
-      * Increase the overhead counter for this MPI
-      * @param overhead Increment size in milliseconds
-      */
-    public void addToOverhead(long overhead)
-    {
+     * @param overhead Increment size in milliseconds
+     */
+    public void addToOverhead(long overhead) {
         overheadTime += overhead;
     }
 
     /**
-     *
-     *
      * Default constructor
-      */
-    public MessagePerformanceInfo()
-    {
+     */
+    public MessagePerformanceInfo() {
 
     }
 }
diff --git a/core/src/main/java/flex/messaging/messages/MessagePerformanceUtils.java b/core/src/main/java/flex/messaging/messages/MessagePerformanceUtils.java
index bc7421d..d9344f2 100644
--- a/core/src/main/java/flex/messaging/messages/MessagePerformanceUtils.java
+++ b/core/src/main/java/flex/messaging/messages/MessagePerformanceUtils.java
@@ -23,19 +23,16 @@
 import flex.messaging.log.LogCategories;
 
 /**
- *
- *
  * Utility class for populating  MessagePerformanceInformation objects at various stages of
  * server processing.  A given message may have three MPI headers populated (naming convention
  * of these headers is from the perspective of the server):
- *
+ * <p>
  * DSMPII - incoming message, message sent from client to server
  * DSMPIO - outgoing message, response/acknowledgement message sent from server back to client
  * DSMPIP - only populated for a pushed message, this is information for the incoming message
  * that caused the pushed message
  */
-public class MessagePerformanceUtils
-{
+public class MessagePerformanceUtils {
 
     static final String LOG_CATEGORY = LogCategories.MESSAGE_GENERAL;
 
@@ -48,265 +45,218 @@
     public static int MPI_TIMING_AND_SIZING = 2;
 
     /**
-     *
-     *
      * Clones the MPI object for the incoming message from client to server
      * from the batch wrapper to all messages included in it, keeping track of
      * overhead time spent doing this.
      *
      * @param message The message whose MPI should be propogated
      */
-    public static void propogateMPIDownBatch(Message message)
-    {
+    public static void propogateMPIDownBatch(Message message) {
         long overhead = System.currentTimeMillis();
-        if(message instanceof BatchableMessage)
-        {
-            BatchableMessage dm = (BatchableMessage)message;
-            if(dm.isBatched())
-            {
-                 Object[] batchedMessages = (Object[])message.getBody();
-                 int batchedLength = batchedMessages.length;
-                 for(int a=0;a<batchedLength;a++)
-                 {
-                     Message currentMess = (Message)batchedMessages[a];
-                     MessagePerformanceInfo mpi = MessagePerformanceUtils.getMPII(message);
-                     MessagePerformanceUtils.setMPII(currentMess, (MessagePerformanceInfo)mpi.clone());
-                     propogateMPIDownBatch(currentMess);
-                 }
+        if (message instanceof BatchableMessage) {
+            BatchableMessage dm = (BatchableMessage) message;
+            if (dm.isBatched()) {
+                Object[] batchedMessages = (Object[]) message.getBody();
+                int batchedLength = batchedMessages.length;
+                for (int a = 0; a < batchedLength; a++) {
+                    Message currentMess = (Message) batchedMessages[a];
+                    MessagePerformanceInfo mpi = MessagePerformanceUtils.getMPII(message);
+                    MessagePerformanceUtils.setMPII(currentMess, (MessagePerformanceInfo) mpi.clone());
+                    propogateMPIDownBatch(currentMess);
+                }
             }
         }
         overhead = System.currentTimeMillis() - overhead;
         MessagePerformanceUtils.getMPII(message).addToOverhead(overhead);
-   }
+    }
 
     /**
-     *
-     *
      * This method finalizes the incoming MPI instance.  It is necessary because the client
      * send time is stored on the incoming MPII and the server receive time as well as message
      * size are populated in the MPI object stored on the ActionContext, this method combines
      * the information into one MPI instance.
      *
-     * @param context - The action context used to deserialize the incoming message, it will have the
-     * server receive time and message size information
+     * @param context   - The action context used to deserialize the incoming message, it will have the
+     *                  server receive time and message size information
      * @param inMessage - The incoming message, its MPI will have the client send time
      */
-    public static void setupMPII(ActionContext context, Message inMessage)
-    {
-        try
-        {
+    public static void setupMPII(ActionContext context, Message inMessage) {
+        try {
             // the MPI from the incoming message will have the client-send timestamp
-            MessagePerformanceInfo mpii= MessagePerformanceUtils.getMPII(inMessage);
+            MessagePerformanceInfo mpii = MessagePerformanceUtils.getMPII(inMessage);
 
             // this is the MPI that we want to propogate
             MessagePerformanceInfo contextMPI = context.getMPII();
-            if(contextMPI!=null && mpii!=null){
+            if (contextMPI != null && mpii != null) {
                 contextMPI.sendTime = mpii.sendTime;
-                MessagePerformanceUtils.setMPII(inMessage, (MessagePerformanceInfo)contextMPI.clone());
+                MessagePerformanceUtils.setMPII(inMessage, (MessagePerformanceInfo) contextMPI.clone());
                 propogateMPIDownBatch(inMessage);
             }
-        }
-        catch(Exception e)
-        {
+        } catch (Exception e) {
             if (Log.isDebug())
                 Log.getLogger(LOG_CATEGORY).error("MPI error: setting up response MPI : " +
-                     e.toString());
+                        e.toString());
         }
     }
 
     /**
-     *
-     *
      * This method sets up the outgoing MPI object for a response/acknowledgement message.
      * The outgoing message should also have a copy of the incoming MPI so that when the client
      * receives the response it has access to all information
      *
-     * @param context - The context used to deserialize the incoming message
-     * @param inMessage - The incoming message
+     * @param context    - The context used to deserialize the incoming message
+     * @param inMessage  - The incoming message
      * @param outMessage - The response message
      */
-    public static void updateOutgoingMPI(ActionContext context, Message inMessage, Object outMessage)
-    {
-        try
-        {
-            MessagePerformanceInfo mpio=null;
-            if(context != null)
-            {
+    public static void updateOutgoingMPI(ActionContext context, Message inMessage, Object outMessage) {
+        try {
+            MessagePerformanceInfo mpio = null;
+            if (context != null) {
                 mpio = context.getMPIO();
-                if(mpio == null)
-                {
+                if (mpio == null) {
                     mpio = new MessagePerformanceInfo();
-                    if(MessagePerformanceUtils.getMPII(inMessage)!=null && MessagePerformanceUtils.getMPII(inMessage).sendTime!=0)
-                        mpio.infoType="OUT";
+                    if (MessagePerformanceUtils.getMPII(inMessage) != null && MessagePerformanceUtils.getMPII(inMessage).sendTime != 0)
+                        mpio.infoType = "OUT";
                 }
-                Message mess = (Message)outMessage;
-                if(MessagePerformanceUtils.getMPII(inMessage)!=null)
-                    MessagePerformanceUtils.setMPII(mess, (MessagePerformanceInfo)MessagePerformanceUtils.getMPII(inMessage).clone());
+                Message mess = (Message) outMessage;
+                if (MessagePerformanceUtils.getMPII(inMessage) != null)
+                    MessagePerformanceUtils.setMPII(mess, (MessagePerformanceInfo) MessagePerformanceUtils.getMPII(inMessage).clone());
                 MessagePerformanceUtils.setMPIO(mess, mpio);
                 context.setMPIO(mpio);
             }
 
-            if(outMessage instanceof CommandMessage &&
-                    ((CommandMessage)outMessage).getOperation() == CommandMessage.CLIENT_SYNC_OPERATION)
-            {
+            if (outMessage instanceof CommandMessage &&
+                    ((CommandMessage) outMessage).getOperation() == CommandMessage.CLIENT_SYNC_OPERATION) {
                 // pushed message case
-                CommandMessage cmd = (CommandMessage)outMessage;
-                Object[] cmdBody = (Object[])cmd.getBody();
+                CommandMessage cmd = (CommandMessage) outMessage;
+                Object[] cmdBody = (Object[]) cmd.getBody();
                 // in the pushed message case we want the outgoing metrics of the message to be updated
                 // however, we want the incoming metrics to be that of the poll message and
                 // the incoming push metrics to be that of the original message
                 int batchedLength = cmdBody.length;
-                for(int i = 0; i < batchedLength; i++)
-                {
-                    Message currentMess = (Message)cmdBody[i];
-                    MessagePerformanceInfo origMPII =  MessagePerformanceUtils.getMPII(currentMess);
+                for (int i = 0; i < batchedLength; i++) {
+                    Message currentMess = (Message) cmdBody[i];
+                    MessagePerformanceInfo origMPII = MessagePerformanceUtils.getMPII(currentMess);
 
-                    if (origMPII == null || MessagePerformanceUtils.getMPII(inMessage) == null)
-                    {
+                    if (origMPII == null || MessagePerformanceUtils.getMPII(inMessage) == null) {
                         // this can happen if the server has MPI enabled but the producing client does not
                         // log a warning for this and break out of here as MPI requires all participating
                         // parties to have the same settings
-                        if (Log.isError())
-                        {
+                        if (Log.isError()) {
                             Log.getLogger(LOG_CATEGORY).error
-                            (
-                                    "MPI is enabled but could not get message performance information " +
-                                            "for incoming MPI instance from client message.  The client "+
-                                            "might have created a new channel not configured to send message" +
-                                            " performance after declaring a different destination which does." +
-                                            "  The client channel should either be configured to add MPI " +
-                                            "properties, or a server destion which has the same MPI " +
-                                            "properties as the client channel should be used.");
+                                    (
+                                            "MPI is enabled but could not get message performance information " +
+                                                    "for incoming MPI instance from client message.  The client " +
+                                                    "might have created a new channel not configured to send message" +
+                                                    " performance after declaring a different destination which does." +
+                                                    "  The client channel should either be configured to add MPI " +
+                                                    "properties, or a server destion which has the same MPI " +
+                                                    "properties as the client channel should be used.");
                         }
                         return;
                     }
 
-                    MessagePerformanceUtils.setMPIP(currentMess, (MessagePerformanceInfo)origMPII.clone());
-                    MessagePerformanceInfo newMPII = (MessagePerformanceInfo)MessagePerformanceUtils.getMPII(inMessage).clone();
-                    mpio.pushedFlag=true;
+                    MessagePerformanceUtils.setMPIP(currentMess, (MessagePerformanceInfo) origMPII.clone());
+                    MessagePerformanceInfo newMPII = (MessagePerformanceInfo) MessagePerformanceUtils.getMPII(inMessage).clone();
+                    mpio.pushedFlag = true;
                     MessagePerformanceUtils.setMPII(currentMess, newMPII);
                     MessagePerformanceUtils.setMPIO(currentMess, mpio);
                 }
             }
-        }
-        catch(Exception e)
-        {
+        } catch (Exception e) {
             if (Log.isDebug())
                 Log.getLogger(LOG_CATEGORY).error("MPI error: setting up response MPI : " +
-                     e.toString());
+                        e.toString());
         }
     }
 
     /**
-     *
-     *
      * Convenience method for setting the incoming MPI object on a message.
      *
      * @param message The message whose MPI header will be set
-     * @param mpi The incoming MPI instance
+     * @param mpi     The incoming MPI instance
      */
-    public static void setMPII(Message message, MessagePerformanceInfo mpi)
-    {
+    public static void setMPII(Message message, MessagePerformanceInfo mpi) {
         message.setHeader(MPI_HEADER_IN, mpi);
     }
 
     /**
-     *
-     * The server generated messages do not have MPII object (which is normally set 
+     * The server generated messages do not have MPII object (which is normally set
      * by the client) which prevents the usual performance gathering. This convenience method
-     * can be invoked to set the MPII object (as if it's generated by the client) once the 
-     * message is generated on the server but before it is routed to the MessageBroker 
+     * can be invoked to set the MPII object (as if it's generated by the client) once the
+     * message is generated on the server but before it is routed to the MessageBroker
      * to be delivered to the client. This way performance gathering can proceed as expected.
-     * 
+     *
      * @param message The server generated message.
      */
-    public static void setMPIIForServerGeneratedMessage(Message message)
-    {
+    public static void setMPIIForServerGeneratedMessage(Message message) {
         MessagePerformanceInfo mpii = new MessagePerformanceInfo();
-        AbstractEndpoint endpoint = (AbstractEndpoint)FlexContext.getEndpoint();
-        mpii.recordMessageSizes = endpoint != null? endpoint.isRecordMessageSizes() : false;
-        mpii.recordMessageTimes = endpoint != null? endpoint.isRecordMessageTimes() : false;
+        AbstractEndpoint endpoint = (AbstractEndpoint) FlexContext.getEndpoint();
+        mpii.recordMessageSizes = endpoint != null ? endpoint.isRecordMessageSizes() : false;
+        mpii.recordMessageTimes = endpoint != null ? endpoint.isRecordMessageTimes() : false;
         mpii.sendTime = System.currentTimeMillis();
         MessagePerformanceUtils.setMPII(message, mpii);
     }
 
     /**
-     *
-     *
      * Convenience method for setting the outgoing MPI object on a message.
      *
      * @param message The message whose MPI header will be set
-     * @param mpi The outgoing MPI instance
+     * @param mpi     The outgoing MPI instance
      */
-    public static void setMPIO(Message message, MessagePerformanceInfo mpi)
-    {
+    public static void setMPIO(Message message, MessagePerformanceInfo mpi) {
         message.setHeader(MPI_HEADER_OUT, mpi);
     }
 
     /**
-     *
-     *
      * Convenience method for setting the pushed MPI object on a message.
      *
      * @param message The message whose MPI header will be set
-     * @param mpi The pushed MPI instance (this is the incoming MPI instance
-     * of the message that caused the push)
+     * @param mpi     The pushed MPI instance (this is the incoming MPI instance
+     *                of the message that caused the push)
      */
-    public static void setMPIP(Message message, MessagePerformanceInfo mpi)
-    {
+    public static void setMPIP(Message message, MessagePerformanceInfo mpi) {
         message.setHeader(MPI_HEADER_PUSH, mpi);
     }
 
     /**
-     *
-     *
      * Convenience method for retrieving the incoming MPI object from a message.
      *
      * @param message The message whose MPI header will be retrieved
      * @return mpi Incoming MPI instance
      */
-    public static MessagePerformanceInfo getMPII(Message message)
-    {
-        return (MessagePerformanceInfo)message.getHeader(MPI_HEADER_IN);
+    public static MessagePerformanceInfo getMPII(Message message) {
+        return (MessagePerformanceInfo) message.getHeader(MPI_HEADER_IN);
     }
 
     /**
-     *
-     *
      * Convenience method for retrieving the outgoing MPI object from a message.
      *
      * @param message The message whose MPI header will be retrieved
      * @return mpi Outgoing MPI instance
      */
-    public static MessagePerformanceInfo getMPIO(Message message)
-    {
-        return (MessagePerformanceInfo)message.getHeader(MPI_HEADER_OUT);
+    public static MessagePerformanceInfo getMPIO(Message message) {
+        return (MessagePerformanceInfo) message.getHeader(MPI_HEADER_OUT);
     }
 
     /**
-     *
-     *
      * Convenience method for retrieving the pushed MPI object from a message.
      *
      * @param message The message whose MPI header will be retrieved
      * @return mpi Pushed MPI instance (this is the incoming MPI instance
      * of the message that caused the push)
      */
-    public static MessagePerformanceInfo getMPIP(Message message)
-    {
-        return (MessagePerformanceInfo)message.getHeader(MPI_HEADER_PUSH);
+    public static MessagePerformanceInfo getMPIP(Message message) {
+        return (MessagePerformanceInfo) message.getHeader(MPI_HEADER_PUSH);
     }
 
     /**
-     *
-     *
      * Convenience method for setting server pre-push processing time on a message.
      * No-op if record-message-times is false
      *
      * @param message The message whose MPI header will be updated
      */
-    public static void markServerPrePushTime(Message message)
-    {
+    public static void markServerPrePushTime(Message message) {
         // If the message does not have an MPI header then we are not recording message times
         // and we have nothing to do here
         if (getMPII(message) == null || getMPII(message).sendTime == 0)
@@ -317,15 +267,12 @@
     }
 
     /**
-     *
-     *
      * Convenience method for setting server pre-adapter timestamp on a message.
      * No-op if record-message-times is false
      *
      * @param message The message whose MPI header will be updated
      */
-    public static void markServerPreAdapterTime(Message message)
-    {
+    public static void markServerPreAdapterTime(Message message) {
         // If the message does not have an MPI header then we are not recording message times
         // and we have nothing to do here
         if (getMPII(message) == null || getMPII(message).sendTime == 0)
@@ -342,15 +289,12 @@
     }
 
     /**
-     *
-     *
      * Convenience method for setting server post-adapter timestamp on a message.
      * No-op if record-message-times is false
      *
      * @param message The message whose MPI header will be updated
      */
-    public static void markServerPostAdapterTime(Message message)
-    {
+    public static void markServerPostAdapterTime(Message message) {
         // If the message does not have an MPI header then we are not recording message times
         // and we have nothing to do here
         if (getMPII(message) == null || getMPII(message).sendTime == 0 || getMPII(message).serverPostAdapterTime != 0)
@@ -361,7 +305,6 @@
     }
 
     /**
-     *
      * Method may be called from a custom adapter to mark the beginning of processing that occurs
      * outside of the adapter for a particular message.  Use this method in conjunction with
      * <code>markServerPostAdapterExternalTime</code> to mark the amount of time spent when your
@@ -369,14 +312,13 @@
      * <code>true</code> for the communication channel, the server processing time external to the
      * adapter may be retrieved via MessagePerformanceUtils.serverAdapterExternalTime on the client
      * once it receives the message.
-     *
+     * <p>
      * If <code>record-message-times</code> is <code>false</code> for the communication channel,
      * calling this method will have no effect.
      *
      * @param message The message being processed
      */
-    public static void markServerPreAdapterExternalTime(Message message)
-    {
+    public static void markServerPreAdapterExternalTime(Message message) {
         // If the message does not have an MPI header then we are not recording message times
         // and we have nothing to do here
         if (getMPII(message) == null || getMPII(message).sendTime == 0)
@@ -387,7 +329,6 @@
     }
 
     /**
-     *
      * Method may be called from a custom adapter to mark the end of processing that occurs
      * outside of the adapter for a particular message.  Use this method in conjunction with
      * <code>markServerPreAdapterExternalTime</code> to mark the amount of time spent when your
@@ -395,14 +336,13 @@
      * <code>true</code> for the communication channel, the server processing time external to the
      * adapter may be retrieved via MessagePerformanceUtils.serverAdapterExternalTime on the client
      * once it receives the message.
-     *
+     * <p>
      * If <code>record-message-times</code> is <code>false</code> for the communication channel,
      * calling this method will have no effect.
      *
      * @param message The message being processed
      */
-    public static void markServerPostAdapterExternalTime(Message message)
-    {
+    public static void markServerPostAdapterExternalTime(Message message) {
         // If the message does not have an MPI header then we are not recording message times
         // and we have nothing to do here
         if (getMPII(message) == null || getMPII(message).sendTime == 0 || getMPII(message).serverPostAdapterExternalTime != 0)
diff --git a/core/src/main/java/flex/messaging/messages/RPCMessage.java b/core/src/main/java/flex/messaging/messages/RPCMessage.java
index 2f7711a..33ddd28 100644
--- a/core/src/main/java/flex/messaging/messages/RPCMessage.java
+++ b/core/src/main/java/flex/messaging/messages/RPCMessage.java
@@ -22,61 +22,51 @@
 /**
  * Base class for RPC request-styled messages, such as RemotingMessage,
  * HTTPMessage and SOAPMessage.
- *
- *
  */
-public abstract class RPCMessage extends AbstractMessage
-{
+public abstract class RPCMessage extends AbstractMessage {
     /**
      * This number was generated using the 'serialver' command line tool.
      * This number should remain consistent with the version used by
      * ColdFusion to communicate with the message broker over RMI.
      */
     private static final long serialVersionUID = -1203255926746881424L;
-    
+
     private String remoteUsername;
     private String remotePassword;
 
-    public RPCMessage()
-    {
+    public RPCMessage() {
     }
 
-    public String getRemoteUsername()
-    {
+    public String getRemoteUsername() {
         return remoteUsername;
     }
 
-    public void setRemoteUsername(String s)
-    {
+    public void setRemoteUsername(String s) {
         remoteUsername = s;
     }
 
-    public String getRemotePassword()
-    {
+    public String getRemotePassword() {
         return remotePassword;
     }
 
-    public void setRemotePassword(String s)
-    {
+    public void setRemotePassword(String s) {
         remotePassword = s;
     }
 
-    protected String toStringFields(int indentLevel)
-    {
+    protected String toStringFields(int indentLevel) {
         String sp = super.toStringFields(indentLevel);
         String sep = getFieldSeparator(indentLevel);
         StringBuilder sb = new StringBuilder();
         sb.append(sep).append("clientId = ").append(Log.isExcludedProperty("clientId") ? Log.VALUE_SUPRESSED : clientId);
         sb.append(sep).append("destination = ").append(Log.isExcludedProperty("destination") ? Log.VALUE_SUPRESSED : destination);
-        sb.append(sep).append("messageId = ").append(Log.isExcludedProperty("messageId") ? Log.VALUE_SUPRESSED :  messageId);
+        sb.append(sep).append("messageId = ").append(Log.isExcludedProperty("messageId") ? Log.VALUE_SUPRESSED : messageId);
         sb.append(sep).append("timestamp = ").append(Log.isExcludedProperty("timestamp") ? Log.VALUE_SUPRESSED : String.valueOf(timestamp));
         sb.append(sep).append("timeToLive = ").append(Log.isExcludedProperty("timeToLive") ? Log.VALUE_SUPRESSED : String.valueOf(timeToLive));
         sb.append(sep).append("body = ").append(Log.isExcludedProperty("body") ? Log.VALUE_SUPRESSED : bodyToString(getBody(), indentLevel) + sp);
         return sb.toString();
     }
 
-    public String logCategory()
-    {
+    public String logCategory() {
         return LogCategories.MESSAGE_RPC;
     }
 }
diff --git a/core/src/main/java/flex/messaging/messages/RemotingMessage.java b/core/src/main/java/flex/messaging/messages/RemotingMessage.java
index 567f8f6..51b269e 100644
--- a/core/src/main/java/flex/messaging/messages/RemotingMessage.java
+++ b/core/src/main/java/flex/messaging/messages/RemotingMessage.java
@@ -27,11 +27,8 @@
  * AMF Endpoint and not to other endpoints (the RTMP Endpoint has
  * no HTTP, and therefore cannot support the request/response and
  * session properties of the ActionContext).
- *
- *
  */
-public class RemotingMessage extends RPCMessage
-{
+public class RemotingMessage extends RPCMessage {
     /**
      * This number was generated using the 'serialver' command line tool.
      * This number should remain consistent with the version used by
@@ -43,84 +40,65 @@
     private String operation;
     private Object[] parameters;
     private transient List parameterList;
-    
-    public RemotingMessage()
-    {
+
+    public RemotingMessage() {
     }
 
-    public String getSource()
-    {
+    public String getSource() {
         return source;
     }
 
-    public void setSource(String s)
-    {
+    public void setSource(String s) {
         source = s;
     }
 
-    public Object getBody()
-    {
+    public Object getBody() {
         if (parameters == null && parameterList != null)
             return parameterList.toArray();
         else
             return parameters;
     }
 
-    public void setBody(Object bodyValue)
-    {
-        if (bodyValue instanceof List)
-        {
+    public void setBody(Object bodyValue) {
+        if (bodyValue instanceof List) {
             // some channels/endpoints may send in a list
             // and expect to keep a reference to it - amfx
             // for example works this way, so keep the list
             // around rather than making an array copy
-            if (parameterList != null)
-            {
+            if (parameterList != null) {
                 parameterList.addAll((List) bodyValue);
-            }
-            else
-            {
+            } else {
                 parameterList = (List) bodyValue;
             }
-        }
-        else if (!bodyValue.getClass().isArray())
-        {
-            parameters = new Object[] { bodyValue };
-        }
-        else
-        {
+        } else if (!bodyValue.getClass().isArray()) {
+            parameters = new Object[]{bodyValue};
+        } else {
             parameters = (Object[]) bodyValue;
         }
     }
 
-    public String getOperation()
-    {
+    public String getOperation() {
         return operation;
     }
 
-    public void setOperation(String operation)
-    {
+    public void setOperation(String operation) {
         this.operation = operation;
     }
 
-    public List getParameters()
-    {
-        if (parameters == null && parameterList != null)
-        {
+    public List getParameters() {
+        if (parameters == null && parameterList != null) {
             parameters = parameterList.toArray();
             // we can clean up the parameter list now
             parameterList = null;
         }
-        return (parameters == null) ? null : Arrays.asList(parameters);            
+        return (parameters == null) ? null : Arrays.asList(parameters);
     }
 
-    public void setParameters(List params)
-    {
+    public void setParameters(List params) {
         parameters = params.toArray();
     }
-    
-    protected String toStringFields(int indentLevel)
-    {
+
+    protected String toStringFields(int indentLevel) {
         String s = getOperation();
         String sp = super.toStringFields(indentLevel);
         String sep = getFieldSeparator(indentLevel);
diff --git a/core/src/main/java/flex/messaging/messages/SOAPMessage.java b/core/src/main/java/flex/messaging/messages/SOAPMessage.java
index a291ab2..cf520cf 100644
--- a/core/src/main/java/flex/messaging/messages/SOAPMessage.java
+++ b/core/src/main/java/flex/messaging/messages/SOAPMessage.java
@@ -22,11 +22,8 @@
  * A SOAP specific subclass of HTTPMessage. By default we
  * assume the content-type as &quot;text/xml; charset=utf-8&quot;
  * and the HTTP method will be POST.
- *
- *
  */
-public class SOAPMessage extends HTTPMessage
-{
+public class SOAPMessage extends HTTPMessage {
     /**
      * This number was generated using the 'serialver' command line tool.
      * This number should remain consistent with the version used by
@@ -34,20 +31,17 @@
      */
     private static final long serialVersionUID = 3706466843618325314L;
 
-    public SOAPMessage()
-    {
+    public SOAPMessage() {
         contentType = MessageIOConstants.CONTENT_TYPE_XML;
         method = MessageIOConstants.METHOD_POST;
     }
 
-    public String getAction()
-    {
+    public String getAction() {
         Object action = httpHeaders.get(MessageIOConstants.HEADER_SOAP_ACTION);
         return action == null ? null : action.toString();
     }
 
-    public void setAction(String action)
-    {
+    public void setAction(String action) {
         httpHeaders.put(MessageIOConstants.HEADER_SOAP_ACTION, action);
     }
 }
diff --git a/core/src/main/java/flex/messaging/messages/SmallMessage.java b/core/src/main/java/flex/messaging/messages/SmallMessage.java
index d757160..03808b1 100644
--- a/core/src/main/java/flex/messaging/messages/SmallMessage.java
+++ b/core/src/main/java/flex/messaging/messages/SmallMessage.java
@@ -20,10 +20,8 @@
 /**
  * A marker interface that is used to indicate that a Message has an
  * alternative smaller form for serialization.
- *
  */
-public interface SmallMessage extends Message
-{
+public interface SmallMessage extends Message {
     /**
      * This method must be implemented by subclasses that have an
      * <code>java.io.Externalizable</code> or "small" form, or null to
diff --git a/core/src/main/java/flex/messaging/security/AppServerLoginCommand.java b/core/src/main/java/flex/messaging/security/AppServerLoginCommand.java
index 864623a..05bf587 100644
--- a/core/src/main/java/flex/messaging/security/AppServerLoginCommand.java
+++ b/core/src/main/java/flex/messaging/security/AppServerLoginCommand.java
@@ -29,11 +29,8 @@
 /**
  * This class implements LoginCommand and doAuthorization in way that should work by default if
  * authorization logged a user into the J2EE application server.  doAuthorization uses isUserInRole.
- *
- *
  */
-public abstract class AppServerLoginCommand implements LoginCommand
-{
+public abstract class AppServerLoginCommand implements LoginCommand {
 
     /**
      * The gateway calls this method to perform programmatic authorization.
@@ -44,34 +41,30 @@
      * </p>
      *
      * @param principal The principal being checked for authorization
-     * @param roles    A List of role names to check, all members should be strings
+     * @param roles     A List of role names to check, all members should be strings
      * @return true if the principal belongs to at least one of the roles
      * @throws SecurityException Throws SecurityException
      */
-    public boolean doAuthorization(Principal principal, List roles) throws SecurityException
-    {
+    public boolean doAuthorization(Principal principal, List roles) throws SecurityException {
         HttpServletRequest request = FlexContext.getHttpRequest();
         return (request != null) ? doAuthorization(principal, roles, request) : false;
     }
 
     protected boolean doAuthorization(Principal principal, List roles, HttpServletRequest request)
-        throws SecurityException
-    {
-        for (Object role : roles)
-        {
-            if (request.isUserInRole((String)role))
+            throws SecurityException {
+        for (Object role : roles) {
+            if (request.isUserInRole((String) role))
                 return true;
         }
 
         return false;
     }
 
-    protected String extractPassword(Object credentials)
-    {
+    protected String extractPassword(Object credentials) {
         if (credentials instanceof String)
-            return (String)credentials;
+            return (String) credentials;
         else if (credentials instanceof Map)
-            return (String)((Map)credentials).get(MessageIOConstants.SECURITY_CREDENTIALS);
+            return (String) ((Map) credentials).get(MessageIOConstants.SECURITY_CREDENTIALS);
         return null;
     }
 
@@ -82,8 +75,7 @@
      *
      * @param config The servlet configuration for MessageBrokerServlet.
      */
-    public void start(ServletConfig config)
-    {
+    public void start(ServletConfig config) {
         // No-op.
     }
 
@@ -91,8 +83,7 @@
      * Called to free up resources used by the login command. The default implementation
      * is no-op, subclasses can override to provide their own implementation.
      */
-    public void stop()
-    {
+    public void stop() {
         // No-op.
     }
 }
diff --git a/core/src/main/java/flex/messaging/security/LoginCommand.java b/core/src/main/java/flex/messaging/security/LoginCommand.java
index 3e05991..73b2412 100644
--- a/core/src/main/java/flex/messaging/security/LoginCommand.java
+++ b/core/src/main/java/flex/messaging/security/LoginCommand.java
@@ -26,12 +26,11 @@
  * gateway configuration's security section and is instantiated using reflection
  * on servlet initialization.
  */
-public interface LoginCommand
-{
+public interface LoginCommand {
     /**
      * Called to initialize a login command prior to authentication/authorization requests.
-     * 
-     * @param config The servlet configuration for MessageBrokerServlet.  
+     *
+     * @param config The servlet configuration for MessageBrokerServlet.
      */
     void start(ServletConfig config);
 
@@ -49,7 +48,7 @@
      *
      * @param username    The principal being authenticated
      * @param credentials A map, typically with string keys and values - holds, for example, a password
-     * @return principal for the authenticated user when authentication is successful; null otherwise 
+     * @return principal for the authenticated user when authentication is successful; null otherwise
      */
     Principal doAuthentication(String username, Object credentials);
 
@@ -62,15 +61,16 @@
      * </p>
      *
      * @param principal The principal being checked for authorization
-     * @param roles    A List of role names to check, all members should be strings
+     * @param roles     A List of role names to check, all members should be strings
      * @return true if the principal is authorized given the list of roles
      */
     boolean doAuthorization(Principal principal, List roles);
 
     /**
      * Attempts to log a user out from their session.
-     *
+     * <p>
      * NOTE: May not be possible on all application servers.
+     *
      * @param principal The principal to logout.
      * @return true when logout is successful
      */
diff --git a/core/src/main/java/flex/messaging/security/LoginCommandExt.java b/core/src/main/java/flex/messaging/security/LoginCommandExt.java
index 7bf159b..4ac4937 100644
--- a/core/src/main/java/flex/messaging/security/LoginCommandExt.java
+++ b/core/src/main/java/flex/messaging/security/LoginCommandExt.java
@@ -20,24 +20,23 @@
 /**
  * Extensions to the LoginCommand interface.
  */
-public interface LoginCommandExt
-{
+public interface LoginCommandExt {
     /**
      * Classes that implement the flex.messaging.security.LoginCommand interface, should also
      * implement this interface if the name stored in java.security.Principal created as a result
      * of a successful authentication differs from the username that is actually passed in to
      * the authentication.
-     *
+     * <p>
      * Implementing this interface gives such LoginCommand's a chance to return the resulting
      * username so that it can be compared to the one stored in Principal.
-     *
+     * <p>
      * Returns the value that would be returned by java.security.Principal.getName() if
      * username/credentials had been authenticated
      *
-     * @param username - User whose comparable name will be retrieved
+     * @param username    - User whose comparable name will be retrieved
      * @param credentials - Credentials for user whose comparable name will be retrieved
      * @return - value that would be returned by java.security.Principal.getName() if
-     *           username/credentials had been authenticated
+     * username/credentials had been authenticated
      */
     String getPrincipalNameFromCredentials(String username, Object credentials);
 
diff --git a/core/src/main/java/flex/messaging/security/LoginManager.java b/core/src/main/java/flex/messaging/security/LoginManager.java
index 1f42ab6..8651243 100644
--- a/core/src/main/java/flex/messaging/security/LoginManager.java
+++ b/core/src/main/java/flex/messaging/security/LoginManager.java
@@ -39,12 +39,11 @@
  * differently, a separate LoginCommand needs to be written for
  * each server.
  * </p>
- *
- *
  */
-public class LoginManager implements FlexComponent
-{
-    /** Log category for LoginManager. */
+public class LoginManager implements FlexComponent {
+    /**
+     * Log category for LoginManager.
+     */
     public static final String LOG_CATEGORY = LogCategories.SECURITY;
 
     private static final String NIOHTTP_FLEX_SESSION_TYPE = "flex.messaging.endpoints.NIOHTTPFlexSession";
@@ -74,8 +73,7 @@
     /**
      * Creates a new <code>LoginManager</code> instance.
      */
-    public LoginManager()
-    {
+    public LoginManager() {
         perClientAuthentication = false;
     }
 
@@ -90,21 +88,18 @@
      * This is no-op for LoginManager as it does not have an id and all
      * its properties are directly settable.
      *
-     * @param id The id of the component.
+     * @param id        The id of the component.
      * @param configMap The properties for configuring component.
      */
-    public void initialize(String id, ConfigMap configMap)
-    {
+    public void initialize(String id, ConfigMap configMap) {
         // No-op
     }
 
     /**
      * Validates the LoginManager before it is started.
      */
-    protected void validate()
-    {
-        if (perClientAuthentication && loginCommand instanceof AppServerLoginCommand)
-        {
+    protected void validate() {
+        if (perClientAuthentication && loginCommand instanceof AppServerLoginCommand) {
             // Cannot use application server authentication together with per client authentication.
             ConfigurationException configException = new ConfigurationException();
             configException.setMessage(PER_CLIENT_ANT_APPSERVER);
@@ -116,8 +111,7 @@
      * Implements FlexComponent.start.
      * Starts the <code>LoginManager</code>.
      */
-    public void start()
-    {
+    public void start() {
         if (started)
             return;
 
@@ -133,8 +127,7 @@
      * Implements FlexComponents.stop.
      * Stops the <code>LoginManager</code>.
      */
-    public void stop()
-    {
+    public void stop() {
         if (!started)
             return;
 
@@ -156,8 +149,7 @@
      * @return <code>true</code> if per client authentication is enabled;
      * otherwise <code>false</code>.
      */
-    public boolean isPerClientAuthentication()
-    {
+    public boolean isPerClientAuthentication() {
         return perClientAuthentication;
     }
 
@@ -165,10 +157,9 @@
      * Sets whether per client authentication is enabled or not.
      *
      * @param perClientAuthentication <code>true</code> if per client authentication
-     * is enabled; otherwise <code>false</code>.
+     *                                is enabled; otherwise <code>false</code>.
      */
-    public void setPerClientAuthentication(boolean perClientAuthentication)
-    {
+    public void setPerClientAuthentication(boolean perClientAuthentication) {
         this.perClientAuthentication = perClientAuthentication;
     }
 
@@ -178,8 +169,7 @@
      *
      * @return <code>true</code> if the LoginManager is started; otherwise <code>false</code>.
      */
-    public boolean isStarted()
-    {
+    public boolean isStarted() {
         return started;
     }
 
@@ -188,8 +178,7 @@
      *
      * @return loginCommand The login command used.
      */
-    public LoginCommand getLoginCommand()
-    {
+    public LoginCommand getLoginCommand() {
         return loginCommand;
     }
 
@@ -198,8 +187,7 @@
      *
      * @param value The login command to set.
      */
-    public void setLoginCommand(LoginCommand value)
-    {
+    public void setLoginCommand(LoginCommand value) {
         if (loginCommand == value)
             return;
 
@@ -211,15 +199,12 @@
     /**
      * Perform login with username and credentials.
      *
-     * @param username Username to use to login.
+     * @param username    Username to use to login.
      * @param credentials Credentials to use to login.
      */
-    public void login(String username, Object credentials)
-    {
-        if (getCurrentPrincipal() == null)
-        {
-            if (loginCommand == null)
-            {
+    public void login(String username, Object credentials) {
+        if (getCurrentPrincipal() == null) {
+            if (loginCommand == null) {
                 // Client needs to be externally authenticated via Basic Authentication or some other method.
                 SecurityException se = new SecurityException();
                 se.setMessage(NO_LOGIN_COMMAND);
@@ -227,8 +212,7 @@
                 throw se;
             }
 
-            if (username != null && credentials != null)
-            {
+            if (username != null && credentials != null) {
                 Principal authenticated = loginCommand.doAuthentication(username, credentials);
 
                 if (authenticated == null) // Invalid login.
@@ -239,29 +223,24 @@
                     throw se;
                 }
                 setCurrentPrincipal(authenticated);
-            }
-            else
-            {
+            } else {
                 // Login is required but the client passed null principal and credentials.
                 SecurityException se = new SecurityException();
                 se.setMessage(LOGIN_REQ);
                 se.setCode(SecurityException.CLIENT_AUTHENTICATION_CODE);
                 throw se;
             }
-        }
-        else
-        {
+        } else {
             // It is possible that the username passed in from the client and that stored in the
             // Principal on the session may be different. To facilitate this case a LoginCommand
             // must implement LoginCommandExt and the user stored in the Principal is retrieved
             // here for comparison.
-            String comparisonUsername = loginCommand instanceof LoginCommandExt?
-                    ((LoginCommandExt)loginCommand).getPrincipalNameFromCredentials(username, credentials) : username;
+            String comparisonUsername = loginCommand instanceof LoginCommandExt ?
+                    ((LoginCommandExt) loginCommand).getPrincipalNameFromCredentials(username, credentials) : username;
 
             // If we have a username and a different existing principal then we must raise an exception
             // as we don't allow re-authentication for a given session.
-            if (comparisonUsername != null && !comparisonUsername.equals(getCurrentPrincipal().getName()))
-            {
+            if (comparisonUsername != null && !comparisonUsername.equals(getCurrentPrincipal().getName())) {
                 // Cannot re-authenticate in the same session.
                 SecurityException se = new SecurityException();
                 se.setMessage(CANNOT_REAUTH);
@@ -274,10 +253,8 @@
     /**
      * Perform logout.
      */
-    public void logout()
-    {
-        if (loginCommand == null)
-        {
+    public void logout() {
+        if (loginCommand == null) {
             FlexContext.getFlexSession().invalidate();
 
             // External login command required. Please check your security configuration.
@@ -290,12 +267,9 @@
         // Always invoke the command's logout hook.
         loginCommand.logout(getCurrentPrincipal());
 
-        if (FlexContext.isPerClientAuthentication())
-        {
+        if (FlexContext.isPerClientAuthentication()) {
             FlexContext.setUserPrincipal(null);
-        }
-        else
-        {
+        } else {
             FlexSession session = FlexContext.getFlexSession();
             session.invalidate();
         }
@@ -309,40 +283,33 @@
      *
      * @param constraint Constraint against which the current user is authorized.
      */
-    public void checkConstraint(SecurityConstraint constraint)
-    {
+    public void checkConstraint(SecurityConstraint constraint) {
         if (constraint == null)
             return;
 
         Principal currentPrincipal = getCurrentPrincipal();
 
-        if (currentPrincipal != null)
-        {
+        if (currentPrincipal != null) {
             List roles = constraint.getRoles();
             boolean authorized = roles == null || checkRoles(currentPrincipal, roles);
 
-            if (!authorized)
-            {
+            if (!authorized) {
                 // Access denied. User not authorized.
                 SecurityException se = new SecurityException();
                 se.setMessage(ACCESS_DENIED);
                 se.setCode(SecurityException.CLIENT_AUTHORIZATION_CODE);
                 throw se;
             }
-        }
-        else
-        {
-            if (!isCustomAuth(constraint))
-            {
+        } else {
+            if (!isCustomAuth(constraint)) {
                 // Some endpoints (NIO) do not support HTTP Basic authentication.
-                if (FlexContext.getHttpResponse() == null)
-                {
+                if (FlexContext.getHttpResponse() == null) {
                     Endpoint endpoint = FlexContext.getEndpoint();
                     String endpointId = (endpoint != null) ? endpoint.getId() : "unknown";
                     // A resource protected by a security constraint that specifies Basic security was accessed via the ''{0}''
                     // endpoint which does not support HTTP Basic security. Please use custom security or an alternate endpoint.
-                    SecurityException se =new SecurityException();
-                    se.setMessage(NO_BASIC_SECURITY, new Object[] {constraint.getId(), endpointId});
+                    SecurityException se = new SecurityException();
+                    se.setMessage(NO_BASIC_SECURITY, new Object[]{constraint.getId(), endpointId});
                     se.setCode(SecurityException.CLIENT_AUTHORIZATION_CODE);
                     throw se;
                 }
@@ -363,18 +330,17 @@
      * roles in the passed in list of roles.
      *
      * @param principal Principal to check against roles
-     * @param roles list of roles
+     * @param roles     list of roles
      * @return true if principal belongs to at least one of the roles in the list
      */
-    public boolean checkRoles(Principal principal, List roles)
-    {
+    public boolean checkRoles(Principal principal, List roles) {
         if (loginCommand == null) // This should not happen but just in case.
         {
             if (Log.isWarn())
                 Log.getLogger(LOG_CATEGORY).warn
-                ("Login command is null. Please ensure that the login-command"
-                        + " tag has the correct server attribute value"
-                        + ", or use 'all' to use the login command regardless of the server.");
+                        ("Login command is null. Please ensure that the login-command"
+                                + " tag has the correct server attribute value"
+                                + ", or use 'all' to use the login command regardless of the server.");
             return false;
         }
         return loginCommand.doAuthorization(principal, roles);
@@ -386,18 +352,15 @@
     //
     //--------------------------------------------------------------------------
 
-    private Principal getCurrentPrincipal()
-    {
+    private Principal getCurrentPrincipal() {
         return FlexContext.getUserPrincipal();
     }
 
-    private void setCurrentPrincipal(Principal p)
-    {
+    private void setCurrentPrincipal(Principal p) {
         FlexContext.setUserPrincipal(p);
     }
 
-    private boolean isCustomAuth(SecurityConstraint constraint)
-    {
+    private boolean isCustomAuth(SecurityConstraint constraint) {
         return SecurityConstraint.CUSTOM_AUTH_METHOD.equals(constraint.getMethod());
     }
 }
diff --git a/core/src/main/java/flex/messaging/security/MessagingSecurity.java b/core/src/main/java/flex/messaging/security/MessagingSecurity.java
index 4f3491d..e9f9c4c 100644
--- a/core/src/main/java/flex/messaging/security/MessagingSecurity.java
+++ b/core/src/main/java/flex/messaging/security/MessagingSecurity.java
@@ -23,27 +23,26 @@
  * by the DataManagement Assembler instance.  If it is implemented, this
  * class is used to do security filtering of subscribe and send operations.
  */
-public interface MessagingSecurity 
-{
+public interface MessagingSecurity {
     /**
      * This method is invoked before a client subscribe request is processed,
      * so that custom application logic can determine whether the client
-     * should be allowed to subscribe to the specified subtopic. You can access 
+     * should be allowed to subscribe to the specified subtopic. You can access
      * the current user via
      * <code>FlexContext.getUserPrincipal()</code>.
-     * 
+     *
      * @param subtopic The subtopic the client is attempting to subscribe to.
      * @return true to allow the subscription, false to prevent it.
      */
     boolean allowSubscribe(Subtopic subtopic);
-    
+
     /**
      * This method is invoked before a client message is sent to a subtopic,
      * so that custom application logic can determine whether the client
-     * should be allowed to send to the specified subtopic. You can access 
+     * should be allowed to send to the specified subtopic. You can access
      * the current user via
      * <code>FlexContext.getUserPrincipal()</code>.
-     * 
+     *
      * @param subtopic The subtopic the client is attempting to send a message to.
      * @return true to allow the message to be sent, false to prevent it.
      */
diff --git a/core/src/main/java/flex/messaging/security/PrincipalConverter.java b/core/src/main/java/flex/messaging/security/PrincipalConverter.java
index 09895eb..aa02173 100644
--- a/core/src/main/java/flex/messaging/security/PrincipalConverter.java
+++ b/core/src/main/java/flex/messaging/security/PrincipalConverter.java
@@ -22,11 +22,10 @@
 /**
  * The principal Converter interface.
  */
-public interface PrincipalConverter
-{
+public interface PrincipalConverter {
     /**
      * Classes that implement the flex.messaging.security.PrinciplaConverter interface, to convert a J2EE Principal to a
-     * Flex Principal impl. A Flex Principal impl is specific to different Application Servers and will be used by Flex to 
+     * Flex Principal impl. A Flex Principal impl is specific to different Application Servers and will be used by Flex to
      * do security authorization check, which calls security framework API specific to Application Servers.
      */
     Principal convertPrincipal(Principal principal);
diff --git a/core/src/main/java/flex/messaging/security/SecurityException.java b/core/src/main/java/flex/messaging/security/SecurityException.java
index ed511cc..bc3ffe2 100644
--- a/core/src/main/java/flex/messaging/security/SecurityException.java
+++ b/core/src/main/java/flex/messaging/security/SecurityException.java
@@ -28,8 +28,7 @@
  * errors. It defines a set of supported error code values as constants suffixed
  * with _CODE.
  */
-public class SecurityException extends MessageException
-{
+public class SecurityException extends MessageException {
     static final long serialVersionUID = -3168212117963624230L;
 
     // Error code constants.
@@ -43,24 +42,20 @@
     // Constructors
     //
     //--------------------------------------------------------------------------    
-    
+
     /**
      * Create a SecurityException that will use the default ResourceLoader
      * for error codes.
      */
-    public SecurityException()
-    {
+    public SecurityException() {
         super();
     }
-    
+
     /**
      * Create a SecurityException that will use the specified ResourceLoader
      * for error codes.
-     * 
-     *
      */
-    public SecurityException(ResourceLoader resourceLoader)
-    {
+    public SecurityException(ResourceLoader resourceLoader) {
         super(resourceLoader);
     }
 
@@ -69,72 +64,64 @@
     // Properties
     //
     //--------------------------------------------------------------------------        
-    
+
     //----------------------------------
     //  defaultLogMessageIntro
     //----------------------------------            
 
     /**
-     *
      * Returns the default initial text for the log output generated by <code>logAtHingePoint()</code>.
      */
-    public String getDefaultLogMessageIntro()
-    {
+    public String getDefaultLogMessageIntro() {
         return "Security error for message: ";
-    }  
-    
+    }
+
     //----------------------------------
     //  logStackTraceEnabled
     //----------------------------------            
-    
+
     /**
-     *
      * Override to disable stack trace logging. Security exceptions are generally innocuous (invalid credentials/role membership)
      * and stack traces make these faults scarier than necessary.
      */
-    public boolean isLogStackTraceEnabled()
-    {
+    public boolean isLogStackTraceEnabled() {
         return false;
-    }    
-    
+    }
+
     //----------------------------------
     //  peferredLogLevel
     //----------------------------------            
-    
+
     /**
-     *
      * Returns the preferred log level for this exception instance.
      */
-    public short getPreferredLogLevel()
-    {
+    public short getPreferredLogLevel() {
         // SecurityExceptions are common, incorrect credentials/invalid role membership, and don't
         // need to be logged at the ERROR level.
-        return LogEvent.DEBUG;        
-    } 
-    
+        return LogEvent.DEBUG;
+    }
+
     //----------------------------------
     //  failingMessage
     //----------------------------------            
-    
+
     private Message failingMessage;
-    
+
     /**
      * Returns the message with information about what caused this security exception to be thrown.
-     * 
+     *
      * @return message with information about what caused this security exception to be thrown
      */
-    public Message getFailingMessage()
-    {
+    public Message getFailingMessage() {
         return failingMessage;
     }
 
     /**
      * Sets the message with information about what caused this security exception to be thrown.
-     * 
+     *
      * @param failingMessage message with information about what caused this security exception to be thrown
      */
-    public void setFailingMessage(Message failingMessage)
-    {
+    public void setFailingMessage(Message failingMessage) {
         this.failingMessage = failingMessage;
     }
 
@@ -143,21 +130,19 @@
     // Public Methods
     //
     //--------------------------------------------------------------------------    
-    
+
     /**
      * Overrides <code>createErrorMessage()</code> to correlate the <code>ErrorMessage</code> to the
      * failing message by id and destination.
-     * 
+     *
      * @return correlated error message
      */
-    public ErrorMessage createErrorMessage()
-    {
+    public ErrorMessage createErrorMessage() {
         ErrorMessage msg = super.createErrorMessage();
-        if (failingMessage != null)
-        {
+        if (failingMessage != null) {
             msg.setCorrelationId(failingMessage.getMessageId());
             msg.setDestination(failingMessage.getDestination());
         }
         return msg;
-    } 
+    }
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/services/AbstractBootstrapService.java b/core/src/main/java/flex/messaging/services/AbstractBootstrapService.java
index 4314250..0e4d14b 100644
--- a/core/src/main/java/flex/messaging/services/AbstractBootstrapService.java
+++ b/core/src/main/java/flex/messaging/services/AbstractBootstrapService.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 package flex.messaging.services;
 
 import java.util.List;
@@ -31,303 +31,265 @@
 
 /**
  * The purpose of <code>AbstractBootstrapService</code> is to enable creation
- * of dynamic services, destinations, and adapters. <code>MessageBroker</code> 
- * creates an instance of this class and calls <code>initialize</code> after all 
- * of the server components are created but right before they are started. 
- * <code>MessageBroker</code> also calls <code>start</code> as server starts and 
- * <code>stop</code> as server stops. Subclasses should have their dynamic 
- * component creation code in one of <code>initialize</code>, <code>start</code>, 
- * and <code>stop</code> methods depending on when they want their components 
- * to be created.  
+ * of dynamic services, destinations, and adapters. <code>MessageBroker</code>
+ * creates an instance of this class and calls <code>initialize</code> after all
+ * of the server components are created but right before they are started.
+ * <code>MessageBroker</code> also calls <code>start</code> as server starts and
+ * <code>stop</code> as server stops. Subclasses should have their dynamic
+ * component creation code in one of <code>initialize</code>, <code>start</code>,
+ * and <code>stop</code> methods depending on when they want their components
+ * to be created.
  */
-public abstract class AbstractBootstrapService implements Service
-{
+public abstract class AbstractBootstrapService implements Service {
     // Errors
     private static final int NULL_COMPONENT_PROPERTY = 11116;
-    
+
     protected String id;
     protected MessageBroker broker;
-    
+
     /**
-     * Default constructor which is no-op. 
+     * Default constructor which is no-op.
      */
-    public AbstractBootstrapService()
-    {
+    public AbstractBootstrapService() {
         // No-op
     }
-    
+
     /**
      * Returns the id of the <code>AbstractBootstrapService</code>.
-     * 
+     *
      * @return The id of the <code>AbstractBootstrapService</code>.
      */
-    public String getId()
-    {
+    public String getId() {
         return id;
     }
-    
+
     /**
-     * Sets the id of the <code>AbstractBootstrapService</code>. If the 
-     * <code>AbstractBootstrapService</code> has a <code>MessageBroker</code> 
+     * Sets the id of the <code>AbstractBootstrapService</code>. If the
+     * <code>AbstractBootstrapService</code> has a <code>MessageBroker</code>
      * already assigned, it also updates the id in the <code>MessageBroker</code>.
      */
-    public void setId(String id)
-    {
+    public void setId(String id) {
         String oldId = getId();
-        
-        if (id == null)
-        {
+
+        if (id == null) {
             // Id of a component cannot be null.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(NULL_COMPONENT_PROPERTY, new Object[]{"id"});
             throw ce;
-        }      
-        
+        }
+
         this.id = id;
-        
+
         // Update the service id in the broker
         MessageBroker broker = getMessageBroker();
-        if (broker != null)
-        {
+        if (broker != null) {
             // broker must have the service then
             broker.removeService(oldId);
             broker.addService(this);
-        }            
+        }
     }
-    
+
     /**
      * Returns the <code>MessageBroker</code> managing this <code>AbstractBootstrapService</code>.
-     * 
+     *
      * @return MessageBroker of the <code>AbstractBootstrapService</code>.
      */
-    public MessageBroker getMessageBroker()
-    {
+    public MessageBroker getMessageBroker() {
         return broker;
     }
-    
+
     /**
      * Sets the <code>MessageBroker</code> managing this <code>AbstractBootstrapService</code>.
-     * Removes the <code>AbstractService</code> from the old broker (if there was one) 
+     * Removes the <code>AbstractService</code> from the old broker (if there was one)
      * and adds to the list of services in the new broker.
-     * 
+     *
      * @param broker <code>MessageBroker</code> of the <code>AbstractBootstrapService</code>.
      */
-    public void setMessageBroker(MessageBroker broker)
-    {
-        MessageBroker oldBroker = getMessageBroker();                                    
+    public void setMessageBroker(MessageBroker broker) {
+        MessageBroker oldBroker = getMessageBroker();
 
         this.broker = broker;
 
-        if (oldBroker != null)
-        {
+        if (oldBroker != null) {
             oldBroker.removeService(getId());
-        }       
-                
+        }
+
         // Add service to the new broker if needed
         if (broker.getService(getId()) != this)
-            broker.addService(this);        
+            broker.addService(this);
     }
-    
+
     /**
      * Always unmanaged.
-     * 
+     *
      * @return <code>false</code>.
      */
-    public boolean isManaged()
-    {
+    public boolean isManaged() {
         return false;
     }
 
     /**
      * Management is always disabled.
      */
-    public void setManaged(boolean enableManagement)
-    {         
+    public void setManaged(boolean enableManagement) {
         // No-op
     }
-    
+
     /**
-     * Called by the <code>MessageBroker</code> after all of the server 
-     * components are created but right before they are started. This is 
+     * Called by the <code>MessageBroker</code> after all of the server
+     * components are created but right before they are started. This is
      * usually the place to create dynamic components.
-     * 
-     * @param id Id of the <code>AbstractBootstrapService</code>.
-     * @param properties Properties for the <code>AbstractBootstrapService</code>. 
+     *
+     * @param id         Id of the <code>AbstractBootstrapService</code>.
+     * @param properties Properties for the <code>AbstractBootstrapService</code>.
      */
     public abstract void initialize(String id, ConfigMap properties);
-        
+
     /**
      * Called by the <code>MessageBroker</code> as server starts. Useful for
      * custom code that needs to run after all the components are initialized
-     * and the server is starting up. 
-     */  
+     * and the server is starting up.
+     */
     public abstract void start();
 
     /**
-     * Called by the <code>MessageBroker</code> as server stops. Useful for 
+     * Called by the <code>MessageBroker</code> as server stops. Useful for
      * custom code that needs to run as the server is shutting down.
      */
     public abstract void stop();
-       
 
-    public ConfigMap describeService(Endpoint endpoint)
-    {
+
+    public ConfigMap describeService(Endpoint endpoint) {
         return null;
     }
-    
 
-    public BaseControl getControl()
-    {
+
+    public BaseControl getControl() {
         throw new UnsupportedOperationException();
     }
-    
 
-    public void setControl(BaseControl control)
-    {        
+
+    public void setControl(BaseControl control) {
         throw new UnsupportedOperationException();
     }
-    
 
-    public void addDefaultChannel(String id)
-    {        
-        // No-op
-    }
-    
 
-    public void setDefaultChannels(List<String> ids)
-    {
+    public void addDefaultChannel(String id) {
         // No-op
     }
 
 
-    public boolean removeDefaultChannel(String id)
-    {
+    public void setDefaultChannels(List<String> ids) {
+        // No-op
+    }
+
+
+    public boolean removeDefaultChannel(String id) {
         return false;
     }
 
 
-    public void addDestination(Destination destination)
-    {   
+    public void addDestination(Destination destination) {
         throw new UnsupportedOperationException();
     }
 
 
-    public Destination createDestination(String destId)
-    {
+    public Destination createDestination(String destId) {
         throw new UnsupportedOperationException();
     }
 
 
-    public Destination removeDestination(String id)
-    {
-        throw new UnsupportedOperationException();
-    }
-    
-
-    public String getDefaultAdapter()
-    {
+    public Destination removeDestination(String id) {
         throw new UnsupportedOperationException();
     }
 
 
-    public void setDefaultAdapter(String id)
-    {        
-        throw new UnsupportedOperationException();
-    }
-    
-
-    public List<String> getDefaultChannels()
-    {
+    public String getDefaultAdapter() {
         throw new UnsupportedOperationException();
     }
 
 
-    public Destination getDestination(Message message)
-    {
+    public void setDefaultAdapter(String id) {
         throw new UnsupportedOperationException();
     }
 
 
-    public Destination getDestination(String id)
-    {
+    public List<String> getDefaultChannels() {
         throw new UnsupportedOperationException();
     }
 
 
-    public Map<String, Destination> getDestinations()
-    {
+    public Destination getDestination(Message message) {
         throw new UnsupportedOperationException();
     }
 
 
-    public Map<String, String> getRegisteredAdapters()
-    {
+    public Destination getDestination(String id) {
         throw new UnsupportedOperationException();
     }
 
 
-    public boolean isStarted()
-    {
-        return false;
+    public Map<String, Destination> getDestinations() {
+        throw new UnsupportedOperationException();
     }
-    
 
-    public boolean isSupportedMessage(Message message)
-    {
+
+    public Map<String, String> getRegisteredAdapters() {
+        throw new UnsupportedOperationException();
+    }
+
+
+    public boolean isStarted() {
         return false;
     }
 
 
-    public boolean isSupportedMessageType(String messageClassName)
-    {
+    public boolean isSupportedMessage(Message message) {
         return false;
     }
 
 
-    public String registerAdapter(String id, String className)
-    {
+    public boolean isSupportedMessageType(String messageClassName) {
+        return false;
+    }
+
+
+    public String registerAdapter(String id, String className) {
         throw new UnsupportedOperationException();
     }
 
 
-    public String unregisterAdapter(String id)
-    {
-        throw new UnsupportedOperationException();
-    }
-    
-
-    public Object serviceCommand(CommandMessage message)
-    {
-        throw new UnsupportedOperationException();
-    }
-    
-
-    public Object serviceMessage(Message message)
-    {
-        throw new UnsupportedOperationException();
-    }
-    
-
-    public List getMessageTypes()
-    {        
+    public String unregisterAdapter(String id) {
         throw new UnsupportedOperationException();
     }
 
 
-    public void addMessageType(String messageType)
-    {
-        throw new UnsupportedOperationException();   
+    public Object serviceCommand(CommandMessage message) {
+        throw new UnsupportedOperationException();
     }
 
 
-    public void setMessageTypes(List messageTypes)
-    {        
+    public Object serviceMessage(Message message) {
         throw new UnsupportedOperationException();
-    }   
-        
+    }
 
-    public boolean removeMessageType(String messageType)
-    {
+
+    public List getMessageTypes() {
         throw new UnsupportedOperationException();
-    }       
+    }
+
+
+    public void addMessageType(String messageType) {
+        throw new UnsupportedOperationException();
+    }
+
+
+    public void setMessageTypes(List messageTypes) {
+        throw new UnsupportedOperationException();
+    }
+
+
+    public boolean removeMessageType(String messageType) {
+        throw new UnsupportedOperationException();
+    }
 }
diff --git a/core/src/main/java/flex/messaging/services/AbstractService.java b/core/src/main/java/flex/messaging/services/AbstractService.java
index 7d7d1ee..a4cfeb0 100644
--- a/core/src/main/java/flex/messaging/services/AbstractService.java
+++ b/core/src/main/java/flex/messaging/services/AbstractService.java
@@ -43,9 +43,10 @@
  * This is the default implementation of <code>Service</code>, which provides a
  * convenient base for behavior and associations common to all Services.
  */
-public abstract class AbstractService extends ManageableComponent implements Service
-{
-    /** Log category for <code>AbstractService</code>.*/
+public abstract class AbstractService extends ManageableComponent implements Service {
+    /**
+     * Log category for <code>AbstractService</code>.
+     */
     public static final String LOG_CATEGORY = LogCategories.SERVICE_GENERAL;
     /**
      * Log category that captures startup information for service's destinations.
@@ -70,8 +71,7 @@
     /**
      * Constructs an unmanaged <code>AbstractService</code>.
      */
-    public AbstractService()
-    {
+    public AbstractService() {
         this(false);
     }
 
@@ -79,14 +79,13 @@
      * Constructs an <code>AbstractService</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>AbstractService</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public AbstractService(boolean enableManagement)
-    {
+    public AbstractService(boolean enableManagement) {
         super(enableManagement);
 
-        adapterClasses = new HashMap<String, String>(); 
-        destinations = new ConcurrentHashMap<String, Destination>();             
+        adapterClasses = new HashMap<String, String>();
+        destinations = new ConcurrentHashMap<String, Destination>();
     }
 
     //--------------------------------------------------------------------------
@@ -100,31 +99,24 @@
      * it is started. If subclasses override, they must call <code>super.validate()</code>.
      */
     @Override
-    protected void validate()
-    {
+    protected void validate() {
         if (isValid())
             return;
 
         super.validate();
 
-        if (defaultChannels != null)
-        {
-            for (Iterator<String> iter = defaultChannels.iterator(); iter.hasNext();)
-            {
+        if (defaultChannels != null) {
+            for (Iterator<String> iter = defaultChannels.iterator(); iter.hasNext(); ) {
                 String id = iter.next();
-                if (!getMessageBroker().getChannelIds().contains(id))
-                {
+                if (!getMessageBroker().getChannelIds().contains(id)) {
                     iter.remove();
-                    if (Log.isWarn())
-                    {
-                        Log.getLogger(getLogCategory()).warn("Removing the Channel "+id+" from Destination "+getId()+
+                    if (Log.isWarn()) {
+                        Log.getLogger(getLogCategory()).warn("Removing the Channel " + id + " from Destination " + getId() +
                                 "as MessageBroker does not know the channel");
                     }
                 }
             }
-        }
-        else
-        {
+        } else {
             defaultChannels = getMessageBroker().getDefaultChannels();
         }
     }
@@ -136,10 +128,8 @@
      * If subclasses override, they must call <code>super.start()</code>.
      */
     @Override
-    public void start()
-    {
-        if (isStarted())
-        {
+    public void start() {
+        if (isStarted()) {
             // Needed for destinations added after startup.
             startDestinations();
             return;
@@ -147,22 +137,19 @@
 
         // Check if the MessageBroker is started
         MessageBroker broker = getMessageBroker();
-        if (!broker.isStarted())
-        {
-            if (Log.isWarn())
-            {
+        if (!broker.isStarted()) {
+            if (Log.isWarn()) {
                 Log.getLogger(getLogCategory()).warn("Service with id '{0}' cannot be started" +
-                        " when the MessageBroker is not started.",
+                                " when the MessageBroker is not started.",
                         new Object[]{getId()});
             }
             return;
         }
 
         // Set up management
-        if (isManaged() && broker.isManaged())
-        {
+        if (isManaged() && broker.isManaged()) {
             setupServiceControl(broker);
-            MessageBrokerControl controller = (MessageBrokerControl)broker.getControl();
+            MessageBrokerControl controller = (MessageBrokerControl) broker.getControl();
             if (getControl() != null)
                 controller.addService(getControl().getObjectName());
         }
@@ -178,10 +165,8 @@
      * If subclasses override, they must call <code>super.stop()</code>.
      */
     @Override
-    public void stop()
-    {
-        if (!isStarted())
-        {
+    public void stop() {
+        if (!isStarted()) {
             return;
         }
 
@@ -190,10 +175,8 @@
         super.stop();
 
         // Remove management
-        if (isManaged() && getMessageBroker().isManaged())
-        {
-            if (getControl() != null)
-            {
+        if (isManaged() && getMessageBroker().isManaged()) {
+            if (getControl() != null) {
                 getControl().unregister();
                 setControl(null);
             }
@@ -212,20 +195,18 @@
      *
      * @return The Map of adapter id and classes.
      */
-    public Map<String, String> getRegisteredAdapters()
-    {
+    public Map<String, String> getRegisteredAdapters() {
         return adapterClasses;
     }
 
     /**
      * Registers the adapter with the <code>AbstractService</code>.
      *
-     * @param id The id of the adapter.
+     * @param id           The id of the adapter.
      * @param adapterClass The class of the adapter.
      * @return The previous adapter class that the id was associated with.
      */
-    public String registerAdapter(String id, String adapterClass)
-    {
+    public String registerAdapter(String id, String adapterClass) {
         return adapterClasses.put(id, adapterClass);
     }
 
@@ -236,10 +217,9 @@
      * @param id The id of the adapter.
      * @return The adapter class that the id was associated with.
      */
-    public String unregisterAdapter(String id)
-    {
+    public String unregisterAdapter(String id) {
         if (id != null && id.equals(defaultAdapterId))
-                defaultAdapterId = null;
+            defaultAdapterId = null;
 
         return adapterClasses.remove(id);
 
@@ -250,8 +230,7 @@
      *
      * @return defaultAdapterId The id of the default adapter of the <code>AbstractService</code>.
      */
-    public String getDefaultAdapter()
-    {
+    public String getDefaultAdapter() {
         return defaultAdapterId;
     }
 
@@ -260,10 +239,8 @@
      *
      * @param id The id of the default adapter.
      */
-    public void setDefaultAdapter(String id)
-    {
-        if (adapterClasses.get(id) == null)
-        {
+    public void setDefaultAdapter(String id) {
+        if (adapterClasses.get(id) == null) {
             // No adapter with id '{0}' is registered with the service '{1}'.
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.UNREGISTERED_ADAPTER, new Object[]{id, getId()});
@@ -277,8 +254,7 @@
      *
      * @return list of default channels
      */
-    public List<String> getDefaultChannels()
-    {
+    public List<String> getDefaultChannels() {
         return defaultChannels;
     }
 
@@ -289,23 +265,19 @@
      *
      * @param id The id of the channel.
      */
-    public void addDefaultChannel(String id)
-    {
+    public void addDefaultChannel(String id) {
         if (defaultChannels == null)
             defaultChannels = new ArrayList<String>();
         else if (defaultChannels.contains(id))
             return;
 
-        if (isStarted())
-        {
+        if (isStarted()) {
             List<String> channelIds = getMessageBroker().getChannelIds();
-            if (channelIds == null || !channelIds.contains(id))
-            {
+            if (channelIds == null || !channelIds.contains(id)) {
                 // No channel with id ''{0}'' is known by the MessageBroker.
-                if (Log.isWarn())
-                {
+                if (Log.isWarn()) {
                     Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." +
-                            " Not adding the channel.",
+                                    " Not adding the channel.",
                             new Object[]{id});
                 }
                 return;
@@ -323,21 +295,16 @@
      *
      * @param ids List of channel ids.
      */
-    public void setDefaultChannels(List<String> ids)
-    {
-        if (ids != null && isStarted())
-        {
+    public void setDefaultChannels(List<String> ids) {
+        if (ids != null && isStarted()) {
             List<String> channelIds = getMessageBroker().getChannelIds();
-            for (Iterator<String> iter = ids.iterator(); iter.hasNext();)
-            {
+            for (Iterator<String> iter = ids.iterator(); iter.hasNext(); ) {
                 String id = iter.next();
-                if (channelIds == null || !channelIds.contains(id))
-                {
+                if (channelIds == null || !channelIds.contains(id)) {
                     iter.remove();
-                    if (Log.isWarn())
-                    {
+                    if (Log.isWarn()) {
                         Log.getLogger(getLogCategory()).warn("No channel with id '{0}' is known by the MessageBroker." +
-                                " Not adding the channel.",
+                                        " Not adding the channel.",
                                 new Object[]{id});
                     }
                 }
@@ -353,8 +320,7 @@
      * @param id The id of the channel.
      * @return <code>true</code> if the list contained the channel id.
      */
-    public boolean removeDefaultChannel(String id)
-    {
+    public boolean removeDefaultChannel(String id) {
         return defaultChannels != null && defaultChannels.remove(id);
     }
 
@@ -365,12 +331,10 @@
      * @return The <code>Destination</code> that the <code>Message</code> targets.
      * @throws MessageException if no such <code>Destination</code> exists.
      */
-    public Destination getDestination(Message message)
-    {
+    public Destination getDestination(Message message) {
         String id = message.getDestination();
         Destination result = getDestination(id);
-        if (result == null)
-        {
+        if (result == null) {
             throw new MessageException
                     ("No destination '" + id + "' exists in service " + getClass().getName());
         }
@@ -384,8 +348,7 @@
      * @param id The id of the <code>Destination</code>.
      * @return the destination
      */
-    public Destination getDestination(String id)
-    {
+    public Destination getDestination(String id) {
         return destinations.get(id);
     }
 
@@ -394,8 +357,7 @@
      *
      * @return The a read-only Map of <code>Destination</code> ids and instances.
      */
-    public Map<String, Destination> getDestinations()
-    {
+    public Map<String, Destination> getDestinations() {
         return Collections.unmodifiableMap(destinations);
     }
 
@@ -409,16 +371,14 @@
      * @param id The id of the <code>Destination</code>.
      * @return The <code>Destination</code> instanced created.
      */
-    public Destination createDestination(String id)
-    {
-        if (id == null)
-        {
+    public Destination createDestination(String id) {
+        if (id == null) {
             // Cannot add ''{0}'' with null id to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT_ID, new Object[]{"Destination", "Service"});
             throw ex;
         }
-        
+
         // check with the message broker to make sure that no destination with the id already exists
         getMessageBroker().isDestinationRegistered(id, getId(), true);
 
@@ -443,10 +403,8 @@
      *
      * @param destination The <code>Destination</code> instance to be added.
      */
-    public void addDestination(Destination destination)
-    {
-        if (destination == null)
-        {
+    public void addDestination(Destination destination) {
+        if (destination == null) {
             // Cannot add null ''{0}'' to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT, new Object[]{"Destination", "Service"});
@@ -455,16 +413,14 @@
 
         String id = destination.getId();
 
-        if (id == null)
-        {
+        if (id == null) {
             // Cannot add ''{0}'' with null id to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT_ID, new Object[]{"Destination", "Service"});
             throw ex;
         }
         // No need to add if the destination is already there
-        if (getDestination(id) == destination)
-        {
+        if (getDestination(id) == destination) {
             return;
         }
 
@@ -474,8 +430,7 @@
 
         destinations.put(id, destination);
 
-        if (destination.getService() == null || destination.getService() != this)
-        {
+        if (destination.getService() == null || destination.getService() != this) {
             destination.setService(this);
         }
     }
@@ -487,11 +442,9 @@
      * @param id The id of the <code>Destination</code>.
      * @return Previous <code>Destination</code> associated with the id.
      */
-    public Destination removeDestination(String id)
-    {
+    public Destination removeDestination(String id) {
         Destination destination = destinations.get(id);
-        if (destination != null)
-        {
+        if (destination != null) {
             destination.stop();
             destinations.remove(id);
             getMessageBroker().unregisterDestination(id);
@@ -507,16 +460,14 @@
      * @param id the id
      */
     @Override
-    public void setId(String id)
-    {
+    public void setId(String id) {
         String oldId = getId();
 
         super.setId(id);
 
         // Update the service id in the broker
         MessageBroker broker = getMessageBroker();
-        if (broker != null)
-        {
+        if (broker != null) {
             // broker must have the service then
             broker.removeService(oldId);
             broker.addService(this);
@@ -528,9 +479,8 @@
      *
      * @return MessageBroker of the <code>AbstractService</code>.
      */
-    public MessageBroker getMessageBroker()
-    {
-        return (MessageBroker)getParent();
+    public MessageBroker getMessageBroker() {
+        return (MessageBroker) getParent();
     }
 
     /**
@@ -540,14 +490,12 @@
      *
      * @param broker <code>MessageBroker</code> of the <code>AbstractService</code>.
      */
-    public void setMessageBroker(MessageBroker broker)
-    {
+    public void setMessageBroker(MessageBroker broker) {
         MessageBroker oldBroker = getMessageBroker();
 
         setParent(broker);
 
-        if (oldBroker != null)
-        {
+        if (oldBroker != null) {
             oldBroker.removeService(getId());
         }
 
@@ -563,53 +511,45 @@
     //--------------------------------------------------------------------------
 
     /**
-     * Calls {@link AbstractService#describeService(Endpoint, boolean)} with 
+     * Calls {@link AbstractService#describeService(Endpoint, boolean)} with
      * the passed in endpoint and boolean value of true.
      *
      * @param endpoint Endpoint used to filter the destinations of the service;
-     * no filtering is done if the endpoint is null. 
+     *                 no filtering is done if the endpoint is null.
      * @return ConfigMap of service properties.
      * @see flex.messaging.services.AbstractService#describeService(Endpoint, boolean)
      */
-    public ConfigMap describeService(Endpoint endpoint)
-    {
+    public ConfigMap describeService(Endpoint endpoint) {
         return describeService(endpoint, true);
     }
 
     /**
-     *
      * Returns a <tt>ConfigMap</tt> of service properties that the client needs.
-     * The <tt>allDestinations</tt> flag controls whether configuration for all 
-     * destinations or only reliable client destinations is returned. 
+     * The <tt>allDestinations</tt> flag controls whether configuration for all
+     * destinations or only reliable client destinations is returned.
      * Subclasses can override to return properties relevant to their implementation.
      *
-     * @param endpoint Endpoint used to filter the destinations of the service.
-     * No filtering is done if the endpoint is null. 
+     * @param endpoint     Endpoint used to filter the destinations of the service.
+     *                     No filtering is done if the endpoint is null.
      * @param onlyReliable When false, configuration for all destinations is
-     * returned instead of only reliable destinations. 
+     *                     returned instead of only reliable destinations.
      * @return ConfigMap of service properties.
      */
-    public ConfigMap describeService(Endpoint endpoint, boolean onlyReliable)
-    {
+    public ConfigMap describeService(Endpoint endpoint, boolean onlyReliable) {
         ConfigMap serviceConfig = null;
 
         // Scan for reliable destinations; if any are found they need to be shipped to the client.
-        for (Destination destination : destinations.values())
-        {
+        for (Destination destination : destinations.values()) {
             boolean endpointIdMatches = false;
             if (endpoint == null) // No need to check against destination channels.
             {
                 endpointIdMatches = true;
-            }
-            else // One of the destination ids should match.
+            } else // One of the destination ids should match.
             {
                 List<String> channels = destination.getChannels();
-                if (channels != null)
-                {
-                    for (String channelId : channels)
-                    {
-                        if (channelId.equals(endpoint.getId()))
-                        {
+                if (channels != null) {
+                    for (String channelId : channels) {
+                        if (channelId.equals(endpoint.getId())) {
                             endpointIdMatches = true;
                             break;
                         }
@@ -617,11 +557,9 @@
                 }
             }
 
-            if (endpointIdMatches)
-            {
+            if (endpointIdMatches) {
                 ConfigMap destinationConfig = destination.describeDestination(onlyReliable);
-                if (destinationConfig != null && destinationConfig.size() > 0)
-                {
+                if (destinationConfig != null && destinationConfig.size() > 0) {
                     if (serviceConfig == null) // Lazy-init only if destinations exist.
                     {
                         serviceConfig = new ConfigMap();
@@ -647,11 +585,9 @@
     /**
      * {@inheritDoc}
      */
-    public Object serviceCommand(CommandMessage message)
-    {
+    public Object serviceCommand(CommandMessage message) {
         Object result = serviceCommonCommands(message);
-        if (result != null)
-        {
+        if (result != null) {
             // TODO: ServiceControl needs this method.
             /*
             if (isManaged())
@@ -670,24 +606,17 @@
     //
     //--------------------------------------------------------------------------
 
-    protected Object serviceCommonCommands(CommandMessage message)
-    {
+    protected Object serviceCommonCommands(CommandMessage message) {
         Object commandResult = null;
-        if (message.getOperation() == CommandMessage.CLIENT_PING_OPERATION)
-        {
+        if (message.getOperation() == CommandMessage.CLIENT_PING_OPERATION) {
             commandResult = Boolean.TRUE;
-        }
-        else if (message.getOperation() == CommandMessage.CLUSTER_REQUEST_OPERATION)
-        {
+        } else if (message.getOperation() == CommandMessage.CLUSTER_REQUEST_OPERATION) {
             ClusterManager clusterManager = getMessageBroker().getClusterManager();
             String serviceType = getClass().getName();
             String destinationName = message.getDestination();
-            if (clusterManager.isDestinationClustered(serviceType, destinationName))
-            {
+            if (clusterManager.isDestinationClustered(serviceType, destinationName)) {
                 commandResult = clusterManager.getEndpointsForDestination(serviceType, destinationName);
-            }
-            else
-            {
+            } else {
                 // client should never send this message if its local
                 // config declares the destination is not clustered
                 commandResult = Boolean.FALSE;
@@ -703,8 +632,7 @@
      * @return The log category.
      */
     @Override
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -720,18 +648,15 @@
     /**
      * Start all of the destinations of the service.
      */
-    private void startDestinations()
-    {
-        for (Destination destination : destinations.values())
-        {
+    private void startDestinations() {
+        for (Destination destination : destinations.values()) {
             long timeBeforeStartup = 0;
             if (Log.isDebug())
                 timeBeforeStartup = System.currentTimeMillis();
 
             destination.start();
 
-            if (Log.isDebug())
-            {
+            if (Log.isDebug()) {
                 long timeAfterStartup = System.currentTimeMillis();
                 Long diffMillis = timeAfterStartup - timeBeforeStartup;
                 Log.getLogger(LOG_CATEGORY_STARTUP_DESTINATION).debug("Destination with id '{0}' is ready (startup time: '{1}' ms)",
@@ -743,10 +668,8 @@
     /**
      * Stop all of the destinations of the service.
      */
-    private void stopDestinations()
-    {
-        for (Destination destination : destinations.values())
-        {
+    private void stopDestinations() {
+        for (Destination destination : destinations.values()) {
             destination.stop();
         }
     }
diff --git a/core/src/main/java/flex/messaging/services/AuthenticationEvent.java b/core/src/main/java/flex/messaging/services/AuthenticationEvent.java
index 1435dcf..6efa81f 100644
--- a/core/src/main/java/flex/messaging/services/AuthenticationEvent.java
+++ b/core/src/main/java/flex/messaging/services/AuthenticationEvent.java
@@ -18,6 +18,7 @@
 
 import flex.messaging.FlexSession;
 import flex.messaging.client.FlexClient;
+
 import java.security.Principal;
 import java.util.EventObject;
 
@@ -28,8 +29,7 @@
  * and <tt>FlexClient</tt> for the user. Following a logout, these objects may have been invalidated
  * so exercise caution with accessing and using them.
  */
-public class AuthenticationEvent extends EventObject
-{
+public class AuthenticationEvent extends EventObject {
     private static final long serialVersionUID = 6002063582698638736L;
 
     //--------------------------------------------------------------------------
@@ -40,16 +40,15 @@
 
     /**
      * Constructs an <tt>AuthenticationEvent</tt>.
-     * 
-     * @param source The <tt>AuthenticationService</tt> dispatching this event.
-     * @param username The username used to authenticate
+     *
+     * @param source      The <tt>AuthenticationService</tt> dispatching this event.
+     * @param username    The username used to authenticate
      * @param credentials The password or secret used to authenticate.
-     * @param principal The user's <tt>Principal</tt>.
+     * @param principal   The user's <tt>Principal</tt>.
      * @param flexSession The user's <tt>FlexSession</tt>.
-     * @param flexClient The user's <tt>FlexClient</tt>.
+     * @param flexClient  The user's <tt>FlexClient</tt>.
      */
-    public AuthenticationEvent(final AuthenticationService source, final String username, final Object credentials, final Principal principal, final FlexSession flexSession, final FlexClient flexClient)
-    {
+    public AuthenticationEvent(final AuthenticationService source, final String username, final Object credentials, final Principal principal, final FlexSession flexSession, final FlexClient flexClient) {
         super(source);
         this.username = username;
         this.credentials = credentials;
@@ -67,32 +66,30 @@
     //----------------------------------
     //  credentials
     //----------------------------------    
-    
+
     private final Object credentials;
-    
+
     /**
      * Returns the credentials used for authentication, <code>null</code> for logout events.
-     * 
+     *
      * @return The credentials used for authentication, <code>null</code> for logout events.
      */
-    public Object getCredentials()
-    {
+    public Object getCredentials() {
         return credentials;
     }
-    
+
     //----------------------------------
     //  flexClient
     //----------------------------------
 
     private final FlexClient flexClient;
-    
+
     /**
      * Returns the <tt>FlexClient</tt> associated with this event.
-     * 
+     *
      * @return The <tt>FlexClient</tt> associated with this event.
      */
-    public FlexClient getFlexClient()
-    {
+    public FlexClient getFlexClient() {
         return flexClient;
     }
 
@@ -101,55 +98,51 @@
     //----------------------------------
 
     private final FlexSession flexSession;
-    
+
     /**
      * Returns the <tt>FlexSession</tt> associated with this event.
-     * 
+     *
      * @return The <tt>FlexSession</tt> associated with this event.
      */
-    public FlexSession getFlexSession()
-    {
+    public FlexSession getFlexSession() {
         return flexSession;
-    }    
-    
+    }
+
     //----------------------------------
     //  principal
     //----------------------------------
 
     private final Principal principal;
-    
+
     /**
      * Returns the <tt>Principal</tt> associated with this event.
-     * 
+     *
      * @return The <tt>Principal</tt> associated with this event.
      */
-    public Principal getPrincipal()
-    {
+    public Principal getPrincipal() {
         return principal;
     }
-    
+
     //----------------------------------
     //  source
     //----------------------------------
-    
-    public AuthenticationService getSource()
-    {
+
+    public AuthenticationService getSource() {
         return AuthenticationService.class.cast(super.getSource());
     }
-    
+
     //----------------------------------
     //  username
     //----------------------------------
-    
+
     private String username;
-    
+
     /**
      * Returns the username for authentication, <code>null</code> for logout events.
-     * 
+     *
      * @return The username for authentication, <code>null</code> for logout events.
      */
-    public String getUsername()
-    {
+    public String getUsername() {
         return username;
     }
 }
diff --git a/core/src/main/java/flex/messaging/services/AuthenticationListener.java b/core/src/main/java/flex/messaging/services/AuthenticationListener.java
index 1a8b29a..14484d7 100644
--- a/core/src/main/java/flex/messaging/services/AuthenticationListener.java
+++ b/core/src/main/java/flex/messaging/services/AuthenticationListener.java
@@ -23,13 +23,12 @@
  * <tt>AuthenticationListener</tt>s are registered with the <tt>AuthenticationService</tt>
  * and allow for custom post-processing of successful user login and logout events.
  */
-public interface AuthenticationListener extends EventListener
-{
+public interface AuthenticationListener extends EventListener {
     /**
      * Invoked after a user has successfully logged in.
      */
     void loginSucceeded(AuthenticationEvent event);
-    
+
     /**
      * Invoked after a user has successfully logged out.
      */
diff --git a/core/src/main/java/flex/messaging/services/AuthenticationService.java b/core/src/main/java/flex/messaging/services/AuthenticationService.java
index 345e0c1..0a2d184 100644
--- a/core/src/main/java/flex/messaging/services/AuthenticationService.java
+++ b/core/src/main/java/flex/messaging/services/AuthenticationService.java
@@ -39,14 +39,13 @@
  * Core service that is automatically created and registered with a <tt>MessageBroker</tt>.
  * It handles login and logout commands from clients.
  * The service implementation is internal, but customer code may look up the service by id
- * using <code>MessageBroker#getService(String)</code>, and register as an <tt>AuthenticationListener</tt> for 
- * <tt>AuthenticationEvent</tt>s. An authentication event is dispatched following successful and after 
+ * using <code>MessageBroker#getService(String)</code>, and register as an <tt>AuthenticationListener</tt> for
+ * <tt>AuthenticationEvent</tt>s. An authentication event is dispatched following successful and after
  * successful logout.
  */
-public class AuthenticationService extends AbstractService
-{
+public class AuthenticationService extends AbstractService {
     private static final int INVALID_CREDENTIALS_ERROR = 10064;
-    
+
     /**
      * The well-known id that the <tt>AuthenticationService</tt> is bound to the <tt>MessageBroker</tt> under.
      */
@@ -55,87 +54,79 @@
     /**
      *
      */
-    public AuthenticationService()
-    {
+    public AuthenticationService() {
         this(false);
     }
-    
+
     /**
      *
      */
-    public AuthenticationService(boolean enableManagement)
-    {
+    public AuthenticationService(boolean enableManagement) {
         // this service can never be managed
         super(false);
         super.setId(ID);
     }
-    
+
     /**
      * Internal thread-safe storage for AuthenticationListeners.
      */
     private final CopyOnWriteArrayList<AuthenticationListener> authenticationListeners = new CopyOnWriteArrayList<AuthenticationListener>();
-     
+
     /**
      * Registers an <tt>AuthenticationListener</tt> to receive <tt>AuthenticationEvent</tt>s.
-     *  
+     *
      * @param listener The <tt>AuthenticationListener</tt> to register.
      */
-    public void addAuthenticationListener(final AuthenticationListener listener)
-    {
+    public void addAuthenticationListener(final AuthenticationListener listener) {
         authenticationListeners.addIfAbsent(listener);
     }
-    
+
     /**
      * Unregisters an <tt>AuthenticationListener</tt>.
-     * 
+     *
      * @param listener The <tt>AuthenticationListener</tt> to unregister.
      */
-    public void removeAuthenticationListener(final AuthenticationListener listener)
-    {
+    public void removeAuthenticationListener(final AuthenticationListener listener) {
         authenticationListeners.remove(listener);
     }
-    
+
     // This service's id should never be changed
+
     /**
      *
      */
-    public void setId(String id)
-    {
+    public void setId(String id) {
         // No-op
     }
 
     // This service should not be visible to the client
+
     /**
      *
      */
-    public ConfigMap describeService(Endpoint endpoint)
-    { 
-        return null;
-    }
-    
-    /**
-     *
-     */
-    public Object serviceMessage(Message message)
-    {
+    public ConfigMap describeService(Endpoint endpoint) {
         return null;
     }
 
     /**
      *
      */
-    public Object serviceCommand(CommandMessage msg)
-    {
+    public Object serviceMessage(Message message) {
+        return null;
+    }
+
+    /**
+     *
+     */
+    public Object serviceCommand(CommandMessage msg) {
         LoginManager lm = getMessageBroker().getLoginManager();
-        switch (msg.getOperation())
-        {
+        switch (msg.getOperation()) {
             case CommandMessage.LOGIN_OPERATION:
-                if (msg.getBody() instanceof String)
-                {
-                    String encoded = (String)msg.getBody();
-                    Object charsetHeader = msg.getHeader(CommandMessage.CREDENTIALS_CHARSET_HEADER); 
+                if (msg.getBody() instanceof String) {
+                    String encoded = (String) msg.getBody();
+                    Object charsetHeader = msg.getHeader(CommandMessage.CREDENTIALS_CHARSET_HEADER);
                     if (charsetHeader instanceof String)
-                        decodeAndLoginWithCharset(encoded, lm, (String)charsetHeader);
+                        decodeAndLoginWithCharset(encoded, lm, (String) charsetHeader);
                     else
                         decodeAndLoginWithCharset(encoded, lm, null);
                 }
@@ -145,16 +136,12 @@
                 AuthenticationEvent logoutEvent = buildAuthenticationEvent(null, null); // null username and creds.
                 lm.logout();
                 // Success - notify listeners.
-                for (AuthenticationListener listener : authenticationListeners)
-                {
-                    try
-                    {
+                for (AuthenticationListener listener : authenticationListeners) {
+                    try {
                         listener.logoutSucceeded(logoutEvent);
-                    }
-                    catch (Throwable t)
-                    {
+                    } catch (Throwable t) {
                         if (Log.isError())
-                            Log.getLogger(LogCategories.SECURITY).error("AuthenticationListener {0} threw an exception handling a logout event.", new Object[] {listener}, t);
+                            Log.getLogger(LogCategories.SECURITY).error("AuthenticationListener {0} threw an exception handling a logout event.", new Object[]{listener}, t);
                     }
                 }
                 break;
@@ -163,13 +150,12 @@
         }
         return "success";
     }
-    
+
     /**
      *
      */
     @Override
-    public void stop()
-    {
+    public void stop() {
         super.stop();
         authenticationListeners.clear();
     }
@@ -177,16 +163,14 @@
     /**
      *
      */
-    public void decodeAndLogin(String encoded, LoginManager lm)
-    {
+    public void decodeAndLogin(String encoded, LoginManager lm) {
         decodeAndLoginWithCharset(encoded, lm, null);
     }
 
     /**
      *
      */
-    private void decodeAndLoginWithCharset(String encoded, LoginManager lm, String charset)
-    {
+    private void decodeAndLoginWithCharset(String encoded, LoginManager lm, String charset) {
         String username = null;
         String password = null;
         Base64.Decoder decoder = new Base64.Decoder();
@@ -194,72 +178,56 @@
         String decoded = "";
 
         // Charset-aware decoding of the credentials bytes 
-        if (charset != null)
-        {
-            try
-            {
+        if (charset != null) {
+            try {
                 decoded = new String(decoder.drain(), charset);
+            } catch (UnsupportedEncodingException ex) {
             }
-            catch (UnsupportedEncodingException ex)
-            {
-            }
-        }
-        else
-        {
+        } else {
             decoded = new String(decoder.drain());
         }
 
         int colon = decoded.indexOf(":");
-        if (colon > 0 && colon < decoded.length() - 1)
-        {
+        if (colon > 0 && colon < decoded.length() - 1) {
             username = decoded.substring(0, colon);
             password = decoded.substring(colon + 1);
         }
 
-        if (username != null && password != null)
-        {
+        if (username != null && password != null) {
             lm.login(username, password);
-            
+
             // Success - notify listeners.
             AuthenticationEvent loginEvent = buildAuthenticationEvent(username, password);
-            for (AuthenticationListener listener : authenticationListeners)
-            {
-                try
-                {
+            for (AuthenticationListener listener : authenticationListeners) {
+                try {
                     listener.loginSucceeded(loginEvent);
-                }
-                catch (Throwable t)
-                {
+                } catch (Throwable t) {
                     if (Log.isError())
-                        Log.getLogger(LogCategories.SECURITY).error("AuthenticationListener {0} threw an exception handling a login event.", new Object[] {listener}, t);
+                        Log.getLogger(LogCategories.SECURITY).error("AuthenticationListener {0} threw an exception handling a login event.", new Object[]{listener}, t);
                 }
             }
-        }
-        else
-        {
+        } else {
             SecurityException se = new SecurityException();
             se.setCode(SecurityException.CLIENT_AUTHENTICATION_CODE);
             se.setMessage(INVALID_CREDENTIALS_ERROR);
             throw se;
         }
     }
-    
+
     /**
      *
      */
-    protected void setupServiceControl(MessageBroker broker)
-    {
+    protected void setupServiceControl(MessageBroker broker) {
         // not doing anything
     }
-    
+
     /**
      * Utility method to build an <tt>AuthenticationEvent</tt> based on the current
      * thread-local state for the remote user.
-     * 
+     *
      * @return An <tt>AuthenticationEvent</tt> that captures references to the server state for the remote user.
      */
-    private AuthenticationEvent buildAuthenticationEvent(String username, Object credentials)
-    {
+    private AuthenticationEvent buildAuthenticationEvent(String username, Object credentials) {
         Principal principal = FlexContext.getUserPrincipal();
         FlexClient flexClient = FlexContext.getFlexClient();
         FlexSession flexSession = FlexContext.getFlexSession();
diff --git a/core/src/main/java/flex/messaging/services/MessageService.java b/core/src/main/java/flex/messaging/services/MessageService.java
index 36aeb6d..c15af1d 100644
--- a/core/src/main/java/flex/messaging/services/MessageService.java
+++ b/core/src/main/java/flex/messaging/services/MessageService.java
@@ -57,18 +57,20 @@
 import flex.messaging.services.messaging.ThrottleManager;
 import flex.messaging.services.messaging.adapters.MessagingAdapter;
 import flex.messaging.services.messaging.adapters.MessagingSecurityConstraintManager;
-import flex.messaging.services.messaging.selector.JMSSelector;
 import flex.messaging.util.StringUtils;
 
 /**
  * The MessageService class is the Service implementation that manages point-to-point
  * and publish-subscribe messaging.
  */
-public class MessageService extends AbstractService implements MessagingConstants
-{
-    /** Log category for <code>MessageService</code>. */
+public class MessageService extends AbstractService implements MessagingConstants {
+    /**
+     * Log category for <code>MessageService</code>.
+     */
     public static final String LOG_CATEGORY = LogCategories.SERVICE_MESSAGE;
-    /** Log category for <code>MessageService</code> that captures message timing. */
+    /**
+     * Log category for <code>MessageService</code> that captures message timing.
+     */
     public static final String TIMING_LOG_CATEGORY = LogCategories.MESSAGE_TIMING;
 
 
@@ -93,8 +95,7 @@
     /**
      * Constructs an unmanaged <code>MessageService</code>.
      */
-    public MessageService()
-    {
+    public MessageService() {
         super(false);
     }
 
@@ -102,10 +103,9 @@
      * Constructs an <code>MessageService</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>MessageService</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public MessageService(boolean enableManagement)
-    {
+    public MessageService(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -116,8 +116,7 @@
     //--------------------------------------------------------------------------
 
     @Override
-    public void start()
-    {
+    public void start() {
         String serviceType = getClass().getName();
         ClusterManager clm = getMessageBroker().getClusterManager();
 
@@ -129,26 +128,20 @@
          * the requestSubscription messages, then we wait for the sendSubscriptions
          * messages to come in.
          */
-        for (String destName : destinations.keySet())
-        {
+        for (String destName : destinations.keySet()) {
             MessageDestination dest = (MessageDestination) getDestination(destName);
-            if (dest.getServerSettings().getRoutingMode() == RoutingMode.SERVER_TO_SERVER && dest.isClustered())
-            {
+            if (dest.getServerSettings().getRoutingMode() == RoutingMode.SERVER_TO_SERVER && dest.isClustered()) {
                 initRemoteSubscriptions(destName);
             }
         }
 
         /* Now go through and wait for the response to these messages... */
-        for (String destName : destinations.keySet())
-        {
+        for (String destName : destinations.keySet()) {
             MessageDestination dest = (MessageDestination) getDestination(destName);
-            if (dest.getServerSettings().getRoutingMode() == RoutingMode.SERVER_TO_SERVER && dest.isClustered())
-            {
+            if (dest.getServerSettings().getRoutingMode() == RoutingMode.SERVER_TO_SERVER && dest.isClustered()) {
                 List members = clm.getClusterMemberAddresses(serviceType, destName);
-                for (Object addr : members)
-                {
-                    if (!clm.getLocalAddress(serviceType, destName).equals(addr))
-                    {
+                for (Object addr : members) {
+                    if (!clm.getLocalAddress(serviceType, destName).equals(addr)) {
                         RemoteSubscriptionManager subMgr = dest.getRemoteSubscriptionManager();
                         subMgr.waitForSubscriptions(addr);
                     }
@@ -174,10 +167,8 @@
      * @return The <code>Destination</code> instanced created.
      */
     @Override
-    public Destination createDestination(String id)
-    {
-        if (id == null)
-        {
+    public Destination createDestination(String id) {
+        if (id == null) {
             // Cannot add ''{0}'' with null id to the ''{1}''
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage(ConfigurationConstants.NULL_COMPONENT_ID, new Object[]{"Destination", "Service"});
@@ -202,9 +193,8 @@
      * @param destination The <code>Destination</code> instance to be added.
      */
     @Override
-    public void addDestination(Destination destination)
-    {
-        MessageDestination messageDestination = (MessageDestination)destination;
+    public void addDestination(Destination destination) {
+        MessageDestination messageDestination = (MessageDestination) destination;
         super.addDestination(messageDestination);
     }
 
@@ -215,8 +205,7 @@
     //--------------------------------------------------------------------------
 
     @Override
-    public Object serviceMessage(Message message)
-    {
+    public Object serviceMessage(Message message) {
         return serviceMessage(message, true);
     }
 
@@ -224,23 +213,20 @@
      *
      */
 
-    public Object serviceMessage(Message message, boolean throttle)
-    {
+    public Object serviceMessage(Message message, boolean throttle) {
         return serviceMessage(message, throttle, null);
     }
 
     /**
      *
      */
-    public Object serviceMessage(Message message, boolean throttle, MessageDestination dest)
-    {
+    public Object serviceMessage(Message message, boolean throttle, MessageDestination dest) {
         if (managed)
             incrementMessageCount(false, message);
 
-        if (throttle)
-        {
+        if (throttle) {
             // Throttle the inbound message; also attempts to prevent duplicate messages sent by a client.
-            dest = (MessageDestination)getDestination(message);
+            dest = (MessageDestination) getDestination(message);
             ThrottleManager throttleManager = dest.getThrottleManager();
             if (throttleManager != null && throttleManager.throttleIncomingMessage(message))
                 return null; // Message throttled.
@@ -251,35 +237,28 @@
         // commands (see serviceCommand() and manageSubscriptions()).
         Object subtopicObj = message.getHeader(AsyncMessage.SUBTOPIC_HEADER_NAME);
         List<Subtopic> subtopics = null;
-        if (subtopicObj != null)
-        {
+        if (subtopicObj != null) {
             if (subtopicObj instanceof Object[])
-                subtopicObj = Arrays.asList((Object[])subtopicObj);
+                subtopicObj = Arrays.asList((Object[]) subtopicObj);
 
-            if (subtopicObj instanceof String)
-            {
-                String subtopicString = (String)subtopicObj;
-                if (subtopicString != null && subtopicString.length() > 0)
-                {
+            if (subtopicObj instanceof String) {
+                String subtopicString = (String) subtopicObj;
+                if (subtopicString != null && subtopicString.length() > 0) {
                     if (dest == null)
-                        dest = (MessageDestination)getDestination(message);
+                        dest = (MessageDestination) getDestination(message);
                     Subtopic subtopic = testProducerSubtopic(dest.getServerSettings().getSubtopicSeparator(), subtopicString);
                     if (subtopics == null)
                         subtopics = new ArrayList<Subtopic>();
                     subtopics.add(subtopic);
                 }
-            }
-            else if (subtopicObj instanceof List)
-            {
+            } else if (subtopicObj instanceof List) {
                 @SuppressWarnings("unchecked")
-                List<String> subtopicList = (List<String>)subtopicObj;
+                List<String> subtopicList = (List<String>) subtopicObj;
                 String subtopicSeperator = null;
-                for (String subtopicString : subtopicList)
-                {
-                    if (subtopicString != null && subtopicString.length() > 0)
-                    {
+                for (String subtopicString : subtopicList) {
+                    if (subtopicString != null && subtopicString.length() > 0) {
                         if (dest == null)
-                            dest = (MessageDestination)getDestination(message);
+                            dest = (MessageDestination) getDestination(message);
                         subtopicSeperator = dest.getServerSettings().getSubtopicSeparator();
                         Subtopic subtopic = testProducerSubtopic(subtopicSeperator, subtopicString);
                         if (subtopics == null)
@@ -292,7 +271,7 @@
 
         // Override TTL if there was one specifically configured for this destination
         if (dest == null)
-            dest = (MessageDestination)getDestination(message);
+            dest = (MessageDestination) getDestination(message);
         ServerSettings destServerSettings = dest.getServerSettings();
         if (destServerSettings.getMessageTTL() >= 0)
             message.setTimeToLive(destServerSettings.getMessageTTL());
@@ -303,9 +282,8 @@
 
         // Give MessagingAdapter a chance to block the send.
         ServiceAdapter adapter = dest.getAdapter();
-        if (adapter instanceof MessagingAdapter)
-        {
-            MessagingSecurityConstraintManager manager = ((MessagingAdapter)adapter).getSecurityConstraintManager();
+        if (adapter instanceof MessagingAdapter) {
+            MessagingSecurityConstraintManager manager = ((MessagingAdapter) adapter).getSecurityConstraintManager();
             if (manager != null)
                 manager.assertSendAuthorization();
         }
@@ -314,8 +292,7 @@
         Object result = adapter.invoke(message);
         MessagePerformanceUtils.markServerPostAdapterTime(message);
 
-        if (debug)
-        {
+        if (debug) {
             long end = System.currentTimeMillis();
             Log.getLogger(TIMING_LOG_CATEGORY).debug("After invoke service: " + getId() + "; execution time = " + (end - start) + "ms");
         }
@@ -327,8 +304,7 @@
      *
      */
     @Override
-    public Object serviceCommand(CommandMessage message)
-    {
+    public Object serviceCommand(CommandMessage message) {
         if (managed)
             incrementMessageCount(true, message);
 
@@ -349,20 +325,17 @@
      * expressions to be evaluated, use a combination of the <code>pushMessageToClients</code>
      * method and the <code>sendPushMessageFromPeer</code> methods.
      *
-     * @param message The <code>Message</code> to send.
+     * @param message              The <code>Message</code> to send.
      * @param sendToAllSubscribers If <code>true</code>, send this message to all clients
-     * subscribed to the destination of this message.  If <code>false</code>, send the message
-     * only to the clientId specified in the message.
+     *                             subscribed to the destination of this message.  If <code>false</code>, send the message
+     *                             only to the clientId specified in the message.
      */
-    public void serviceMessageFromAdapter(Message message, boolean sendToAllSubscribers)
-    {
+    public void serviceMessageFromAdapter(Message message, boolean sendToAllSubscribers) {
         // Update management metrics.
-        if (managed)
-        {
-            MessageDestination destination = (MessageDestination)getDestination(message.getDestination());
-            if (destination != null && destination.isManaged())
-            {
-                MessageDestinationControl destinationControl = (MessageDestinationControl)destination.getControl();
+        if (managed) {
+            MessageDestination destination = (MessageDestination) getDestination(message.getDestination());
+            if (destination != null && destination.isManaged()) {
+                MessageDestinationControl destinationControl = (MessageDestinationControl) destination.getControl();
                 if (destinationControl != null) // Should not happen but just in case.
                     destinationControl.incrementServiceMessageFromAdapterCount();
             }
@@ -370,13 +343,10 @@
 
         // in this service's case, this invocation occurs when an adapter has asynchronously
         // received a message from one of its adapters acting as a consumer
-        if (sendToAllSubscribers)
-        {
+        if (sendToAllSubscribers) {
             pushMessageToClients(message, false);
             sendPushMessageFromPeer(message, false);
-        }
-        else
-        {
+        } else {
             // TODO - need to do something here to locate the proper qualified client.
             // the adapter has already processed the subscribers
             Set subscriberIds = new TreeSet();
@@ -391,51 +361,45 @@
      * through the cluster. If you are using the server-to-server mode, the message is sent only
      * to servers from which we have received a matching subscription request.
      *
-     * @param message The <code>Message</code> to push to peer server nodes in the cluster.
+     * @param message      The <code>Message</code> to push to peer server nodes in the cluster.
      * @param evalSelector <code>true</code> to evaluate each remote subscriber's selector
-     * before pushing the message to them; <code>false</code> to skip selector evaluation.
+     *                     before pushing the message to them; <code>false</code> to skip selector evaluation.
      */
-    public void sendPushMessageFromPeer(Message message, boolean evalSelector)
-    {
-        sendPushMessageFromPeer(message, (MessageDestination)getDestination(message), evalSelector);
+    public void sendPushMessageFromPeer(Message message, boolean evalSelector) {
+        sendPushMessageFromPeer(message, (MessageDestination) getDestination(message), evalSelector);
     }
 
     /**
      * Same as the previous method but it accepts a destination parameter as well to avoid
      * potentially costly destination lookup.
      *
-     * @param message The <code>Message</code> to push to peer server nodes in the cluster.
-     * @param destination The destination to push the message to.
+     * @param message      The <code>Message</code> to push to peer server nodes in the cluster.
+     * @param destination  The destination to push the message to.
      * @param evalSelector <code>true</code> to evaluate each remote subscriber's selector
-     * before pushing the message to them; <code>false</code> to skip selector evaluation.
+     *                     before pushing the message to them; <code>false</code> to skip selector evaluation.
      */
-    public void sendPushMessageFromPeer(Message message, MessageDestination destination, boolean evalSelector)
-    {
+    public void sendPushMessageFromPeer(Message message, MessageDestination destination, boolean evalSelector) {
         if (!destination.isClustered())
             return;
 
         if (destination.getServerSettings().getRoutingMode() == RoutingMode.NONE)
             return;
-        
+
         ClusterManager clm = getMessageBroker().getClusterManager();
-        if (destination.getServerSettings().isBroadcastRoutingMode())
-        {
+        if (destination.getServerSettings().isBroadcastRoutingMode()) {
             if (debug)
                 Log.getLogger(LOG_CATEGORY).debug("Broadcasting message to peer servers: " + message + " evalSelector: " + evalSelector);
             // tell the message service on other nodes to push the message
             clm.invokeServiceOperation(getClass().getName(), message.getDestination(),
-                    ClusterManager.OPERATION_PUSH_MESSAGE_FROM_PEER, new Object[] { message, evalSelector});
-        }
-        else
-        {
+                    ClusterManager.OPERATION_PUSH_MESSAGE_FROM_PEER, new Object[]{message, evalSelector});
+        } else {
             RemoteSubscriptionManager mgr = destination.getRemoteSubscriptionManager();
             Set serverAddresses = mgr.getSubscriberIds(message, evalSelector);
 
             if (debug)
                 Log.getLogger(LOG_CATEGORY).debug("Sending message to peer servers: " + serverAddresses + StringUtils.NEWLINE + " message: " + message + StringUtils.NEWLINE + " evalSelector: " + evalSelector);
 
-            for (Object remoteAddress : serverAddresses)
-            {
+            for (Object remoteAddress : serverAddresses) {
                 clm.invokePeerToPeerOperation(getClass().getName(), message.getDestination(),
                         ClusterManager.OPERATION_PUSH_MESSAGE_FROM_PEER_TO_PEER, new Object[]{message, evalSelector}, remoteAddress);
             }
@@ -443,25 +407,20 @@
     }
 
     /**
-     *
      * This method is provided for a cluster peer broadcast from a single remote node.  Because the
      * cluster handling code adds the remote server's address as a paramter when you call invokePeerToPeerOperation
      * we need a new variant of this method which takes the remote node's address.
      */
-    public void pushMessageFromPeerToPeer(AsyncMessage message, Boolean evalSelector, Object address)
-    {
+    public void pushMessageFromPeerToPeer(AsyncMessage message, Boolean evalSelector, Object address) {
         pushMessageFromPeer(message, evalSelector);
     }
 
     /**
-     *
      * This method is provided for a cluster peer broadcast, it is not intended to be
      * invoked locally.
      */
-    public void pushMessageFromPeer(AsyncMessage message, Boolean evalSelector)
-    {
-        if (!isStarted())
-        {
+    public void pushMessageFromPeer(AsyncMessage message, Boolean evalSelector) {
+        if (!isStarted()) {
             Log.getLogger(LOG_CATEGORY).debug("Received message from peer server before server is started - ignoring: " + message + " evalSelector: " + evalSelector);
             return;
         }
@@ -482,22 +441,19 @@
     /**
      * Pushes a message to all clients that are subscribed to the destination targeted by this message.
      *
-     * @param message The <code>Message</code> to push to the destination's subscribers.
-     *
+     * @param message      The <code>Message</code> to push to the destination's subscribers.
      * @param evalSelector <code>true</code> to evaluate each subscriber's selector before pushing
-     *        the message to them; <code>false</code> to skip selector evaluation.
+     *                     the message to them; <code>false</code> to skip selector evaluation.
      */
-    public void pushMessageToClients(Message message, boolean evalSelector)
-    {
-        MessageDestination destination = (MessageDestination)getDestination(message);
+    public void pushMessageToClients(Message message, boolean evalSelector) {
+        MessageDestination destination = (MessageDestination) getDestination(message);
         SubscriptionManager subscriptionManager = destination.getSubscriptionManager();
         Set subscriberIds = subscriptionManager.getSubscriberIds(message, evalSelector);
 
         if (debug)
             Log.getLogger(LOG_CATEGORY).debug("Sending message: " + message + StringUtils.NEWLINE + "    to subscribed clientIds: " + subscriberIds);
 
-        if ((subscriberIds != null) && !subscriberIds.isEmpty())
-        {
+        if ((subscriberIds != null) && !subscriberIds.isEmpty()) {
             /* We have already filtered based on the selector and so pass false below */
             pushMessageToClients(destination, subscriberIds, message, false);
         }
@@ -524,13 +480,12 @@
      * sendPushMessageFromPeer method.
      * </p>
      *
-     * @param message The <code>Messsage</code>
-     * Typically
+     * @param message      The <code>Messsage</code>
+     *                     Typically
      * @param evalSelector whether we should evaluate the selector
      * @return Set the set of the subscriber's IDs
      */
-    public Set getSubscriberIds(Message message, boolean evalSelector)
-    {
+    public Set getSubscriberIds(Message message, boolean evalSelector) {
         MessageDestination destination = (MessageDestination) getDestination(message);
         SubscriptionManager subscriptionManager = destination.getSubscriptionManager();
         return subscriptionManager.getSubscriberIds(message, evalSelector);
@@ -540,13 +495,13 @@
      * Returns the set of subscribers for the specified destination, subtopic/subtopic pattern
      * and message headers.  The message headers can be null.  If specified, they are used
      * to match against any selector patterns that were used for subscribers.
-     * @param destinationId the destination ID
+     *
+     * @param destinationId   the destination ID
      * @param subtopicPattern the subtopic pattern
-     * @param messsageHeaders the map of the message headers
+     * @param messageHeaders  the map of the message headers
      * @return Set the set of the subscriber's IDs
      */
-    public Set getSubscriberIds(String destinationId, String subtopicPattern, Map messageHeaders)
-    {
+    public Set getSubscriberIds(String destinationId, String subtopicPattern, Map messageHeaders) {
         MessageDestination destination = (MessageDestination) getDestination(destinationId);
         SubscriptionManager subscriptionManager = destination.getSubscriptionManager();
         return subscriptionManager.getSubscriberIds(subtopicPattern, messageHeaders);
@@ -558,30 +513,23 @@
      * upon the execution of their selector expressions.
      *
      * @param subscriberIds The set of subscribers to push the message to.
-     *
-     * @param message The <code>Message</code> to push.
-     *
-     * @param evalSelector <code>true</code> to evaluate each subscriber's selector before pushing
-     *        the message to them; <code>false</code> to skip selector evaluation.
+     * @param message       The <code>Message</code> to push.
+     * @param evalSelector  <code>true</code> to evaluate each subscriber's selector before pushing
+     *                      the message to them; <code>false</code> to skip selector evaluation.
      */
-    public void pushMessageToClients(Set subscriberIds, Message message, boolean evalSelector)
-    {
-        MessageDestination destination = (MessageDestination)getDestination(message);
+    public void pushMessageToClients(Set subscriberIds, Message message, boolean evalSelector) {
+        MessageDestination destination = (MessageDestination) getDestination(message);
         pushMessageToClients(destination, subscriberIds, message, evalSelector);
     }
 
     /**
-     *
      * This method is used by messaging adapters to send a message to a specific
      * set of clients that are directly connected to this server.  It does not
      * propagate the message to other servers in the cluster.
      */
-    public void pushMessageToClients(MessageDestination destination, Set subscriberIds, Message message, boolean evalSelector)
-    {
-        if (subscriberIds != null)
-        {
-            try
-            {
+    public void pushMessageToClients(MessageDestination destination, Set subscriberIds, Message message, boolean evalSelector) {
+        if (subscriberIds != null) {
+            try {
                 // Place notifier in thread-local scope.
                 MessageRoutedNotifier routingNotifier = new MessageRoutedNotifier(message);
                 FlexContext.setMessageRoutedNotifier(routingNotifier);
@@ -590,13 +538,11 @@
                 // There is a deadlock potential here, as route message could involve a FlexClient.push(), outbound message queue process could end up with managing subscription
                 // See bug watson 2769398
                 subscribeLock.readLock().lock();
-                for (Object clientId : subscriberIds)
-                {
+                for (Object clientId : subscriberIds) {
                     MessageClient client = subscriptionManager.getSubscriber(clientId);
 
                     // Skip if the client is null or invalidated.
-                    if (client == null || !client.isValid())
-                    {
+                    if (client == null || !client.isValid()) {
                         if (debug)
                             Log.getLogger(MessageService.LOG_CATEGORY).debug("Warning: could not find MessageClient for clientId in pushMessageToClients: " + clientId + " for destination: " + destination.getId());
                         continue;
@@ -607,9 +553,7 @@
 
                 // Done with the push, notify any listeners.
                 routingNotifier.notifyMessageRouted();
-            }
-            finally
-            {
+            } finally {
                 subscribeLock.readLock().unlock();
                 // Unset the notifier for this message.
                 FlexContext.setMessageRoutedNotifier(null);
@@ -618,23 +562,20 @@
     }
 
     void pushMessageToClient(MessageClient client, MessageDestination destination, Message message,
-                             boolean evalSelector)
-    {
+                             boolean evalSelector) {
         // Normally we'll process the message selector criteria as part of fetching the
         // clients which should receive this message. However, because the API exposed the evalSelecor flag
         // in pushMessageToClients(Set, Message, boolean), we need to run the client.testMessage() method
         // here to make sure subtopic and selector expressions are evaluated correctly in this case.
         // The general code path passes evalSelector as false, so the testMessage() method is not generally
         // invoked as part of a message push operation.
-        if (evalSelector && !client.testMessage(message, destination))
-        {
+        if (evalSelector && !client.testMessage(message, destination)) {
             return;
         }
 
         // Push the message to the client. Note that client level outbound throttling
         // might still happen at the FlexClientOutboundQueueProcessor level.
-        try
-        {
+        try {
             // Only update client last use if the message is not a pushed server command.
             if (!(message instanceof CommandMessage))
                 client.updateLastUse();
@@ -646,8 +587,7 @@
 
             // Add the default message priority headers, if it's not already set.
             int priority = destination.getServerSettings().getPriority();
-            if (priority != -1)
-            {
+            if (priority != -1) {
                 Object header = message.getHeader(Message.PRIORITY_HEADER);
                 if (header == null)
                     message.setHeader(Message.PRIORITY_HEADER, priority);
@@ -661,7 +601,7 @@
             // outbound queue processing for various clients from interfering with each other
             // as well as needing to target the copy of the message to a specific MessageAgent
             // instance on the client.
-            Message messageForClient = (Message)message.clone();
+            Message messageForClient = (Message) message.clone();
 
             // the MPIUTil call will be a no-op if MPI is not enabled.  Otherwise it will add
             // a server pre-push processing timestamp to the MPI object
@@ -675,10 +615,8 @@
             if (debug)
                 Log.getLogger(MessageService.LOG_CATEGORY).debug("Routing message to FlexClient id:" + client.getFlexClient().getId() + "', MessageClient id: " + client.getClientId());
 
-            getMessageBroker().routeMessageToMessageClient(messageForClient, client);            
-        }
-        catch (MessageException ignore)
-        {
+            getMessageBroker().routeMessageToMessageClient(messageForClient, client);
+        } catch (MessageException ignore) {
             // Client is subscribed but has disconnected or the network failed.
             // There's nothing we can do to correct this so just continue server processing.
         }
@@ -686,10 +624,10 @@
 
     /**
      * Issue messages to request the remote subscription table from each server in the cluster (except this one).
+     *
      * @param destinationId the destination ID
      */
-    public void initRemoteSubscriptions(String destinationId)
-    {
+    public void initRemoteSubscriptions(String destinationId) {
         ClusterManager clm = getMessageBroker().getClusterManager();
         String serviceType = getClass().getName();
         MessageDestination dest = (MessageDestination) getDestination(destinationId);
@@ -699,8 +637,7 @@
             cluster.addRemoveNodeListener(dest.getRemoteSubscriptionManager());
 
         List members = clm.getClusterMemberAddresses(serviceType, destinationId);
-        for (int i = 0; i < members.size(); i++)
-        {
+        for (int i = 0; i < members.size(); i++) {
             Object addr = members.get(i);
             if (!clm.getLocalAddress(serviceType, destinationId).equals(addr))
                 requestSubscriptions(destinationId, addr);
@@ -711,25 +648,19 @@
     /**
      * This method is provided for a clustered messaging with the routing-mode set to point-to-point.
      * On startup, a server invokes this method for each server to request its local subscription state.
-     *
-     *
      */
-    public void requestSubscriptions(String destinationId, Object remoteAddress)
-    {
+    public void requestSubscriptions(String destinationId, Object remoteAddress) {
         ClusterManager clm = getMessageBroker().getClusterManager();
         clm.invokePeerToPeerOperation(getClass().getName(), destinationId,
-                ClusterManager.OPERATION_SEND_SUBSCRIPTIONS, new Object[] { destinationId }, remoteAddress);
+                ClusterManager.OPERATION_SEND_SUBSCRIPTIONS, new Object[]{destinationId}, remoteAddress);
     }
 
     /**
      * This method is invoked remotely via jgroups.  It builds a snapshot of the local
      * subscription state and sends it back to the requesting server by calling its
      * receiveSubscriptions method.
-     *
-     *
      */
-    public void sendSubscriptions(String destinationId, Object remoteAddress)
-    {
+    public void sendSubscriptions(String destinationId, Object remoteAddress) {
         MessageDestination destination = (MessageDestination) getDestination(destinationId);
         Object subscriptions;
 
@@ -737,14 +668,11 @@
          * Avoid trying to use the cluster stuff if this destination does not
          * exist or is not clustered on this server.
          */
-        if (destination == null)
-        {
+        if (destination == null) {
             if (Log.isError())
                 Log.getLogger(LOG_CATEGORY).error("Destination: " + destinationId + " does not exist on this server but we received a request for the subscription info from a peer server where the destination exists as clustered.  Check the cluster configuration for this destination and make sure it matches on all servers.");
             return;
-        }
-        else if (!destination.isClustered())
-        {
+        } else if (!destination.isClustered()) {
             if (Log.isError())
                 Log.getLogger(LOG_CATEGORY).error("Destination: " + destinationId + " is not clustered on this server but we received a request for the subscription info from a peer server which is clustered.  Check the cluster configuration for this destination and make sure it matches on all servers.");
             return;
@@ -766,16 +694,13 @@
          * table we need to block out the code which adds/removes subscriptions and sends
          * them to remote servers between here...
          */
-        try
-        {
+        try {
             subscribeLock.writeLock().lock();
             subscriptions = destination.getSubscriptionManager().getSubscriptionState();
             ClusterManager clm = getMessageBroker().getClusterManager();
             clm.invokePeerToPeerOperation(getClass().getName(), destinationId,
-                    ClusterManager.OPERATION_RECEIVE_SUBSCRIPTIONS, new Object[] { destinationId, subscriptions }, remoteAddress);
-        }
-        finally
-        {
+                    ClusterManager.OPERATION_RECEIVE_SUBSCRIPTIONS, new Object[]{destinationId, subscriptions}, remoteAddress);
+        } finally {
             /* ... And here */
             subscribeLock.writeLock().unlock();
         }
@@ -784,11 +709,8 @@
     /**
      * This method is provided for a cluster peer broadcast, it is not invoked locally.  It is used
      * by remote clients to send their subscription table to this server.
-     *
-     *
      */
-    public void receiveSubscriptions(String destinationId, Object subscriptions, Object senderAddress)
-    {
+    public void receiveSubscriptions(String destinationId, Object subscriptions, Object senderAddress) {
         Destination destination = getDestination(destinationId);
         if (destination instanceof MessageDestination)
             ((MessageDestination) destination).getRemoteSubscriptionManager().setSubscriptionState(subscriptions, senderAddress);
@@ -797,46 +719,42 @@
     }
 
     /**
-     *
      * Called when we need to push a local subscribe/unsubscribe to all of the remote
      * servers.
      */
-    public void sendSubscribeFromPeer(String destinationId, Boolean subscribe, String selector, String subtopic)
-    {
+    public void sendSubscribeFromPeer(String destinationId, Boolean subscribe, String selector, String subtopic) {
         ClusterManager clm = getMessageBroker().getClusterManager();
 
         String serviceType = getClass().getName();
 
         clm.invokeServiceOperation(serviceType, destinationId,
-                        ClusterManager.OPERATION_SUBSCRIBE_FROM_PEER, new Object[] { destinationId, subscribe, selector, subtopic, clm.getLocalAddress(serviceType, destinationId)});
+                ClusterManager.OPERATION_SUBSCRIBE_FROM_PEER, new Object[]{destinationId, subscribe, selector, subtopic, clm.getLocalAddress(serviceType, destinationId)});
     }
 
     /**
      * This is called remotely from other cluster members when a new remote subscription is identified.
-     *
+     * <p>
      * We add or remove a remote subscription...
+     *
      * @param destinationId the destination ID
-     * @param subscribe whehter it is a subscribe or unsubscribe
-     * @param selector the selector string
-     * @param subtopc the subtopic string
+     * @param subscribe     whehter it is a subscribe or unsubscribe
+     * @param selector      the selector string
+     * @param subtopic      the subtopic string
      * @param remoteAddress the remote node address in the cluster
      */
-    public void subscribeFromPeer(String destinationId, Boolean subscribe, String selector, String subtopic, Object remoteAddress)
-    {
+    public void subscribeFromPeer(String destinationId, Boolean subscribe, String selector, String subtopic, Object remoteAddress) {
         Destination destination = getDestination(destinationId);
 
         RemoteSubscriptionManager subMgr = ((MessageDestination) destination).getRemoteSubscriptionManager();
 
-        if (destination instanceof MessageDestination)
-        {
+        if (destination instanceof MessageDestination) {
             if (debug)
                 Log.getLogger(MessageService.LOG_CATEGORY).debug("Received subscription from peer: " + remoteAddress + " subscribe? " + subscribe + " selector: " + selector + " subtopic: " + subtopic);
             if (subscribe)
                 subMgr.addSubscriber(remoteAddress, selector, subtopic, null);
             else
                 subMgr.removeSubscriber(remoteAddress, selector, subtopic, null);
-        }
-        else if (Log.isError())
+        } else if (Log.isError())
             Log.getLogger(LOG_CATEGORY).error("subscribeFromPeer called with destination: " + destinationId + " that is not a MessageDestination");
     }
 
@@ -856,14 +774,12 @@
      * @param commandMessage Pass <code>true</code> if the message being processed is a <code>CommandMessage</code>;
      *                       otherwise <code>false</code>.
      */
-    protected void incrementMessageCount(boolean commandMessage, Message message)
-    {
+    protected void incrementMessageCount(boolean commandMessage, Message message) {
         if (managed) // Update management metrics.
         {
-            MessageDestination destination = (MessageDestination)getDestination(message.getDestination());
-            if (destination != null && destination.isManaged())
-            {
-                MessageDestinationControl destinationControl = (MessageDestinationControl)destination.getControl();
+            MessageDestination destination = (MessageDestination) getDestination(message.getDestination());
+            if (destination != null && destination.isManaged()) {
+                MessageDestinationControl destinationControl = (MessageDestinationControl) destination.getControl();
                 if (destinationControl != null) // Should not happen but just in case.
                 {
                     if (commandMessage)
@@ -882,36 +798,32 @@
      *
      * @param command The <code>CommandMessage</code> to process.
      */
-    protected Message manageSubscriptions(CommandMessage command)
-    {
+    protected Message manageSubscriptions(CommandMessage command) {
         Message replyMessage = null;
 
-        MessageDestination destination = (MessageDestination)getDestination(command);
+        MessageDestination destination = (MessageDestination) getDestination(command);
         SubscriptionManager subscriptionManager = destination.getSubscriptionManager();
 
         Object clientId = command.getClientId();
-        String endpointId = (String)command.getHeader(Message.ENDPOINT_HEADER);
+        String endpointId = (String) command.getHeader(Message.ENDPOINT_HEADER);
 
         String subtopicString = (String) command.getHeader(AsyncMessage.SUBTOPIC_HEADER_NAME);
 
         ServiceAdapter adapter = destination.getAdapter();
 
-        if (command.getOperation() == CommandMessage.SUBSCRIBE_OPERATION)
-        {
+        if (command.getOperation() == CommandMessage.SUBSCRIBE_OPERATION) {
             String selectorExpr = (String) command.getHeader(CommandMessage.SELECTOR_HEADER);
 
             getMessageBroker().inspectChannel(command, destination);
 
             // Give MessagingAdapter a chance to block the subscribe.
-            if ((adapter instanceof MessagingAdapter))
-            {
-                MessagingSecurityConstraintManager manager = ((MessagingAdapter)adapter).getSecurityConstraintManager();
+            if ((adapter instanceof MessagingAdapter)) {
+                MessagingSecurityConstraintManager manager = ((MessagingAdapter) adapter).getSecurityConstraintManager();
                 if (manager != null)
                     manager.assertSubscribeAuthorization();
             }
 
-            try
-            {
+            try {
                 /*
                  * This allows parallel add/remove subscribe calls (protected by the
                  * concurrent hash table) but prevents us from doing any table mods
@@ -919,12 +831,9 @@
                  */
                 subscribeLock.readLock().lock();
 
-                if (adapter.handlesSubscriptions())
-                {
+                if (adapter.handlesSubscriptions()) {
                     replyMessage = (Message) adapter.manage(command);
-                }
-                else
-                {
+                } else {
                     testSelector(selectorExpr, command);
                 }
                 /*
@@ -939,60 +848,47 @@
                 // Extract the maxFrequency that might have been specified by the client.
                 int maxFrequency = processMaxFrequencyHeader(command);
                 subscriptionManager.addSubscriber(clientId, selectorExpr, subtopicString, endpointId, maxFrequency);
-            }
-            finally
-            {
+            } finally {
                 subscribeLock.readLock().unlock();
             }
 
             if (replyMessage == null)
                 replyMessage = new AcknowledgeMessage();
-        }
-        else if (command.getOperation() == CommandMessage.UNSUBSCRIBE_OPERATION)
-        {
+        } else if (command.getOperation() == CommandMessage.UNSUBSCRIBE_OPERATION) {
             // Give MessagingAdapter a chance to block the unsubscribe, as long as
             // the subscription has not been invalidated.
-            if ((adapter instanceof MessagingAdapter) && command.getHeader(CommandMessage.SUBSCRIPTION_INVALIDATED_HEADER) == null)
-            {
-                MessagingSecurityConstraintManager manager = ((MessagingAdapter)adapter).getSecurityConstraintManager();
+            if ((adapter instanceof MessagingAdapter) && command.getHeader(CommandMessage.SUBSCRIPTION_INVALIDATED_HEADER) == null) {
+                MessagingSecurityConstraintManager manager = ((MessagingAdapter) adapter).getSecurityConstraintManager();
                 if (manager != null)
                     manager.assertSubscribeAuthorization();
             }
 
             String selectorExpr = (String) command.getHeader(CommandMessage.SELECTOR_HEADER);
 
-            try
-            {
+            try {
                 subscribeLock.readLock().lock();
 
-                if (adapter.handlesSubscriptions())
-                {
+                if (adapter.handlesSubscriptions()) {
                     replyMessage = (Message) adapter.manage(command);
                 }
                 subscriptionManager.removeSubscriber(clientId, selectorExpr, subtopicString, endpointId);
-            }
-            finally
-            {
+            } finally {
                 subscribeLock.readLock().unlock();
             }
 
             if (replyMessage == null)
                 replyMessage = new AcknowledgeMessage();
-        }
-        else if (command.getOperation() == CommandMessage.MULTI_SUBSCRIBE_OPERATION)
-        {
+        } else if (command.getOperation() == CommandMessage.MULTI_SUBSCRIBE_OPERATION) {
             getMessageBroker().inspectChannel(command, destination);
 
             // Give MessagingAdapter a chance to block the multi subscribe.
-            if ((adapter instanceof MessagingAdapter))
-            {
-                MessagingSecurityConstraintManager manager = ((MessagingAdapter)adapter).getSecurityConstraintManager();
+            if ((adapter instanceof MessagingAdapter)) {
+                MessagingSecurityConstraintManager manager = ((MessagingAdapter) adapter).getSecurityConstraintManager();
                 if (manager != null)
                     manager.assertSubscribeAuthorization();
             }
 
-            try
-            {
+            try {
                 /*
                  * This allows parallel add/remove subscribe calls (protected by the
                  * concurrent hash table) but prevents us from doing any table mods
@@ -1000,8 +896,7 @@
                  */
                 subscribeLock.readLock().lock();
 
-                if (adapter.handlesSubscriptions())
-                {
+                if (adapter.handlesSubscriptions()) {
                     replyMessage = (Message) adapter.manage(command);
                 }
 
@@ -1009,38 +904,30 @@
                 Object[] adds = getObjectArrayFromHeader(command.getHeader(CommandMessage.ADD_SUBSCRIPTIONS));
                 Object[] rems = getObjectArrayFromHeader(command.getHeader(CommandMessage.REMOVE_SUBSCRIPTIONS));
 
-                if (adds != null)
-                {
+                if (adds != null) {
                     // Extract the maxFrequency that might have been specified
                     // by the client for every subscription (selector/subtopic).
                     int maxFrequency = processMaxFrequencyHeader(command);
-                    for (int i = 0; i < adds.length; i++)
-                    {
+                    for (int i = 0; i < adds.length; i++) {
                         // Use the maxFrequency by default.
                         int maxFrequencyPerSubscription = maxFrequency;
                         String ss = (String) adds[i];
                         int ix = ss.indexOf(CommandMessage.SUBTOPIC_SEPARATOR);
-                        if (ix != -1)
-                        {
+                        if (ix != -1) {
                             String subtopic = (ix == 0 ? null : ss.substring(0, ix));
                             String selector = null;
-                            String selectorAndMaxFrequency = ss.substring(ix+CommandMessage.SUBTOPIC_SEPARATOR.length());
-                            if (selectorAndMaxFrequency.length() != 0)
-                            {
+                            String selectorAndMaxFrequency = ss.substring(ix + CommandMessage.SUBTOPIC_SEPARATOR.length());
+                            if (selectorAndMaxFrequency.length() != 0) {
                                 int ix2 = selectorAndMaxFrequency.indexOf(CommandMessage.SUBTOPIC_SEPARATOR);
-                                if (ix2 != -1)
-                                {
-                                    selector = (ix2 == 0? null : selectorAndMaxFrequency.substring(0, ix2));
+                                if (ix2 != -1) {
+                                    selector = (ix2 == 0 ? null : selectorAndMaxFrequency.substring(0, ix2));
                                     String maxFrequencyString = selectorAndMaxFrequency.substring(ix2 + CommandMessage.SUBTOPIC_SEPARATOR.length());
-                                    if (maxFrequencyString.length() != 0)
-                                    {
+                                    if (maxFrequencyString.length() != 0) {
                                         // Choose the minimum of Consumer level maxFrequency and subscription level maxFrequency.
                                         int maxFrequencyCandidate = Integer.parseInt(maxFrequencyString);
-                                        maxFrequencyPerSubscription = maxFrequencyPerSubscription == 0? maxFrequencyCandidate : Math.min(maxFrequencyPerSubscription, maxFrequencyCandidate);
+                                        maxFrequencyPerSubscription = maxFrequencyPerSubscription == 0 ? maxFrequencyCandidate : Math.min(maxFrequencyPerSubscription, maxFrequencyCandidate);
                                     }
-                                }
-                                else
-                                {
+                                } else {
                                     selector = selectorAndMaxFrequency;
                                 }
                             }
@@ -1050,22 +937,18 @@
                     }
                 }
 
-                if (rems != null)
-                {
-                    for (int i = 0; i < rems.length; i++)
-                    {
+                if (rems != null) {
+                    for (int i = 0; i < rems.length; i++) {
                         String ss = (String) rems[i];
                         int ix = ss.indexOf(CommandMessage.SUBTOPIC_SEPARATOR);
-                        if (ix != -1)
-                        {
+                        if (ix != -1) {
                             String subtopic = (ix == 0 ? null : ss.substring(0, ix));
                             String selector = null;
                             String selectorAndMaxFrequency = ss.substring(ix + CommandMessage.SUBTOPIC_SEPARATOR.length());
-                            if (selectorAndMaxFrequency.length() != 0)
-                            {
+                            if (selectorAndMaxFrequency.length() != 0) {
                                 int ix2 = selectorAndMaxFrequency.indexOf(CommandMessage.SUBTOPIC_SEPARATOR);
                                 if (ix2 != -1)
-                                    selector = ix2 == 0? null : selectorAndMaxFrequency.substring(0, ix2);
+                                    selector = ix2 == 0 ? null : selectorAndMaxFrequency.substring(0, ix2);
                                 else
                                     selector = selectorAndMaxFrequency;
                             }
@@ -1073,82 +956,64 @@
                         }
                     }
                 }
-            }
-            finally
-            {
+            } finally {
                 subscribeLock.readLock().unlock();
             }
 
             if (replyMessage == null)
                 replyMessage = new AcknowledgeMessage();
-        }
-        else if (command.getOperation() == CommandMessage.POLL_OPERATION)
-        {
+        } else if (command.getOperation() == CommandMessage.POLL_OPERATION) {
             // This code path handles poll messages sent by Consumer.receive().
             // This API should not trigger server side waits, so we invoke poll
             // and if there are no queued messages for this Consumer instance we
             // return an empty acknowledgement immediately.
             MessageClient client = null;
-            try
-            {
+            try {
                 client = subscriptionManager.getMessageClient(clientId, endpointId);
 
-                if (client != null)
-                {
-                    if (adapter.handlesSubscriptions())
-                    {
-                        List missedMessages = (List)adapter.manage(command);
-                        if (missedMessages != null && !missedMessages.isEmpty())
-                        {
+                if (client != null) {
+                    if (adapter.handlesSubscriptions()) {
+                        List missedMessages = (List) adapter.manage(command);
+                        if (missedMessages != null && !missedMessages.isEmpty()) {
                             MessageBroker broker = getMessageBroker();
-                            for (Iterator iter = missedMessages.iterator(); iter.hasNext();)
-                                broker.routeMessageToMessageClient((Message)iter.next(), client);
+                            for (Iterator iter = missedMessages.iterator(); iter.hasNext(); )
+                                broker.routeMessageToMessageClient((Message) iter.next(), client);
                         }
                     }
                     FlushResult flushResult = client.getFlexClient().poll(client);
                     List messagesToReturn = (flushResult != null) ? flushResult.getMessages() : null;
-                    if (messagesToReturn != null && !messagesToReturn.isEmpty())
-                    {
+                    if (messagesToReturn != null && !messagesToReturn.isEmpty()) {
                         replyMessage = new CommandMessage(CommandMessage.CLIENT_SYNC_OPERATION);
                         replyMessage.setBody(messagesToReturn.toArray());
-                    }
-                    else
-                    {
+                    } else {
                         replyMessage = new AcknowledgeMessage();
                     }
                     // Adaptive poll wait is never used in responses to Consumer.receive() calls.
-                }
-                else
-                {
+                } else {
                     ServiceException se = new ServiceException();
                     se.setCode(NOT_SUBSCRIBED_CODE);
-                    se.setMessage(NOT_SUBSCRIBED, new Object[] {destination.getId()});
+                    se.setMessage(NOT_SUBSCRIBED, new Object[]{destination.getId()});
                     throw se;
                 }
-            }
-            finally
-            {
+            } finally {
                 subscriptionManager.releaseMessageClient(client);
             }
-        }
-        else
-        {
+        } else {
             ServiceException se = new ServiceException();
-            se.setMessage(UNKNOWN_COMMAND, new Object[] {new Integer(command.getOperation())});
+            se.setMessage(UNKNOWN_COMMAND, new Object[]{new Integer(command.getOperation())});
             throw se;
         }
 
         return replyMessage;
     }
-    
+
     /**
      * Returns the log category of the <code>MessageService</code>.
      *
      * @return The log category of the component.
      */
     @Override
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -1159,60 +1024,53 @@
      * @param broker The <code>MessageBroker</code> to pass to the <code>MessageServiceControl</code> constructor.
      */
     @Override
-    protected void setupServiceControl(MessageBroker broker)
-    {
+    protected void setupServiceControl(MessageBroker broker) {
         controller = new MessageServiceControl(this, broker.getControl());
         controller.register();
         setControl(controller);
     }
 
     /**
-     *
      * Tests a selector in an attempt to avoid runtime errors that we could catch at startup.
      *
      * @param selectorExpression The expression to test.
-     * @param msg A test message.
+     * @param msg                A test message.
      */
-    private void testSelector(String selectorExpression, Message msg)
-    {
-        try
+    private void testSelector(String selectorExpression, Message msg) {
+        /*try
         {
             JMSSelector selector = new JMSSelector(selectorExpression);
             selector.match(msg);
         }
         catch (Exception e)
-        {
-            ServiceException se = new ServiceException();
-            se.setMessage(BAD_SELECTOR, new Object[] {selectorExpression});
-            se.setRootCause(e);
-            throw se;
-        }
+        {*/
+        ServiceException se = new ServiceException();
+        se.setMessage(BAD_SELECTOR, new Object[]{selectorExpression});
+        se.setRootCause(new RuntimeException("JMSSelector removed"));
+        throw se;
+        //}
     }
 
-    private int processMaxFrequencyHeader(CommandMessage command)
-    {
+    private int processMaxFrequencyHeader(CommandMessage command) {
         Object maxFrequencyHeader = command.getHeader(CommandMessage.MAX_FREQUENCY_HEADER);
         if (maxFrequencyHeader != null)
-            return ((Integer)maxFrequencyHeader).intValue();
+            return ((Integer) maxFrequencyHeader).intValue();
         return 0;
     }
 
-    private Subtopic testProducerSubtopic(String subtopicSeparator, String subtopicString)
-    {
+    private Subtopic testProducerSubtopic(String subtopicSeparator, String subtopicString) {
         Subtopic subtopic = new Subtopic(subtopicString, subtopicSeparator);
-        if (subtopic.containsSubtopicWildcard())
-        {
+        if (subtopic.containsSubtopicWildcard()) {
             ServiceException se = new ServiceException();
-            se.setMessage(10556, new Object[] {subtopicString});
+            se.setMessage(10556, new Object[]{subtopicString});
             throw se;
         }
         return subtopic;
     }
 
-    private Object[] getObjectArrayFromHeader(Object header)
-    {
+    private Object[] getObjectArrayFromHeader(Object header) {
         if (header instanceof Object[])
-            return (Object []) header;
+            return (Object[]) header;
         else if (header instanceof List)
             return ((List) header).toArray();
         else if (header == null)
@@ -1222,23 +1080,17 @@
         se.setMessage("Invalid header: " + header + " in message.  expected array or list and found: " + header.getClass().getName());
         throw se;
     }
-    
+
     /**
-     *
-     * 
      * This is override the method stop().
      * It is needed to provide locking of MessageService.subcribeLock first
      */
     @Override
-    public void stop()
-    {
-        try
-        {
+    public void stop() {
+        try {
             subscribeLock.readLock().lock();
             super.stop();
-        }
-        finally
-        {
+        } finally {
             subscribeLock.readLock().unlock();
         }
     }
diff --git a/core/src/main/java/flex/messaging/services/Service.java b/core/src/main/java/flex/messaging/services/Service.java
index be3e874..084e349 100644
--- a/core/src/main/java/flex/messaging/services/Service.java
+++ b/core/src/main/java/flex/messaging/services/Service.java
@@ -33,8 +33,7 @@
  * on the other. The Service interface defines the contract between
  * the MessageBroker and all Service implementations.
  */
-public interface Service extends Manageable, FlexComponent
-{
+public interface Service extends Manageable, FlexComponent {
     /**
      * Returns the adapters registered with the <code>Service</code>.
      *
@@ -45,7 +44,7 @@
     /**
      * Registers the adapter with the <code>Service</code>.
      *
-     * @param id The id of the adapter.
+     * @param id        The id of the adapter.
      * @param className The class of the adapter.
      * @return The previous adapter class that the id was associated with.
      */
diff --git a/core/src/main/java/flex/messaging/services/ServiceAdapter.java b/core/src/main/java/flex/messaging/services/ServiceAdapter.java
index cc65971..5808a46 100644
--- a/core/src/main/java/flex/messaging/services/ServiceAdapter.java
+++ b/core/src/main/java/flex/messaging/services/ServiceAdapter.java
@@ -27,9 +27,10 @@
 /**
  * The ServiceAdapter class is the base definition of a service adapter.
  */
-public abstract class ServiceAdapter extends ManageableComponent
-{
-    /** Log category for <code>ServiceAdapter</code>. */
+public abstract class ServiceAdapter extends ManageableComponent {
+    /**
+     * Log category for <code>ServiceAdapter</code>.
+     */
     public static final String LOG_CATEGORY = Destination.LOG_CATEGORY;
 
     //--------------------------------------------------------------------------
@@ -41,8 +42,7 @@
     /**
      * Constructs an unmanaged <code>ServiceAdapter</code> instance.
      */
-    public ServiceAdapter()
-    {
+    public ServiceAdapter() {
         this(false);
     }
 
@@ -50,10 +50,9 @@
      * Constructs a <code>ServiceAdapter</code> instance.
      *
      * @param enableManagement <code>true</code> if the <code>ServiceAdapter</code> has a
-     * corresponding MBean control for management; otherwise <code>false</code>.
+     *                         corresponding MBean control for management; otherwise <code>false</code>.
      */
-    public ServiceAdapter(boolean enableManagement)
-    {
+    public ServiceAdapter(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -66,10 +65,8 @@
     /**
      * Verifies that the <code>ServiceAdapter</code> is in valid state before
      * it is started. If subclasses override, they must call <code>super.validate()</code>.
-     *
      */
-    protected void validate()
-    {
+    protected void validate() {
         if (isValid())
             return;
 
@@ -81,31 +78,26 @@
      * and if the adapter is not already running. If subclasses override, they
      * must call <code>super.start()</code>.
      */
-    public void start()
-    {
-        if (isStarted())
-        {
+    public void start() {
+        if (isStarted()) {
             return;
         }
 
         // Check if the Destination is started
         Destination destination = getDestination();
-        if (!destination.isStarted())
-        {
-            if (Log.isWarn())
-            {
+        if (!destination.isStarted()) {
+            if (Log.isWarn()) {
                 Log.getLogger(getLogCategory()).warn("Adapter with id '{0}' cannot be started" +
-                        " when its Destination with id '{1}' is not started.",
+                                " when its Destination with id '{1}' is not started.",
                         new Object[]{getId(), destination.getId()});
             }
             return;
         }
 
         // Set up management
-        if (isManaged() && destination.isManaged())
-        {
+        if (isManaged() && destination.isManaged()) {
             setupAdapterControl(destination);
-            DestinationControl controller = (DestinationControl)destination.getControl();
+            DestinationControl controller = (DestinationControl) destination.getControl();
             if (getControl() != null)
                 controller.setAdapter(getControl().getObjectName());
 
@@ -117,22 +109,17 @@
     /**
      * Stops the <code>ServiceAdapter</code>.
      * If subclasses override, they must call <code>super.start()</code>.
-     *
      */
-    public void stop()
-    {
-        if (!isStarted())
-        {
+    public void stop() {
+        if (!isStarted()) {
             return;
         }
 
         super.stop();
 
         // Remove management
-        if (isManaged() && getDestination().isManaged())
-        {
-            if (getControl() != null)
-            {
+        if (isManaged() && getDestination().isManaged()) {
+            if (getControl() != null) {
                 getControl().unregister();
                 setControl(null);
             }
@@ -152,9 +139,8 @@
      *
      * @return The <code>Destination</code> of the <code>ServiceAdapter</code>.
      */
-    public Destination getDestination()
-    {
-        return (Destination)getParent();
+    public Destination getDestination() {
+        return (Destination) getParent();
     }
 
     /**
@@ -164,8 +150,7 @@
      *
      * @param destination The <code>Destination</code> of the <code>ServiceAdapter</code>.
      */
-    public void setDestination(Destination destination)
-    {
+    public void setDestination(Destination destination) {
         Destination oldDestination = getDestination();
 
         setParent(destination);
@@ -174,8 +159,7 @@
             oldDestination.setAdapter(null);
 
         // Set destination's adapter if needed
-        if (destination.getAdapter() != this)
-        {
+        if (destination.getAdapter() != this) {
             destination.setAdapter(this);
         }
     }
@@ -200,7 +184,6 @@
      *
      * @param message the message as sent by the client intended for this adapter
      * @return the body of the acknowledge message (or null if there is no body)
-     *
      * @see flex.messaging.messages.Message
      * @see flex.messaging.messages.AsyncMessage
      */
@@ -230,14 +213,12 @@
      * up for this client.
      * </p>
      *
-     * @see flex.messaging.messages.CommandMessage
-     * @see flex.messaging.messages.AsyncMessage
-     *
      * @param commandMessage The command message to manage.
      * @return The result of manage. The default implementation returns null.
+     * @see flex.messaging.messages.CommandMessage
+     * @see flex.messaging.messages.AsyncMessage
      */
-    public Object manage(CommandMessage commandMessage)
-    {
+    public Object manage(CommandMessage commandMessage) {
         return null;
     }
 
@@ -250,8 +231,7 @@
      * @return The state of the adapter. The default implementations throws
      * <code>UnsupportedOperationException</code>.
      */
-    public Object getAdapterState()
-    {
+    public Object getAdapterState() {
         throw new UnsupportedOperationException();
     }
 
@@ -263,8 +243,7 @@
      *
      * @param adapterState The object representing the adapter state.
      */
-    public void setAdapterState(Object adapterState)
-    {
+    public void setAdapterState(Object adapterState) {
         throw new UnsupportedOperationException();
     }
 
@@ -276,11 +255,10 @@
      * @return <code>true</code> if the adapter performs custom subscription management.
      * The default return value is <code>false</code>.
      */
-    public boolean handlesSubscriptions()
-    {
+    public boolean handlesSubscriptions() {
         return false;
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Protected/private APIs
@@ -293,8 +271,7 @@
      *
      * @return The log category.
      */
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -304,8 +281,7 @@
      *
      * @param destination The associated <code>Destination</code> for the adapter.
      */
-    protected void setupAdapterControl(Destination destination)
-    {
+    protected void setupAdapterControl(Destination destination) {
         setManaged(false);
     }
 
diff --git a/core/src/main/java/flex/messaging/services/ServiceException.java b/core/src/main/java/flex/messaging/services/ServiceException.java
index e4c3327..019b2ae 100644
--- a/core/src/main/java/flex/messaging/services/ServiceException.java
+++ b/core/src/main/java/flex/messaging/services/ServiceException.java
@@ -21,56 +21,50 @@
 
 /**
  * Exception type for Service errors.
- *
- *
  */
-public class ServiceException extends MessageException
-{
+public class ServiceException extends MessageException {
     static final long serialVersionUID = 3349730139522030203L;
-    
+
     //--------------------------------------------------------------------------
     //
     // Properties
     //
     //--------------------------------------------------------------------------        
-    
+
     //----------------------------------
     //  defaultLogMessageIntro
     //----------------------------------            
 
     /**
-     * Overrides the intro text if the exception is a 'not subscribed' fault. 
+     * Overrides the intro text if the exception is a 'not subscribed' fault.
      */
-    public String getDefaultLogMessageIntro()
-    {
+    public String getDefaultLogMessageIntro() {
         if (code != null && code.equals(MessageService.NOT_SUBSCRIBED_CODE))
             return "Client not subscribed: ";
         else
             return super.getDefaultLogMessageIntro();
     }
-    
+
     //----------------------------------
     //  logStackTraceEnabled
     //----------------------------------            
-    
+
     /**
      * Override to disable stack trace logging if the exception is a 'not subscribed' fault. No need for
      * a stack trace in this case.
      */
-    public boolean isLogStackTraceEnabled()
-    {
+    public boolean isLogStackTraceEnabled() {
         return !(code != null && code.equals(MessageService.NOT_SUBSCRIBED_CODE));
-    }    
-    
+    }
+
     //----------------------------------
     //  peferredLogLevel
     //----------------------------------            
-    
+
     /**
-     * Override to lower the preferred log level to debug if the exception is a 'not subscribed' fault. 
+     * Override to lower the preferred log level to debug if the exception is a 'not subscribed' fault.
      */
-    public short getPreferredLogLevel()
-    {
+    public short getPreferredLogLevel() {
         String code = getCode();
         // Log not-subscribed errors at a lower level because this is a common occurance
         // following normal failover.
diff --git a/core/src/main/java/flex/messaging/services/messaging/MessageFrequency.java b/core/src/main/java/flex/messaging/services/messaging/MessageFrequency.java
index da3454a..4d11b99 100644
--- a/core/src/main/java/flex/messaging/services/messaging/MessageFrequency.java
+++ b/core/src/main/java/flex/messaging/services/messaging/MessageFrequency.java
@@ -25,19 +25,17 @@
  * to keep track of inbound and outbound message rates per destination and
  * per client-subscription.
  */
-public class MessageFrequency
-{
+public class MessageFrequency {
     public final int messageHistorySize;
     private int messageCount;
-    private long [] previousMessageTimes;
+    private long[] previousMessageTimes;
 
     /**
      * Creates a new MessageFrequency with the specified id.
      *
      * @param messageHistorySize The number of messages to use in calculating message rates.
      */
-    public MessageFrequency(int messageHistorySize)
-    {
+    public MessageFrequency(int messageHistorySize) {
         this.messageHistorySize = messageHistorySize;
         messageCount = 0;
         previousMessageTimes = new long[messageHistorySize];
@@ -47,43 +45,38 @@
      * Given the current time and a maximum frequency, checks that the message
      * is not exceeding the max frequency limit. If message exceeds the limit,
      * returns a throttle result object that is appropriate for the passed in policy.
-     *
+     * <p>
      * Callers of checkLimit method should call updateMessageFrequency method
      * once a message is successfully sent to the client.
      *
      * @param maxFrequency The maximum frequency to enforce. If maxFrequency is
-     * zero, the message frequencies are being kept track but no check happens.
-     * @param policy The throttling policy.
+     *                     zero, the message frequencies are being kept track but no check happens.
+     * @param policy       The throttling policy.
      * @return The ThrottleResult.
      */
-    public ThrottleResult checkLimit(int maxFrequency, Policy policy)
-    {
+    public ThrottleResult checkLimit(int maxFrequency, Policy policy) {
         long messageTimestamp = System.currentTimeMillis();
         // If we have enough messages to start testing.
-        if (maxFrequency > -1 && messageCount >= messageHistorySize)
-        {
+        if (maxFrequency > -1 && messageCount >= messageHistorySize) {
             // Find the interval between this message and the last n messages.
             int index = messageCount % messageHistorySize;
             long intervalMillis = messageTimestamp - previousMessageTimes[index];
             double intervalSeconds = intervalMillis / 1000d;
             // Calculate the message rate in seconds.
             double actualFrequency;
-            if (intervalSeconds > 0)
-            {
+            if (intervalSeconds > 0) {
                 actualFrequency = messageHistorySize / intervalSeconds;
                 actualFrequency = Math.round(actualFrequency * 100d) / 100d;
             }
             // If the interval is zero, it means all the messages were sent
             // in the same instant. In that case, there's no frequency to
             // calculate really, so set it to one more than the limit.
-            else
-            {
+            else {
                 actualFrequency = maxFrequency + 1;
             }
             // If the rate is too high, toss this message and do not record it,
             // so the history represents the rate of messages actually delivered.
-            if (maxFrequency > 0 && actualFrequency > maxFrequency)
-            {
+            if (maxFrequency > 0 && actualFrequency > maxFrequency) {
                 Result result = ThrottleManager.getResult(policy);
                 String detail = "[actual-frequency=" + actualFrequency + ", max-frequency=" + maxFrequency + "]";
                 return new ThrottleResult(result, detail);
@@ -98,10 +91,9 @@
      * current time. This method should be used by callers of checkLimit method
      * once a message is successfully sent to the client.
      */
-    public void updateMessageFrequency()
-    {
+    public void updateMessageFrequency() {
         // Handle integer wrap
-        messageCount = messageCount == Integer.MAX_VALUE? 0 : messageCount;
+        messageCount = messageCount == Integer.MAX_VALUE ? 0 : messageCount;
 
         // Increase the messageCount and update the message times.
         previousMessageTimes[messageCount++ % messageHistorySize] = System.currentTimeMillis();
diff --git a/core/src/main/java/flex/messaging/services/messaging/MessagingConstants.java b/core/src/main/java/flex/messaging/services/messaging/MessagingConstants.java
index a525855..4b1dee2 100644
--- a/core/src/main/java/flex/messaging/services/messaging/MessagingConstants.java
+++ b/core/src/main/java/flex/messaging/services/messaging/MessagingConstants.java
@@ -19,8 +19,7 @@
 /**
  *
  */
-public interface MessagingConstants
-{
+public interface MessagingConstants {
     // General constants.
     /**
      * The default subtopic separator value.
diff --git a/core/src/main/java/flex/messaging/services/messaging/RemoteMessageClient.java b/core/src/main/java/flex/messaging/services/messaging/RemoteMessageClient.java
index fe6fd2f..a0a29b7 100644
--- a/core/src/main/java/flex/messaging/services/messaging/RemoteMessageClient.java
+++ b/core/src/main/java/flex/messaging/services/messaging/RemoteMessageClient.java
@@ -24,8 +24,7 @@
 /**
  *
  */
-public class RemoteMessageClient extends MessageClient
-{
+public class RemoteMessageClient extends MessageClient {
     /**
      *
      */
@@ -33,33 +32,28 @@
 
     /**
      * Constructor.
-     * 
-     * @param clientId The client id.
+     *
+     * @param clientId    The client id.
      * @param destination The message destination.
-     * @param endpointId The endpoint id.
+     * @param endpointId  The endpoint id.
      */
-    public RemoteMessageClient(Object clientId, MessageDestination destination, String endpointId)
-    {
+    public RemoteMessageClient(Object clientId, MessageDestination destination, String endpointId) {
         super(clientId, destination, endpointId, false /* do not use session */);
     }
 
     /**
      * Invalidates the RemoteMessageClient.
      */
-    public void invalidate()
-    {
-        synchronized (lock)
-        {
+    public void invalidate() {
+        synchronized (lock) {
             if (!valid)
                 return;
         }
 
-        if (destination instanceof MessageDestination)
-        {
-            MessageDestination msgDestination = (MessageDestination)destination;
-            for (Iterator it = subscriptions.iterator(); it.hasNext(); )
-            {
-                SubscriptionInfo si = (SubscriptionInfo)it.next();
+        if (destination instanceof MessageDestination) {
+            MessageDestination msgDestination = (MessageDestination) destination;
+            for (Iterator it = subscriptions.iterator(); it.hasNext(); ) {
+                SubscriptionInfo si = (SubscriptionInfo) it.next();
                 msgDestination.getRemoteSubscriptionManager().removeSubscriber(clientId,
                         si.selector, si.subtopic, null);
             }
diff --git a/core/src/main/java/flex/messaging/services/messaging/RemoteSubscriptionManager.java b/core/src/main/java/flex/messaging/services/messaging/RemoteSubscriptionManager.java
index c1a3096..4607a70 100644
--- a/core/src/main/java/flex/messaging/services/messaging/RemoteSubscriptionManager.java
+++ b/core/src/main/java/flex/messaging/services/messaging/RemoteSubscriptionManager.java
@@ -31,11 +31,8 @@
  * each remote server.  It clientId is the address of the remote server.
  * Using a separate instance of this class keeps the subscriptions
  * of local clients separate from remote clients.
- *
- *
  */
-public class RemoteSubscriptionManager extends SubscriptionManager implements RemoveNodeListener
-{
+public class RemoteSubscriptionManager extends SubscriptionManager implements RemoveNodeListener {
     private Object syncLock = new Object();
 
     /*
@@ -44,29 +41,23 @@
      */
     private static final Object initRemoteSubscriptionsLock = new Object();
 
-    public RemoteSubscriptionManager(MessageDestination destination)
-    {
+    public RemoteSubscriptionManager(MessageDestination destination) {
         this(destination, false);
     }
 
-    public RemoteSubscriptionManager(MessageDestination destination, boolean enableManagement)
-    {
+    public RemoteSubscriptionManager(MessageDestination destination, boolean enableManagement) {
         super(destination, enableManagement);
     }
 
-    public void setSessionTimeout(long sessionConfigValue)
-    {
+    public void setSessionTimeout(long sessionConfigValue) {
     }
 
-    public long getSessionTimeout()
-    {
+    public long getSessionTimeout() {
         return 0; // not used for remote subscriptions
     }
 
-    public void addSubscriber(String flexClientId, Object clientId, String selector, String subtopic)
-    {
-        synchronized (syncLock)
-        {
+    public void addSubscriber(String flexClientId, Object clientId, String selector, String subtopic) {
+        synchronized (syncLock) {
             /*
              * Only process subscriptions for servers whose subscription state we have received
              * We may receive a subscribe/unsubscribe from a peer before we get their
@@ -80,23 +71,19 @@
         }
     }
 
-    public void removeSubscriber(String flexClientId, Object clientId, String selector, String subtopic, String endpoint)
-    {
-        synchronized (syncLock)
-        {
+    public void removeSubscriber(String flexClientId, Object clientId, String selector, String subtopic, String endpoint) {
+        synchronized (syncLock) {
             /* Only process subscriptions for servers whose subscription state we have received */
             if (allSubscriptions.get(clientId) != null)
                 super.removeSubscriber(clientId, selector, subtopic, null);
         }
     }
 
-    protected void sendSubscriptionToPeer(boolean subscribe, String selector, String subtopic)
-    {
+    protected void sendSubscriptionToPeer(boolean subscribe, String selector, String subtopic) {
         // Don't do this for remote subscriptions
     }
 
-    protected MessageClient newMessageClient(Object clientId, String endpointId)
-    {
+    protected MessageClient newMessageClient(Object clientId, String endpointId) {
         return new RemoteMessageClient(clientId, destination, endpointId);
     }
 
@@ -106,11 +93,11 @@
      * registered in this table.  We also register the remote
      * subscription with a "per server" index so we can easily
      * remove them later on.
-     * @param state the subscription state object
+     *
+     * @param state   the subscription state object
      * @param address the remote cluster node address
      */
-    public void setSubscriptionState(Object state, Object address)
-    {
+    public void setSubscriptionState(Object state, Object address) {
         MessageClient client = newMessageClient(address, null);
 
         if (Log.isDebug())
@@ -123,19 +110,16 @@
          * Also, we need to ensure we do not process any remote subscribe/unsubs
          * from a remote server until we finish this list.
          */
-        synchronized (syncLock)
-        {
+        synchronized (syncLock) {
             allSubscriptions.put(address, client);
 
             List list = (List) state;
 
-            for (int i = 0; i < list.size(); i+=2)
-            {
-                addSubscriber(null, address, (String) list.get(i), (String) list.get(i+1));
+            for (int i = 0; i < list.size(); i += 2) {
+                addSubscriber(null, address, (String) list.get(i), (String) list.get(i + 1));
             }
         }
-        synchronized (initRemoteSubscriptionsLock)
-        {
+        synchronized (initRemoteSubscriptionsLock) {
             initRemoteSubscriptionsLock.notifyAll();
         }
     }
@@ -144,17 +128,14 @@
      * This method waits for some time for the receipt of the subscription
      * state for the server with the given address.  If we fail to receive
      * a message after waiting for the 5 seconds, a warning is printed.
+     *
      * @param addr the remote cluster node address
      */
-    public void waitForSubscriptions(Object addr)
-    {
+    public void waitForSubscriptions(Object addr) {
         /* If we have not gotten the response yet from this client... */
-        if (getSubscriber(addr) == null)
-        {
-            synchronized (initRemoteSubscriptionsLock)
-            {
-                try
-                {
+        if (getSubscriber(addr) == null) {
+            synchronized (initRemoteSubscriptionsLock) {
+                try {
                     if (Log.isDebug())
                         Log.getLogger(MessageService.LOG_CATEGORY).debug("Waiting for subscriptions from cluster node: " + addr + " for destination: " + destination.getId());
 
@@ -162,29 +143,27 @@
 
                     if (Log.isDebug())
                         Log.getLogger(MessageService.LOG_CATEGORY).debug("Done waiting for subscriptions from cluster node: " + addr + " for destination: " + destination.getId());
+                } catch (InterruptedException exc) {
                 }
-                catch (InterruptedException exc) {}
             }
             if (getSubscriber(addr) == null && Log.isWarn())
                 Log.getLogger(MessageService.LOG_CATEGORY).warn("No response yet from request subscriptions request for server: " + addr + " for destination: " + destination.getId());
-        }
-        else if (Log.isDebug())
+        } else if (Log.isDebug())
             Log.getLogger(MessageService.LOG_CATEGORY).debug("Already have subscriptions from server: " + addr + " for destination: " + destination.getId());
     }
 
     /**
      * Called when a cluster node gets removed.  We need to make sure that all subscriptions
      * for this node are removed.
+     *
      * @param address the remote cluster node address
      */
-    public void removeClusterNode(Object address)
-    {
+    public void removeClusterNode(Object address) {
         if (Log.isDebug())
             Log.getLogger(MessageService.LOG_CATEGORY).debug("Cluster node: " + address + " subscriptions being removed for destination:" + destination.getId() + " before: " + StringUtils.NEWLINE + getDebugSubscriptionState());
 
         MessageClient client = getSubscriber(address);
-        if (client != null)
-        {
+        if (client != null) {
             client.invalidate();
         }
 
@@ -192,8 +171,7 @@
             Log.getLogger(MessageService.LOG_CATEGORY).debug("Cluster node: " + address + " subscriptions being removed for destination:" + destination.getId() + " after: " + StringUtils.NEWLINE + getDebugSubscriptionState());
     }
 
-    protected void monitorTimeout(MessageClient client)
-    {
+    protected void monitorTimeout(MessageClient client) {
         // Remote subscriptions do not timeout
     }
 
diff --git a/core/src/main/java/flex/messaging/services/messaging/SubscriptionManager.java b/core/src/main/java/flex/messaging/services/messaging/SubscriptionManager.java
index 9e53cf1..58c2f86 100644
--- a/core/src/main/java/flex/messaging/services/messaging/SubscriptionManager.java
+++ b/core/src/main/java/flex/messaging/services/messaging/SubscriptionManager.java
@@ -24,14 +24,13 @@
 import flex.messaging.client.FlexClient;
 import flex.messaging.config.ServerSettings.RoutingMode;
 import flex.messaging.log.Log;
+import flex.messaging.log.LogCategories;
 import flex.messaging.messages.AsyncMessage;
 import flex.messaging.messages.Message;
 import flex.messaging.security.MessagingSecurity;
 import flex.messaging.services.MessageService;
 import flex.messaging.services.ServiceAdapter;
 import flex.messaging.services.ServiceException;
-import flex.messaging.services.messaging.selector.JMSSelector;
-import flex.messaging.services.messaging.selector.JMSSelectorException;
 import flex.messaging.util.StringUtils;
 import flex.messaging.util.TimeoutManager;
 
@@ -45,12 +44,10 @@
 import java.util.concurrent.ThreadFactory;
 
 /**
- *
  * The SubscriptionManager monitors subscribed clients for MessageService
  * and its subclasses, such as DataService.
  */
-public class SubscriptionManager extends ManageableComponent
-{
+public class SubscriptionManager extends ManageableComponent {
     public static final String TYPE = "SubscriptionManager";
     private static final int SUBTOPICS_NOT_SUPPORTED = 10553;
     private static final int WILDCARD_SUBTOPICS_NOT_ALLOWED = 10560;
@@ -65,13 +62,19 @@
     // This lock protects allSubscriptions as synchronizing on a Concurrent class does not work.
     private final Object allSubscriptionsLock = new Object();
 
-    /** Subscriptions with no subtopic. */
+    /**
+     * Subscriptions with no subtopic.
+     */
     private final TopicSubscription globalSubscribers = new TopicSubscription();
 
-    /** Subscriptions with a simple subtopic. */
+    /**
+     * Subscriptions with a simple subtopic.
+     */
     private final Map<Subtopic, TopicSubscription> subscribersPerSubtopic = new ConcurrentHashMap<Subtopic, TopicSubscription>();
 
-    /** Subscriptions with a wildcard subtopic. */
+    /**
+     * Subscriptions with a wildcard subtopic.
+     */
     private final Map<Subtopic, TopicSubscription> subscribersPerSubtopicWildcard = new ConcurrentHashMap<Subtopic, TopicSubscription>();
 
     protected final MessageDestination destination;
@@ -86,22 +89,19 @@
      *
      * @param destination the destination
      */
-    public SubscriptionManager(MessageDestination destination)
-    {
+    public SubscriptionManager(MessageDestination destination) {
         this(destination, false);
     }
 
     /**
      * Construct a subscription manager for a destination.
      *
-     * @param destination the destination
+     * @param destination      the destination
      * @param enableManagement turn on management?
      */
-    public SubscriptionManager(MessageDestination destination, boolean enableManagement)
-    {
+    public SubscriptionManager(MessageDestination destination, boolean enableManagement) {
         super(enableManagement);
-        synchronized (classMutex)
-        {
+        synchronized (classMutex) {
             super.setId(TYPE + ++instanceCount);
         }
         this.destination = destination;
@@ -110,41 +110,39 @@
     }
 
     // This component's id should never be changed as it's generated internally
-    /** {@inheritDoc} */
-    @Override public void setId(String id)
-    {
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setId(String id) {
         // No-op
     }
 
     /**
      * Stops the subscription manager.
      */
-    @Override public void stop()
-    {
+    @Override
+    public void stop() {
         super.stop();
 
         // Remove management.
-        if (isManaged() && getControl() != null)
-        {
+        if (isManaged() && getControl() != null) {
             getControl().unregister();
             setControl(null);
             setManaged(false);
         }
 
         // Destroy subscriptions
-        synchronized (this)
-        {
-            if (subscriberSessionManager != null)
-            {
+        synchronized (this) {
+            if (subscriberSessionManager != null) {
                 subscriberSessionManager.shutdown();
                 subscriberSessionManager = null;
             }
         }
 
-        synchronized (allSubscriptionsLock)
-        {
-            if (!allSubscriptions.isEmpty())
-            {
+        synchronized (allSubscriptionsLock) {
+            if (!allSubscriptions.isEmpty()) {
                 for (Map.Entry<Object, MessageClient> objectMessageClientEntry : allSubscriptions.entrySet())
                     removeSubscriber(objectMessageClientEntry.getValue());
             }
@@ -156,21 +154,18 @@
      *
      * @param value the timeout value in milliseconds
      */
-    public void setSubscriptionTimeoutMillis(long value)
-    {
+    public void setSubscriptionTimeoutMillis(long value) {
         subscriptionTimeoutMillis = value;
-        if (subscriptionTimeoutMillis > 0)
-        {
-            subscriberSessionManager = new TimeoutManager(new ThreadFactory()
-                                                            {
-                                                                int counter = 1;
-                                                                public synchronized Thread newThread(Runnable runnable)
-                                                                {
-                                                                    Thread t = new Thread(runnable);
-                                                                    t.setName(destination.getId() + "-SubscriptionTimeoutThread-" + counter++);
-                                                                    return t;
-                                                                }
-                                                            });
+        if (subscriptionTimeoutMillis > 0) {
+            subscriberSessionManager = new TimeoutManager(new ThreadFactory() {
+                int counter = 1;
+
+                public synchronized Thread newThread(Runnable runnable) {
+                    Thread t = new Thread(runnable);
+                    t.setName(destination.getId() + "-SubscriptionTimeoutThread-" + counter++);
+                    return t;
+                }
+            });
         }
     }
 
@@ -179,8 +174,7 @@
      *
      * @return the timeout in milliseconds
      */
-    public long getSubscriptionTimeoutMillis()
-    {
+    public long getSubscriptionTimeoutMillis() {
         return subscriptionTimeoutMillis;
     }
 
@@ -191,26 +185,22 @@
      * remote server, iterate through the maps of subscriptions and
      * for each "unique" subscription it writes the selector and
      * subtopic.
-     *
+     * <p>
      * synchronization note: this assumes no add/remove subscriptions
      * are occurring while this method is called.
      *
      * @return a List of subscriptions selectors and subtopics
      */
-    public Object getSubscriptionState()
-    {
+    public Object getSubscriptionState() {
         ArrayList<String> subState = new ArrayList<String>();
 
         if (globalSubscribers.defaultSubscriptions != null &&
-            !globalSubscribers.defaultSubscriptions.isEmpty())
-        {
+                !globalSubscribers.defaultSubscriptions.isEmpty()) {
             subState.add(null); // selector string
             subState.add(null); // subtopic string
         }
-        if (globalSubscribers.selectorSubscriptions != null)
-        {
-            for (String s : globalSubscribers.selectorSubscriptions.keySet())
-            {
+        if (globalSubscribers.selectorSubscriptions != null) {
+            for (String s : globalSubscribers.selectorSubscriptions.keySet()) {
                 subState.add(s);
                 subState.add(null); // subtopic
             }
@@ -224,22 +214,17 @@
         return subState;
     }
 
-    private void addSubscriptionState(List<String> subState, Map<Subtopic, TopicSubscription> subsPerSubtopic)
-    {
-        for (Map.Entry<Subtopic, TopicSubscription> entry : subsPerSubtopic.entrySet())
-        {
+    private void addSubscriptionState(List<String> subState, Map<Subtopic, TopicSubscription> subsPerSubtopic) {
+        for (Map.Entry<Subtopic, TopicSubscription> entry : subsPerSubtopic.entrySet()) {
             Subtopic subtopic = entry.getKey();
             TopicSubscription tc = entry.getValue();
 
-            if (tc.defaultSubscriptions != null && !tc.defaultSubscriptions.isEmpty())
-            {
+            if (tc.defaultSubscriptions != null && !tc.defaultSubscriptions.isEmpty()) {
                 subState.add(null);
                 subState.add(subtopic.toString());
             }
-            if (tc.selectorSubscriptions != null)
-            {
-                for (String s : tc.selectorSubscriptions.keySet())
-                {
+            if (tc.selectorSubscriptions != null) {
+                for (String s : tc.selectorSubscriptions.keySet()) {
                     subState.add(s);
                     subState.add(subtopic.toString()); // subtopic
                 }
@@ -250,10 +235,10 @@
 
     /**
      * Get a string representation of the subscription state.
+     *
      * @return the string
      */
-    protected String getDebugSubscriptionState()
-    {
+    protected String getDebugSubscriptionState() {
         StringBuffer sb = new StringBuffer(100);
 
         sb.append(" global subscriptions: ").append(globalSubscribers).append(StringUtils.NEWLINE);
@@ -262,55 +247,49 @@
         return sb.toString();
     }
 
-    @Override protected String getLogCategory()
-    {
+    @Override
+    protected String getLogCategory() {
         return MessageService.LOG_CATEGORY;
     }
 
     /**
      * Return the ids of our subscribers.
+     *
      * @return a set of subscriber ids
      */
-    public Set<Object> getSubscriberIds()
-    {
+    public Set<Object> getSubscriberIds() {
         return allSubscriptions.keySet();
     }
 
     /**
      * Return the set of subscribers for a message.
      *
-     * @param message the message
+     * @param message      the message
      * @param evalSelector should the selector be evaluated?
      * @return the set of subscribers
      */
-    public Set<Object> getSubscriberIds(Message message, boolean evalSelector)
-    {
+    public Set<Object> getSubscriberIds(Message message, boolean evalSelector) {
         Set<Object> ids = new LinkedHashSet<Object>();
 
         Object subtopicObj = message.getHeader(AsyncMessage.SUBTOPIC_HEADER_NAME);
 
         if (subtopicObj instanceof Object[])
-            subtopicObj = Arrays.asList((Object[])subtopicObj);
+            subtopicObj = Arrays.asList((Object[]) subtopicObj);
 
-        if (subtopicObj instanceof String)
-        {
+        if (subtopicObj instanceof String) {
             String subtopicString = (String) subtopicObj;
 
             if (subtopicString.length() > 0)
                 addSubtopicSubscribers(subtopicString, message, ids, evalSelector);
             else
                 addTopicSubscribers(globalSubscribers, message, ids, evalSelector);
-        }
-        else if (subtopicObj instanceof List)
-        {
+        } else if (subtopicObj instanceof List) {
             @SuppressWarnings("unchecked")
-            List<String> subtopicList = (List<String>)subtopicObj;
-            for (String aSubtopicList : subtopicList)
-            {
+            List<String> subtopicList = (List<String>) subtopicObj;
+            for (String aSubtopicList : subtopicList) {
                 addSubtopicSubscribers(aSubtopicList, message, ids, evalSelector);
             }
-        }
-        else
+        } else
             addTopicSubscribers(globalSubscribers, message, ids, evalSelector);
 
         return ids;
@@ -319,23 +298,18 @@
     /**
      * Return the set of subscribers for a message.
      *
-     * @param message the message
+     * @param message      the message
      * @param evalSelector hould the selector be evaluated?
-     * @param subtopics the subtopics to use
+     * @param subtopics    the subtopics to use
      * @return the set of subscribers
      */
-    public Set<Object> getSubscriberIds(Message message, boolean evalSelector, List<Subtopic> subtopics)
-    {
+    public Set<Object> getSubscriberIds(Message message, boolean evalSelector, List<Subtopic> subtopics) {
         Set<Object> ids = new LinkedHashSet<Object>();
 
-        if (subtopics == null || subtopics.isEmpty())
-        {
+        if (subtopics == null || subtopics.isEmpty()) {
             addTopicSubscribers(globalSubscribers, message, ids, evalSelector);
-        }
-        else
-        {
-            for (Subtopic subtopic : subtopics)
-            {
+        } else {
+            for (Subtopic subtopic : subtopics) {
                 addSubtopicSubscribers(subtopic, message, ids, evalSelector);
             }
         }
@@ -346,12 +320,11 @@
      * Return the set of subscribers for a subtopic pattern.
      * Constructs a message and calls {@link #getSubscriberIds(flex.messaging.messages.Message, boolean)}.
      *
-     * @param subtopicPattern  the pattern to match
-     * @param messageHeaders the message headers
+     * @param subtopicPattern the pattern to match
+     * @param messageHeaders  the message headers
      * @return the set of subscribers
      */
-    public Set<Object> getSubscriberIds(String subtopicPattern, Map messageHeaders)
-    {
+    public Set<Object> getSubscriberIds(String subtopicPattern, Map messageHeaders) {
         // This could be more efficient but we'd have to change the SQLParser to accept a map.
         Message msg = new AsyncMessage();
         msg.setHeader(AsyncMessage.SUBTOPIC_HEADER_NAME, subtopicPattern);
@@ -360,39 +333,33 @@
         return getSubscriberIds(msg, true);
     }
 
-    void addSubtopicSubscribers(String subtopicString, Message message, Set<Object> ids, boolean evalSelector)
-    {
+    void addSubtopicSubscribers(String subtopicString, Message message, Set<Object> ids, boolean evalSelector) {
         Subtopic subtopic = getSubtopic(subtopicString);
         addSubtopicSubscribers(subtopic, message, ids, evalSelector);
     }
 
-    void addSubtopicSubscribers(Subtopic subtopic, Message message, Set<Object> ids, boolean evalSelector)
-    {
+    void addSubtopicSubscribers(Subtopic subtopic, Message message, Set<Object> ids, boolean evalSelector) {
         // If we have a subtopic, we need to route the message only to that
         // subset of subscribers.
-        if (!destination.getServerSettings().getAllowSubtopics())
-        {
+        if (!destination.getServerSettings().getAllowSubtopics()) {
             // Throw an error - the destination doesn't allow subtopics.
             ServiceException se = new ServiceException();
-            se.setMessage(SUBTOPICS_NOT_SUPPORTED, new Object[] {subtopic.getValue(), destination.getId()});
+            se.setMessage(SUBTOPICS_NOT_SUPPORTED, new Object[]{subtopic.getValue(), destination.getId()});
             throw se;
         }
 
         // Give a MessagingAdapter a chance to block the send to this subtopic.
         ServiceAdapter adapter = destination.getAdapter();
-        if (adapter instanceof MessagingSecurity)
-        {
-            if (!((MessagingSecurity)adapter).allowSend(subtopic))
-            {
+        if (adapter instanceof MessagingSecurity) {
+            if (!((MessagingSecurity) adapter).allowSend(subtopic)) {
                 ServiceException se = new ServiceException();
-                se.setMessage(10558, new Object[] {subtopic.getValue()});
+                se.setMessage(10558, new Object[]{subtopic.getValue()});
                 throw se;
             }
         }
 
         TopicSubscription ts;
-        if (subscribersPerSubtopic.containsKey(subtopic))
-        {
+        if (subscribersPerSubtopic.containsKey(subtopic)) {
             ts = subscribersPerSubtopic.get(subtopic);
             addTopicSubscribers(ts, message, ids, evalSelector);
         }
@@ -402,12 +369,9 @@
          * a hashtable lookup rather than a linear search
          */
         Set<Subtopic> subtopics = subscribersPerSubtopicWildcard.keySet();
-        if (!subtopics.isEmpty())
-        {
-            for (Subtopic st : subtopics)
-            {
-                if (st.matches(subtopic))
-                {
+        if (!subtopics.isEmpty()) {
+            for (Subtopic st : subtopics) {
+                if (st.matches(subtopic)) {
                     ts = subscribersPerSubtopicWildcard.get(st);
                     addTopicSubscribers(ts, message, ids, evalSelector);
                 }
@@ -415,8 +379,7 @@
         }
     }
 
-    void addTopicSubscribers(TopicSubscription ts, Message message, Set<Object> ids, boolean evalSelector)
-    {
+    void addTopicSubscribers(TopicSubscription ts, Message message, Set<Object> ids, boolean evalSelector) {
         if (ts == null)
             return;
 
@@ -427,15 +390,14 @@
         if (ts.selectorSubscriptions == null)
             return;
 
-        for (Map.Entry<String, Map<Object, MessageClient>> entry : ts.selectorSubscriptions.entrySet())
-        {
+        for (Map.Entry<String, Map<Object, MessageClient>> entry : ts.selectorSubscriptions.entrySet()) {
             String selector = entry.getKey();
             subs = entry.getValue();
 
-            if (!evalSelector)
-            {
-                ids.addAll(subs.keySet());
-            }
+            /*if (!evalSelector)
+            {*/
+            ids.addAll(subs.keySet());
+            /*}
             else
             {
                 JMSSelector jmsSel = new JMSSelector(selector);
@@ -456,7 +418,7 @@
                                 "  selector: " + selector);
                     }
                 }
-            }
+            }*/
         }
     }
 
@@ -468,8 +430,7 @@
      * @param clientId The clientId of the target subscriber.
      * @return The subscriber, or null if the subscriber is not found.
      */
-    public MessageClient getSubscriber(Object clientId)
-    {
+    public MessageClient getSubscriber(Object clientId) {
         MessageClient client = allSubscriptions.get(clientId);
         if (client != null && !client.isTimingOut())
             monitorTimeout(client);
@@ -482,8 +443,7 @@
      *
      * @param client the client
      */
-    public void removeSubscriber(MessageClient client)
-    {
+    public void removeSubscriber(MessageClient client) {
         // Sends unsub messages for each subscription for this MessageClient which
         // should mean we remove the client at the end.
         client.invalidate();
@@ -495,49 +455,44 @@
     /**
      * Add a subscriber.
      *
-     * @param clientId the client id
-     * @param selector the selector
+     * @param clientId       the client id
+     * @param selector       the selector
      * @param subtopicString the subtopic
-     * @param endpointId the endpoint
+     * @param endpointId     the endpoint
      */
-    public void addSubscriber(Object clientId, String selector, String subtopicString, String endpointId)
-    {
+    public void addSubscriber(Object clientId, String selector, String subtopicString, String endpointId) {
         addSubscriber(clientId, selector, subtopicString, endpointId, 0);
     }
 
     /**
      * Add a subscriber.
      *
-     * @param clientId the client id
-     * @param selector the selector
+     * @param clientId       the client id
+     * @param selector       the selector
      * @param subtopicString the subtopic
-     * @param endpointId the endpoint
-     * @param maxFrequency maximum frequency
+     * @param endpointId     the endpoint
+     * @param maxFrequency   maximum frequency
      */
-    public void addSubscriber(Object clientId, String selector, String subtopicString, String endpointId, int maxFrequency)
-    {
+    public void addSubscriber(Object clientId, String selector, String subtopicString, String endpointId, int maxFrequency) {
         Subtopic subtopic = getSubtopic(subtopicString);
         MessageClient client = null;
         TopicSubscription topicSub;
         Map<Object, MessageClient> subs;
         Map<Subtopic, TopicSubscription> map;
 
-        try
-        {
+        try {
             // Handle resubscribes from the same client and duplicate subscribes from different clients
             boolean subscriptionAlreadyExists = (getSubscriber(clientId) != null);
             client = getMessageClient(clientId, endpointId);
 
             FlexClient flexClient = FlexContext.getFlexClient();
-            if (subscriptionAlreadyExists)
-            {
+            if (subscriptionAlreadyExists) {
                 // Block duplicate subscriptions from multiple FlexClients if they
                 // attempt to use the same clientId.  (when this is called from a remote
                 // subscription, there won't be a flex client so skip this test).
-                if (flexClient != null && !flexClient.getId().equals(client.getFlexClient().getId()))
-                {
+                if (flexClient != null && !flexClient.getId().equals(client.getFlexClient().getId())) {
                     ServiceException se = new ServiceException();
-                    se.setMessage(10559, new Object[] {clientId});
+                    se.setMessage(10559, new Object[]{clientId});
                     throw se;
                 }
 
@@ -549,35 +504,28 @@
             ServiceAdapter adapter = destination.getAdapter();
             client.updateLastUse();
 
-            if (subtopic == null)
-            {
+            if (subtopic == null) {
                 topicSub = globalSubscribers;
-            }
-            else
-            {
-                if (!destination.getServerSettings().getAllowSubtopics())
-                {
+            } else {
+                if (!destination.getServerSettings().getAllowSubtopics()) {
                     // Throw an error - the destination doesn't allow subtopics.
                     ServiceException se = new ServiceException();
-                    se.setMessage(SUBTOPICS_NOT_SUPPORTED, new Object[] {subtopicString, destination.getId()});
+                    se.setMessage(SUBTOPICS_NOT_SUPPORTED, new Object[]{subtopicString, destination.getId()});
                     throw se;
                 }
 
-                if (subtopic.containsSubtopicWildcard() && destination.getServerSettings().isDisallowWildcardSubtopics())
-                {
+                if (subtopic.containsSubtopicWildcard() && destination.getServerSettings().isDisallowWildcardSubtopics()) {
                     // Attempt to subscribe to the subtopic, ''{0}'', on destination, ''{1}'', that does not allow wilcard subtopics failed.
                     ServiceException se = new ServiceException();
-                    se.setMessage(WILDCARD_SUBTOPICS_NOT_ALLOWED, new Object[] {subtopicString, destination.getId()});
+                    se.setMessage(WILDCARD_SUBTOPICS_NOT_ALLOWED, new Object[]{subtopicString, destination.getId()});
                     throw se;
                 }
 
                 // Give a MessagingAdapter a chance to block the subscribe.
-                if ((adapter instanceof MessagingSecurity) && (subtopic != null))
-                {
-                    if (!((MessagingSecurity)adapter).allowSubscribe(subtopic))
-                    {
+                if ((adapter instanceof MessagingSecurity) && (subtopic != null)) {
+                    if (!((MessagingSecurity) adapter).allowSubscribe(subtopic)) {
                         ServiceException se = new ServiceException();
-                        se.setMessage(10557, new Object[] {subtopicString});
+                        se.setMessage(10557, new Object[]{subtopicString});
                         throw se;
                     }
                 }
@@ -592,11 +540,9 @@
                 else
                     map = subscribersPerSubtopic;
 
-                synchronized (this)
-                {
+                synchronized (this) {
                     topicSub = map.get(subtopic);
-                    if (topicSub == null)
-                    {
+                    if (topicSub == null) {
                         topicSub = new TopicSubscription();
                         map.put(subtopic, topicSub);
                     }
@@ -604,49 +550,38 @@
             }
 
             /* Subscribing with no selector */
-            if (selector == null)
-            {
+            if (selector == null) {
                 subs = topicSub.defaultSubscriptions;
-                if (subs == null)
-                {
-                    synchronized (this)
-                    {
+                if (subs == null) {
+                    synchronized (this) {
                         if ((subs = topicSub.defaultSubscriptions) == null)
                             topicSub.defaultSubscriptions = subs = new ConcurrentHashMap<Object, MessageClient>();
                     }
                 }
             }
             /* Subscribing with a selector - store all subscriptions under the selector key */
-            else
-            {
-                synchronized (this)
-                {
+            else {
+                synchronized (this) {
                     if (topicSub.selectorSubscriptions == null)
-                        topicSub.selectorSubscriptions = new ConcurrentHashMap<String,  Map<Object, MessageClient>>();
+                        topicSub.selectorSubscriptions = new ConcurrentHashMap<String, Map<Object, MessageClient>>();
                 }
 
                 subs = topicSub.selectorSubscriptions.get(selector);
-                if (subs == null)
-                {
-                    synchronized (this)
-                    {
+                if (subs == null) {
+                    synchronized (this) {
                         if ((subs = topicSub.selectorSubscriptions.get(selector)) == null)
                             topicSub.selectorSubscriptions.put(selector, subs = new ConcurrentHashMap<Object, MessageClient>());
                     }
                 }
             }
 
-            if (subs.containsKey(clientId))
-            {
+            if (subs.containsKey(clientId)) {
                 /* I'd rather this be an error but in 2.0 we allowed this without error */
                 if (Log.isWarn())
-                    Log.getLogger(JMSSelector.LOG_CATEGORY).warn("Client: " + clientId + " already subscribed to: " + destination.getId() + " selector: " + selector + " subtopic: " + subtopicString);
-            }
-            else
-            {
+                    Log.getLogger(LogCategories.MESSAGE_SELECTOR).warn("Client: " + clientId + " already subscribed to: " + destination.getId() + " selector: " + selector + " subtopic: " + subtopicString);
+            } else {
                 client.addSubscription(selector, subtopicString, maxFrequency);
-                synchronized (this)
-                {
+                synchronized (this) {
                     /*
                      * Make sure other members of the cluster know that we are subscribed to
                      * this info if we are in server-to-server mode
@@ -656,7 +591,7 @@
                      * subscription state matches the one in the local server.
                      */
                     if (subs.isEmpty() && destination.isClustered() &&
-                        destination.getServerSettings().getRoutingMode() == RoutingMode.SERVER_TO_SERVER)
+                            destination.getServerSettings().getRoutingMode() == RoutingMode.SERVER_TO_SERVER)
                         sendSubscriptionToPeer(true, selector, subtopicString);
                     subs.put(clientId, client);
                 }
@@ -667,9 +602,7 @@
                 if (!subscriptionAlreadyExists)
                     client.notifyCreatedListeners();
             }
-        }
-        finally
-        {
+        } finally {
             releaseMessageClient(client);
         }
 
@@ -678,18 +611,15 @@
     /**
      * Remove a subscriber.
      *
-     * @param clientId the client id
-     * @param selector the selector
+     * @param clientId       the client id
+     * @param selector       the selector
      * @param subtopicString the subtopic
-     * @param endpointId the endpoint
+     * @param endpointId     the endpoint
      */
-    public void removeSubscriber(Object clientId, String selector, String subtopicString, String endpointId)
-    {
+    public void removeSubscriber(Object clientId, String selector, String subtopicString, String endpointId) {
         MessageClient client = null;
-        try
-        {
-            synchronized (allSubscriptionsLock)
-            {
+        try {
+            synchronized (allSubscriptionsLock) {
                 // Do a simple lookup first to avoid the creation of a new MessageClient instance
                 // in the following call to getMessageClient() if the subscription is already removed.
                 client = allSubscriptions.get(clientId);
@@ -705,12 +635,9 @@
             Map<Object, MessageClient> subs;
             Map<Subtopic, TopicSubscription> map = null;
 
-            if (subtopic == null)
-            {
+            if (subtopic == null) {
                 topicSub = globalSubscribers;
-            }
-            else
-            {
+            } else {
                 if (subtopic.containsSubtopicWildcard())
                     map = subscribersPerSubtopicWildcard;
                 else
@@ -730,40 +657,33 @@
             if (subs == null || subs.get(clientId) == null)
                 throw new MessageException("Client: " + clientId + " not subscribed to destination with selector: " + selector);
 
-            synchronized (this)
-            {
+            synchronized (this) {
                 subs.remove(clientId);
                 if (subs.isEmpty() &&
-                    destination.isClustered() && destination.getServerSettings().getRoutingMode() == RoutingMode.SERVER_TO_SERVER)
+                        destination.isClustered() && destination.getServerSettings().getRoutingMode() == RoutingMode.SERVER_TO_SERVER)
                     sendSubscriptionToPeer(false, selector, subtopicString);
 
-                if (subs.isEmpty())
-                {
-                    if (selector != null)
-                    {
+                if (subs.isEmpty()) {
+                    if (selector != null) {
                         if (topicSub.selectorSubscriptions != null && !topicSub.selectorSubscriptions.isEmpty())
                             topicSub.selectorSubscriptions.remove(selector);
                     }
 
                     if (subtopic != null &&
-                        (topicSub.selectorSubscriptions == null || topicSub.selectorSubscriptions.isEmpty()) &&
-                        (topicSub.defaultSubscriptions == null || topicSub.defaultSubscriptions.isEmpty()))
-                    {
-                           if ((topicSub.selectorSubscriptions == null || topicSub.selectorSubscriptions.isEmpty()) &&
-                               (topicSub.defaultSubscriptions == null || topicSub.defaultSubscriptions.isEmpty()))
-                               map.remove(subtopic);
+                            (topicSub.selectorSubscriptions == null || topicSub.selectorSubscriptions.isEmpty()) &&
+                            (topicSub.defaultSubscriptions == null || topicSub.defaultSubscriptions.isEmpty())) {
+                        if ((topicSub.selectorSubscriptions == null || topicSub.selectorSubscriptions.isEmpty()) &&
+                                (topicSub.defaultSubscriptions == null || topicSub.defaultSubscriptions.isEmpty()))
+                            map.remove(subtopic);
                     }
                 }
             }
 
-            if (client.removeSubscription(selector, subtopicString))
-            {
+            if (client.removeSubscription(selector, subtopicString)) {
                 allSubscriptions.remove(clientId);
                 client.invalidate(); // Destroy the MessageClient.
             }
-        }
-        finally
-        {
+        } finally {
             if (client != null)
                 releaseMessageClient(client);
         }
@@ -772,12 +692,11 @@
     /**
      * Create a new MessageClient object.
      *
-     * @param clientId the client id
+     * @param clientId   the client id
      * @param endpointId the endpoint
      * @return constructed MessageClient
      */
-    protected MessageClient newMessageClient(Object clientId, String endpointId)
-    {
+    protected MessageClient newMessageClient(Object clientId, String endpointId) {
         return new MessageClient(clientId, destination, endpointId, true);
     }
 
@@ -787,12 +706,11 @@
      * a given clientId for as long as this session is valid (or the
      * subscription times out).
      *
-     * @param clientId the client id
+     * @param clientId   the client id
      * @param endpointId the endpoint
      * @return registered MessageClient
      */
-    public MessageClient registerMessageClient(Object clientId, String endpointId)
-    {
+    public MessageClient registerMessageClient(Object clientId, String endpointId) {
         MessageClient client = getMessageClient(clientId, endpointId);
 
         monitorTimeout(client);
@@ -813,17 +731,14 @@
     /**
      * Return a message client, creating it if needed.
      *
-     * @param clientId the client if
+     * @param clientId   the client if
      * @param endpointId the endpoint
      * @return the MessageClient
      */
-    public MessageClient getMessageClient(Object clientId, String endpointId)
-    {
-        synchronized (allSubscriptionsLock)
-        {
+    public MessageClient getMessageClient(Object clientId, String endpointId) {
+        synchronized (allSubscriptionsLock) {
             MessageClient client = allSubscriptions.get(clientId);
-            if (client == null)
-            {
+            if (client == null) {
                 client = newMessageClient(clientId, endpointId);
                 allSubscriptions.put(clientId, client);
             }
@@ -838,15 +753,12 @@
      *
      * @param client the client to release
      */
-    public void releaseMessageClient(MessageClient client)
-    {
+    public void releaseMessageClient(MessageClient client) {
         if (client == null)
             return;
 
-        synchronized (allSubscriptionsLock)
-        {
-            if (client.decrementReferences())
-            {
+        synchronized (allSubscriptionsLock) {
+            if (client.decrementReferences()) {
                 allSubscriptions.remove(client.getClientId());
                 client.invalidate(); // Destroy the MessageClient.
             }
@@ -858,14 +770,10 @@
      *
      * @param client the client
      */
-    protected void monitorTimeout(MessageClient client)
-    {
-        if (subscriberSessionManager != null)
-        {
-            synchronized (client)
-            {
-                if (!client.isTimingOut())
-                {
+    protected void monitorTimeout(MessageClient client) {
+        if (subscriberSessionManager != null) {
+            synchronized (client) {
+                if (!client.isTimingOut()) {
                     subscriberSessionManager.scheduleTimeout(client);
                     client.setTimingOut(true);
                 }
@@ -873,9 +781,8 @@
         }
     }
 
-    private Subtopic getSubtopic(String subtopic)
-    {
-        return subtopic != null?
+    private Subtopic getSubtopic(String subtopic) {
+        return subtopic != null ?
                 new Subtopic(subtopic, destination.getServerSettings().getSubtopicSeparator()) : null;
     }
 
@@ -884,27 +791,29 @@
      * of this server's interest in messages matching this selector and subtopic.
      *
      * @param subscribe are we subscribing?
-     * @param selector the selector
-     * @param subtopic the subtopic
+     * @param selector  the selector
+     * @param subtopic  the subtopic
      */
-    protected void sendSubscriptionToPeer(boolean subscribe, String selector, String subtopic)
-    {
+    protected void sendSubscriptionToPeer(boolean subscribe, String selector, String subtopic) {
         if (Log.isDebug())
             Log.getLogger(MessageService.LOG_CATEGORY).debug("Sending subscription to peers for subscribe? " + subscribe + " selector: " + selector + " subtopic: " + subtopic);
 
-        ((MessageService)destination.getService()).sendSubscribeFromPeer(destination.getId(), subscribe, selector, subtopic);
+        ((MessageService) destination.getService()).sendSubscribeFromPeer(destination.getId(), subscribe, selector, subtopic);
     }
 
-    static class TopicSubscription
-    {
-        /** This is the Map of clientId to MessageClient for each client subscribed to this topic with no selector. */
+    static class TopicSubscription {
+        /**
+         * This is the Map of clientId to MessageClient for each client subscribed to this topic with no selector.
+         */
         Map<Object, MessageClient> defaultSubscriptions;
 
-        /** A map of selector string to Map of clientId to MessageClient. */
-        Map<String,  Map<Object, MessageClient>> selectorSubscriptions;
+        /**
+         * A map of selector string to Map of clientId to MessageClient.
+         */
+        Map<String, Map<Object, MessageClient>> selectorSubscriptions;
 
-        @Override public String toString()
-        {
+        @Override
+        public String toString() {
             StringBuffer sb = new StringBuffer(100);
 
             sb.append("default subscriptions: ").append(defaultSubscriptions).append(StringUtils.NEWLINE);
diff --git a/core/src/main/java/flex/messaging/services/messaging/Subtopic.java b/core/src/main/java/flex/messaging/services/messaging/Subtopic.java
index ba641b0..0f19cfc 100644
--- a/core/src/main/java/flex/messaging/services/messaging/Subtopic.java
+++ b/core/src/main/java/flex/messaging/services/messaging/Subtopic.java
@@ -26,8 +26,7 @@
  * are used to implement your own authorization for the subscribe and send messages
  * to specific subtopics.
  */
-public class Subtopic
-{
+public class Subtopic {
     //--------------------------------------------------------------------------
     //
     // Constructor
@@ -37,37 +36,31 @@
     /**
      * Constructor.
      *
-     *
-     *
-     * @param subtopic The full subtopic string.
+     * @param subtopic  The full subtopic string.
      * @param separator The separator for tokenizing a hierarchical subtopic.
      */
-    public Subtopic(String subtopic, String separator)
-    {
+    public Subtopic(String subtopic, String separator) {
         this.subtopic = subtopic;
         this.separator = separator;
 
         // Subtopic cannot be zero length.
-        if (subtopic.length() == 0)
-        {
+        if (subtopic.length() == 0) {
             ServiceException se = new ServiceException();
-            se.setMessage(10554, new Object[] {subtopic});
+            se.setMessage(10554, new Object[]{subtopic});
             throw se;
         }
         // Validate subtopic format if it contains a separator.
-        else if ((separator != null) && (subtopic.indexOf(separator) != -1))
-        {
+        else if ((separator != null) && (subtopic.indexOf(separator) != -1)) {
             hierarchical = true;
             /*
              * Each token must have non-zero length, meaning no leading or trailing
              * separator or empty subtopics in between.
              */
             if (subtopic.startsWith(separator) ||
-                subtopic.endsWith(separator) ||
-                (subtopic.indexOf(separator + separator) != -1))
-            {
+                    subtopic.endsWith(separator) ||
+                    (subtopic.indexOf(separator + separator) != -1)) {
                 ServiceException se = new ServiceException();
-                se.setMessage(10554, new Object[] {subtopic});
+                se.setMessage(10554, new Object[]{subtopic});
                 throw se;
             }
 
@@ -78,19 +71,14 @@
              */
 
             StringTokenizer tokenizer = new StringTokenizer(subtopic, separator);
-            while (tokenizer.hasMoreTokens())
-            {
+            while (tokenizer.hasMoreTokens()) {
                 String token = tokenizer.nextToken();
-                if (token.indexOf(SUBTOPIC_WILDCARD) != -1)
-                {
-                    if (!token.equals(SUBTOPIC_WILDCARD))
-                    {
+                if (token.indexOf(SUBTOPIC_WILDCARD) != -1) {
+                    if (!token.equals(SUBTOPIC_WILDCARD)) {
                         ServiceException se = new ServiceException();
-                        se.setMessage(10554, new Object[] {subtopic});
+                        se.setMessage(10554, new Object[]{subtopic});
                         throw se;
-                    }
-                    else
-                    {
+                    } else {
                         hasSubtopicWildcard = true;
                     }
                 }
@@ -98,16 +86,12 @@
         }
         // Non-hierarchical subtopics cannot contain subtopic wildcard unless
         // that is the only value, "*", indicating a match for any subtopic.
-        else if (subtopic.indexOf(SUBTOPIC_WILDCARD) != -1)
-        {
-            if (!subtopic.equals(SUBTOPIC_WILDCARD))
-            {
+        else if (subtopic.indexOf(SUBTOPIC_WILDCARD) != -1) {
+            if (!subtopic.equals(SUBTOPIC_WILDCARD)) {
                 ServiceException se = new ServiceException();
-                se.setMessage(10554, new Object[] {subtopic});
+                se.setMessage(10554, new Object[]{subtopic});
                 throw se;
-            }
-            else
-            {
+            } else {
                 hasSubtopicWildcard = true;
             }
         }
@@ -160,10 +144,9 @@
      * Returns true if the subtopic contains a hierarchical subtopic wildcard.
      *
      * @return true if the subtopic contains a hierarchical subtopic wildcard,
-     *         otherwise false.
+     * otherwise false.
      */
-    public boolean containsSubtopicWildcard()
-    {
+    public boolean containsSubtopicWildcard() {
         return hasSubtopicWildcard;
     }
 
@@ -173,8 +156,7 @@
      * @param other The object to compare against.
      * @return <code>true</code> if other equals to this; <code>false</code> otherwise;
      */
-    public boolean equals(Object other)
-    {
+    public boolean equals(Object other) {
         if (!(other instanceof Subtopic))
             return false;
         Subtopic otherSubtopic = (Subtopic) other;
@@ -188,8 +170,7 @@
      *
      * @return The separator used to create this Subtopic instance.
      */
-    public String getSeparator()
-    {
+    public String getSeparator() {
         return separator;
     }
 
@@ -198,8 +179,7 @@
      *
      * @return The subtopic value used to create this Subtopic instance.
      */
-    public String getValue()
-    {
+    public String getValue() {
         return subtopic;
     }
 
@@ -208,8 +188,7 @@
      *
      * @return The hashCode.
      */
-    public int hashCode()
-    {
+    public int hashCode() {
         return subtopic.hashCode();
     }
 
@@ -218,8 +197,7 @@
      *
      * @return true if the subtopic is hierarchical, otherwise false.
      */
-    public boolean isHierarchical()
-    {
+    public boolean isHierarchical() {
         return hierarchical;
     }
 
@@ -234,16 +212,13 @@
      * @param other The other subtopic to match against this subtopic.
      * @return true if they match, otherwise false.
      */
-    public boolean matches(Subtopic other)
-    {
+    public boolean matches(Subtopic other) {
         // If neither contain a wildcard, match them as simple Strings.
-        if (!hasSubtopicWildcard && !other.hasSubtopicWildcard)
-        {
+        if (!hasSubtopicWildcard && !other.hasSubtopicWildcard) {
             return (subtopic.equals(other.subtopic)) ? true : false;
         }
         // Otherwise, this subtopic or the other contains a wildcard.
-        else
-        {
+        else {
             // If both are hierarchical but use different separators - don't match.
             if (hierarchical && other.hierarchical && !separator.equals(other.separator))
                 return false;
@@ -256,19 +231,15 @@
             String tok1 = null;
             String tok2 = null;
             boolean matchToken;
-            while (n-- > 0)
-            {
+            while (n-- > 0) {
                 tok1 = t1.nextToken();
                 matchToken = !tok1.equals(SUBTOPIC_WILDCARD);
 
-                if (t2.hasMoreTokens())
-                {
+                if (t2.hasMoreTokens()) {
                     tok2 = t2.nextToken();
                     if (tok2.equals(SUBTOPIC_WILDCARD))
                         continue;
-                }
-                else
-                {
+                } else {
                     break; // No more tokens to compare.
                 }
 
@@ -289,8 +260,7 @@
      *
      * @return The subtopic string.
      */
-    public String toString()
-    {
+    public String toString() {
         return subtopic;
     }
 
diff --git a/core/src/main/java/flex/messaging/services/messaging/ThrottleManager.java b/core/src/main/java/flex/messaging/services/messaging/ThrottleManager.java
index 499c5f0..d39d87f 100644
--- a/core/src/main/java/flex/messaging/services/messaging/ThrottleManager.java
+++ b/core/src/main/java/flex/messaging/services/messaging/ThrottleManager.java
@@ -31,21 +31,17 @@
 import flex.messaging.services.messaging.ThrottleManager.ThrottleResult.Result;
 
 /**
- *
- *
  * The ThrottleManager provides functionality to limit the frequency of messages
  * routed through the system in message/second terms. Message frequency can be managed
  * on a per-client basis and also on a per-destination basis by tweaking different
  * parameters. Each MessageDestination has one ThrottleManager.
- *
+ * <p>
  * Message frequency can be throttled differently for incoming messages, which are messages
  * published by Flash/Flex producers, and for outgoing messages, which are messages
  * consumed by Flash/Flex subscribers that may have been produced by either Flash clients
  * or external message producers (such as data feeds, JMS publishers, etc).
- *
  */
-public class ThrottleManager extends ManageableComponent
-{
+public class ThrottleManager extends ManageableComponent {
     //--------------------------------------------------------------------------
     //
     // Public Static Constants
@@ -80,8 +76,7 @@
     /**
      * Constructs an unmanaged <code>ThrottleManager</code> instance.
      */
-    public ThrottleManager()
-    {
+    public ThrottleManager() {
         this(false);
     }
 
@@ -89,13 +84,11 @@
      * Constructs a <code>ThrottleManager</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>ThrottleManager</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public ThrottleManager(boolean enableManagement)
-    {
+    public ThrottleManager(boolean enableManagement) {
         super(enableManagement);
-        synchronized (classMutex)
-        {
+        synchronized (classMutex) {
             super.setId(TYPE + ++instanceCount);
         }
     }
@@ -121,14 +114,12 @@
      * Starts the throttle manager.
      */
     @Override
-    public void start()
-    {
+    public void start() {
         // Use the default ThrottleSettings if one is not set already.
         if (settings == null)
             settings = new ThrottleSettings();
 
-        if (settings.isDestinationThrottleEnabled())
-        {
+        if (settings.isDestinationThrottleEnabled()) {
             inboundDestinationMark = new MessageFrequency(settings.getIncomingDestinationFrequency());
             outboundDestinationMark = new MessageFrequency(settings.getOutgoingDestinationFrequency());
         }
@@ -142,13 +133,11 @@
      * Stops the throttle manager.
      */
     @Override
-    public void stop()
-    {
+    public void stop() {
         super.stop();
 
         // Remove management.
-        if (isManaged() && getControl() != null)
-        {
+        if (isManaged() && getControl() != null) {
             getControl().unregister();
             setControl(null);
             setManaged(false);
@@ -167,8 +156,7 @@
      * @param policy The policy.
      * @return The result for the policy.
      */
-    public static Result getResult(Policy policy)
-    {
+    public static Result getResult(Policy policy) {
         if (Policy.IGNORE == policy)
             return Result.IGNORE;
         else if (Policy.ERROR == policy)
@@ -185,9 +173,8 @@
      *
      * @return The outbound policy for the throttle manager.
      */
-    public Policy getOutboundPolicy()
-    {
-        return settings == null? null : settings.getOutboundPolicy();
+    public Policy getOutboundPolicy() {
+        return settings == null ? null : settings.getOutboundPolicy();
     }
 
 
@@ -197,19 +184,16 @@
      * @param id The id.
      */
     @Override
-    public void setId(String id)
-    {
+    public void setId(String id) {
         // No-op
     }
 
     /**
-     *
      * Used by the MessageClient in its cleanup process.
      *
      * @param clientId The id of the MessageClient.
      */
-    public void removeClientThrottleMark(Object clientId)
-    {
+    public void removeClientThrottleMark(Object clientId) {
         if (inboundClientMarks != null)
             inboundClientMarks.remove(clientId);
         // Note that the outBoundClientMarks that is maintained by the FlexClientOutboundQueueProcessor
@@ -221,12 +205,10 @@
      *
      * @param throttleSettings The throttling settings for the throttle manager.
      */
-    public void setThrottleSettings(ThrottleSettings throttleSettings)
-    {
+    public void setThrottleSettings(ThrottleSettings throttleSettings) {
         // Make sure that we have valid outbound policies.
         Policy outPolicy = throttleSettings.getOutboundPolicy();
-        if (outPolicy != Policy.NONE && outPolicy != Policy.IGNORE)
-        {
+        if (outPolicy != Policy.NONE && outPolicy != Policy.IGNORE) {
             ConfigurationException ex = new ConfigurationException();
             ex.setMessage("Invalid outbound throttle policy '" + outPolicy
                     + "' for destination '" + throttleSettings.getDestinationName()
@@ -242,21 +224,18 @@
      * @param message Message to be throttled.
      * @return True if the message was throttled; otherwise false.
      */
-    public boolean throttleIncomingMessage(Message message)
-    {
+    public boolean throttleIncomingMessage(Message message) {
         // destination-level throttling comes before client-level, because if it
         // fails then it doesn't matter what the client-level throttle reports.
         ThrottleResult throttleResult = throttleDestinationLevel(message, true);
-        if (throttleResult.getResult() == Result.OK)
-        {
+        if (throttleResult.getResult() == Result.OK) {
             // client-level throttling allows the system to further refine a
             // different throttle for individual clients, which may be a subset
             // but never a superset of destination-level throttle settings
             throttleResult = throttleIncomingClientLevel(message);
             handleIncomingThrottleResult(message, throttleResult, true /*isClientLevel*/);
             boolean throttled = throttleResult.getResult() != Result.OK;
-            if (!throttled)
-            {
+            if (!throttled) {
                 updateMessageFrequencyDestinationLevel(true /* incoming */);
                 updateMessageFrequencyIncomingClientLevel(message);
             }
@@ -265,8 +244,7 @@
 
         handleIncomingThrottleResult(message, throttleResult, false /*isClientLevel*/);
         boolean throttled = throttleResult.getResult() != Result.OK;
-        if (!throttled)
-        {
+        if (!throttled) {
             updateMessageFrequencyDestinationLevel(true /* incoming */);
             updateMessageFrequencyIncomingClientLevel(message);
         }
@@ -280,8 +258,7 @@
      * @param message The message to be throttled.
      * @return The result of throttling attempt.
      */
-    public ThrottleResult throttleOutgoingMessage(Message message)
-    {
+    public ThrottleResult throttleOutgoingMessage(Message message) {
         ThrottleResult throttleResult = throttleDestinationLevel(message, false);
         // Outbound client-level throttling happens in FlexClientOutboundQueueProcessor.
         handleOutgoingThrottleResult(message, throttleResult, false /*isClientLevel*/);
@@ -291,27 +268,24 @@
     /**
      * A utility method to handle outgoing throttling results in a common way.
      *
-     * @param message The message that is being throttled.
+     * @param message        The message that is being throttled.
      * @param throttleResult The throttling result.
-     * @param isClientLevel Whether the message is being throttled at the client level
-     * or not.
+     * @param isClientLevel  Whether the message is being throttled at the client level
+     *                       or not.
      */
-    public void handleOutgoingThrottleResult(Message message, ThrottleResult throttleResult, boolean isClientLevel)
-    {
+    public void handleOutgoingThrottleResult(Message message, ThrottleResult throttleResult, boolean isClientLevel) {
         Result result = throttleResult.getResult();
 
         // Update the management metrics.
-        if (result != Result.OK && isManaged())
-        {
+        if (result != Result.OK && isManaged()) {
             if (isClientLevel)
-                ((ThrottleManagerControl)getControl()).incrementClientOutgoingMessageThrottleCount();
+                ((ThrottleManagerControl) getControl()).incrementClientOutgoingMessageThrottleCount();
             else
-                ((ThrottleManagerControl)getControl()).incrementDestinationOutgoingMessageThrottleCount();
+                ((ThrottleManagerControl) getControl()).incrementDestinationOutgoingMessageThrottleCount();
         }
 
         // Result can only be IGNORE (or NONE which means no throttling)
-        if (result == Result.IGNORE)
-        {
+        if (result == Result.IGNORE) {
             // Improve the detail message for IGNORE.
             if (isClientLevel)
                 throttleResult.setDetail("Message '" + message.getMessageId() + "' ignored: Too many messages sent to client '"
@@ -328,19 +302,15 @@
     /**
      * Attempts to throttle destination-level incoming and outgoing messages.
      *
-     * @param message Message to throttle.
+     * @param message  Message to throttle.
      * @param incoming Whether the message is incoming or outgoing.
      * @return The result of the throttling attempt.
      */
-    public ThrottleResult throttleDestinationLevel(Message message, boolean incoming)
-    {
-        if (incoming && settings.isInboundDestinationThrottleEnabled())
-        {
+    public ThrottleResult throttleDestinationLevel(Message message, boolean incoming) {
+        if (incoming && settings.isInboundDestinationThrottleEnabled()) {
             ThrottleResult result = inboundDestinationMark.checkLimit(settings.getIncomingDestinationFrequency(), settings.getInboundPolicy());
             return result;
-        }
-        else if (!incoming && settings.isOutboundDestinationThrottleEnabled())
-        {
+        } else if (!incoming && settings.isOutboundDestinationThrottleEnabled()) {
             ThrottleResult result = outboundDestinationMark.checkLimit(settings.getOutgoingDestinationFrequency(), settings.getOutboundPolicy());
             return result;
         }
@@ -350,11 +320,10 @@
 
     /**
      * Updates the destination level message frequency.
-     *
+     * <p>
      * param incoming Whether the message is incoming or outgoing.
      */
-    public void updateMessageFrequencyDestinationLevel(boolean incoming)
-    {
+    public void updateMessageFrequencyDestinationLevel(boolean incoming) {
         if (incoming && settings.isInboundDestinationThrottleEnabled())
             inboundDestinationMark.updateMessageFrequency();
         else if (!incoming && settings.isOutboundDestinationThrottleEnabled())
@@ -364,11 +333,9 @@
     /**
      * Updates the incoming client level message frequency.
      */
-    public void updateMessageFrequencyIncomingClientLevel(Message message)
-    {
-        String clientId = (String)message.getClientId();
-        if (settings.isInboundClientThrottleEnabled())
-        {
+    public void updateMessageFrequencyIncomingClientLevel(Message message) {
+        String clientId = (String) message.getClientId();
+        if (settings.isInboundClientThrottleEnabled()) {
             MessageFrequency clientLevelMark = inboundClientMarks.get(clientId);
             if (clientLevelMark != null)
                 clientLevelMark.updateMessageFrequency();
@@ -385,45 +352,40 @@
      * Returns the log category for the throttle manager.
      */
     @Override
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
     /**
      * A utility method to handle incoming throttling results in a common way.
      *
-     * @param message The message that is being throttled.
+     * @param message        The message that is being throttled.
      * @param throttleResult The throttling result.
-     * @param isClientLevel Whether the message is being throttled at the client level
-     * or not.
+     * @param isClientLevel  Whether the message is being throttled at the client level
+     *                       or not.
      */
-    protected void handleIncomingThrottleResult(Message message, ThrottleResult throttleResult, boolean isClientLevel)
-    {
+    protected void handleIncomingThrottleResult(Message message, ThrottleResult throttleResult, boolean isClientLevel) {
         Result result = throttleResult.getResult();
 
         // Update the management metrics.
-        if (result != Result.OK && isManaged())
-        {
+        if (result != Result.OK && isManaged()) {
             if (isClientLevel)
-                ((ThrottleManagerControl)getControl()).incrementClientIncomingMessageThrottleCount();
+                ((ThrottleManagerControl) getControl()).incrementClientIncomingMessageThrottleCount();
             else
-                ((ThrottleManagerControl)getControl()).incrementDestinationIncomingMessageThrottleCount();
+                ((ThrottleManagerControl) getControl()).incrementDestinationIncomingMessageThrottleCount();
         }
 
         // Result can be IGNORE or ERROR (or NONE which means no throttling).
-        if (result == Result.IGNORE || result == Result.ERROR)
-        {
+        if (result == Result.IGNORE || result == Result.ERROR) {
             if (isClientLevel)
                 throttleResult.setDetail("Message '" + message.getMessageId() + "' throttled: Too many messages sent by the client '"
                         + message.getClientId() + "' in too small of a time interval " + throttleResult.getDetail());
             else
                 throttleResult.setDetail("Message '" + message.getMessageId() + "' throttled: Too many messages sent to destination '"
-                    + message.getDestination() + "' in too small of a time interval " + throttleResult.getDetail());
+                        + message.getDestination() + "' in too small of a time interval " + throttleResult.getDetail());
 
             String detail = throttleResult.getDetail();
-            if (result == Result.ERROR)
-            {
+            if (result == Result.ERROR) {
                 if (Log.isError())
                     Log.getLogger(LOG_CATEGORY).error(detail);
                 // And, throw an exception, so the client gets the error.
@@ -443,11 +405,9 @@
      * @param message Message to throttle.
      * @return The result of the throttling attempt.
      */
-    protected ThrottleResult throttleIncomingClientLevel(Message message)
-    {
-        String clientId = (String)message.getClientId();
-        if (settings.isInboundClientThrottleEnabled())
-        {
+    protected ThrottleResult throttleIncomingClientLevel(Message message) {
+        String clientId = (String) message.getClientId();
+        if (settings.isInboundClientThrottleEnabled()) {
             MessageFrequency clientLevelMark;
             clientLevelMark = inboundClientMarks.get(clientId);
             if (clientLevelMark == null)
@@ -470,13 +430,11 @@
     /**
      * This class is used to keep track of throttling results.
      */
-    public static class ThrottleResult
-    {
+    public static class ThrottleResult {
         /**
          * Result enum.
          */
-        public enum Result
-        {
+        public enum Result {
             OK, IGNORE, ERROR, BUFFER, CONFLATE
         }
 
@@ -486,8 +444,7 @@
         /**
          * Creates a ThrottleResult with Result.OK.
          */
-        public ThrottleResult()
-        {
+        public ThrottleResult() {
             this(Result.OK);
         }
 
@@ -518,8 +475,7 @@
          *
          * @return The detail.
          */
-        public String getDetail()
-        {
+        public String getDetail() {
             return detail;
         }
 
@@ -528,8 +484,7 @@
          *
          * @param detail The detail.
          */
-        public void setDetail(String detail)
-        {
+        public void setDetail(String detail) {
             this.detail = detail;
         }
 
@@ -538,8 +493,7 @@
          *
          * @return The result.
          */
-        public Result getResult()
-        {
+        public Result getResult() {
             return result;
         }
 
@@ -548,8 +502,7 @@
          *
          * @param result The result.
          */
-        public void setResult(Result result)
-        {
+        public void setResult(Result result) {
             this.result = result;
         }
     }
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/ActionScriptAdapter.java b/core/src/main/java/flex/messaging/services/messaging/adapters/ActionScriptAdapter.java
index fb00d0c..cda75c7 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/ActionScriptAdapter.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/ActionScriptAdapter.java
@@ -30,8 +30,7 @@
  * that supports simple publish/subscribe messaging between
  * ActionScript based clients.
  */
-public class ActionScriptAdapter extends MessagingAdapter
-{
+public class ActionScriptAdapter extends MessagingAdapter {
     private ActionScriptAdapterControl controller;
 
     //--------------------------------------------------------------------------
@@ -39,15 +38,14 @@
     // Constructor
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Constructs a default <code>ActionScriptAdapter</code>.
      */
-    public ActionScriptAdapter()
-    {
+    public ActionScriptAdapter() {
         super();
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Public Getters and Setters for ServiceAdapter properties
@@ -57,33 +55,30 @@
     /**
      * Casts the <code>Destination</code> into <code>MessageDestination</code>
      * and calls super.setDestination.
-     * 
+     *
      * @param destination
      */
-    public void setDestination(Destination destination)
-    {
-        Destination dest = (MessageDestination)destination;
+    public void setDestination(Destination destination) {
+        Destination dest = (MessageDestination) destination;
         super.setDestination(dest);
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Other Public APIs
     //                 
     //--------------------------------------------------------------------------
-    
+
     /**
      * Handle a data message intended for this adapter.
      */
-    public Object invoke(Message message)
-    {
-        MessageDestination destination = (MessageDestination)getDestination();
-        MessageService msgService = (MessageService)destination.getService();
+    public Object invoke(Message message) {
+        MessageDestination destination = (MessageDestination) getDestination();
+        MessageService msgService = (MessageService) destination.getService();
 
         SubscriptionManager subscriptionManager = destination.getSubscriptionManager();
         Set subscriberIds = subscriptionManager.getSubscriberIds(message, true /*evalSelector*/);
-        if (subscriberIds != null && !subscriberIds.isEmpty())
-        {
+        if (subscriberIds != null && !subscriberIds.isEmpty()) {
             /* We have already filtered based on the selector and so pass false below */
             msgService.pushMessageToClients(destination, subscriberIds, message, false);
         }
@@ -95,11 +90,10 @@
     /**
      * Invoked automatically to allow the <code>ActionScriptAdapter</code> to setup its corresponding
      * MBean control.
-     * 
+     *
      * @param broker The <code>Destination</code> that manages this <code>ActionScriptAdapter</code>.
      */
-    protected void setupAdapterControl(Destination destination)
-    {
+    protected void setupAdapterControl(Destination destination) {
         controller = new ActionScriptAdapterControl(this, destination.getControl());
         controller.register();
         setControl(controller);
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/AsyncMessageReceiver.java b/core/src/main/java/flex/messaging/services/messaging/adapters/AsyncMessageReceiver.java
index fb1c0f4..c0f96f0 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/AsyncMessageReceiver.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/AsyncMessageReceiver.java
@@ -23,11 +23,8 @@
 
 /**
  * A <code>MessageReceiver</code> that receives messages asynchronously from JMS.
- *
- *
  */
-class AsyncMessageReceiver implements MessageReceiver, ExceptionListener, MessageListener
-{
+class AsyncMessageReceiver implements MessageReceiver, ExceptionListener, MessageListener {
     private JMSConsumer jmsConsumer;
 
     /**
@@ -35,24 +32,21 @@
      *
      * @param jmsConsumer JMSConsumer associated with the AsyncMessageReceiver.
      */
-    public AsyncMessageReceiver(JMSConsumer jmsConsumer)
-    {
+    public AsyncMessageReceiver(JMSConsumer jmsConsumer) {
         this.jmsConsumer = jmsConsumer;
     }
 
     /**
      * Implements MessageReceiver.startReceive.
      */
-    public void startReceive() throws JMSException
-    {
+    public void startReceive() throws JMSException {
         jmsConsumer.setMessageListener(this);
     }
 
     /**
      * Implements MessageReceiver.stopReceive.
      */
-    public void stopReceive()
-    {
+    public void stopReceive() {
         // Nothing to do.
     }
 
@@ -61,8 +55,7 @@
      *
      * @param exception JMS exception received from the JMS server.
      */
-    public void onException(JMSException exception)
-    {
+    public void onException(JMSException exception) {
         jmsConsumer.onException(exception);
     }
 
@@ -71,8 +64,7 @@
      *
      * @param message JMS message received from the JMS server.
      */
-    public void onMessage(Message message)
-    {
+    public void onMessage(Message message) {
         jmsConsumer.onMessage(message);
     }
 }
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSAdapter.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSAdapter.java
index d04539f..83bd335 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSAdapter.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSAdapter.java
@@ -52,8 +52,7 @@
  * This adapter for the MessageService integrates Flex messaging
  * with Java Message Service destinations.
  */
-public class JMSAdapter extends MessagingAdapter implements JMSConfigConstants, JMSExceptionListener, JMSMessageListener, MessageClientListener
-{
+public class JMSAdapter extends MessagingAdapter implements JMSConfigConstants, JMSExceptionListener, JMSMessageListener, MessageClientListener {
     public static final String LOG_CATEGORY = LogCategories.SERVICE_MESSAGE_JMS;
     private static final String DURABLE_SUBSCRIBER_NAME_PREFIX = "FlexClient_";
 
@@ -80,8 +79,7 @@
     /**
      * Constructs an unmanaged <code>JMSAdapter</code> instance.
      */
-    public JMSAdapter()
-    {
+    public JMSAdapter() {
         this(false);
     }
 
@@ -89,10 +87,9 @@
      * Constructs a <code>JMSAdapter</code> instance.
      *
      * @param enableManagement <code>true</code> if the <code>JMSAdapter</code>
-     * has a corresponding MBean control for management; otherwise <code>false</code>.
+     *                         has a corresponding MBean control for management; otherwise <code>false</code>.
      */
-    public JMSAdapter(boolean enableManagement)
-    {
+    public JMSAdapter(boolean enableManagement) {
         super(enableManagement);
         consumerToClientId = new ConcurrentHashMap<JMSConsumer, Object>();
         messageClients = new ConcurrentHashMap<Object, MessageClient>();
@@ -112,12 +109,11 @@
     /**
      * Initializes the <code>JMSAdapter</code> with the properties.
      *
-     * @param id The id of the <code>JMSAdapter</code>.
+     * @param id         The id of the <code>JMSAdapter</code>.
      * @param properties Properties for the <code>JMSAdapter</code>.
      */
     @Override
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
         if (properties == null || properties.size() == 0)
@@ -132,34 +128,30 @@
      * it is started.
      */
     @Override
-    protected void validate()
-    {
+    protected void validate() {
         if (isValid())
             return;
 
         super.validate();
 
-        if (settings.getConnectionFactory() == null)
-        {
+        if (settings.getConnectionFactory() == null) {
             // JMS connection factory of message destinations with JMS Adapters must be specified.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(MISSING_CONNECTION_FACTORY);
             throw ce;
         }
 
-        if (settings.getDestinationJNDIName() == null)
-        {
+        if (settings.getDestinationJNDIName() == null) {
             // JNDI names for message destinations with JMS Adapters must be specified.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(JMSConfigConstants.MISSING_DESTINATION_JNDI_NAME);
             throw ce;
         }
 
-        if (settings.getMessageType() == null)
-        {
+        if (settings.getMessageType() == null) {
             // Unsupported JMS Message Type ''{0}''. Valid values are javax.jms.TextMessage, javax.jms.ObjectMessage, and javax.jms.MapMessage.
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(INVALID_JMS_MESSAGE_TYPE, new Object[] {null});
+            ce.setMessage(INVALID_JMS_MESSAGE_TYPE, new Object[]{null});
             throw ce;
         }
     }
@@ -168,8 +160,7 @@
      * Starts the adapter.
      */
     @Override
-    public void start()
-    {
+    public void start() {
         if (isStarted())
             return;
 
@@ -184,8 +175,7 @@
      * Stops the adapter.
      */
     @Override
-    public void stop()
-    {
+    public void stop() {
         if (!isStarted())
             return;
 
@@ -208,9 +198,8 @@
      * @param destination The destination of the adapter.
      */
     @Override
-    public void setDestination(Destination destination)
-    {
-        MessageDestination dest = (MessageDestination)destination;
+    public void setDestination(Destination destination) {
+        MessageDestination dest = (MessageDestination) destination;
         super.setDestination(dest);
     }
 
@@ -219,18 +208,16 @@
      *
      * @return <code>JMSSettings</code> of the <code>JMSAdapter</code>.
      */
-    public JMSSettings getJMSSettings()
-    {
+    public JMSSettings getJMSSettings() {
         return settings;
     }
 
     /**
      * Sets the <code>JMSSettings</code> of the <code>JMSAdapter</code>.
      *
-     * @param jmsSettings  <code>JMSSettings</code> of the <code>JMSAdapter</code>.
+     * @param jmsSettings <code>JMSSettings</code> of the <code>JMSAdapter</code>.
      */
-    public void setJMSSettings(JMSSettings jmsSettings)
-    {
+    public void setJMSSettings(JMSSettings jmsSettings) {
         this.settings = jmsSettings;
     }
 
@@ -239,8 +226,7 @@
      *
      * @return The count of queue consumers managed by this adapter.
      */
-    public int getQueueConsumerCount()
-    {
+    public int getQueueConsumerCount() {
         return queueConsumers.size();
     }
 
@@ -249,11 +235,9 @@
      *
      * @return The ids of all queue consumers.
      */
-    public String[] getQueueConsumerIds()
-    {
+    public String[] getQueueConsumerIds() {
         Set<Object> consumerIds = queueConsumers.keySet();
-        if (consumerIds != null)
-        {
+        if (consumerIds != null) {
             String[] ids = new String[consumerIds.size()];
             return consumerIds.toArray(ids);
         }
@@ -265,8 +249,7 @@
      *
      * @return The count of topic consumers currently managed by this adapter.
      */
-    public int getTopicConsumerCount()
-    {
+    public int getTopicConsumerCount() {
         return topicConsumers.size();
     }
 
@@ -275,11 +258,9 @@
      *
      * @return The ids of all topic consumers.
      */
-    public String[] getTopicConsumerIds()
-    {
+    public String[] getTopicConsumerIds() {
         Set<Object> consumerIds = topicConsumers.keySet();
-        if (consumerIds != null)
-        {
+        if (consumerIds != null) {
             String[] ids = new String[consumerIds.size()];
             return consumerIds.toArray(ids);
         }
@@ -291,8 +272,7 @@
      *
      * @return The count of topic producers currently managed by this adapter.
      */
-    public int getTopicProducerCount()
-    {
+    public int getTopicProducerCount() {
         return topicProducers.size();
     }
 
@@ -301,8 +281,7 @@
      *
      * @return The count of queue producers currently managed by this adapter.
      */
-    public int getQueueProducerCount()
-    {
+    public int getQueueProducerCount() {
         return queueProducers.size();
     }
 
@@ -314,14 +293,13 @@
      *
      * @param evt The <code>JMSExceptionEvent</code>.
      */
-    public void exceptionThrown(JMSExceptionEvent evt)
-    {
-        JMSConsumer consumer = (JMSConsumer)evt.getSource();
+    public void exceptionThrown(JMSExceptionEvent evt) {
+        JMSConsumer consumer = (JMSConsumer) evt.getSource();
         JMSException jmsEx = evt.getJMSException();
 
         // Client is unsubscribed because its corresponding JMS consumer for JMS destination ''{0}'' encountered an error during message delivery: {1}
         MessageException messageEx = new MessageException();
-        messageEx.setMessage(JMSConfigConstants.CLIENT_UNSUBSCRIBE_DUE_TO_MESSAGE_DELIVERY_ERROR, new Object[] {consumer.getDestinationJndiName(), jmsEx.getMessage()});
+        messageEx.setMessage(JMSConfigConstants.CLIENT_UNSUBSCRIBE_DUE_TO_MESSAGE_DELIVERY_ERROR, new Object[]{consumer.getDestinationJndiName(), jmsEx.getMessage()});
         removeConsumer(consumer, true, true, messageEx.createErrorMessage());
     }
 
@@ -331,8 +309,7 @@
      * @return <code>true</code>.
      */
     @Override
-    public boolean handlesSubscriptions()
-    {
+    public boolean handlesSubscriptions() {
         return true;
     }
 
@@ -344,58 +321,40 @@
      */
     @SuppressWarnings("unchecked")
     @Override
-    public Object invoke(Message message)
-    {
+    public Object invoke(Message message) {
         JMSProducer producer = null;
 
         // named Flex message props become JMS headers
         Map msgProps = message.getHeaders();
         msgProps.put(JMSConfigConstants.TIME_TO_LIVE, new Long(message.getTimeToLive()));
 
-        if (settings.getDestinationType().equals(TOPIC))
-        {
-            synchronized (topicProducers)
-            {
-                if (topicProducers.size() < settings.getMaxProducers())
-                {
+        if (settings.getDestinationType().equals(TOPIC)) {
+            synchronized (topicProducers) {
+                if (topicProducers.size() < settings.getMaxProducers()) {
                     producer = new JMSTopicProducer();
-                    try
-                    {
+                    try {
                         producer.initialize(settings);
                         producer.start();
-                    }
-                    catch (Exception e)
-                    {
+                    } catch (Exception e) {
                         throw constructMessageException(e);
                     }
-                }
-                else
-                {
+                } else {
                     producer = topicProducers.removeFirst();
                 }
 
                 topicProducers.addLast(producer);
             }
-        }
-        else if (settings.getDestinationType().equals(QUEUE))
-        {
-            synchronized (queueProducers)
-            {
-                if (queueProducers.size() < settings.getMaxProducers())
-                {
+        } else if (settings.getDestinationType().equals(QUEUE)) {
+            synchronized (queueProducers) {
+                if (queueProducers.size() < settings.getMaxProducers()) {
                     producer = new JMSQueueProducer();
-                    try
-                    {
+                    try {
                         producer.initialize(settings);
                         producer.start();
-                    }
-                    catch (Exception e)
-                    {
+                    } catch (Exception e) {
                         throw constructMessageException(e);
                     }
-                }
-                else
-                {
+                } else {
                     producer = queueProducers.removeFirst();
                 }
 
@@ -403,32 +362,22 @@
             }
         }
 
-        try
-        {
+        try {
             if (producer != null)
                 producer.sendMessage(message);
-        }
-        catch (JMSException jmsEx)
-        {
+        } catch (JMSException jmsEx) {
             // At this point we give up on this producer, so we just
             // stop and remove it from the pool.
-            if (settings.getDestinationType().equals(TOPIC))
-            {
-                synchronized (topicProducers)
-                {
-                    if (producer != null)
-                    {
+            if (settings.getDestinationType().equals(TOPIC)) {
+                synchronized (topicProducers) {
+                    if (producer != null) {
                         producer.stop();
                         topicProducers.remove(producer);
                     }
                 }
-            }
-            else if (settings.getDestinationType().equals(QUEUE))
-            {
-                synchronized (queueProducers)
-                {
-                    if (producer != null)
-                    {
+            } else if (settings.getDestinationType().equals(QUEUE)) {
+                synchronized (queueProducers) {
+                    if (producer != null) {
                         producer.stop();
                         queueProducers.remove(producer);
                     }
@@ -445,26 +394,22 @@
      * Handle a CommandMessage sent by this adapter's service.
      *
      * @param commandMessage The command message to manage.
-     * @return  The result of manage which is null in this case.
+     * @return The result of manage which is null in this case.
      */
     @Override
-    public Object manage(CommandMessage commandMessage)
-    {
+    public Object manage(CommandMessage commandMessage) {
         JMSConsumer consumer = null;
         Object clientId = commandMessage.getClientId();
 
-        if (commandMessage.getOperation() == CommandMessage.SUBSCRIBE_OPERATION)
-        {
+        if (commandMessage.getOperation() == CommandMessage.SUBSCRIBE_OPERATION) {
             // Keep track of the selector expression.
             Object selectorExpression = commandMessage.getHeaders().get(CommandMessage.SELECTOR_HEADER);
 
             // Create a JMSConsumer for this destination and associate it with the client id
-            if (settings.getDestinationType().equals(TOPIC))
-            {
+            if (settings.getDestinationType().equals(TOPIC)) {
                 MessageClient existingMessageClient = null;
                 // This could happen when client disconnects without unsubscribing first.
-                if (topicConsumers.containsKey(clientId))
-                {
+                if (topicConsumers.containsKey(clientId)) {
                     removeConsumer(clientId, true /*unsubscribe*/, false /*invalidate*/, null);
                     existingMessageClient = messageClients.get(clientId);
                 }
@@ -472,9 +417,9 @@
                 consumer = new JMSTopicConsumer();
                 consumer.initialize(settings);
                 if (selectorExpression != null)
-                    consumer.setSelectorExpression((String)selectorExpression);
+                    consumer.setSelectorExpression((String) selectorExpression);
                 // Need to build a subscription name, in case durable subscriptions are used.
-                ((JMSTopicConsumer)consumer).setDurableSubscriptionName(buildSubscriptionName(clientId));
+                ((JMSTopicConsumer) consumer).setDurableSubscriptionName(buildSubscriptionName(clientId));
                 consumer.setMessageReceiver(buildMessageReceiver(consumer));
 
                 // Add JMSAdapter as JMS exception and message listener.
@@ -488,12 +433,9 @@
                 // wired up with the new JMS consumer properly.
                 if (existingMessageClient != null)
                     messageClientCreated(existingMessageClient);
-            }
-            else if (settings.getDestinationType().equals(QUEUE))
-            {
+            } else if (settings.getDestinationType().equals(QUEUE)) {
                 MessageClient existingMessageClient = null;
-                if (queueConsumers.containsKey(clientId))
-                {
+                if (queueConsumers.containsKey(clientId)) {
                     removeConsumer(clientId, true /*unsubscribe*/, false /*invalidate*/, null);
                     existingMessageClient = messageClients.get(clientId);
                 }
@@ -501,7 +443,7 @@
                 consumer = new JMSQueueConsumer();
                 consumer.initialize(settings);
                 if (selectorExpression != null)
-                    consumer.setSelectorExpression((String)selectorExpression);
+                    consumer.setSelectorExpression((String) selectorExpression);
                 consumer.setMessageReceiver(buildMessageReceiver(consumer));
 
                 // Add JMSAdapter as JMS exception and message listener.
@@ -516,22 +458,19 @@
                 if (existingMessageClient != null)
                     messageClientCreated(existingMessageClient);
             }
-        }
-
-        else if (commandMessage.getOperation() == CommandMessage.UNSUBSCRIBE_OPERATION)
-        {
+        } else if (commandMessage.getOperation() == CommandMessage.UNSUBSCRIBE_OPERATION) {
             // Determines if the durable subscription should be unsubscribed
             // when the JMS consumer is removed.
             boolean unsubscribe = true;
 
             boolean preserveDurable = false;
             if (commandMessage.getHeader(CommandMessage.PRESERVE_DURABLE_HEADER) != null)
-                preserveDurable = ((Boolean)(commandMessage.getHeader(CommandMessage.PRESERVE_DURABLE_HEADER))).booleanValue();
+                preserveDurable = ((Boolean) (commandMessage.getHeader(CommandMessage.PRESERVE_DURABLE_HEADER))).booleanValue();
 
             // Don't destroy a durable subscription if the MessageClient's session has been invalidated.
             // or this is a JMS durable connection that has requested to be undestroyed
             if (commandMessage.getHeader(CommandMessage.SUBSCRIPTION_INVALIDATED_HEADER) != null
-                    && ((Boolean)commandMessage.getHeader(CommandMessage.SUBSCRIPTION_INVALIDATED_HEADER)).booleanValue()
+                    && ((Boolean) commandMessage.getHeader(CommandMessage.SUBSCRIPTION_INVALIDATED_HEADER)).booleanValue()
                     || preserveDurable)
                 unsubscribe = false;
 
@@ -554,8 +493,7 @@
      *
      * @param messageClient The newly created MessageClient.
      */
-    public void messageClientCreated(MessageClient messageClient)
-    {
+    public void messageClientCreated(MessageClient messageClient) {
         Object clientId = messageClient.getClientId();
         JMSConsumer consumer = null;
         if (topicConsumers.containsKey(clientId))
@@ -565,22 +503,16 @@
 
         // If there is a JMSConsumer created for the same clientId, register
         // the MessageClient with JMSAdapter and start the consumer.
-        if (consumer != null)
-        {
+        if (consumer != null) {
             messageClients.put(clientId, messageClient);
-            try
-            {
+            try {
                 consumer.start();
                 // Add JMS adapter as a client destroyed listener, so client
                 // invalidation (eg. due to session timeout) can be handled properly.
                 messageClient.addMessageClientDestroyedListener(this);
-            }
-            catch (MessageException messageEx)
-            {
+            } catch (MessageException messageEx) {
                 removeConsumer(consumer, true, true, messageEx.createErrorMessage());
-            }
-            catch (Exception ex)
-            {
+            } catch (Exception ex) {
                 removeConsumer(consumer, true, true, constructMessageException(ex).createErrorMessage());
             }
         }
@@ -594,8 +526,7 @@
      *
      * @param messageClient The MessageClient that was destroyed.
      */
-    public void messageClientDestroyed(MessageClient messageClient)
-    {
+    public void messageClientDestroyed(MessageClient messageClient) {
         Object clientId = messageClient.getClientId();
         removeConsumer(clientId);
         messageClients.remove(clientId);
@@ -608,16 +539,14 @@
      *
      * @param evt The <code>JMSMessageEvent</code>.
      */
-    public void messageReceived(JMSMessageEvent evt)
-    {
-        JMSConsumer consumer = (JMSConsumer)evt.getSource();
+    public void messageReceived(JMSMessageEvent evt) {
+        JMSConsumer consumer = (JMSConsumer) evt.getSource();
         javax.jms.Message jmsMessage = evt.getJMSMessage();
 
         flex.messaging.messages.AsyncMessage flexMessage = convertToFlexMessage(jmsMessage, consumer);
-        if (flexMessage != null)
-        {
+        if (flexMessage != null) {
             MessagePerformanceUtils.markServerPostAdapterExternalTime(flexMessage);
-            ((MessageService)getDestination().getService()).serviceMessageFromAdapter(flexMessage, false);
+            ((MessageService) getDestination().getService()).serviceMessageFromAdapter(flexMessage, false);
         }
     }
 
@@ -628,8 +557,7 @@
      *
      * @param clientId The identifier for the consumer to remove.
      */
-    public void removeConsumer(Object clientId)
-    {
+    public void removeConsumer(Object clientId) {
         // Client is unsubscribed because its corresponding JMS consumer has been removed from the JMS adapter.
         MessageException messageEx = new MessageException();
         messageEx.setMessage(JMSConfigConstants.CLIENT_UNSUBSCRIBE_DUE_TO_CONSUMER_REMOVAL);
@@ -645,15 +573,14 @@
     /**
      * Removes (unsubscribes) the JMSConsumer associated with the clientId.
      *
-     * @param clientId The clientId associated with the JMSConsumer to remove.
-     * @param unsubscribe Whether to unsubscribe the durable subscription or not.
-     * @param invalidate Whether to invalidate the MessageClient or not.
+     * @param clientId          The clientId associated with the JMSConsumer to remove.
+     * @param unsubscribe       Whether to unsubscribe the durable subscription or not.
+     * @param invalidate        Whether to invalidate the MessageClient or not.
      * @param invalidateMessage A message to push to the client before consumer
-     * is removed and its MessageClient is invalidated. If the message is null,
-     * MessageClient is invalidated silently.
+     *                          is removed and its MessageClient is invalidated. If the message is null,
+     *                          MessageClient is invalidated silently.
      */
-    protected void removeConsumer(Object clientId, boolean unsubscribe, boolean invalidate, ErrorMessage invalidateMessage)
-    {
+    protected void removeConsumer(Object clientId, boolean unsubscribe, boolean invalidate, ErrorMessage invalidateMessage) {
         JMSConsumer consumer = null;
         if (topicConsumers.containsKey(clientId))
             consumer = topicConsumers.get(clientId);
@@ -666,15 +593,14 @@
     /**
      * Removes (unsubscribes) the specified consumer.
      *
-     * @param consumer The JMSConsumer instance to remove.
-     * @param unsubscribe Whether to unsubscribe the durable subscription or not.
-     * @param invalidate Whether to invalidate the MessageClient or not.
+     * @param consumer          The JMSConsumer instance to remove.
+     * @param unsubscribe       Whether to unsubscribe the durable subscription or not.
+     * @param invalidate        Whether to invalidate the MessageClient or not.
      * @param invalidateMessage A message to push to the client before consumer
-     * is removed and its MessageClient is invalidated. If the message is null,
-     * MessageClient is invalidated silently.
+     *                          is removed and its MessageClient is invalidated. If the message is null,
+     *                          MessageClient is invalidated silently.
      */
-    protected void removeConsumer(JMSConsumer consumer, boolean unsubscribe, boolean invalidate, ErrorMessage invalidateMessage)
-    {
+    protected void removeConsumer(JMSConsumer consumer, boolean unsubscribe, boolean invalidate, ErrorMessage invalidateMessage) {
         if (consumer == null)
             return;
 
@@ -682,10 +608,9 @@
         if (clientId == null)
             return;
 
-        if (Log.isInfo())
-        {
+        if (Log.isInfo()) {
             String logMessage = "JMS consumer for JMS destination '" + consumer.getDestinationJndiName()
-            + "' is being removed from the JMS adapter";
+                    + "' is being removed from the JMS adapter";
 
             if (invalidateMessage != null)
                 logMessage += " due to the following error: " + invalidateMessage.faultString;
@@ -713,8 +638,7 @@
      * @param destination The <code>Destination</code> that manages this <code>JMSAdapter</code>.
      */
     @Override
-    protected void setupAdapterControl(Destination destination)
-    {
+    protected void setupAdapterControl(Destination destination) {
         controller = new JMSAdapterControl(this, destination.getControl());
         controller.register();
         setControl(controller);
@@ -726,8 +650,7 @@
      * @param consumer The <code>JMSConsumer</code>.
      * @return MessageReceiver configured for JMSConsumer per DeliverySettings.
      */
-    private MessageReceiver buildMessageReceiver(JMSConsumer consumer)
-    {
+    private MessageReceiver buildMessageReceiver(JMSConsumer consumer) {
         DeliverySettings deliverySettings = settings.getDeliverySettings();
         if (deliverySettings.getMode().equals(JMSConfigConstants.ASYNC))
             return new AsyncMessageReceiver(consumer);
@@ -741,20 +664,19 @@
      * Prefixes a clientId with DURABLE_SUBSCRIBER_NAME_PREFIX to build a
      * subscription name to be used in JMSConsumers with durable connections.
      */
-    private String buildSubscriptionName(Object clientId)
-    {
+    private String buildSubscriptionName(Object clientId) {
         return DURABLE_SUBSCRIBER_NAME_PREFIX + clientId.toString();
     }
-    
+
     /**
      * Construct a MessageException for the JMS invocation
+     *
      * @param e the Exception caught in the JMS invocation
      * @return MessageException encapsulates the JMS Exception message
      */
-    private MessageException constructMessageException(Exception e)
-    {
+    private MessageException constructMessageException(Exception e) {
         MessageException messageEx = new MessageException();
-        messageEx.setMessage(JMSINVOCATION_EXCEPTION, new Object[] { e.getMessage() });
+        messageEx.setMessage(JMSINVOCATION_EXCEPTION, new Object[]{e.getMessage()});
         return messageEx;
     }
 
@@ -763,14 +685,12 @@
      * Supported types are <code>javax.jms.TextMessage</code>, <code>javax.jms.ObjectMessage</code>,
      * and <code>javax.jms.MapMessage</code>.
      */
-    private flex.messaging.messages.AsyncMessage convertToFlexMessage(javax.jms.Message jmsMessage, JMSConsumer consumer)
-    {
+    private flex.messaging.messages.AsyncMessage convertToFlexMessage(javax.jms.Message jmsMessage, JMSConsumer consumer) {
         flex.messaging.messages.AsyncMessage flexMessage = null;
         flexMessage = new flex.messaging.messages.AsyncMessage();
 
         Object clientId = consumerToClientId.get(consumer);
-        if (clientId == null)
-        {
+        if (clientId == null) {
             if (Log.isWarn())
                 Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered a null clientId during JMS to Flex message conversion");
 
@@ -782,34 +702,26 @@
         flexMessage.setDestination(getDestination().getId());
 
         // Set JMSMessageID header as Flex messageId property.
-        try
-        {
+        try {
             flexMessage.setMessageId(jmsMessage.getJMSMessageID());
-        }
-        catch (JMSException jmsEx)
-        {
+        } catch (JMSException jmsEx) {
             if (Log.isWarn())
                 Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered an error while retrieving JMS message id during JMS to Flex message conversion: " + jmsEx.getMessage());
         }
 
         // Set JMSTimestamp header as Flex timestamp property.
-        try
-        {
+        try {
             flexMessage.setTimestamp(jmsMessage.getJMSTimestamp());
-        }
-        catch (JMSException jmsEx)
-        {
+        } catch (JMSException jmsEx) {
             if (Log.isWarn())
                 Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered an error while retrieving JMS timestamp during JMS to Flex message conversion: " + jmsEx.getMessage());
         }
 
         // Set JMS headers and Flex headers.
-        if (settings.isPreserveJMSHeaders())
-        {
+        if (settings.isPreserveJMSHeaders()) {
             // Set standard JMS headers except JMSMessageId and JMSTimestamp,
             // as they are already set on the Flex message directly.
-            try
-            {
+            try {
                 flexMessage.setHeader(JMS_CORRELATION_ID, jmsMessage.getJMSCorrelationID());
                 flexMessage.setHeader(JMS_DELIVERY_MODE, Integer.toString(jmsMessage.getJMSDeliveryMode()));
                 flexMessage.setHeader(JMS_DESTINATION, jmsMessage.getJMSDestination().toString());
@@ -818,12 +730,10 @@
                 flexMessage.setHeader(JMS_REDELIVERED, Boolean.toString(jmsMessage.getJMSRedelivered()));
                 flexMessage.setHeader(JMS_REPLY_TO, jmsMessage.getJMSReplyTo());
                 flexMessage.setHeader(JMS_TYPE, jmsMessage.getJMSType());
-            }
-            catch (JMSException jmsEx)
-            {
+            } catch (JMSException jmsEx) {
                 // These should not cause errors to be pushed to Flash clients
                 if (Log.isWarn())
-                    Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered an error while retrieving JMS headers during JMS to Flex conversion: " +  jmsEx.getMessage());
+                    Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered an error while retrieving JMS headers during JMS to Flex conversion: " + jmsEx.getMessage());
 
             }
         }
@@ -835,82 +745,60 @@
         // properties starting with with MPI_HEADER_IN (if any).
         MessagePerformanceInfo mpi = null;
 
-        try
-        {
-            for (Enumeration propEnum = jmsMessage.getPropertyNames(); propEnum.hasMoreElements();)
-            {
-                String propName = (String)propEnum.nextElement();
-                try
-                {
+        try {
+            for (Enumeration propEnum = jmsMessage.getPropertyNames(); propEnum.hasMoreElements(); ) {
+                String propName = (String) propEnum.nextElement();
+                try {
                     Object propValue = jmsMessage.getObjectProperty(propName);
-                    if (propName.startsWith(MessagePerformanceUtils.MPI_HEADER_IN))
-                    {
+                    if (propName.startsWith(MessagePerformanceUtils.MPI_HEADER_IN)) {
                         if (mpi == null)
                             mpi = new MessagePerformanceInfo();
                         propName = propName.substring(MessagePerformanceUtils.MPI_HEADER_IN.length());
                         java.lang.reflect.Field field;
-                        try
-                        {
+                        try {
                             field = mpi.getClass().getField(propName);
                             field.set(mpi, propValue);
-                        }
-                        catch (Exception ignore)
-                        {
+                        } catch (Exception ignore) {
                             // Simply don't set the property if the value cannot be retrieved.
                         }
-                    }
-                    else
-                    {
+                    } else {
                         flexMessage.setHeader(propName, propValue);
                     }
-                }
-                catch (JMSException jmsEx)
-                {
+                } catch (JMSException jmsEx) {
                     if (Log.isWarn())
-                        Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered an error while retrieving JMS properties during JMS to Flex conversion: " +  jmsEx.getMessage());
+                        Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered an error while retrieving JMS properties during JMS to Flex conversion: " + jmsEx.getMessage());
                 }
             }
 
             if (mpi != null)
                 flexMessage.setHeader(MessagePerformanceUtils.MPI_HEADER_IN, mpi);
-        }
-        catch (JMSException jmsEx)
-        {
+        } catch (JMSException jmsEx) {
             if (Log.isWarn())
-                Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered an error while retrieving JMS properties during JMS to Flex conversion: " +  jmsEx.getMessage());
+                Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered an error while retrieving JMS properties during JMS to Flex conversion: " + jmsEx.getMessage());
         }
 
         // Finally, set the JMS message body of the Flex message body.
-        try
-        {
-            if (jmsMessage instanceof javax.jms.TextMessage)
-            {
-                javax.jms.TextMessage textMessage = (javax.jms.TextMessage)jmsMessage;
+        try {
+            if (jmsMessage instanceof javax.jms.TextMessage) {
+                javax.jms.TextMessage textMessage = (javax.jms.TextMessage) jmsMessage;
                 flexMessage.setBody(textMessage.getText());
-            }
-            else if (jmsMessage instanceof javax.jms.ObjectMessage)
-            {
-                javax.jms.ObjectMessage objMessage = (javax.jms.ObjectMessage)jmsMessage;
+            } else if (jmsMessage instanceof javax.jms.ObjectMessage) {
+                javax.jms.ObjectMessage objMessage = (javax.jms.ObjectMessage) jmsMessage;
                 flexMessage.setBody(objMessage.getObject());
-            }
-            else if (jmsMessage instanceof javax.jms.MapMessage)
-            {
-                javax.jms.MapMessage mapMessage = (javax.jms.MapMessage)jmsMessage;
+            } else if (jmsMessage instanceof javax.jms.MapMessage) {
+                javax.jms.MapMessage mapMessage = (javax.jms.MapMessage) jmsMessage;
                 @SuppressWarnings("unchecked")
                 Enumeration names = mapMessage.getMapNames();
                 Map<String, Object> body = new HashMap<String, Object>();
-                while (names.hasMoreElements())
-                {
-                    String name = (String)names.nextElement();
+                while (names.hasMoreElements()) {
+                    String name = (String) names.nextElement();
                     body.put(name, mapMessage.getObject(name));
                 }
                 flexMessage.setBody(body);
             }
-        }
-        catch (JMSException jmsEx)
-        {
+        } catch (JMSException jmsEx) {
             if (Log.isWarn())
-                Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered an error while retrieving JMS message body during JMS to Flex conversion: " +  jmsEx.getMessage());
+                Log.getLogger(LOG_CATEGORY).warn("JMSAdapter encountered an error while retrieving JMS message body during JMS to Flex conversion: " + jmsEx.getMessage());
         }
 
         return flexMessage;
@@ -921,15 +809,13 @@
      * supplied error message.
      *
      * @param consumer The JMSConsumer whose MessageClient will be invalidated.
-     * @param message The error message to push out before invalidating the
-     * MessageClient. If the message is null, MessageClient is invalidated
-     * silently.
+     * @param message  The error message to push out before invalidating the
+     *                 MessageClient. If the message is null, MessageClient is invalidated
+     *                 silently.
      */
-    private void invalidateMessageClient(JMSConsumer consumer, flex.messaging.messages.Message message)
-    {
+    private void invalidateMessageClient(JMSConsumer consumer, flex.messaging.messages.Message message) {
         Object clientId = consumerToClientId.get(consumer);
-        if (clientId != null && messageClients.containsKey(clientId))
-        {
+        if (clientId != null && messageClients.containsKey(clientId)) {
             MessageClient messageClient = messageClients.get(clientId);
 
             if (Log.isInfo())
@@ -941,13 +827,11 @@
     }
 
     /**
-     *  Handle JMS specific configuration.
+     * Handle JMS specific configuration.
      */
-    private void jms(ConfigMap properties)
-    {
+    private void jms(ConfigMap properties) {
         ConfigMap jms = properties.getPropertyAsMap(JMS, null);
-        if (jms != null)
-        {
+        if (jms != null) {
             String destType = jms.getPropertyAsString(DESTINATION_TYPE, defaultDestinationType);
             settings.setDestinationType(destType);
 
@@ -958,8 +842,7 @@
             settings.setConnectionFactory(factory);
 
             ConfigMap connectionCredentials = jms.getPropertyAsMap(CONNECTION_CREDENTIALS, null);
-            if (connectionCredentials != null)
-            {
+            if (connectionCredentials != null) {
                 String username = connectionCredentials.getPropertyAsString(USERNAME, null);
                 settings.setConnectionUsername(username);
                 String password = connectionCredentials.getPropertyAsString(PASSWORD, null);
@@ -967,8 +850,7 @@
             }
 
             ConfigMap deliverySettings = jms.getPropertyAsMap(DELIVERY_SETTINGS, null);
-            if (deliverySettings != null)
-            {
+            if (deliverySettings != null) {
                 // Get the default delivery settings.
                 DeliverySettings ds = settings.getDeliverySettings();
 
@@ -990,7 +872,7 @@
                 Log.getLogger(LOG_CATEGORY).warn("The <destination-name> configuration option is deprecated and non-functional. Please remove this from your configuration file.");
 
             boolean durable = getDestination() instanceof MessageDestination ?
-                ((MessageDestination) getDestination()).getServerSettings().isDurable() : false;
+                    ((MessageDestination) getDestination()).getServerSettings().isDurable() : false;
             settings.setDurableConsumers(durable);
 
             String deliveryMode = jms.getPropertyAsString(DELIVERY_MODE, null);
@@ -1000,8 +882,7 @@
             settings.setPreserveJMSHeaders(preserveJMSHeaders);
 
             String defPriority = jms.getPropertyAsString(MESSAGE_PRIORITY, null);
-            if (defPriority != null && !defPriority.equalsIgnoreCase(DEFAULT_PRIORITY))
-            {
+            if (defPriority != null && !defPriority.equalsIgnoreCase(DEFAULT_PRIORITY)) {
                 int priority = jms.getPropertyAsInt(MESSAGE_PRIORITY, settings.getMessagePriority());
                 settings.setMessagePriority(priority);
             }
@@ -1018,94 +899,74 @@
 
             // Retrieve any JNDI initial context environment properties.
             ConfigMap env = jms.getPropertyAsMap(INITIAL_CONTEXT_ENVIRONMENT, null);
-            if (env != null)
-            {
+            if (env != null) {
                 List props = env.getPropertyAsList(PROPERTY, null);
-                if (props != null)
-                {
+                if (props != null) {
                     Class contextClass = Context.class;
                     Hashtable envProps = new Hashtable();
-                    for (Iterator iter = props.iterator(); iter.hasNext();)
-                    {
+                    for (Iterator iter = props.iterator(); iter.hasNext(); ) {
                         Object prop = iter.next();
-                        if (prop instanceof ConfigMap)
-                        {
-                            ConfigMap pair = (ConfigMap)prop;
+                        if (prop instanceof ConfigMap) {
+                            ConfigMap pair = (ConfigMap) prop;
                             String name = pair.getProperty(NAME);
                             String value = pair.getProperty(VALUE);
-                            if (name == null || value == null)
-                            {
+                            if (name == null || value == null) {
                                 // A <property> element for the <initial-context-environment> settings for the ''{0}'' destination does not specify both <name> and <value> subelements.
                                 MessageException messageEx = new MessageException();
-                                messageEx.setMessage(MISSING_NAME_OR_VALUE, new Object[] {getDestination().getId()});
+                                messageEx.setMessage(MISSING_NAME_OR_VALUE, new Object[]{getDestination().getId()});
                                 throw messageEx;
                             }
                             // If the name is a Context field, use the
                             // constant value rather than this literal name.
-                            if (name.startsWith("Context."))
-                            {
+                            if (name.startsWith("Context.")) {
                                 String fieldName = name.substring(name.indexOf('.') + 1);
                                 java.lang.reflect.Field field = null;
-                                try
-                                {
+                                try {
                                     field = contextClass.getDeclaredField(fieldName);
-                                }
-                                catch (NoSuchFieldException nsfe)
-                                {
+                                } catch (NoSuchFieldException nsfe) {
                                     // A <property> element for the <initial-context-environment> settings for the ''{0}'' destination specifies an invalid javax.naming.Context field for its <name>: {1}
                                     MessageException messageEx = new MessageException();
-                                    messageEx.setMessage(INVALID_CONTEXT_NAME, new Object[] {getDestination().getId(), fieldName});
+                                    messageEx.setMessage(INVALID_CONTEXT_NAME, new Object[]{getDestination().getId(), fieldName});
                                     throw messageEx;
                                 }
                                 String fieldValue = null;
-                                try
-                                {
-                                    fieldValue = (String)field.get(null);
-                                }
-                                catch (IllegalAccessException iae)
-                                {
+                                try {
+                                    fieldValue = (String) field.get(null);
+                                } catch (IllegalAccessException iae) {
                                     // A <property> element for the <initial-context-environment> settings for the ''{0}'' destination specifies an inaccessible javax.naming.Context field for its <name>: {1}
                                     MessageException messageEx = new MessageException();
-                                    messageEx.setMessage(INACCESIBLE_CONTEXT_NAME, new Object[] {getDestination().getId(), fieldName});
+                                    messageEx.setMessage(INACCESIBLE_CONTEXT_NAME, new Object[]{getDestination().getId(), fieldName});
                                     throw messageEx;
                                 }
                                 envProps.put(fieldValue, value);
-                            }
-                            else
-                            {
+                            } else {
                                 envProps.put(name, value);
                             }
-                        }
-                        else
-                        {
+                        } else {
                             // A <property> element for the <initial-context-environment> settings for the ''{0}'' destination does not specify both <name> and <value> subelements.
                             MessageException messageEx = new MessageException();
-                            messageEx.setMessage(MISSING_NAME_OR_VALUE, new Object[] {getDestination().getId()});
+                            messageEx.setMessage(MISSING_NAME_OR_VALUE, new Object[]{getDestination().getId()});
                             throw messageEx;
                         }
                     }
                     settings.setInitialContextEnvironment(envProps);
-                }
-                else
-                {
+                } else {
                     // The <initial-context-environment> settings for the ''{0}'' destination does not include any <property> subelements.
                     MessageException messageEx = new MessageException();
-                    messageEx.setMessage(MISSING_PROPERTY_SUBELEMENT, new Object[] {getDestination().getId()});
+                    messageEx.setMessage(MISSING_PROPERTY_SUBELEMENT, new Object[]{getDestination().getId()});
                     throw messageEx;
                 }
             }
         }
     }
 
-    private void stopConsumers(Collection<JMSConsumer> consumers)
-    {
+    private void stopConsumers(Collection<JMSConsumer> consumers) {
         Iterator<JMSConsumer> itr = consumers.iterator();
-        while (itr.hasNext())
-        {
+        while (itr.hasNext()) {
             JMSConsumer consumer = itr.next();
             // Client is unsubscribed because its corresponding JMS consumer for JMS destination ''{0}'' has been stopped.
             MessageException me = new MessageException();
-            me.setMessage(JMSConfigConstants.CLIENT_UNSUBSCRIBE_DUE_TO_CONSUMER_STOP, new Object[] {consumer.getDestinationJndiName()});
+            me.setMessage(JMSConfigConstants.CLIENT_UNSUBSCRIBE_DUE_TO_CONSUMER_STOP, new Object[]{consumer.getDestinationJndiName()});
             consumer.stop(true);
             invalidateMessageClient(consumer, me.createErrorMessage());
         }
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSConfigConstants.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSConfigConstants.java
index e792eb6..18fb22f 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSConfigConstants.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSConfigConstants.java
@@ -18,11 +18,8 @@
 
 /**
  * Constants for JMSAdapter and its related classes.
- *
- *
  */
-public interface JMSConfigConstants
-{
+public interface JMSConfigConstants {
     // Values used in the messaging configuration
     String ASYNC = "async";
     String ACKNOWLEDGE_MODE = "acknowledge-mode";
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSConsumer.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSConsumer.java
index fa375f0..9876083 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSConsumer.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSConsumer.java
@@ -33,8 +33,7 @@
 /**
  * A JMSProxy subclass for <code>javax.jms.MessageConsumer</code> instance.
  */
-public abstract class JMSConsumer extends JMSProxy implements ExceptionListener
-{
+public abstract class JMSConsumer extends JMSProxy implements ExceptionListener {
     /* JMS related variables */
     protected MessageConsumer consumer;
 
@@ -71,10 +70,9 @@
      * Starts the <code>JMSConsumer</code>. Subclasses should call <code>super.start</code>.
      *
      * @throws NamingException The thrown naming exception.
-     * @throws JMSException The thrown JMS exception.
+     * @throws JMSException    The thrown JMS exception.
      */
-    public void start() throws NamingException, JMSException
-    {
+    public void start() throws NamingException, JMSException {
         super.start();
 
         if (Log.isInfo())
@@ -87,21 +85,17 @@
      * adapter and closing the underlying <code>MessageConsumer</code>. It then
      * calls <code>JMSProxy.close</code> for session and connection closure.
      */
-    public void stop()
-    {
+    public void stop() {
         if (Log.isInfo())
             Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS consumer for JMS destination '"
                     + destinationJndiName + "' is stopping.");
 
         stopMessageReceiver();
 
-        try
-        {
+        try {
             if (consumer != null)
                 consumer.close();
-        }
-        catch (JMSException e)
-        {
+        } catch (JMSException e) {
             if (Log.isWarn())
                 Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("JMS consumer for JMS destination '"
                         + destinationJndiName + "' received an error while closing its underlying MessageConsumer: "
@@ -117,10 +111,9 @@
      * and doesn't remove a durable subscription.
      *
      * @param unsubscribe Determines whether to unsubscribe a durable subscription
-     * if one exists, or not.
+     *                    if one exists, or not.
      */
-    public void stop(boolean unsubscribe)
-    {
+    public void stop(boolean unsubscribe) {
         stop();
     }
 
@@ -133,12 +126,10 @@
     /**
      * Adds a JMS message listener.
      *
-     * @see flex.messaging.services.messaging.adapters.JMSMessageListener
-     *
      * @param listener The listener to add.
+     * @see flex.messaging.services.messaging.adapters.JMSMessageListener
      */
-    public void addJMSMessageListener(JMSMessageListener listener)
-    {
+    public void addJMSMessageListener(JMSMessageListener listener) {
         if (listener != null)
             jmsMessageListeners.addIfAbsent(listener);
     }
@@ -146,12 +137,10 @@
     /**
      * Removes a JMS message listener.
      *
-     * @see flex.messaging.services.messaging.adapters.JMSMessageListener
-     *
      * @param listener The listener to remove.
+     * @see flex.messaging.services.messaging.adapters.JMSMessageListener
      */
-    public void removeJMSMessageListener(JMSMessageListener listener)
-    {
+    public void removeJMSMessageListener(JMSMessageListener listener) {
         if (listener != null)
             jmsMessageListeners.remove(listener);
     }
@@ -159,12 +148,10 @@
     /**
      * Adds a JMS exception listener.
      *
-     * @see flex.messaging.services.messaging.adapters.JMSExceptionListener
-     *
      * @param listener The listener to add.
+     * @see flex.messaging.services.messaging.adapters.JMSExceptionListener
      */
-    public void addJMSExceptionListener(JMSExceptionListener listener)
-    {
+    public void addJMSExceptionListener(JMSExceptionListener listener) {
         if (listener != null)
             jmsExceptionListeners.addIfAbsent(listener);
     }
@@ -172,12 +159,10 @@
     /**
      * Removes a JMS exception listener.
      *
-     * @see flex.messaging.services.messaging.adapters.JMSExceptionListener
-     *
      * @param listener The listener to remove.
+     * @see flex.messaging.services.messaging.adapters.JMSExceptionListener
      */
-    public void removeJMSExceptionListener(JMSExceptionListener listener)
-    {
+    public void removeJMSExceptionListener(JMSExceptionListener listener) {
         if (listener != null)
             jmsExceptionListeners.remove(listener);
     }
@@ -193,8 +178,7 @@
      * @return The old message listener associated with the MessageConsumer.
      * @throws JMSException The thrown JMS exception.
      */
-    public MessageListener setMessageListener(MessageListener listener) throws JMSException
-    {
+    public MessageListener setMessageListener(MessageListener listener) throws JMSException {
         MessageListener oldListener = consumer.getMessageListener();
         consumer.setMessageListener(listener);
         return oldListener;
@@ -206,8 +190,7 @@
      *
      * @return The <code>MessageReceiver</code> used.
      */
-    public MessageReceiver getMessageReceiver()
-    {
+    public MessageReceiver getMessageReceiver() {
         return messageReceiver;
     }
 
@@ -217,8 +200,7 @@
      *
      * @param messageReceiver The <code>MessageReceiver</code> used.
      */
-    public void setMessageReceiver(MessageReceiver messageReceiver)
-    {
+    public void setMessageReceiver(MessageReceiver messageReceiver) {
         this.messageReceiver = messageReceiver;
         messageReceiverManuallySet = true;
     }
@@ -229,8 +211,7 @@
      *
      * @return The selector expression.
      */
-    public String getSelectorExpression()
-    {
+    public String getSelectorExpression() {
         return selectorExpression;
     }
 
@@ -241,8 +222,7 @@
      *
      * @param selectorExpression The selector expression.
      */
-    public void setSelectorExpression(String selectorExpression)
-    {
+    public void setSelectorExpression(String selectorExpression) {
         this.selectorExpression = selectorExpression;
     }
 
@@ -252,13 +232,11 @@
      *
      * @param exception The thrown JMS exception.
      */
-    public void onException(JMSException exception)
-    {
-        if (!jmsExceptionListeners.isEmpty())
-        {
+    public void onException(JMSException exception) {
+        if (!jmsExceptionListeners.isEmpty()) {
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
-            for (Iterator iter = jmsExceptionListeners.iterator(); iter.hasNext();)
-                ((JMSExceptionListener)iter.next()).exceptionThrown(new JMSExceptionEvent(this, exception));
+            for (Iterator iter = jmsExceptionListeners.iterator(); iter.hasNext(); )
+                ((JMSExceptionListener) iter.next()).exceptionThrown(new JMSExceptionEvent(this, exception));
         }
     }
 
@@ -268,15 +246,13 @@
      *
      * @param jmsMessage The new JMS message to acknowledge and dispatch.
      */
-    public void onMessage(Message jmsMessage)
-    {
+    public void onMessage(Message jmsMessage) {
         acknowledgeMessage(jmsMessage);
 
-        if (!jmsMessageListeners.isEmpty())
-        {
+        if (!jmsMessageListeners.isEmpty()) {
             // CopyOnWriteArrayList is iteration-safe from ConcurrentModificationExceptions.
-            for (Iterator iter = jmsMessageListeners.iterator(); iter.hasNext();)
-                ((JMSMessageListener)iter.next()).messageReceived(new JMSMessageEvent(this, jmsMessage));
+            for (Iterator iter = jmsMessageListeners.iterator(); iter.hasNext(); )
+                ((JMSMessageListener) iter.next()).messageReceived(new JMSMessageEvent(this, jmsMessage));
         }
     }
 
@@ -287,8 +263,7 @@
      * @return The received JMS message.
      * @throws JMSException The thrown JMS exception.
      */
-    public Message receive() throws JMSException
-    {
+    public Message receive() throws JMSException {
         if (Log.isInfo())
             Log.getLogger(JMSAdapter.LOG_CATEGORY).info(Thread.currentThread()
                     + " JMS consumer for JMS destination '" + destinationJndiName
@@ -304,8 +279,7 @@
      * @param timeout The number of milliseconds to wait for a new message.
      * @throws JMSException The thrown JMS exception.
      */
-    public Message receive(long timeout) throws JMSException
-    {
+    public Message receive(long timeout) throws JMSException {
         if (Log.isInfo())
             Log.getLogger(JMSAdapter.LOG_CATEGORY).info(Thread.currentThread()
                     + " JMS consumer for JMS destination '" + destinationJndiName
@@ -320,8 +294,7 @@
      * @return The received JMS message.
      * @throws JMSException The thrown JMS exception.
      */
-    public Message receiveNoWait() throws JMSException
-    {
+    public Message receiveNoWait() throws JMSException {
         return consumer.receiveNoWait();
     }
 
@@ -336,8 +309,7 @@
      *
      * @throws JMSException The thrown JMS exception.
      */
-    void startMessageReceiver() throws JMSException
-    {
+    void startMessageReceiver() throws JMSException {
         initializeMessageReceiver();
         messageReceiver.startReceive();
         connection.start();
@@ -346,8 +318,7 @@
     /**
      * Stops the Message Receiver of the <code>JMSConsumer</code>.
      */
-    void stopMessageReceiver()
-    {
+    void stopMessageReceiver() {
         if (messageReceiver != null)
             messageReceiver.stopReceive();
     }
@@ -357,16 +328,11 @@
      *
      * @param message The JMS message to acknowledge.
      */
-    protected void acknowledgeMessage(Message message)
-    {
-        if (getAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE)
-        {
-            try
-            {
+    protected void acknowledgeMessage(Message message) {
+        if (getAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE) {
+            try {
                 message.acknowledge();
-            }
-            catch (JMSException e)
-            {
+            } catch (JMSException e) {
                 if (Log.isInfo())
                     Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS consumer for JMS destination '"
                             + destinationJndiName + "' received an error in message acknowledgement: " + e.getMessage());
@@ -379,48 +345,39 @@
      * If the message receiver has been manually set, it validates the message
      * receiver. Otherwise, it initalizes an async message receiver if it can,
      * and falls back to sync message delivery if it cannot.
-     *
+     * <p>
      * This method should be called by subclasses once there is an underlying
      * <code>javax.jms.MessageConsumer</code>.
      */
-    private void initializeMessageReceiver()
-    {
+    private void initializeMessageReceiver() {
         // If an AsyncMessageReceiver is manually set, make sure the app server
         // allows MessageListener and ExceptionListener for JMS.
-        if (messageReceiverManuallySet && messageReceiver != null)
-        {
-            if (messageReceiver instanceof AsyncMessageReceiver)
-            {
+        if (messageReceiverManuallySet && messageReceiver != null) {
+            if (messageReceiver instanceof AsyncMessageReceiver) {
                 String restrictedMethod = null;
-                try
-                {
+                try {
                     // Test if MessageListener is restricted.
                     restrictedMethod = "javax.jms.MessageConsumer.setMessageListener";
                     consumer.getMessageListener();
 
                     // Test if ExceptionListener is restricted.
                     restrictedMethod = "javax.jms.Connection.setExceptionListener";
-                    connection.setExceptionListener((AsyncMessageReceiver)messageReceiver);
+                    connection.setExceptionListener((AsyncMessageReceiver) messageReceiver);
 
                     if (Log.isInfo())
                         Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS consumer for JMS destination '"
-                                + destinationJndiName +"' is using async message receiver.");
-                }
-                catch (JMSException jmsEx)
-                {
+                                + destinationJndiName + "' is using async message receiver.");
+                } catch (JMSException jmsEx) {
                     // JMS consumer for JMS destination ''{0}'' is configured to use async message receiver but the application server does not allow ''{1}'' call used in async message receiver. Please switch to sync message receiver.
                     MessageException me = new MessageException();
-                    me.setMessage(JMSConfigConstants.ASYNC_MESSAGE_DELIVERY_NOT_SUPPORTED, new Object[] {destinationJndiName, restrictedMethod});
+                    me.setMessage(JMSConfigConstants.ASYNC_MESSAGE_DELIVERY_NOT_SUPPORTED, new Object[]{destinationJndiName, restrictedMethod});
                     throw me;
                 }
-            }
-            else if (messageReceiver instanceof SyncMessageReceiver)
-            {
-                SyncMessageReceiver smr = (SyncMessageReceiver)messageReceiver;
-                if (Log.isInfo())
-                {
+            } else if (messageReceiver instanceof SyncMessageReceiver) {
+                SyncMessageReceiver smr = (SyncMessageReceiver) messageReceiver;
+                if (Log.isInfo()) {
                     Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS consumer for JMS destination '"
-                            + destinationJndiName +"' is using sync message receiver"
+                            + destinationJndiName + "' is using sync message receiver"
                             + " with sync-receive-interval-millis: " + smr.getSyncReceiveIntervalMillis()
                             + ", sync-receive-wait-millis: " + smr.getSyncReceiveWaitMillis());
                 }
@@ -429,32 +386,27 @@
         // If no MessageReceiver was manually set, set a default MessageReceiver
         // with the following strategy: First try async message delivery. If the
         // app server doesn't allow it, switch to sync message delivery.
-        else
-        {
-            try
-            {
+        else {
+            try {
                 messageReceiver = new AsyncMessageReceiver(this);
 
                 // Test if MessageListener is restricted.
                 consumer.getMessageListener();
                 // Test if ExceptionListener is restricted.
-                connection.setExceptionListener((AsyncMessageReceiver)messageReceiver);
+                connection.setExceptionListener((AsyncMessageReceiver) messageReceiver);
 
                 if (Log.isInfo())
                     Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS consumer for JMS destination '"
-                            + destinationJndiName +"' is using async message receiver.");
-            }
-            catch (JMSException e)
-            {
+                            + destinationJndiName + "' is using async message receiver.");
+            } catch (JMSException e) {
                 SyncMessageReceiver smr = new SyncMessageReceiver(this);
                 smr.setSyncReceiveIntervalMillis(1);
                 smr.setSyncReceiveWaitMillis(-1);
                 messageReceiver = smr;
 
-                if (Log.isInfo())
-                {
+                if (Log.isInfo()) {
                     Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS consumer for JMS destination '"
-                            + destinationJndiName +"' is using sync message receiver"
+                            + destinationJndiName + "' is using sync message receiver"
                             + " with sync-receive-interval-millis: " + smr.getSyncReceiveIntervalMillis()
                             + ", sync-receive-wait-millis: " + smr.getSyncReceiveWaitMillis());
                 }
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSExceptionEvent.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSExceptionEvent.java
index f809efb..31c5348 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSExceptionEvent.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSExceptionEvent.java
@@ -22,32 +22,29 @@
 /**
  * Event dispatched to the JMSExceptionListener when a JMS exception is encountered
  * by the source.
- * 
+ *
  * @see flex.messaging.services.messaging.adapters.JMSExceptionListener
  */
-public class JMSExceptionEvent extends EventObject
-{
+public class JMSExceptionEvent extends EventObject {
     private JMSException jmsException;
-    
+
     /**
      * Create a new JMSExceptionEvent with the source and exception.
-     * 
-     * @param source The source of the exception.
+     *
+     * @param source       The source of the exception.
      * @param jmsException The actual JMS exception.
      */
-    JMSExceptionEvent(JMSConsumer source, JMSException jmsException)
-    {
+    JMSExceptionEvent(JMSConsumer source, JMSException jmsException) {
         super(source);
         this.jmsException = jmsException;
     }
-    
+
     /**
      * Return the JMS exception of the event.
-     * 
+     *
      * @return The JMS exception of the event.
      */
-    public JMSException getJMSException()
-    {
+    public JMSException getJMSException() {
         return jmsException;
-    }    
+    }
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSExceptionListener.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSExceptionListener.java
index 438e337..97cd345 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSExceptionListener.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSExceptionListener.java
@@ -23,8 +23,7 @@
  * consumer. Implementations of this interface may add themselves as listeners
  * via <code>JMSConsumer.addJMSExceptionListener</code>.
  */
-public interface JMSExceptionListener extends EventListener
-{
+public interface JMSExceptionListener extends EventListener {
     /**
      * Notification that a JMS exception was encountered.
      *
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSMessageEvent.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSMessageEvent.java
index 2d583e7..1ace43d 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSMessageEvent.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSMessageEvent.java
@@ -24,20 +24,17 @@
  * by the source.
  *
  * @see flex.messaging.services.messaging.adapters.JMSMessageListener
- *
  */
-public class JMSMessageEvent extends EventObject
-{
+public class JMSMessageEvent extends EventObject {
     private Message message;
 
     /**
      * Create a new JMSMessageEvent with the source and message.
      *
-     * @param source The source of the message.
+     * @param source       The source of the message.
      * @param jmsException The actual JMS message.
      */
-    JMSMessageEvent(JMSConsumer source, javax.jms.Message message)
-    {
+    JMSMessageEvent(JMSConsumer source, javax.jms.Message message) {
         super(source);
         this.message = message;
     }
@@ -47,8 +44,7 @@
      *
      * @return The JMS message of the event.
      */
-    public Message getJMSMessage()
-    {
+    public Message getJMSMessage() {
         return message;
     }
 }
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSMessageListener.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSMessageListener.java
index 671416d..6eaa3b2 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSMessageListener.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSMessageListener.java
@@ -23,8 +23,7 @@
  * consumer. Implementations of this interface may add themselves as listeners
  * via <code>JMSConsumer.addJMSMessageListener</code>.
  */
-public interface JMSMessageListener extends EventListener
-{
+public interface JMSMessageListener extends EventListener {
     /**
      * Notification that a JMS message was received.
      *
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSProducer.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSProducer.java
index 557163c..5c1b1dc 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSProducer.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSProducer.java
@@ -32,11 +32,8 @@
 
 /**
  * A JMSProxy subclass for <code>javax.jms.MessageProducer</code> instances.
- *
- *
  */
-public abstract class JMSProducer extends JMSProxy
-{
+public abstract class JMSProducer extends JMSProxy {
     /* JMS related variables */
     protected MessageProducer producer;
 
@@ -54,8 +51,7 @@
      * Create a new JMSProducer with default delivery mode of <code>javax.jms.Message.DEFAULT_DELIVERY_MODE</code>
      * and default message priority of <code>javax.jms.Message.DEFAULT_PRIORITY</code>.
      */
-    public JMSProducer()
-    {
+    public JMSProducer() {
         super();
         deliveryMode = javax.jms.Message.DEFAULT_DELIVERY_MODE;
         messagePriority = javax.jms.Message.DEFAULT_PRIORITY;
@@ -72,8 +68,7 @@
      *
      * @param settings JMS settings to use for initialization.
      */
-    public void initialize(JMSSettings settings)
-    {
+    public void initialize(JMSSettings settings) {
         super.initialize(settings);
 
         String deliveryString = settings.getDeliveryMode();
@@ -93,17 +88,15 @@
      * it is started. For <code>JMSProducer</code> to be in valid state, it needs
      * to have a message type assigned.
      */
-    protected void validate()
-    {
+    protected void validate() {
         super.validate();
 
         if (messageType == null || !(messageType.equals(JMSConfigConstants.TEXT_MESSAGE)
                 || messageType.equals(JMSConfigConstants.OBJECT_MESSAGE)
-                || messageType.equals(JMSConfigConstants.MAP_MESSAGE)) )
-        {
+                || messageType.equals(JMSConfigConstants.MAP_MESSAGE))) {
             // Unsupported JMS Message Type ''{0}''. Valid values are javax.jms.TextMessage, javax.jms.ObjectMessage, javax.jms.MapMessage.
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(JMSConfigConstants.INVALID_JMS_MESSAGE_TYPE, new Object[] {messageType});
+            ce.setMessage(JMSConfigConstants.INVALID_JMS_MESSAGE_TYPE, new Object[]{messageType});
             throw ce;
         }
     }
@@ -111,13 +104,12 @@
     /**
      * Starts the <code>JMSProducer</code>. Subclasses should call <code>super.start</code>.
      */
-    public void start() throws NamingException, JMSException
-    {
+    public void start() throws NamingException, JMSException {
         super.start();
 
         if (Log.isInfo())
             Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS producer for JMS destination '"
-                    + destinationJndiName +"' is starting.");
+                    + destinationJndiName + "' is starting.");
     }
 
     /**
@@ -125,19 +117,15 @@
      * <code>MessageProducer</code>. It then calls <code>JMSProxy.close</code>
      * for session and connection closure.
      */
-    public void stop()
-    {
+    public void stop() {
         if (Log.isInfo())
             Log.getLogger(JMSAdapter.LOG_CATEGORY).info("JMS producer for JMS destination '" +
                     destinationJndiName + "' is stopping.");
 
-        try
-        {
+        try {
             if (producer != null)
                 producer.close();
-        }
-        catch (JMSException e)
-        {
+        } catch (JMSException e) {
             if (Log.isWarn())
                 Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("JMS producer for JMS destination '" +
                         destinationJndiName + "' received an error while closing"
@@ -158,8 +146,7 @@
      *
      * @return The delivery mode used by the <code>JMSProducer</code>.
      */
-    public int getDeliveryMode()
-    {
+    public int getDeliveryMode() {
         return deliveryMode;
     }
 
@@ -170,8 +157,7 @@
      *
      * @param deliveryMode
      */
-    public void setDeliveryMode(int deliveryMode)
-    {
+    public void setDeliveryMode(int deliveryMode) {
         if (deliveryMode == javax.jms.Message.DEFAULT_DELIVERY_MODE
                 || deliveryMode == javax.jms.DeliveryMode.NON_PERSISTENT
                 || deliveryMode == javax.jms.DeliveryMode.PERSISTENT)
@@ -183,8 +169,7 @@
      *
      * @return an int specifying the message priority.
      */
-    public int getMessagePriority()
-    {
+    public int getMessagePriority() {
         return messagePriority;
     }
 
@@ -194,8 +179,7 @@
      *
      * @param messagePriority an int specifying the message priority.
      */
-    public void setMessagePriority(int messagePriority)
-    {
+    public void setMessagePriority(int messagePriority) {
         this.messagePriority = messagePriority;
     }
 
@@ -204,8 +188,7 @@
      *
      * @return The message type used by the <code>JMSProducer</code>.
      */
-    public String getMessageType()
-    {
+    public String getMessageType() {
         return messageType;
     }
 
@@ -216,8 +199,7 @@
      *
      * @param messageType String representing the message type used.
      */
-    public void setMessageType(String messageType)
-    {
+    public void setMessageType(String messageType) {
         this.messageType = messageType;
     }
 
@@ -227,61 +209,48 @@
     //
     //--------------------------------------------------------------------------
 
-    protected void copyHeadersToProperties(Map properties, javax.jms.Message message) throws JMSException
-    {
+    protected void copyHeadersToProperties(Map properties, javax.jms.Message message) throws JMSException {
         // Generic Flex headers become JMS properties, named Flex headers become JMS headers
-        for (Iterator iter = properties.keySet().iterator(); iter.hasNext();)
-        {
-            String propName = (String)iter.next();
+        for (Iterator iter = properties.keySet().iterator(); iter.hasNext(); ) {
+            String propName = (String) iter.next();
             Object propValue = properties.get(propName);
 
             // For now, only named property is TTL.
-            if (!propName.equals(JMSConfigConstants.TIME_TO_LIVE))
-            {
+            if (!propName.equals(JMSConfigConstants.TIME_TO_LIVE)) {
                 // MPI header contains a MessagePerformaceInfo object that cannot
                 // be set as a JMS header property. Instead, it is broken down
                 // to its primitive types and each primitive is individually
                 // set as a JMS header property.
-                if (propName.equals(MessagePerformanceUtils.MPI_HEADER_IN))
-                {
+                if (propName.equals(MessagePerformanceUtils.MPI_HEADER_IN)) {
                     Field[] fields = propValue.getClass().getFields();
-                    for (int i = 0; i < fields.length; i++)
-                    {
+                    for (int i = 0; i < fields.length; i++) {
                         Field field = fields[i];
                         // Use MPI_HEADER_IN as prefix to the property name so that
                         // they can be distinguished later when the MessagePerformanceInfo
                         // object gets built from the headers.
                         String mpiPropertyName = MessagePerformanceUtils.MPI_HEADER_IN + field.getName();
                         Object mpiPropertyValue = null;
-                        try
-                        {
+                        try {
                             mpiPropertyValue = field.get(propValue);
                             message.setObjectProperty(mpiPropertyName, mpiPropertyValue);
-                        }
-                        catch (Exception e)
-                        {
+                        } catch (Exception e) {
                             if (Log.isWarn())
                                 Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("JMSProducer could not retrieve the value of MessagePerformanceUtils property '"
                                         + propValue + "' from the Flex message, therefore it will not be set on the JMS message.");
                         }
                     }
-                }
-                else if (propValue != null)
-                {
+                } else if (propValue != null) {
                     message.setObjectProperty(propName, propValue);
                 }
             }
         }
     }
 
-    protected long getTimeToLive(Map properties) throws JMSException
-    {
+    protected long getTimeToLive(Map properties) throws JMSException {
         long timeToLive = producer.getTimeToLive();
-        if (properties.containsKey(JMSConfigConstants.TIME_TO_LIVE))
-        {
-            long l = ((Long)properties.get(JMSConfigConstants.TIME_TO_LIVE)).longValue();
-            if (l != 0)
-            {
+        if (properties.containsKey(JMSConfigConstants.TIME_TO_LIVE)) {
+            long l = ((Long) properties.get(JMSConfigConstants.TIME_TO_LIVE)).longValue();
+            if (l != 0) {
                 // Don't let Flex default override JMS implementation default,
                 // only explicit ActionScript TTL usage overrides JMS TTL.
                 timeToLive = l;
@@ -290,36 +259,24 @@
         return timeToLive;
     }
 
-    void sendMessage(flex.messaging.messages.Message flexMessage) throws JMSException
-    {
+    void sendMessage(flex.messaging.messages.Message flexMessage) throws JMSException {
         MessagePerformanceUtils.markServerPreAdapterExternalTime(flexMessage);
 
-        if (JMSConfigConstants.TEXT_MESSAGE.equals(messageType))
-        {
+        if (JMSConfigConstants.TEXT_MESSAGE.equals(messageType)) {
             sendTextMessage(flexMessage.getBody().toString(), flexMessage.getHeaders());
-        }
-        else if (JMSConfigConstants.OBJECT_MESSAGE.equals(messageType))
-        {
-            try
-            {
-                sendObjectMessage((Serializable)flexMessage.getBody(), flexMessage.getHeaders());
-            }
-            catch (ClassCastException ce)
-            {
+        } else if (JMSConfigConstants.OBJECT_MESSAGE.equals(messageType)) {
+            try {
+                sendObjectMessage((Serializable) flexMessage.getBody(), flexMessage.getHeaders());
+            } catch (ClassCastException ce) {
                 // The body of the Flex Message could not be converted to a Serializable Java Object.
                 MessageException me = new MessageException();
                 me.setMessage(JMSConfigConstants.NONSERIALIZABLE_MESSAGE_BODY);
                 throw me;
             }
-        }
-        else if (JMSConfigConstants.MAP_MESSAGE.equals(messageType))
-        {
-            try
-            {
-                sendMapMessage((Map<String,?>)flexMessage.getBody(), flexMessage.getHeaders());
-            }
-            catch (ClassCastException ce)
-            {
+        } else if (JMSConfigConstants.MAP_MESSAGE.equals(messageType)) {
+            try {
+                sendMapMessage((Map<String, ?>) flexMessage.getBody(), flexMessage.getHeaders());
+            } catch (ClassCastException ce) {
                 // 10812=The body of the Flex message could not be converted to a Java Map object.
                 MessageException me = new MessageException();
                 me.setMessage(JMSConfigConstants.NONMAP_MESSAGE_BODY);
@@ -332,5 +289,5 @@
 
     abstract void sendTextMessage(String text, Map properties) throws JMSException;
 
-    abstract void sendMapMessage(Map<String,?> map, Map properties) throws JMSException;
+    abstract void sendMapMessage(Map<String, ?> map, Map properties) throws JMSException;
 }
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSProxy.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSProxy.java
index a009a6c..d848292 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSProxy.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSProxy.java
@@ -34,8 +34,7 @@
  * on both topics and queues. This class contains shared behavior
  * between producers and consumers.
  */
-public abstract class JMSProxy
-{
+public abstract class JMSProxy {
     /* JMS related variables */
     protected Connection connection;
     protected ConnectionCredentials connectionCredentials;
@@ -59,8 +58,7 @@
      * Creates a new <code>JMSProxy</code> default default acknowledge mode of
      * <code>javax.jms.Session.AUTO_ACKNOWLEDGE</code>.
      */
-    public JMSProxy()
-    {
+    public JMSProxy() {
         acknowledgeMode = javax.jms.Session.AUTO_ACKNOWLEDGE;
     }
 
@@ -75,8 +73,7 @@
      *
      * @param settings JMS settings to use for initialization.
      */
-    public void initialize(JMSSettings settings)
-    {
+    public void initialize(JMSSettings settings) {
         String ackString = settings.getAcknowledgeMode();
         if (ackString.equals(JMSConfigConstants.AUTO_ACKNOWLEDGE))
             acknowledgeMode = Session.AUTO_ACKNOWLEDGE;
@@ -88,8 +85,7 @@
         connectionFactoryName = settings.getConnectionFactory();
         String username = settings.getConnectionUsername();
         String password = settings.getConnectionPassword();
-        if (username != null || password != null)
-        {
+        if (username != null || password != null) {
             connectionCredentials = new ConnectionCredentials(username, password);
         }
         destinationJndiName = settings.getDestinationJNDIName();
@@ -101,18 +97,15 @@
      * it is started. For <code>JMSProxy</code> to be in valid state, it needs
      * to have a connection factory name and destination jndi name assigned.
      */
-    protected void validate()
-    {
-        if (connectionFactoryName == null)
-        {
+    protected void validate() {
+        if (connectionFactoryName == null) {
             // JMS connection factory of message destinations with JMS Adapters must be specified.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(JMSConfigConstants.MISSING_CONNECTION_FACTORY);
             throw ce;
         }
 
-        if (destinationJndiName == null)
-        {
+        if (destinationJndiName == null) {
             // JNDI names for message destinations with JMS Adapters must be specified.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(JMSConfigConstants.MISSING_DESTINATION_JNDI_NAME);
@@ -127,10 +120,9 @@
      * should call <code>super.start</code>.
      *
      * @throws NamingException The thrown naming exception.
-     * @throws JMSException The thrown JMS exception.
+     * @throws JMSException    The thrown JMS exception.
      */
-    public void start() throws NamingException, JMSException
-    {
+    public void start() throws NamingException, JMSException {
         validate();
         initializeJndiContext();
         initializeConnectionFactory();
@@ -141,41 +133,31 @@
      * Stops the <code>JMSProxy</code> by stopping its associated session
      * and connection.
      */
-    public void stop()
-    {
-        try
-        {
+    public void stop() {
+        try {
             if (session != null)
                 session.close();
-        }
-        catch (JMSException e)
-        {
+        } catch (JMSException e) {
             if (Log.isWarn())
                 Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("JMS proxy for JMS destination '"
                         + destinationJndiName + "' received an error while closing"
                         + " its underlying Session: " + e.getMessage());
         }
 
-        try
-        {
+        try {
             if (connection != null)
                 connection.close();
-        }
-        catch (JMSException e)
-        {
+        } catch (JMSException e) {
             if (Log.isWarn())
                 Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("JMS proxy for JMS destination '"
                         + destinationJndiName + "' received an error while closing"
                         + " its underlying Connection: " + e.getMessage());
         }
 
-        try
-        {
+        try {
             if (jndiContext != null)
                 jndiContext.close();
-        }
-        catch (NamingException e)
-        {
+        } catch (NamingException e) {
             if (Log.isWarn())
                 Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("JMS proxy for JMS destination '"
                         + destinationJndiName + "' received an error while closing"
@@ -194,8 +176,7 @@
      *
      * @return The acknowledge mode used by the <code>JMSProxy</code>.
      */
-    public int getAcknowledgeMode()
-    {
+    public int getAcknowledgeMode() {
         return acknowledgeMode;
     }
 
@@ -207,8 +188,7 @@
      *
      * @param acknowledgeMode An int representing the acknowledge mode used.
      */
-    public void setAcknowledgeMode(int acknowledgeMode)
-    {
+    public void setAcknowledgeMode(int acknowledgeMode) {
         if (acknowledgeMode == Session.AUTO_ACKNOWLEDGE
                 || acknowledgeMode == Session.CLIENT_ACKNOWLEDGE
                 || acknowledgeMode == Session.DUPS_OK_ACKNOWLEDGE)
@@ -220,8 +200,7 @@
      *
      * @return The connection factory name.
      */
-    public String getConnectionFactoryName()
-    {
+    public String getConnectionFactoryName() {
         return connectionFactoryName;
     }
 
@@ -231,8 +210,7 @@
      *
      * @param connectionFactoryName The connection factory name.
      */
-    public void setConnectionFactoryName(String connectionFactoryName)
-    {
+    public void setConnectionFactoryName(String connectionFactoryName) {
         this.connectionFactoryName = connectionFactoryName;
     }
 
@@ -241,8 +219,7 @@
      *
      * @return The connection credentials used while creating JMS connections.
      */
-    public ConnectionCredentials getConnectionCredentials()
-    {
+    public ConnectionCredentials getConnectionCredentials() {
         return connectionCredentials;
     }
 
@@ -252,8 +229,7 @@
      *
      * @param connectionCredentials The connection credentials.
      */
-    public void setConnectionCredentials(ConnectionCredentials connectionCredentials)
-    {
+    public void setConnectionCredentials(ConnectionCredentials connectionCredentials) {
         this.connectionCredentials = connectionCredentials;
     }
 
@@ -262,8 +238,7 @@
      *
      * @return The JNDI name of the JMS destination.
      */
-    public String getDestinationJndiName()
-    {
+    public String getDestinationJndiName() {
         return destinationJndiName;
     }
 
@@ -272,8 +247,7 @@
      *
      * @param destinationJndiName The JNDI name of the JMS destination.
      */
-    public void setDestinationJndiName(String destinationJndiName)
-    {
+    public void setDestinationJndiName(String destinationJndiName) {
         this.destinationJndiName = destinationJndiName;
     }
 
@@ -282,8 +256,7 @@
      *
      * @return a Hashtable of the <code>initial-context-environment</code>.
      */
-    public Hashtable getInitialContextEnvironment()
-    {
+    public Hashtable getInitialContextEnvironment() {
         return initialContextEnvironment;
     }
 
@@ -293,8 +266,7 @@
      *
      * @param env A Hashtable of the <code>initial-context-environment</code>.
      */
-    public void setInitialContextEnvironment(Hashtable env)
-    {
+    public void setInitialContextEnvironment(Hashtable env) {
         initialContextEnvironment = env;
     }
 
@@ -307,10 +279,9 @@
     /**
      * Initializes the connection factory needed for JMS.
      */
-    protected ConnectionFactory initializeConnectionFactory() throws NamingException
-    {
+    protected ConnectionFactory initializeConnectionFactory() throws NamingException {
         if (connectionFactory == null)
-            connectionFactory = (ConnectionFactory)jndiContext.lookup(connectionFactoryName);
+            connectionFactory = (ConnectionFactory) jndiContext.lookup(connectionFactoryName);
 
         return connectionFactory;
     }
@@ -318,10 +289,9 @@
     /**
      * Initializes the destination (topic and queue) used by JMS.
      */
-    protected Destination initializeDestination() throws NamingException
-    {
+    protected Destination initializeDestination() throws NamingException {
         if (destination == null)
-            destination = (Destination)jndiContext.lookup(destinationJndiName);
+            destination = (Destination) jndiContext.lookup(destinationJndiName);
 
         return destination;
     }
@@ -330,8 +300,7 @@
      * Initializes the JNDI context needed by JMS. This should be called before
      * any other initialize methods.
      */
-    protected Context initializeJndiContext() throws NamingException
-    {
+    protected Context initializeJndiContext() throws NamingException {
         if (jndiContext != null)
             stop();
 
@@ -353,8 +322,7 @@
      * A static inner class for connection credentials that is passed to JMS
      * connection factory when a JMS connection is created.
      */
-    public static class ConnectionCredentials
-    {
+    public static class ConnectionCredentials {
         private String username;
         private String password;
 
@@ -365,8 +333,7 @@
          * @param username Username of the credential.
          * @param password Password of the credential.
          */
-        public ConnectionCredentials(String username, String password)
-        {
+        public ConnectionCredentials(String username, String password) {
             this.username = username;
             this.password = password;
         }
@@ -376,8 +343,7 @@
          *
          * @return The username being used.
          */
-        public String getUsername()
-        {
+        public String getUsername() {
             return username;
         }
 
@@ -386,8 +352,7 @@
          *
          * @return The password being used.
          */
-        public String getPassword()
-        {
+        public String getPassword() {
             return password;
         }
     }
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSQueueConsumer.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSQueueConsumer.java
index e1620be..f4c7fcf 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSQueueConsumer.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSQueueConsumer.java
@@ -28,8 +28,7 @@
 /**
  * A <code>JMSConsumer</code> subclass specifically for JMS Queue receivers.
  */
-public class JMSQueueConsumer extends JMSConsumer
-{
+public class JMSQueueConsumer extends JMSConsumer {
     //--------------------------------------------------------------------------
     //
     // Initialize, validate, start, and stop methods.
@@ -40,44 +39,37 @@
      * Starts the <code>JMSQueueConsumer</code>.
      *
      * @throws NamingException The thrown naming exception.
-     * @throws JMSException The thrown JMS exception.
+     * @throws JMSException    The thrown JMS exception.
      */
-    public void start() throws NamingException, JMSException
-    {
+    public void start() throws NamingException, JMSException {
         super.start();
 
         // Establish queue
         Queue queue = null;
-        try
-        {
-            queue = (Queue)destination;
-        }
-        catch (ClassCastException cce)
-        {
+        try {
+            queue = (Queue) destination;
+        } catch (ClassCastException cce) {
             // JMS queue proxy for JMS destination ''{0}'' has a destination type of ''{1}'' which is not Queue.
             MessageException me = new MessageException();
-            me.setMessage(JMSConfigConstants.NON_QUEUE_DESTINATION, new Object[] {destinationJndiName, destination.getClass().getName()});
+            me.setMessage(JMSConfigConstants.NON_QUEUE_DESTINATION, new Object[]{destinationJndiName, destination.getClass().getName()});
             throw me;
         }
 
         // Create connection
-        try
-        {
-            QueueConnectionFactory queueFactory = (QueueConnectionFactory)connectionFactory;
+        try {
+            QueueConnectionFactory queueFactory = (QueueConnectionFactory) connectionFactory;
             if (connectionCredentials != null)
                 connection = queueFactory.createQueueConnection(connectionCredentials.getUsername(), connectionCredentials.getPassword());
             else
                 connection = queueFactory.createQueueConnection();
-        }
-        catch (ClassCastException cce)
-        {
+        } catch (ClassCastException cce) {
             // JMS queue proxy for JMS destination ''{0}'' has a connection factory type of ''{1}'' which is not QueueConnectionFactory.
             MessageException me = new MessageException();
-            me.setMessage(JMSConfigConstants.NON_QUEUE_FACTORY, new Object[] {destinationJndiName, connectionFactory.getClass().getName()});
+            me.setMessage(JMSConfigConstants.NON_QUEUE_FACTORY, new Object[]{destinationJndiName, connectionFactory.getClass().getName()});
             throw me;
         }
 
-        QueueConnection queueConnection = (QueueConnection)connection;
+        QueueConnection queueConnection = (QueueConnection) connection;
 
         // Create queue session on the connection
         session = queueConnection.createQueueSession(false, getAcknowledgeMode());
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSQueueProducer.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSQueueProducer.java
index 7b77ee8..6359c48 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSQueueProducer.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSQueueProducer.java
@@ -34,49 +34,39 @@
 
 /**
  * A <code>JMSProducer</code> subclass specifically for JMS Queue senders.
- *
- *
  */
-public class JMSQueueProducer extends JMSProducer
-{
+public class JMSQueueProducer extends JMSProducer {
     /* JMS related variables */
     private QueueSender sender;
 
     /**
      * Starts <code>JMSQueueProducer</code>.
      */
-    public void start() throws NamingException, JMSException
-    {
+    public void start() throws NamingException, JMSException {
         super.start();
 
         // Establish queue
         Queue queue = null;
-        try
-        {
-            queue = (Queue)destination;
-        }
-        catch (ClassCastException cce)
-        {
+        try {
+            queue = (Queue) destination;
+        } catch (ClassCastException cce) {
             // JMS queue proxy for JMS destination ''{0}'' has a destination type of ''{1}'' which is not Queue.
             MessageException me = new MessageException();
-            me.setMessage(JMSConfigConstants.NON_QUEUE_DESTINATION, new Object[] {destinationJndiName, destination.getClass().getName()});
+            me.setMessage(JMSConfigConstants.NON_QUEUE_DESTINATION, new Object[]{destinationJndiName, destination.getClass().getName()});
             throw me;
         }
 
         // Create connection
-        try
-        {
-            QueueConnectionFactory queueFactory = (QueueConnectionFactory)connectionFactory;
+        try {
+            QueueConnectionFactory queueFactory = (QueueConnectionFactory) connectionFactory;
             if (connectionCredentials != null)
                 connection = queueFactory.createQueueConnection(connectionCredentials.getUsername(), connectionCredentials.getPassword());
             else
                 connection = queueFactory.createQueueConnection();
-        }
-        catch (ClassCastException cce)
-        {
+        } catch (ClassCastException cce) {
             // JMS queue proxy for JMS destination ''{0}'' has a connection factory type of ''{1}'' which is not QueueConnectionFactory.
             MessageException me = new MessageException();
-            me.setMessage(JMSConfigConstants.NON_QUEUE_FACTORY, new Object[] {destinationJndiName, connectionFactory.getClass().getName()});
+            me.setMessage(JMSConfigConstants.NON_QUEUE_FACTORY, new Object[]{destinationJndiName, connectionFactory.getClass().getName()});
             throw me;
         }
 
@@ -85,7 +75,7 @@
         session = queueConnection.createQueueSession(false, getAcknowledgeMode());
 
         // Create sender on the queue session
-        QueueSession queueSession = (QueueSession)session;
+        QueueSession queueSession = (QueueSession) session;
         sender = queueSession.createSender(queue);
         producer = sender;
 
@@ -94,8 +84,7 @@
     }
 
     @Override
-    void sendTextMessage(String text, Map properties) throws JMSException
-    {
+    void sendTextMessage(String text, Map properties) throws JMSException {
         if (text == null)
             return;
 
@@ -106,8 +95,7 @@
     }
 
     @Override
-    void sendObjectMessage(Serializable obj, Map properties) throws JMSException
-    {
+    void sendObjectMessage(Serializable obj, Map properties) throws JMSException {
         if (obj == null)
             return;
 
@@ -118,8 +106,7 @@
     }
 
     @Override
-    void sendMapMessage(Map<String, ?> map, Map properties) throws JMSException
-    {
+    void sendMapMessage(Map<String, ?> map, Map properties) throws JMSException {
         if (map == null)
             return;
 
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSSettings.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSSettings.java
index 0515884..c6c6fbc 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSSettings.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSSettings.java
@@ -23,8 +23,7 @@
 /**
  * Settings for <code>JMSAdapter</code>.
  */
-public class JMSSettings
-{
+public class JMSSettings {
     private String acknowledgeMode;
     private String connectionFactory;
     private String connectionUsername;
@@ -46,8 +45,7 @@
      * DEFAULT_DELIVERY_MODE, destination type of Topic, and default
      * delivery setting.
      */
-    public JMSSettings()
-    {
+    public JMSSettings() {
         acknowledgeMode = JMSConfigConstants.AUTO_ACKNOWLEDGE;
         deliveryMode = JMSConfigConstants.DEFAULT_DELIVERY_MODE;
         destinationType = JMSConfigConstants.TOPIC;
@@ -62,8 +60,7 @@
      *
      * @return a String containing the <code>acknowledge-mode</code>
      */
-    public String getAcknowledgeMode()
-    {
+    public String getAcknowledgeMode() {
         return acknowledgeMode;
     }
 
@@ -74,15 +71,12 @@
      * and defautls to AUTO_ACKNOWLEDGE.
      *
      * @param mode Message acknowledgement mode. Supported modes are:
-     * AUTO_ACKNOWLEDGE - the JMS provider client runtime automatically acknowledges the messages.
-     * DUPS_OK_ACKNOWLEDGE - auto-acknowledgement of the messages is not required.
-     * CLIENT_ACKNOWLEDGE - the JMS adapter should acknowledge that the message was received.
-     *
+     *             AUTO_ACKNOWLEDGE - the JMS provider client runtime automatically acknowledges the messages.
+     *             DUPS_OK_ACKNOWLEDGE - auto-acknowledgement of the messages is not required.
+     *             CLIENT_ACKNOWLEDGE - the JMS adapter should acknowledge that the message was received.
      */
-    public void setAcknowledgeMode(String mode)
-    {
-        if (mode == null)
-        {
+    public void setAcknowledgeMode(String mode) {
+        if (mode == null) {
             acknowledgeMode = JMSConfigConstants.defaultAcknowledgeMode;
             return;
         }
@@ -91,11 +85,10 @@
 
         if (!(mode.equals(JMSConfigConstants.AUTO_ACKNOWLEDGE)
                 || mode.equals(JMSConfigConstants.DUPS_OK_ACKNOWLEDGE)
-                || mode.equals(JMSConfigConstants.CLIENT_ACKNOWLEDGE)) )
-        {
+                || mode.equals(JMSConfigConstants.CLIENT_ACKNOWLEDGE))) {
             // Invalid Acknowledge Mode ''{0}''. Valid values are AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, and CLIENT_ACKNOWLEDGE.
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(JMSConfigConstants.INVALID_ACKNOWLEDGE_MODE, new Object[] {mode});
+            ce.setMessage(JMSConfigConstants.INVALID_ACKNOWLEDGE_MODE, new Object[]{mode});
             throw ce;
         }
         acknowledgeMode = mode;
@@ -106,8 +99,7 @@
      *
      * @return a String containing the <code>connection-factory</code>.
      */
-    public String getConnectionFactory()
-    {
+    public String getConnectionFactory() {
         return connectionFactory;
     }
 
@@ -118,10 +110,8 @@
      *
      * @param factory The non-null name of the JMS connection factory.
      */
-    public void setConnectionFactory(String factory)
-    {
-        if (factory == null)
-        {
+    public void setConnectionFactory(String factory) {
+        if (factory == null) {
             // JMS connection factory of message destinations with JMS Adapters must be specified.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(JMSConfigConstants.MISSING_CONNECTION_FACTORY);
@@ -135,8 +125,7 @@
      *
      * @return The connection username used while creating JMS connections.
      */
-    public String getConnectionUsername()
-    {
+    public String getConnectionUsername() {
         return connectionUsername;
     }
 
@@ -147,8 +136,7 @@
      *
      * @param connectionUsername The connection username used while creating JMS connections.
      */
-    public void setConnectionUsername(String connectionUsername)
-    {
+    public void setConnectionUsername(String connectionUsername) {
         this.connectionUsername = connectionUsername;
     }
 
@@ -157,8 +145,7 @@
      *
      * @return The connection password used while creating JMS connections.
      */
-    public String getConnectionPassword()
-    {
+    public String getConnectionPassword() {
         return connectionPassword;
     }
 
@@ -169,8 +156,7 @@
      *
      * @param connectionPassword The connection password used while creating JMS connections.
      */
-    public void setConnectionPassword(String connectionPassword)
-    {
+    public void setConnectionPassword(String connectionPassword) {
         this.connectionPassword = connectionPassword;
     }
 
@@ -179,8 +165,7 @@
      *
      * @return a String containing the <code>delivery-mode</code>.
      */
-    public String getDeliveryMode()
-    {
+    public String getDeliveryMode() {
         return deliveryMode;
     }
 
@@ -189,12 +174,10 @@
      * for producers. This property optional and defaults to DEFAULT_DELIVERY_MODE.
      *
      * @param mode The delivery mode. Valid values are DEFAULT_DELIVERY_MODE,
-     * PERSISTENT, and NON_PERSISTENT.
+     *             PERSISTENT, and NON_PERSISTENT.
      */
-    public void setDeliveryMode(String mode)
-    {
-        if (mode == null)
-        {
+    public void setDeliveryMode(String mode) {
+        if (mode == null) {
             deliveryMode = JMSConfigConstants.DEFAULT_DELIVERY_MODE;
             return;
         }
@@ -203,11 +186,10 @@
 
         if (!(mode.equals(JMSConfigConstants.DEFAULT_DELIVERY_MODE)
                 || mode.equals(JMSConfigConstants.PERSISTENT)
-                || mode.equals(JMSConfigConstants.NON_PERSISTENT)))
-        {
+                || mode.equals(JMSConfigConstants.NON_PERSISTENT))) {
             // Invalid Delivery Mode ''{0}''. Valid values are DEFAULT_DELIVERY_MODE, PERSISTENT, and NON_PERSISTENT.
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(JMSConfigConstants.INVALID_DELIVERY_MODE, new Object[] {mode});
+            ce.setMessage(JMSConfigConstants.INVALID_DELIVERY_MODE, new Object[]{mode});
             throw ce;
         }
         deliveryMode = mode;
@@ -218,8 +200,7 @@
      *
      * @return The <code>delivery-settings</code> property.
      */
-    public DeliverySettings getDeliverySettings()
-    {
+    public DeliverySettings getDeliverySettings() {
         return deliverySettings;
     }
 
@@ -230,8 +211,7 @@
      *
      * @param deliverySettings The <code>delivery-settings</code> property.
      */
-    public void setDeliverySettings(DeliverySettings deliverySettings)
-    {
+    public void setDeliverySettings(DeliverySettings deliverySettings) {
         this.deliverySettings = deliverySettings;
     }
 
@@ -240,8 +220,7 @@
      *
      * @return a String containing the <code>destination-jndi-name</code>
      */
-    public String getDestinationJNDIName()
-    {
+    public String getDestinationJNDIName() {
         return destinationJNDIName;
     }
 
@@ -251,10 +230,8 @@
      *
      * @param name The non-null name of the destination in JNDI.
      */
-    public void setDestinationJNDIName(String name)
-    {
-        if (name == null)
-        {
+    public void setDestinationJNDIName(String name) {
+        if (name == null) {
             // JNDI names for message destinations with JMS Adapters must be specified.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(JMSConfigConstants.MISSING_DESTINATION_JNDI_NAME);
@@ -266,22 +243,20 @@
     /**
      * Destination-name property is not used anymore.
      *
-     * @deprecated
      * @return null.
+     * @deprecated
      */
-    public String getDestinationName()
-    {
+    public String getDestinationName() {
         return null;
     }
 
     /**
      * Destination-name property is not used anymore.
      *
-     * @deprecated
      * @param name The name of the destination.
+     * @deprecated
      */
-    public void setDestinationName(String name)
-    {
+    public void setDestinationName(String name) {
         // No-op
     }
 
@@ -290,8 +265,7 @@
      *
      * @return a String containing the <code>destination-type</code>.
      */
-    public String getDestinationType()
-    {
+    public String getDestinationType() {
         return destinationType;
     }
 
@@ -302,18 +276,15 @@
      *
      * @param type The destination type. Valid values are Topic and Queue.
      */
-    public void setDestinationType(String type)
-    {
-        if (type == null)
-        {
+    public void setDestinationType(String type) {
+        if (type == null) {
             destinationType = JMSConfigConstants.defaultDestinationType;
             return;
         }
 
         type = type.toLowerCase();
 
-        if (!(type.equals(JMSConfigConstants.TOPIC) || type.equals(JMSConfigConstants.QUEUE)))
-        {
+        if (!(type.equals(JMSConfigConstants.TOPIC) || type.equals(JMSConfigConstants.QUEUE))) {
             // JMS Adapter destination type must be Topic or Queue.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(JMSConfigConstants.INVALID_DESTINATION_TYPE);
@@ -328,8 +299,7 @@
      * @return <code>true</code> is consumers are durable, <code>false</code>
      * otherwise.
      */
-    public boolean useDurableConsumers()
-    {
+    public boolean useDurableConsumers() {
         return durableConsumers;
     }
 
@@ -339,8 +309,7 @@
      *
      * @param durable A boolean indicating whether consumers should be durable.
      */
-    public void setDurableConsumers(boolean durable)
-    {
+    public void setDurableConsumers(boolean durable) {
         durableConsumers = durable;
     }
 
@@ -349,8 +318,7 @@
      *
      * @return a Hashtable of the <code>initial-context-environment</code>.
      */
-    public Hashtable getInitialContextEnvironment()
-    {
+    public Hashtable getInitialContextEnvironment() {
         return initialContextEnvironment;
     }
 
@@ -360,8 +328,7 @@
      *
      * @param env A Hashtable of the <code>initial-context-environment</code>.
      */
-    public void setInitialContextEnvironment(Hashtable env)
-    {
+    public void setInitialContextEnvironment(Hashtable env) {
         initialContextEnvironment = env;
     }
 
@@ -370,8 +337,7 @@
      *
      * @return an int representing the <code>max-producers</code>.
      */
-    public int getMaxProducers()
-    {
+    public int getMaxProducers() {
         return maxProducers;
     }
 
@@ -384,8 +350,7 @@
      *
      * @param value an int representing the <code>max-producers</code>.
      */
-    public void setMaxProducers(int value)
-    {
+    public void setMaxProducers(int value) {
         if (value < 1)
             value = JMSConfigConstants.defaultMaxProducers;
         maxProducers = value;
@@ -396,8 +361,7 @@
      *
      * @return an int specifying the <code>message-priority</code>
      */
-    public int getMessagePriority()
-    {
+    public int getMessagePriority() {
         return messagePriority;
     }
 
@@ -408,8 +372,7 @@
      *
      * @param priority an int specifying the <code>message-priority</code>.
      */
-    public void setMessagePriority(int priority)
-    {
+    public void setMessagePriority(int priority) {
         messagePriority = priority;
     }
 
@@ -418,8 +381,7 @@
      *
      * @return a String containing the <code>message-type</code>.
      */
-    public String getMessageType()
-    {
+    public String getMessageType() {
         return messageType;
     }
 
@@ -429,18 +391,16 @@
      * destination.
      *
      * @param type The <code>message-type</code> property. Supported types are
-     * <code>javax.jms.TextMessage</code>, <code>javax.jms.ObjectMessage</code>,
-     * and <code>javax.jms.MapMessage</code>.
+     *             <code>javax.jms.TextMessage</code>, <code>javax.jms.ObjectMessage</code>,
+     *             and <code>javax.jms.MapMessage</code>.
      */
-    public void setMessageType(String type)
-    {
+    public void setMessageType(String type) {
         if (type == null || !(type.equals(JMSConfigConstants.TEXT_MESSAGE)
                 || type.equals(JMSConfigConstants.OBJECT_MESSAGE)
-                || type.equals(JMSConfigConstants.MAP_MESSAGE)) )
-        {
+                || type.equals(JMSConfigConstants.MAP_MESSAGE))) {
             // Unsupported JMS Message Type ''{0}''. Valid values are javax.jms.TextMessage and javax.jms.ObjectMessage.
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(JMSConfigConstants.INVALID_JMS_MESSAGE_TYPE, new Object[] {type});
+            ce.setMessage(JMSConfigConstants.INVALID_JMS_MESSAGE_TYPE, new Object[]{type});
             throw ce;
         }
         messageType = type;
@@ -451,8 +411,7 @@
      *
      * @return The <code>preserve-jms-headers</code> property.
      */
-    public boolean isPreserveJMSHeaders()
-    {
+    public boolean isPreserveJMSHeaders() {
         return preserveJMSHeaders;
     }
 
@@ -462,30 +421,27 @@
      *
      * @param preserveJMSHeaders The <code>preserve-jms-headers</code> property.
      */
-    public void setPreserveJMSHeaders(boolean preserveJMSHeaders)
-    {
+    public void setPreserveJMSHeaders(boolean preserveJMSHeaders) {
         this.preserveJMSHeaders = preserveJMSHeaders;
     }
 
     /**
      * Transacted-session property is not used anymore.
      *
-     * @deprecated
      * @return false.
+     * @deprecated
      */
-    public boolean isTransactedSessions()
-    {
+    public boolean isTransactedSessions() {
         return false;
     }
 
     /**
      * Transacted-session property is not used anymore.
      *
-     * @deprecated
      * @param mode The transacted-session property.
+     * @deprecated
      */
-    public void setTransactedSessions(boolean mode)
-    {
+    public void setTransactedSessions(boolean mode) {
         // No-op
     }
 
@@ -498,8 +454,7 @@
     /**
      * A static inner class for delivery settings.
      */
-    public static class DeliverySettings
-    {
+    public static class DeliverySettings {
         private String mode;
         private long syncReceiveIntervalMillis;
         private long syncReceiveWaitMillis;
@@ -508,8 +463,7 @@
          * Creates a default <code>DeliverySettings</code> instance with default
          * settings.
          */
-        public DeliverySettings()
-        {
+        public DeliverySettings() {
             mode = JMSConfigConstants.SYNC;
             syncReceiveIntervalMillis = JMSConfigConstants.defaultSyncReceiveIntervalMillis;
             syncReceiveWaitMillis = JMSConfigConstants.defaultSyncReceiveWaitMillis;
@@ -520,31 +474,28 @@
          *
          * @return The message delivery mode.
          */
-        public String getMode()
-        {
+        public String getMode() {
             return mode;
         }
+
         /**
          * Sets the message delivery mode. This property is optional and defaults
          * to sync.
          *
          * @param mode The message delivery mode. Valid values are async and sync.
          */
-        public void setMode(String mode)
-        {
-            if (mode == null)
-            {
+        public void setMode(String mode) {
+            if (mode == null) {
                 mode = JMSConfigConstants.defaultMode;
                 return;
             }
 
             mode = mode.toLowerCase();
 
-            if (!(mode.equals(JMSConfigConstants.ASYNC) || mode.equals(JMSConfigConstants.SYNC)))
-            {
+            if (!(mode.equals(JMSConfigConstants.ASYNC) || mode.equals(JMSConfigConstants.SYNC))) {
                 // Invalid delivery-settings mode ''{0}''. Valid values are async and sync.
                 ConfigurationException ce = new ConfigurationException();
-                ce.setMessage(JMSConfigConstants.INVALID_DELIVERY_MODE_VALUE, new Object[] {mode});
+                ce.setMessage(JMSConfigConstants.INVALID_DELIVERY_MODE_VALUE, new Object[]{mode});
                 throw ce;
             }
             this.mode = mode;
@@ -555,8 +506,7 @@
          *
          * @return The interval of the sync receive message call.
          */
-        public long getSyncReceiveIntervalMillis()
-        {
+        public long getSyncReceiveIntervalMillis() {
             return syncReceiveIntervalMillis;
         }
 
@@ -565,10 +515,9 @@
          * is optional and defaults to 100.
          *
          * @param syncReceiveIntervalMillis A positive long that indicates
-         * the interval of the receive message call.
+         *                                  the interval of the receive message call.
          */
-        public void setSyncReceiveIntervalMillis(long syncReceiveIntervalMillis)
-        {
+        public void setSyncReceiveIntervalMillis(long syncReceiveIntervalMillis) {
             if (syncReceiveIntervalMillis < 1)
                 syncReceiveIntervalMillis = JMSConfigConstants.defaultSyncReceiveIntervalMillis;
             this.syncReceiveIntervalMillis = syncReceiveIntervalMillis;
@@ -579,8 +528,7 @@
          *
          * @return How long a JMS proxy waits for a message before returning.
          */
-        public long getSyncReceiveWaitMillis()
-        {
+        public long getSyncReceiveWaitMillis() {
             return syncReceiveWaitMillis;
         }
 
@@ -589,11 +537,10 @@
          * This property is optional and defaults to zero (no wait).
          *
          * @param syncReceiveWaitMillis A non-negative value that indicates how
-         * long a JMS proxy waits for a message before returning. Zero means no
-         * wait, negative one means wait until a message arrives.
+         *                              long a JMS proxy waits for a message before returning. Zero means no
+         *                              wait, negative one means wait until a message arrives.
          */
-        public void setSyncReceiveWaitMillis(long syncReceiveWaitMillis)
-        {
+        public void setSyncReceiveWaitMillis(long syncReceiveWaitMillis) {
             if (syncReceiveWaitMillis < -1)
                 syncReceiveWaitMillis = JMSConfigConstants.defaultSyncReceiveWaitMillis;
             this.syncReceiveWaitMillis = syncReceiveWaitMillis;
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSTopicConsumer.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSTopicConsumer.java
index 4a4498c..29e7ce7 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSTopicConsumer.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSTopicConsumer.java
@@ -35,11 +35,8 @@
 
 /**
  * A <code>JMSConsumer</code> subclass specifically for JMS Topic subscribers.
- *
- *
  */
-public class JMSTopicConsumer extends JMSConsumer
-{
+public class JMSTopicConsumer extends JMSConsumer {
     protected boolean durableConsumers;
     protected String durableSubscriptionName;
 
@@ -54,8 +51,7 @@
      *
      * @param settings JMS settings to use for initialization.
      */
-    public void initialize(JMSSettings settings)
-    {
+    public void initialize(JMSSettings settings) {
         super.initialize(settings);
         durableConsumers = settings.useDurableConsumers();
     }
@@ -65,12 +61,10 @@
      * it is started. For <code>JMSTopicConsumer</code> to be in valid state,
      * it needs durableSubscriptionName if durableConsumers is true.
      */
-    protected void validate()
-    {
+    protected void validate() {
         super.validate();
 
-        if (durableConsumers && durableSubscriptionName == null)
-        {
+        if (durableConsumers && durableSubscriptionName == null) {
             // JMS topic consumer for JMS destination ''{0}'' is configured to use durable subscriptions but it does not have a durable subscription name.
             ConfigurationException ce = new ConfigurationException();
             ce.setMessage(JMSConfigConstants.MISSING_DURABLE_SUBSCRIPTION_NAME, new Object[]{destinationJndiName});
@@ -84,75 +78,59 @@
      * @throws NamingException
      * @throws JMSException
      */
-    public void start() throws NamingException, JMSException
-    {
+    public void start() throws NamingException, JMSException {
         super.start();
 
         // Establish topic
         Topic topic;
-        try
-        {
-            topic = (Topic)destination;
-        }
-        catch (ClassCastException cce)
-        {
+        try {
+            topic = (Topic) destination;
+        } catch (ClassCastException cce) {
             // JMS topic proxy for JMS destination ''{0}'' has a destination type of ''{1}'' which is not Topic.
             MessageException me = new MessageException();
-            me.setMessage(JMSConfigConstants.NON_TOPIC_DESTINATION, new Object[] {destinationJndiName, destination.getClass().getName()});
+            me.setMessage(JMSConfigConstants.NON_TOPIC_DESTINATION, new Object[]{destinationJndiName, destination.getClass().getName()});
             throw me;
         }
 
         // Create connection
         TopicConnectionFactory topicFactory;
-        try
-        {
-            topicFactory = (TopicConnectionFactory)connectionFactory;
+        try {
+            topicFactory = (TopicConnectionFactory) connectionFactory;
             if (connectionCredentials != null)
                 connection = topicFactory.createTopicConnection(connectionCredentials.getUsername(), connectionCredentials.getPassword());
             else
                 connection = topicFactory.createTopicConnection();
-        }
-        catch (ClassCastException cce)
-        {
+        } catch (ClassCastException cce) {
             // JMS topic proxy for JMS destination ''{0}'' has a connection factory type of ''{1}'' which is not TopicConnectionFactory.
             MessageException me = new MessageException();
-            me.setMessage(JMSConfigConstants.NON_TOPIC_FACTORY, new Object[] {destinationJndiName, connectionFactory.getClass().getName()});
+            me.setMessage(JMSConfigConstants.NON_TOPIC_FACTORY, new Object[]{destinationJndiName, connectionFactory.getClass().getName()});
             throw me;
         }
 
-        TopicConnection topicConnection = (TopicConnection)connection;
+        TopicConnection topicConnection = (TopicConnection) connection;
 
-        if (durableConsumers)
-        {
-            try
-            {
+        if (durableConsumers) {
+            try {
                 if (Log.isDebug())
                     Log.getLogger(JMSAdapter.LOG_CATEGORY).debug("JMS consumer for JMS destination '"
                             + destinationJndiName + "' is setting its underlying connection's client id to "
                             + durableSubscriptionName + " for durable subscription.");
 
                 topicConnection.setClientID(durableSubscriptionName);
-            }
-            catch (Exception e)
-            {
+            } catch (Exception e) {
                 // Try to set the clientID in a seperate thread.
                 ExecutorService clientIdSetter = Executors.newSingleThreadExecutor();
                 ClientIdSetterCallable cisc = new ClientIdSetterCallable(topicFactory, durableSubscriptionName);
                 Future future = clientIdSetter.submit(cisc);
-                try
-                {
-                    topicConnection = (TopicConnection)future.get();
-                }
-                catch (InterruptedException ie)
-                {
+                try {
+                    topicConnection = (TopicConnection) future.get();
+                } catch (InterruptedException ie) {
                     if (Log.isWarn())
                         Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("The proxied durable JMS subscription with name, "
                                 + durableSubscriptionName + " could not set its client id "
                                 + "on the topic connection because it was interrupted: "
                                 + ie.toString());
-                }
-                catch (ExecutionException ee)
-                {
+                } catch (ExecutionException ee) {
                     // JMS topic consumer for JMS destination ''{0}'' is configured to use durable subscriptions but the application server does not permit javax.jms.Connection.setClientID method needed to support durable subscribers. Set durable property to false.
                     MessageException me = new MessageException();
                     me.setMessage(JMSConfigConstants.DURABLE_SUBSCRIBER_NOT_SUPPORTED, new Object[]{destinationJndiName});
@@ -166,15 +144,12 @@
         TopicSession topicSession = (TopicSession) session;
 
         // Create subscriber on topic session, handling message selectors and durable subscribers
-        if (selectorExpression != null)
-        {
+        if (selectorExpression != null) {
             if (durableConsumers && durableSubscriptionName != null)
                 consumer = topicSession.createDurableSubscriber(topic, durableSubscriptionName, selectorExpression, false);
             else
                 consumer = topicSession.createSubscriber(topic, selectorExpression, false);
-        }
-        else
-        {
+        } else {
             if (durableConsumers && durableSubscriptionName != null)
                 consumer = topicSession.createDurableSubscriber(topic, durableSubscriptionName);
             else
@@ -189,36 +164,27 @@
      * if one exists.
      *
      * @param unsubscribe Determines whether to unsubscribe a durable subscription
-     * if one exists, or not.
+     *                    if one exists, or not.
      */
-    public void stop(boolean unsubscribe)
-    {
-        if (unsubscribe)
-        {
+    public void stop(boolean unsubscribe) {
+        if (unsubscribe) {
             stopMessageReceiver();
 
-            try
-            {
+            try {
                 if (consumer != null)
                     consumer.close();
-            }
-            catch (Exception e)
-            {
+            } catch (Exception e) {
                 if (Log.isWarn())
                     Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("JMS consumer for JMS destination '"
                             + destinationJndiName + "' received an error while closing its underlying MessageConsumer: "
                             + e.getMessage());
             }
 
-            if (durableConsumers)
-            {
-                try
-                {
-                    TopicSession topicSession = (TopicSession)session;
+            if (durableConsumers) {
+                try {
+                    TopicSession topicSession = (TopicSession) session;
                     topicSession.unsubscribe(durableSubscriptionName);
-                }
-                catch (Exception e)
-                {
+                } catch (Exception e) {
                     if (Log.isWarn())
                         Log.getLogger(JMSAdapter.LOG_CATEGORY).warn("The proxied durable JMS subscription with name, "
                                 + durableSubscriptionName + " failed to unsubscribe : "
@@ -241,8 +207,7 @@
      * @return <code>true</code> is consumers are durable, <code>false</code>
      * otherwise.
      */
-    public boolean isDurableConsumers()
-    {
+    public boolean isDurableConsumers() {
         return durableConsumers;
     }
 
@@ -252,8 +217,7 @@
      *
      * @param durableConsumers A boolean indicating whether consumers should be durable.
      */
-    public void setDurableConsumers(boolean durableConsumers)
-    {
+    public void setDurableConsumers(boolean durableConsumers) {
         this.durableConsumers = durableConsumers;
     }
 
@@ -262,8 +226,7 @@
      *
      * @return The durable subscription name.
      */
-    public String getDurableSubscriptionName()
-    {
+    public String getDurableSubscriptionName() {
         return durableSubscriptionName;
     }
 
@@ -274,8 +237,7 @@
      *
      * @param durableSubscriptionName The durable subscription name.
      */
-    public void setDurableSubscriptionName(String durableSubscriptionName)
-    {
+    public void setDurableSubscriptionName(String durableSubscriptionName) {
         this.durableSubscriptionName = durableSubscriptionName;
     }
 
@@ -290,21 +252,18 @@
      * from calling setClientId() on our topic connection. By spinning this out
      * into a short lived thread the container loses track of what we're doing.
      */
-    class ClientIdSetterCallable implements Callable
-    {
+    class ClientIdSetterCallable implements Callable {
         private TopicConnectionFactory tcf;
         private String clientId;
 
         private TopicConnection topicConnection;
 
-        public ClientIdSetterCallable(TopicConnectionFactory tcf, String clientId)
-        {
+        public ClientIdSetterCallable(TopicConnectionFactory tcf, String clientId) {
             this.tcf = tcf;
             this.clientId = clientId;
         }
 
-        public Object call() throws JMSException
-        {
+        public Object call() throws JMSException {
             topicConnection = tcf.createTopicConnection();
             topicConnection.setClientID(clientId);
             return topicConnection;
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSTopicProducer.java b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSTopicProducer.java
index 3e4941e..3b479f9 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/JMSTopicProducer.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/JMSTopicProducer.java
@@ -33,58 +33,48 @@
 
 /**
  * A <code>JMSProducer</code> subclass specifically for JMS Topic publishers.
- *
- *
  */
-public class JMSTopicProducer extends JMSProducer
-{
+public class JMSTopicProducer extends JMSProducer {
     /* JMS related variables */
     private TopicPublisher publisher;
 
     /**
      * Starts <code>JMSTopicProducer</code>.
      */
-    public void start() throws NamingException, JMSException
-    {
+    public void start() throws NamingException, JMSException {
         super.start();
 
         // Establish topic
         Topic topic = null;
-        try
-        {
-            topic = (Topic)destination;
-        }
-        catch (ClassCastException cce)
-        {
+        try {
+            topic = (Topic) destination;
+        } catch (ClassCastException cce) {
             // JMS topic proxy for JMS destination ''{0}'' has a destination type of ''{1}'' which is not Topic.
             MessageException me = new MessageException();
-            me.setMessage(JMSConfigConstants.NON_TOPIC_DESTINATION, new Object[] {destinationJndiName, destination.getClass().getName()});
+            me.setMessage(JMSConfigConstants.NON_TOPIC_DESTINATION, new Object[]{destinationJndiName, destination.getClass().getName()});
             throw me;
         }
 
         // Create connection
-        try
-        {
-            TopicConnectionFactory topicFactory = (TopicConnectionFactory)connectionFactory;
+        try {
+            TopicConnectionFactory topicFactory = (TopicConnectionFactory) connectionFactory;
             if (connectionCredentials != null)
                 connection = topicFactory.createTopicConnection(connectionCredentials.getUsername(), connectionCredentials.getPassword());
             else
                 connection = topicFactory.createTopicConnection();
-        }
-        catch (ClassCastException cce)
-        {
+        } catch (ClassCastException cce) {
             // JMS topic proxy for JMS destination ''{0}'' has a connection factory of type ''{1}'' which is not TopicConnectionFactory.
             MessageException me = new MessageException();
-            me.setMessage(JMSConfigConstants.NON_TOPIC_FACTORY, new Object[] {destinationJndiName, connectionFactory.getClass().getName()});
+            me.setMessage(JMSConfigConstants.NON_TOPIC_FACTORY, new Object[]{destinationJndiName, connectionFactory.getClass().getName()});
             throw me;
         }
 
         // Create topic session on the connection
-        TopicConnection topicConnection = (TopicConnection)connection;
+        TopicConnection topicConnection = (TopicConnection) connection;
         session = topicConnection.createTopicSession(false /* Always nontransacted */, getAcknowledgeMode());
 
         // Create publisher on the topic session
-        TopicSession topicSession = (TopicSession)session;
+        TopicSession topicSession = (TopicSession) session;
         publisher = topicSession.createPublisher(topic);
         producer = publisher;
 
@@ -92,8 +82,7 @@
         connection.start();
     }
 
-    void sendObjectMessage(Serializable obj, Map properties) throws JMSException
-    {
+    void sendObjectMessage(Serializable obj, Map properties) throws JMSException {
         if (obj == null)
             return;
 
@@ -103,8 +92,7 @@
         publisher.publish(message, getDeliveryMode(), messagePriority, getTimeToLive(properties));
     }
 
-    void sendTextMessage(String text, Map properties) throws JMSException
-    {
+    void sendTextMessage(String text, Map properties) throws JMSException {
         if (text == null)
             return;
 
@@ -115,8 +103,7 @@
     }
 
     @Override
-    void sendMapMessage(Map<String, ?> map, Map properties) throws JMSException
-    {
+    void sendMapMessage(Map<String, ?> map, Map properties) throws JMSException {
         if (map == null)
             return;
 
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/MessageReceiver.java b/core/src/main/java/flex/messaging/services/messaging/adapters/MessageReceiver.java
index 6f4cde9..cad9d4a 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/MessageReceiver.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/MessageReceiver.java
@@ -20,11 +20,8 @@
 
 /**
  * An interface used by <code>JMSConsumer</code> to receive messages from JMS.
- *
- *
  */
-interface MessageReceiver
-{
+interface MessageReceiver {
     /**
      * Called by <code>JMSConsumer</code> as it starts up.
      *
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/MessagingAdapter.java b/core/src/main/java/flex/messaging/services/messaging/adapters/MessagingAdapter.java
index df3a1f8..eb9944a 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/MessagingAdapter.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/MessagingAdapter.java
@@ -73,8 +73,7 @@
  * @see flex.messaging.messages.Message
  * @see flex.messaging.messages.CommandMessage
  */
-public abstract class MessagingAdapter extends ServiceAdapter implements MessagingSecurity
-{
+public abstract class MessagingAdapter extends ServiceAdapter implements MessagingSecurity {
     /**
      * Constraint manager used to assert authorization of send and subscribe related operations.
      */
@@ -89,8 +88,7 @@
     /**
      * Constructs an unmanaged <code>MessagingAdapter</code> instance.
      */
-    public MessagingAdapter()
-    {
+    public MessagingAdapter() {
         this(false);
     }
 
@@ -98,10 +96,9 @@
      * Constructs a <code>MessagingAdapter</code> instance.
      *
      * @param enableManagement <code>true</code> if the <code>MessagingAdapter</code>
-     * has a corresponding MBean control for management; otherwise <code>false</code>.
+     *                         has a corresponding MBean control for management; otherwise <code>false</code>.
      */
-    public MessagingAdapter(boolean enableManagement)
-    {
+    public MessagingAdapter(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -115,26 +112,22 @@
      * Initializes the <code>MessagingAdapter</code> with the properties.
      * Subclasses should call <code>super.initialize</code>.
      *
-     * @param id Id of the <code>MessagingAdapter</code>.
+     * @param id         Id of the <code>MessagingAdapter</code>.
      * @param properties Properties for the <code>MessagingAdapter</code>.
      */
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
         if (properties == null || properties.size() == 0)
             return;
 
         ConfigMap serverSettings = properties.getPropertyAsMap(DestinationSettings.SERVER_ELEMENT, null);
-        if (serverSettings != null)
-        {
+        if (serverSettings != null) {
             // Send constraint
             ConfigMap send = serverSettings.getPropertyAsMap(MessagingSecurityConstraintManager.SEND_SECURITY_CONSTRAINT, null);
-            if (send != null)
-            {
+            if (send != null) {
                 String ref = send.getPropertyAsString(ConfigurationConstants.REF_ATTR, null);
-                if (ref != null)
-                {
+                if (ref != null) {
                     if (constraintManager == null)
                         constraintManager = new MessagingSecurityConstraintManager(getDestination().getService().getMessageBroker());
                     constraintManager.createSendConstraint(ref);
@@ -143,11 +136,9 @@
 
             // Subscribe constraint
             ConfigMap subscribe = serverSettings.getPropertyAsMap(MessagingSecurityConstraintManager.SUBSCRIBE_SECURITY_CONSTRAINT, null);
-            if (subscribe != null)
-            {
+            if (subscribe != null) {
                 String ref = subscribe.getPropertyAsString(ConfigurationConstants.REF_ATTR, null);
-                if (ref != null)
-                {
+                if (ref != null) {
                     if (constraintManager == null)
                         constraintManager = new MessagingSecurityConstraintManager(getDestination().getService().getMessageBroker());
                     constraintManager.createSubscribeConstraint(ref);
@@ -160,8 +151,7 @@
      * Verifies that the <code>MessagingAdapter</code> is in valid state before
      * it is started. If subclasses override, they must call <code>super.validate()</code>.
      */
-    protected void validate()
-    {
+    protected void validate() {
         if (isValid())
             return;
 
@@ -185,8 +175,7 @@
      * @param subtopic The subtopic the client is attempting to subscribe to.
      * @return true to allow the subscription, false to prevent it.
      */
-    public boolean allowSubscribe(Subtopic subtopic)
-    {
+    public boolean allowSubscribe(Subtopic subtopic) {
         return true;
     }
 
@@ -201,8 +190,7 @@
      * @param subtopic The subtopic the client is attempting to send a message to.
      * @return true to allow the message to be sent, false to prevent it.
      */
-    public boolean allowSend(Subtopic subtopic)
-    {
+    public boolean allowSend(Subtopic subtopic) {
         return true;
     }
 
@@ -211,8 +199,7 @@
      *
      * @return The <code>MessagingSecurityConstraintManager</code> of the <code>MessagingAdapter</code>.
      */
-    public MessagingSecurityConstraintManager getSecurityConstraintManager()
-    {
+    public MessagingSecurityConstraintManager getSecurityConstraintManager() {
         return constraintManager;
     }
 
@@ -221,8 +208,7 @@
      *
      * @param constraintManager The <code>MessagingSecurityConstraintManager</code> of the <code>MessagingAdapter</code>.
      */
-    public void setSecurityConstraintManager(MessagingSecurityConstraintManager constraintManager)
-    {
+    public void setSecurityConstraintManager(MessagingSecurityConstraintManager constraintManager) {
         this.constraintManager = constraintManager;
     }
 
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/MessagingSecurityConstraintManager.java b/core/src/main/java/flex/messaging/services/messaging/adapters/MessagingSecurityConstraintManager.java
index 644771a..fbd6e2a 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/MessagingSecurityConstraintManager.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/MessagingSecurityConstraintManager.java
@@ -29,8 +29,7 @@
  * Messaging security constraint managers are used by messaging destinations
  * to assert authorization of send and subscribe operations.
  */
-public final class MessagingSecurityConstraintManager
-{
+public final class MessagingSecurityConstraintManager {
     public static final String SEND_SECURITY_CONSTRAINT = "send-security-constraint";
     public static final String SUBSCRIBE_SECURITY_CONSTRAINT = "subscribe-security-constraint";
 
@@ -47,8 +46,7 @@
      *
      * @param broker Associated <code>MessageBroker</code>.
      */
-    public MessagingSecurityConstraintManager(MessageBroker broker)
-    {
+    public MessagingSecurityConstraintManager(MessageBroker broker) {
         this.loginManager = broker.getLoginManager();
         this.securitySettings = broker.getSecuritySettings();
     }
@@ -59,8 +57,7 @@
      *
      * @param ref The reference id of the constraint
      */
-    public void setSendConstraint(String ref)
-    {
+    public void setSendConstraint(String ref) {
         validateConstraint(ref);
         sendConstraint = securitySettings.getConstraint(ref);
     }
@@ -71,91 +68,73 @@
      *
      * @param ref The reference id of the constraint
      */
-    public void setSubscribeConstraint(String ref)
-    {
-       validateConstraint(ref);
-       subscribeConstraint = securitySettings.getConstraint(ref);
+    public void setSubscribeConstraint(String ref) {
+        validateConstraint(ref);
+        subscribeConstraint = securitySettings.getConstraint(ref);
     }
 
     /**
-     *
      * Asserts send authorizations.
      */
-    public void assertSendAuthorization()
-    {
+    public void assertSendAuthorization() {
         checkConstraint(sendConstraint);
     }
 
     /**
-     *
      * Asserts subscribe authorizations.
      */
-    public void assertSubscribeAuthorization()
-    {
+    public void assertSubscribeAuthorization() {
         checkConstraint(subscribeConstraint);
     }
 
     /**
-     *
      * Creates security constraints from the given server settings.
      *
      * @param serverSettings The <code>ConfigMap</code> of server settings.
      */
-    public void createConstraints(ConfigMap serverSettings)
-    {
+    public void createConstraints(ConfigMap serverSettings) {
         // Send constraint
         ConfigMap send = serverSettings.getPropertyAsMap(SEND_SECURITY_CONSTRAINT, null);
-        if (send != null)
-        {
+        if (send != null) {
             String ref = send.getPropertyAsString(ConfigurationConstants.REF_ATTR, null);
             createSendConstraint(ref);
         }
 
         // Subscribe constraint
         ConfigMap subscribe = serverSettings.getPropertyAsMap(SUBSCRIBE_SECURITY_CONSTRAINT, null);
-        if (subscribe != null)
-        {
+        if (subscribe != null) {
             String ref = subscribe.getPropertyAsString(ConfigurationConstants.REF_ATTR, null);
             createSubscribeConstraint(ref);
         }
     }
 
-    void createSendConstraint(String ref)
-    {
+    void createSendConstraint(String ref) {
         if (ref != null)
             sendConstraint = securitySettings.getConstraint(ref);
     }
 
-    void createSubscribeConstraint(String ref)
-    {
+    void createSubscribeConstraint(String ref) {
         if (ref != null)
             subscribeConstraint = securitySettings.getConstraint(ref);
     }
 
-    private void checkConstraint(SecurityConstraint constraint)
-    {
-        if (constraint != null && !FlexContext.isMessageFromPeer())
-        {
-            try
-            {
+    private void checkConstraint(SecurityConstraint constraint) {
+        if (constraint != null && !FlexContext.isMessageFromPeer()) {
+            try {
                 loginManager.checkConstraint(constraint);
-            }
-            catch (SecurityException e)
-            {
+            } catch (SecurityException e) {
                 throw e;
             }
         }
     }
 
-    private void validateConstraint(String ref)
-    {
+    private void validateConstraint(String ref) {
         // If an attempt is made to use a constraint that we do not know about,
         // do not let the authorization succeed.
-        if (securitySettings.getConstraint(ref) == null)
-        {
+        if (securitySettings.getConstraint(ref) == null) {
             // Security constraint {0} is not defined.
             SecurityException se = new SecurityException();
-            se.setMessage(NO_SEC_CONSTRAINT, new Object[] {ref});
+            se.setMessage(NO_SEC_CONSTRAINT, new Object[]{ref});
             throw se;
         }
     }
diff --git a/core/src/main/java/flex/messaging/services/messaging/adapters/SyncMessageReceiver.java b/core/src/main/java/flex/messaging/services/messaging/adapters/SyncMessageReceiver.java
index 46fed23..3c20dfd 100644
--- a/core/src/main/java/flex/messaging/services/messaging/adapters/SyncMessageReceiver.java
+++ b/core/src/main/java/flex/messaging/services/messaging/adapters/SyncMessageReceiver.java
@@ -29,11 +29,8 @@
 /**
  * A <code>MessageReceiver</code> that receives messages from JMS using
  * synchronous <code>javax.jms.MessageConsumer.receive</code> call.
- *
- *
  */
-class SyncMessageReceiver implements MessageReceiver
-{
+class SyncMessageReceiver implements MessageReceiver {
     private ScheduledExecutorService messageReceiverService;
     private boolean isScheduled = false;
 
@@ -47,8 +44,7 @@
      *
      * @param jmsConsumer JMSConsumer associated with the SynMessageReceiver.
      */
-    public SyncMessageReceiver(JMSConsumer jmsConsumer)
-    {
+    public SyncMessageReceiver(JMSConsumer jmsConsumer) {
         this.jmsConsumer = jmsConsumer;
         syncReceiveIntervalMillis = JMSConfigConstants.defaultSyncReceiveIntervalMillis;
         syncReceiveWaitMillis = JMSConfigConstants.defaultSyncReceiveWaitMillis;
@@ -60,8 +56,7 @@
      *
      * @return The interval of the sync receive message call.
      */
-    public long getSyncReceiveIntervalMillis()
-    {
+    public long getSyncReceiveIntervalMillis() {
         return syncReceiveIntervalMillis;
     }
 
@@ -70,10 +65,9 @@
      * is optional and defaults to 100.
      *
      * @param syncReceiveIntervalMillis A positive long that indicates
-     * the interval of the receive message call.
+     *                                  the interval of the receive message call.
      */
-    public void setSyncReceiveIntervalMillis(long syncReceiveIntervalMillis)
-    {
+    public void setSyncReceiveIntervalMillis(long syncReceiveIntervalMillis) {
         if (syncReceiveIntervalMillis < 1)
             syncReceiveIntervalMillis = JMSConfigConstants.defaultSyncReceiveIntervalMillis;
         this.syncReceiveIntervalMillis = syncReceiveIntervalMillis;
@@ -84,8 +78,7 @@
      *
      * @return How long a JMS proxy waits for a message before returning.
      */
-    public long getSyncReceiveWaitMillis()
-    {
+    public long getSyncReceiveWaitMillis() {
         return syncReceiveWaitMillis;
     }
 
@@ -94,11 +87,10 @@
      * This property is optional and defaults to zero (no wait).
      *
      * @param syncReceiveWaitMillis A non-negative value that indicates how
-     * long a JMS proxy waits for a message before returning. Zero means no
-     * wait, negative one means wait until a message arrives.
+     *                              long a JMS proxy waits for a message before returning. Zero means no
+     *                              wait, negative one means wait until a message arrives.
      */
-    public void setSyncReceiveWaitMillis(long syncReceiveWaitMillis)
-    {
+    public void setSyncReceiveWaitMillis(long syncReceiveWaitMillis) {
         if (syncReceiveWaitMillis < -1)
             syncReceiveWaitMillis = JMSConfigConstants.defaultSyncReceiveWaitMillis;
         this.syncReceiveWaitMillis = syncReceiveWaitMillis;
@@ -107,10 +99,8 @@
     /**
      * Implements MessageReceiver.startReceive.
      */
-    public void startReceive()
-    {
-        if (!isScheduled)
-        {
+    public void startReceive() {
+        if (!isScheduled) {
             if (Log.isDebug())
                 Log.getLogger(JMSAdapter.LOG_CATEGORY).debug(Thread.currentThread()
                         + " JMS consumer sync receive thread for JMS destination '"
@@ -126,8 +116,7 @@
     /**
      * Implements MessageReceivers.stopReceive.
      */
-    public void stopReceive()
-    {
+    public void stopReceive() {
         if (messageReceiverService != null)
             messageReceiverService.shutdown();
     }
@@ -135,8 +124,7 @@
     /**
      * Used internally to receive messages as determined by syncReceiveWaitMillis.
      */
-    private Message receiveMessage() throws JMSException
-    {
+    private Message receiveMessage() throws JMSException {
         if (syncReceiveWaitMillis == -1)
             return jmsConsumer.receive();
         else if (syncReceiveWaitMillis == 0)
@@ -149,8 +137,7 @@
     /**
      * Thread Factory used to create message receive threads.
      */
-    class MessageReceiveThreadFactory implements ThreadFactory
-    {
+    class MessageReceiveThreadFactory implements ThreadFactory {
 
         /**
          * Used to uniquely identify each new message receive thread created.
@@ -163,8 +150,7 @@
          *
          * @param r The runnable to assign to the new thread.
          */
-        public synchronized Thread newThread(Runnable r)
-        {
+        public synchronized Thread newThread(Runnable r) {
             Thread t = new Thread(r);
             t.setName("MessageReceiveThread" + "-" + receiveThreadCount++);
             t.setDaemon(true);
@@ -179,21 +165,15 @@
      * Message receive threads that perform sync javax.jms.MessageConsumer.receive
      * calls.
      */
-    class MessageReceiveThread implements Runnable
-    {
-        public void run()
-        {
-            try
-            {
-                while (true)
-                {
+    class MessageReceiveThread implements Runnable {
+        public void run() {
+            try {
+                while (true) {
                     Message message = receiveMessage();
                     if (message == null) break;
                     jmsConsumer.onMessage(message);
                 }
-            }
-            catch (JMSException jmsEx)
-            {
+            } catch (JMSException jmsEx) {
                 jmsConsumer.onException(jmsEx);
             }
         }
diff --git a/core/src/main/java/flex/messaging/services/messaging/selector/JMSSelector.java b/core/src/main/java/flex/messaging/services/messaging/selector/JMSSelector.java
deleted file mode 100644
index 3d680f9..0000000
--- a/core/src/main/java/flex/messaging/services/messaging/selector/JMSSelector.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * 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.services.messaging.selector;
-
-import javax.jms.InvalidSelectorException;
-import javax.jms.JMSException;
-
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.filter.BooleanExpression;
-import org.apache.activemq.filter.MessageEvaluationContext;
-import org.apache.activemq.selector.SelectorParser;
-
-import flex.messaging.log.Log;
-import flex.messaging.log.LogCategories;
-import flex.messaging.messages.Message;
-
-/**
- * The JMSSelector is used to determine whether a message matches a given
- * SQL-92 selector expression.
- * 
- * A prior implementation of this class borrowed heavily from Sun's
- * proprietary code, that eventually found its way into Glassfish. The license
- * was still CDDL (or CDDL+GPL) and therefore unfit for donation to Apache.
- * 
- * The current implementation relies on Apache ActiveMQ to do the same. Since
- * the selector is evaluated against the message headers (called properties in
- * ActiveMQ parlance), and both ActiveMQ messages and Flex messages use a Map<String, Object>
- * to store the header-value pair, it is easy to create a minimally sufficient
- * ActiveMQMessage from a Flex message.
- * 
- * Possible performance improvement: prevent creation of an ActiveMQMessage for each selector.
- * This isn't exactly a lightweight object but there seem to be only two choices at the moment:
- * a. Use a static field and synchronize access to it
- * 						OR
- * b. Instantiate a new ActiveMQMessage for each selector
- * 
- * Re-using the same instance (approach a.) would entail calling clearProperties() followed
- * by setProperties() and that too by one thread at a time, which is why approach b. has been
- * chosen for now.
- *
- */
-public class JMSSelector
-{
-    public static final String LOG_CATEGORY = LogCategories.MESSAGE_SELECTOR; // Because we're not always JMS-specific.
-
-    private String pattern = null;
-
-    /**
-     * Class Constructor.
-     *
-     * @param pattern selector pattern
-     */
-    public JMSSelector(String pattern)
-    {
-        if (pattern == null)
-            pattern = "";
-
-        this.pattern = pattern;
-    }
-
-    /**
-     * Matches the message against the selector expression.
-     *
-     * @param msg The message to match against.
-     * @return true if the message headers match the selector; otherwise false.
-     * @exception JMSSelectorException
-     */
-    public boolean match(Message msg) throws JMSSelectorException
-    {
-        if (pattern.equals(""))
-            return true; // No selector
-
-        boolean matched = false;
-
-        try
-        {    	
-            // Parse selector pattern
-            BooleanExpression expr = SelectorParser.parse(pattern);	
-			
-			//Create a disposable ActiveMQMessage
-            ActiveMQMessage dummyMessage = new ActiveMQMessage();
-
-            // Populate dummyMessage from Flex message
-            dummyMessage.setProperties(msg.getHeaders());
-
-            // Set up an evaluation context
-            MessageEvaluationContext context = new MessageEvaluationContext();
-            context.setMessageReference(dummyMessage);
-
-            // Check whether message (headers) matches selector expression
-            matched = expr.matches(context);
-
-        }
-        catch (InvalidSelectorException e)
-        {
-            throw new JMSSelectorException(e);
-        }
-        catch (JMSException e)
-        {
-            throw new JMSSelectorException(e);
-        }
-        Log.getLogger(LOG_CATEGORY).debug("Selector: " + pattern + (matched ? " matched " : " did not match ") + " message with id: " + msg.getMessageId());
-        return matched;
-    }
-}
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/services/messaging/selector/JMSSelectorException.java b/core/src/main/java/flex/messaging/services/messaging/selector/JMSSelectorException.java
deleted file mode 100644
index f69d32b..0000000
--- a/core/src/main/java/flex/messaging/services/messaging/selector/JMSSelectorException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.services.messaging.selector;
-
-import flex.messaging.MessageException;
-
-/**
- * Exception type for JMSSelector errors.
- *
- *
- */
-public class JMSSelectorException extends MessageException
-{
-    static final long serialVersionUID = -8886580147676036114L;
-    
-    public JMSSelectorException(Throwable t)
-    {
-        super(t) ;
-    }
-
-}
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/services/messaging/selector/package-info.java b/core/src/main/java/flex/messaging/services/messaging/selector/package-info.java
deleted file mode 100644
index 266ff53..0000000
--- a/core/src/main/java/flex/messaging/services/messaging/selector/package-info.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * 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.services.messaging.selector;
\ No newline at end of file
diff --git a/core/src/main/java/flex/messaging/util/Assert.java b/core/src/main/java/flex/messaging/util/Assert.java
index a5f28a3..981f05e 100644
--- a/core/src/main/java/flex/messaging/util/Assert.java
+++ b/core/src/main/java/flex/messaging/util/Assert.java
@@ -19,43 +19,36 @@
 /**
  * Simple assert class which provides functionality similar to the assert API
  * of JDK 1.4.
- *
+ * <p>
  * Enable as follows:
  * java -Dassert
- * 
- *
  */
-public class Assert 
-{
+public class Assert {
     public static final boolean enableAssert = (System.getProperty("assert") != null);
 
-    
+
     /**
      * If assertions are enabled and the passed in expression is false, throw an
      * AssertionFailedError.
-     * 
+     *
      * @param expr expression whose truth value is tested
      */
-    public static void testAssertion(boolean expr) 
-    {
-        if (enableAssert && !expr) 
-        {
+    public static void testAssertion(boolean expr) {
+        if (enableAssert && !expr) {
             throw new AssertionFailedError();
         }
     }
-    
+
     /**
      * If assertions are enabled and the passed in expression is false, throw an
      * AssertionFailedError with the passed in message.
-     * 
-     * @param expr expression whose truth value is tested
+     *
+     * @param expr    expression whose truth value is tested
      * @param message message contained in the AssertionFailedError when the expression
-     * is false and assertions are enabled. 
+     *                is false and assertions are enabled.
      */
-    public static void testAssertion(boolean expr, String message)
-    {
-        if (enableAssert && !expr) 
-        {
+    public static void testAssertion(boolean expr, String message) {
+        if (enableAssert && !expr) {
             throw new AssertionFailedError(message);
         }
     }
diff --git a/core/src/main/java/flex/messaging/util/AssertionFailedError.java b/core/src/main/java/flex/messaging/util/AssertionFailedError.java
index 5f9a154..5ac5dc0 100644
--- a/core/src/main/java/flex/messaging/util/AssertionFailedError.java
+++ b/core/src/main/java/flex/messaging/util/AssertionFailedError.java
@@ -18,18 +18,14 @@
 
 /**
  *
- *
  */
-public class AssertionFailedError extends Error
-{
+public class AssertionFailedError extends Error {
     static final long serialVersionUID = 6315002781136046939L;
 
-    public AssertionFailedError()
-    {
+    public AssertionFailedError() {
     }
 
-    public AssertionFailedError(String message)
-    {
+    public AssertionFailedError(String message) {
         super(message);
     }
 }
diff --git a/core/src/main/java/flex/messaging/util/Base64.java b/core/src/main/java/flex/messaging/util/Base64.java
index 547b491..b0678e4 100644
--- a/core/src/main/java/flex/messaging/util/Base64.java
+++ b/core/src/main/java/flex/messaging/util/Base64.java
@@ -22,68 +22,61 @@
  * general streaming as they don't let you
  * drain less than everything that is currently
  * available.
- * 
- *
  */
-public class Base64
-{
+public class Base64 {
     private static final char alphabet[] =
             {
-                'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
-                'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
-                'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
-                'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
-                'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
-                'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
-                'w', 'x', 'y', 'z', '0', '1', '2', '3',
-                '4', '5', '6', '7', '8', '9', '+', '/'
+                    'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
+                    'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+                    'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
+                    'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
+                    'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
+                    'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
+                    'w', 'x', 'y', 'z', '0', '1', '2', '3',
+                    '4', '5', '6', '7', '8', '9', '+', '/'
             };
 
     private static final int inverse[] =
             {
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63,
-                52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64,
-                64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-                15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64,
-                64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-                41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64,
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
-                64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63,
+                    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64,
+                    64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+                    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64,
+                    64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+                    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64,
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
+                    64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64
             };
-    /**
-    *
-    */
 
-    public static class Decoder
-    {
+    /**
+     *
+     */
+
+    public static class Decoder {
         private int filled = 0;
         private byte data[];
         private int count = 0;
         private int work[] = {0, 0, 0, 0};
 
 
-        public Decoder()
-        {
+        public Decoder() {
             data = new byte[256];
         }
 
-        public void decode(String encoded)
-        {
+        public void decode(String encoded) {
             int estimate = 1 + encoded.length() * 3 / 4;
 
-            if (filled + estimate > data.length)
-            {
+            if (filled + estimate > data.length) {
                 int length = data.length * 2;
-                while (length < filled + estimate)
-                {
+                while (length < filled + estimate) {
                     length *= 2;
                 }
                 byte[] newdata = new byte[length];
@@ -92,8 +85,7 @@
                 data = newdata;
             }
 
-            for (int i = 0; i < encoded.length(); ++i)
-            {
+            for (int i = 0; i < encoded.length(); ++i) {
                 char c = encoded.charAt(i);
 
                 if (c == '=')
@@ -103,42 +95,38 @@
                 else
                     continue;
 
-                if (count == 4)
-                {
+                if (count == 4) {
                     count = 0;
-                    data[filled++] = (byte)((work[0] << 2) | ((work[1] & 0xff) >> 4));
+                    data[filled++] = (byte) ((work[0] << 2) | ((work[1] & 0xff) >> 4));
 
                     if (work[2] == -1)
                         break;
 
-                    data[filled++] = (byte)((work[1] << 4) | ((work[2] & 0xff) >> 2));
+                    data[filled++] = (byte) ((work[1] << 4) | ((work[2] & 0xff) >> 2));
 
                     if (work[3] == -1)
                         break;
 
-                    data[filled++] = (byte)((work[2] << 6) | work[3]);
+                    data[filled++] = (byte) ((work[2] << 6) | work[3]);
                 }
 
             }
         }
 
-        public byte[] drain()
-        {
+        public byte[] drain() {
             byte[] r = new byte[filled];
             System.arraycopy(data, 0, r, 0, filled);
             filled = 0;
             return r;
         }
 
-        public byte[] flush() throws IllegalStateException
-        {
+        public byte[] flush() throws IllegalStateException {
             if (count > 0)
                 throw new IllegalStateException("a partial block (" + count + " of 4 bytes) was dropped, decoded data is probably truncated!");
             return drain();
         }
 
-        public void reset()
-        {
+        public void reset() {
             count = 0;
             filled = 0;
         }
@@ -146,22 +134,19 @@
     }
 
     /**
-    *
-    */
-    public static class Encoder
-    {
+     *
+     */
+    public static class Encoder {
         private int work[] = {0, 0, 0};
         private int count = 0;
         private int line = 0;
         private StringBuffer output;
 
-        public Encoder(int size)
-        {
+        public Encoder(int size) {
             output = new StringBuffer(size);
         }
 
-        private void encodeBlock()
-        {
+        private void encodeBlock() {
             output.append(alphabet[(work[0] & 0xFF) >> 2]);
             output.append(alphabet[((work[0] & 0x03) << 4) | ((work[1] & 0xF0) >> 4)]);
             if (count > 1)
@@ -174,29 +159,24 @@
             else
                 output.append('=');
 
-            if ((line += 4) == 76)
-            {
+            if ((line += 4) == 76) {
                 output.append('\n');
                 line = 0;
             }
         }
 
-        public void encode(byte[] data)
-        {
+        public void encode(byte[] data) {
             encode(data, 0, data.length);
         }
 
-        public void encode(byte[] data, int offset, int length)
-        {
+        public void encode(byte[] data, int offset, int length) {
             int plainIndex = offset;
 
-            while (plainIndex < (offset + length))
-            {
+            while (plainIndex < (offset + length)) {
                 work[count] = data[plainIndex];
                 count++;
 
-                if (count == work.length || ((offset + length) - plainIndex) == 1)
-                {
+                if (count == work.length || ((offset + length) - plainIndex) == 1) {
                     encodeBlock();
                     count = 0;
                     work[0] = 0;
@@ -207,15 +187,13 @@
             }
         }
 
-        public String drain()
-        {
+        public String drain() {
             String r = output.toString();
             output.setLength(0);
             return r;
         }
 
-        public String flush()
-        {
+        public String flush() {
             if (count > 0)
                 encodeBlock();
 
diff --git a/core/src/main/java/flex/messaging/util/ClassUtil.java b/core/src/main/java/flex/messaging/util/ClassUtil.java
index f93080e..c2413d0 100644
--- a/core/src/main/java/flex/messaging/util/ClassUtil.java
+++ b/core/src/main/java/flex/messaging/util/ClassUtil.java
@@ -28,11 +28,8 @@
  * Utility class to create instances of Complex Types
  * and handle error conditions consistently across the RemoteObject
  * code base.
- *
- *
  */
-public class ClassUtil
-{
+public class ClassUtil {
     private static final int TYPE_NOT_FOUND = 10008;
     private static final int UNEXPECTED_TYPE = 10009;
     private static final int CANNOT_CREATE_TYPE = 10010;
@@ -41,8 +38,7 @@
 
     private static final String NULL = "null";
 
-    private ClassUtil()
-    {
+    private ClassUtil() {
     }
 
     /**
@@ -52,34 +48,30 @@
      * @param type fully qualified class name
      * @return the class instance
      */
-    public static Class createClass(String type)
-    {
+    public static Class createClass(String type) {
         return createClass(type, null);
     }
 
     /**
      * Create a class of the specified type using the provided class loader.
-     * @param type fully qualified class name
+     *
+     * @param type   fully qualified class name
      * @param loader class loader, if null the class loader that loaded ClassUtil is used
      * @return the class instance
      */
-    public static Class createClass(String type, ClassLoader loader)
-    {
-        try
-        {
+    public static Class createClass(String type, ClassLoader loader) {
+        try {
             if (type != null)
                 type = type.trim();
 
             if (loader == null) // will use the loader for this class
                 return Class.forName(type);
             return Class.forName(type, true, loader);
-        }
-        catch (ClassNotFoundException cnf)
-        {
+        } catch (ClassNotFoundException cnf) {
             // Cannot invoke type '{type}'
             MessageException ex = new MessageException();
-            ex.setMessage(TYPE_NOT_FOUND, new Object[] {type});
-            ex.setDetails(TYPE_NOT_FOUND, "0", new Object[] {type});
+            ex.setMessage(TYPE_NOT_FOUND, new Object[]{type});
+            ex.setDetails(TYPE_NOT_FOUND, "0", new Object[]{type});
             ex.setCode(MessageException.CODE_SERVER_RESOURCE_UNAVAILABLE);
             throw ex;
         }
@@ -89,12 +81,11 @@
      * Creates the default instance of the class and verifies that it matches
      * with the expected class type, if one passed in.
      *
-     * @param cls The class to create.
+     * @param cls              The class to create.
      * @param expectedInstance The expected class type.
      * @return The default instance of the class.
      */
-    public static Object createDefaultInstance(Class cls, Class expectedInstance)
-    {
+    public static Object createDefaultInstance(Class cls, Class expectedInstance) {
         return ClassUtil.createDefaultInstance(cls, expectedInstance, false /*validate*/);
     }
 
@@ -103,35 +94,30 @@
      * with the expected class type, if one passed in. It also validates the creation
      * of the instance with the deserialization validator, if one exists.
      *
-     * @param cls The class to create.
+     * @param cls              The class to create.
      * @param expectedInstance The expected class type.
-     * @param validate Controls whether the creation of the instance is validated
-     * with the deserialization validator.
+     * @param validate         Controls whether the creation of the instance is validated
+     *                         with the deserialization validator.
      * @return The default instance of the class.
      */
-    public static Object createDefaultInstance(Class cls, Class expectedInstance, boolean validate)
-    {
+    public static Object createDefaultInstance(Class cls, Class expectedInstance, boolean validate) {
         if (validate)
             validateCreation(cls);
 
         String type = cls.getName();
-        try
-        {
+        try {
             Object instance = cls.newInstance();
 
-            if (expectedInstance != null && !expectedInstance.isInstance(instance))
-            {
+            if (expectedInstance != null && !expectedInstance.isInstance(instance)) {
                 // Given type '{name}' is not of expected type '{expectedName}'.
                 MessageException ex = new MessageException();
-                ex.setMessage(UNEXPECTED_TYPE, new Object[] {instance.getClass().getName(), expectedInstance.getName()});
+                ex.setMessage(UNEXPECTED_TYPE, new Object[]{instance.getClass().getName(), expectedInstance.getName()});
                 ex.setCode(MessageException.CODE_SERVER_RESOURCE_UNAVAILABLE);
                 throw ex;
             }
 
             return instance;
-        }
-        catch (IllegalAccessException ia)
-        {
+        } catch (IllegalAccessException ia) {
             boolean details = false;
             StringBuffer message = new StringBuffer("Unable to create a new instance of type ");
             message.append(type);
@@ -139,24 +125,20 @@
             //Look for a possible cause...
 
             // Class might not have a suitable constructor?
-            if (!hasValidDefaultConstructor(cls))
-            {
+            if (!hasValidDefaultConstructor(cls)) {
                 details = true;
             }
 
             // Unable to create a new instance of type '{type}'.
             MessageException ex = new MessageException();
-            ex.setMessage(CANNOT_CREATE_TYPE, new Object[] {type});
-            if (details)
-            {
+            ex.setMessage(CANNOT_CREATE_TYPE, new Object[]{type});
+            if (details) {
                 //Types must have a public, no arguments constructor
                 ex.setDetails(CANNOT_CREATE_TYPE, "0");
             }
             ex.setCode(MessageException.CODE_SERVER_RESOURCE_UNAVAILABLE);
             throw ex;
-        }
-        catch (InstantiationException ine)
-        {
+        } catch (InstantiationException ine) {
             String variant = null;
 
             //Look for a possible cause...
@@ -169,73 +151,56 @@
                 variant = "3"; // Types cannot be instantiated without a public, no arguments constructor.
 
             MessageException ex = new MessageException();
-            ex.setMessage(CANNOT_CREATE_TYPE, new Object[] {type});
+            ex.setMessage(CANNOT_CREATE_TYPE, new Object[]{type});
             if (variant != null)
                 ex.setDetails(CANNOT_CREATE_TYPE, variant);
             ex.setCode(MessageException.CODE_SERVER_RESOURCE_UNAVAILABLE);
             throw ex;
-        }
-        catch (SecurityException se)
-        {
+        } catch (SecurityException se) {
             MessageException ex = new MessageException();
-            ex.setMessage(SECURITY_ERROR, new Object[] {type});
+            ex.setMessage(SECURITY_ERROR, new Object[]{type});
             ex.setCode(MessageException.CODE_SERVER_RESOURCE_UNAVAILABLE);
             ex.setRootCause(se);
             throw ex;
-        }
-        catch (MessageException me)
-        {
+        } catch (MessageException me) {
             throw me;
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             MessageException ex = new MessageException();
-            ex.setMessage(UNKNOWN_ERROR, new Object[] {type});
+            ex.setMessage(UNKNOWN_ERROR, new Object[]{type});
             ex.setCode(MessageException.CODE_SERVER_RESOURCE_UNAVAILABLE);
             ex.setRootCause(e);
             throw ex;
         }
     }
 
-    public static boolean isAbstract(Class cls)
-    {
-        try
-        {
-            if (cls != null)
-            {
+    public static boolean isAbstract(Class cls) {
+        try {
+            if (cls != null) {
                 int mod = cls.getModifiers();
                 return Modifier.isAbstract(mod);
             }
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             return false;
         }
 
         return false;
     }
 
-    public static boolean hasValidDefaultConstructor(Class cls)
-    {
-        try
-        {
-            if (cls != null)
-            {
+    public static boolean hasValidDefaultConstructor(Class cls) {
+        try {
+            if (cls != null) {
                 Constructor c = cls.getConstructor();
                 int mod = c.getModifiers();
                 return Modifier.isPublic(mod);
             }
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             return false;
         }
 
         return false;
     }
 
-    public static String classLoaderToString(ClassLoader cl)
-    {
+    public static String classLoaderToString(ClassLoader cl) {
         if (cl == null)
             return NULL;
 
@@ -252,34 +217,29 @@
      * against the deserialization validator. If the assignment is not valid,
      * SerializationException is thrown.
      *
-     * @param obj The Array or List instance.
+     * @param obj   The Array or List instance.
      * @param index The index at which the value is being assigned.
      * @param value The value that is assigned to the index.
      */
-    public static void validateAssignment(Object obj, int index, Object value)
-    {
+    public static void validateAssignment(Object obj, int index, Object value) {
         SerializationContext context = SerializationContext.getSerializationContext();
         DeserializationValidator validator = context.getDeserializationValidator();
         if (validator == null)
             return;
 
         boolean valid = true;
-        try
-        {
+        try {
             valid = validator.validateAssignment(obj, index, value);
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             // Assignment validation of the object with type '{0}' for the index '{1}' failed.
             SerializationException se = new SerializationException();
-            se.setMessage(10313, new Object[]{obj == null? NULL : obj.getClass().getName(), index});
+            se.setMessage(10313, new Object[]{obj == null ? NULL : obj.getClass().getName(), index});
             se.setRootCause(e);
             throw se;
         }
-        if (!valid)
-        {
+        if (!valid) {
             SerializationException se = new SerializationException();
-            se.setMessage(10313, new Object[]{obj == null? NULL : obj.getClass().getName(), index});
+            se.setMessage(10313, new Object[]{obj == null ? NULL : obj.getClass().getName(), index});
             throw se;
         }
     }
@@ -289,34 +249,29 @@
      * against the deserialization validator. If the assignment is not valid,
      * SerializationException is thrown.
      *
-     * @param obj The class instance whose property is being assigned to a value.
+     * @param obj      The class instance whose property is being assigned to a value.
      * @param propName The name of the property that is being assigned.
-     * @param value The value that the property is being assigned to.
+     * @param value    The value that the property is being assigned to.
      */
-    public static void validateAssignment(Object obj, String propName, Object value)
-    {
+    public static void validateAssignment(Object obj, String propName, Object value) {
         SerializationContext context = SerializationContext.getSerializationContext();
         DeserializationValidator validator = context.getDeserializationValidator();
         if (validator == null)
             return;
 
         boolean valid = true;
-        try
-        {
+        try {
             valid = validator.validateAssignment(obj, propName, value);
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             // Assignment validation of the object with type '{0}' for the property '{1}' failed.
             SerializationException se = new SerializationException();
-            se.setMessage(10312, new Object[]{obj == null? NULL : obj.getClass().getName(), propName});
+            se.setMessage(10312, new Object[]{obj == null ? NULL : obj.getClass().getName(), propName});
             se.setRootCause(e);
             throw se;
         }
-        if (!valid)
-        {
+        if (!valid) {
             SerializationException se = new SerializationException();
-            se.setMessage(10312, new Object[]{obj == null? NULL : obj.getClass().getName(), propName});
+            se.setMessage(10312, new Object[]{obj == null ? NULL : obj.getClass().getName(), propName});
             throw se;
         }
     }
@@ -328,31 +283,26 @@
      *
      * @param cls The class to validate.
      */
-    public static void validateCreation(Class<?> cls)
-    {
+    public static void validateCreation(Class<?> cls) {
         SerializationContext context = SerializationContext.getSerializationContext();
         DeserializationValidator validator = context.getDeserializationValidator();
         if (validator == null)
             return;
 
         boolean valid = true;
-        try
-        {
+        try {
             valid = validator.validateCreation(cls);
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             // Creation validation for class '{0}' failed.
             SerializationException se = new SerializationException();
-            se.setMessage(10311, new Object[]{cls == null? NULL : cls.getName()});
+            se.setMessage(10311, new Object[]{cls == null ? NULL : cls.getName()});
             se.setRootCause(e);
             throw se;
         }
-        if (!valid)
-        {
+        if (!valid) {
             // Creation validation for class '{0}' failed.
             SerializationException se = new SerializationException();
-            se.setMessage(10311, new Object[]{cls == null? NULL : cls.getName()});
+            se.setMessage(10311, new Object[]{cls == null ? NULL : cls.getName()});
             throw se;
         }
     }
diff --git a/core/src/main/java/flex/messaging/util/DoubleUtil.java b/core/src/main/java/flex/messaging/util/DoubleUtil.java
index 19dfbc8..9125ea3 100644
--- a/core/src/main/java/flex/messaging/util/DoubleUtil.java
+++ b/core/src/main/java/flex/messaging/util/DoubleUtil.java
@@ -19,13 +19,11 @@
 /**
  *
  */
-public class DoubleUtil
-{
+public class DoubleUtil {
     /**
      *
      */
-    public static long doubleToRawLongBits(double d)
-    {
+    public static long doubleToRawLongBits(double d) {
         return Double.doubleToRawLongBits(d);
     }
 }
diff --git a/core/src/main/java/flex/messaging/util/Hex.java b/core/src/main/java/flex/messaging/util/Hex.java
index a48fac8..689aed0 100644
--- a/core/src/main/java/flex/messaging/util/Hex.java
+++ b/core/src/main/java/flex/messaging/util/Hex.java
@@ -22,41 +22,34 @@
  * general streaming as they don't let you
  * drain less than everything that is currently
  * available.
- * 
- *
  */
-public class Hex
-{
+public class Hex {
     private static final char digits[] =
             {
-                '0', '1', '2', '3', '4', '5', '6', '7',
-                '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+                    '0', '1', '2', '3', '4', '5', '6', '7',
+                    '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
             };
+
     /**
-    *
-    */
-    public static class Decoder
-    {
+     *
+     */
+    public static class Decoder {
         private int filled = 0;
         private byte data[];
         private int work[] = {0, 0};
 
 
-        public Decoder()
-        {
+        public Decoder() {
             data = new byte[256];
         }
 
-        public void decode(String encoded)
-        {
+        public void decode(String encoded) {
 
             int estimate = 1 + encoded.length() / 2;
 
-            if (filled + estimate > data.length)
-            {
+            if (filled + estimate > data.length) {
                 int length = data.length * 2;
-                while (length < filled + estimate)
-                {
+                while (length < filled + estimate) {
                     length *= 2;
                 }
                 byte[] newdata = new byte[length];
@@ -65,8 +58,7 @@
                 data = newdata;
             }
 
-            for (int i = 0; i < encoded.length(); ++i)
-            {
+            for (int i = 0; i < encoded.length(); ++i) {
                 work[0] = Character.digit(encoded.charAt(i), 16);
                 i++;
                 work[1] = Character.digit(encoded.charAt(i), 16);
@@ -74,69 +66,58 @@
             }
         }
 
-        public byte[] drain()
-        {
+        public byte[] drain() {
             byte[] r = new byte[filled];
             System.arraycopy(data, 0, r, 0, filled);
             filled = 0;
             return r;
         }
 
-        public byte[] flush() throws IllegalStateException
-        {
+        public byte[] flush() throws IllegalStateException {
             return drain();
         }
 
-        public void reset()
-        {
+        public void reset() {
             filled = 0;
         }
 
     }
 
     /**
-    *
-    */
-    public static class Encoder
-    {
+     *
+     */
+    public static class Encoder {
         private StringBuffer output;
 
-        public Encoder(int size)
-        {
+        public Encoder(int size) {
             output = new StringBuffer(size * 2);
         }
 
-        private void encodeBlock(byte work)
-        {
+        private void encodeBlock(byte work) {
             output.append(digits[(work & 0xF0) >>> 4]);
             output.append(digits[(work & 0x0F)]);
         }
 
-        public void encode(byte[] data)
-        {
+        public void encode(byte[] data) {
             encode(data, 0, data.length);
         }
 
-        public void encode(byte[] data, int offset, int length)
-        {
+        public void encode(byte[] data, int offset, int length) {
             int plainIndex = offset;
 
-            while (plainIndex < (offset + length))
-            {
+            while (plainIndex < (offset + length)) {
                 encodeBlock(data[plainIndex]);
                 plainIndex++;
             }
         }
 
-        public String drain()
-        {
+        public String drain() {
             String r = output.toString();
             output.setLength(0);
             return r;
         }
 
-        public String flush()
-        {
+        public String flush() {
             return drain();
         }
     }
diff --git a/core/src/main/java/flex/messaging/util/MethodKey.java b/core/src/main/java/flex/messaging/util/MethodKey.java
index d2eb7dc..6fff1d3 100644
--- a/core/src/main/java/flex/messaging/util/MethodKey.java
+++ b/core/src/main/java/flex/messaging/util/MethodKey.java
@@ -19,62 +19,55 @@
 import java.util.Arrays;
 
 /**
- * Utility class used as a key into collections of Remote Object methods.  The 
+ * Utility class used as a key into collections of Remote Object methods.  The
  * key consists of the Remote Object class containing this method, the method name,
  * and the classes representing the parameters in the signature of this method.
- *
- *
  */
-public class MethodKey
-{
+public class MethodKey {
     private Class enclosingClass;
     private String methodName;
     private Class[] parameterTypes;
-        
+
     /**
      * Constructor.
-     * 
+     *
      * @param enclosingClass remote Ooject class containing this method
-     * @param methodName method name
+     * @param methodName     method name
      * @param parameterTypes classes representing the parameters in the signature of this method
      */
-    public MethodKey(Class enclosingClass, String methodName, Class[] parameterTypes)
-    {
+    public MethodKey(Class enclosingClass, String methodName, Class[] parameterTypes) {
         this.enclosingClass = enclosingClass;
         this.methodName = methodName;
         this.parameterTypes = parameterTypes;
     }
 
-    /** {@inheritDoc} */
-    public boolean equals(Object object)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean equals(Object object) {
         boolean result;
-        if (this == object) 
-        {
+        if (this == object) {
             result = true;
-        }
-        else if (object instanceof MethodKey)
-        {
+        } else if (object instanceof MethodKey) {
             MethodKey other = (MethodKey) object;
-            result = 
-                other.methodName.equals(this.methodName) &&
-                other.parameterTypes.length == this.parameterTypes.length &&
-                other.enclosingClass == this.enclosingClass &&
-                Arrays.equals(other.parameterTypes, this.parameterTypes);
-        }
-        else
-        {
+            result =
+                    other.methodName.equals(this.methodName) &&
+                            other.parameterTypes.length == this.parameterTypes.length &&
+                            other.enclosingClass == this.enclosingClass &&
+                            Arrays.equals(other.parameterTypes, this.parameterTypes);
+        } else {
             result = false;
         }
         return result;
     }
 
-    /** {@inheritDoc} */
-    public int hashCode()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public int hashCode() {
         // Don't consider parameter types in hashcode to speed up
         // calculation.
         return enclosingClass.hashCode() * 10003 +
-            methodName.hashCode();
+                methodName.hashCode();
     }
 }
diff --git a/core/src/main/java/flex/messaging/util/MethodMatcher.java b/core/src/main/java/flex/messaging/util/MethodMatcher.java
index 6430a30..1db25c8 100644
--- a/core/src/main/java/flex/messaging/util/MethodMatcher.java
+++ b/core/src/main/java/flex/messaging/util/MethodMatcher.java
@@ -33,11 +33,8 @@
  * there isn't a great guarantee for which method will be selected
  * when several overloaded methods match very closely through the use
  * of various combinations of generic types.
- *
- *
  */
-public class MethodMatcher
-{
+public class MethodMatcher {
     private final Map<MethodKey, Method> methodCache = new HashMap<MethodKey, Method>();
     private static final int ARGUMENT_CONVERSION_ERROR = 10006;
     private static final int CANNOT_INVOKE_METHOD = 10007;
@@ -45,8 +42,7 @@
     /**
      * Default constructor.
      */
-    public MethodMatcher()
-    {
+    public MethodMatcher() {
     }
 
     /**
@@ -54,13 +50,12 @@
      * into account the supplied parameters when evaluating overloaded
      * method signatures.
      *
-     * @param c The class.
+     * @param c          The class.
      * @param methodName Desired method to search for
      * @param parameters Required to distinguish between overloaded methods of the same name
      * @return The best-match <tt>Method</tt>.
      */
-    public Method getMethod(Class c, String methodName, List parameters)
-    {
+    public Method getMethod(Class c, String methodName, List parameters) {
         // Keep track of the best method match found
         Match bestMatch = new Match(methodName);
 
@@ -71,41 +66,32 @@
         MethodKey methodKey = new MethodKey(c, methodName, suppliedParamTypes);
 
         Method method = null;
-        if (methodCache.containsKey(methodKey))
-        {
+        if (methodCache.containsKey(methodKey)) {
             method = methodCache.get(methodKey);
 
             String thisMethodName = method.getName();
             bestMatch.matchedMethodName = thisMethodName;
-        }
-        else
-        {
+        } else {
             try // First, try an exact match.
             {
                 method = c.getMethod(methodName, suppliedParamTypes);
-                synchronized(methodCache)
-                {
+                synchronized (methodCache) {
                     Method method2 = methodCache.get(methodKey);
                     if (method2 == null)
                         methodCache.put(methodKey, method);
                     else
                         method = method2;
                 }
-            }
-            catch (SecurityException e)
-            {
+            } catch (SecurityException e) {
                 // NOWARN
-            }
-            catch (NoSuchMethodException e)
-            {
+            } catch (NoSuchMethodException e) {
                 // NOWARN
             }
 
             if (method == null) // Otherwise, search the long way.
             {
                 Method[] methods = c.getMethods();
-                for (Method thisMethod : c.getMethods())
-                {
+                for (Method thisMethod : c.getMethods()) {
                     String thisMethodName = thisMethod.getName();
 
                     // FIXME: Do we want to do this case-insensitively in Flex 2.0?
@@ -146,11 +132,9 @@
 
                     // If all types were compatible, we have a match.
                     if (currentMatch.matchedParamCount == desiredParamTypes.length
-                            && bestMatch == currentMatch)
-                    {
+                            && bestMatch == currentMatch) {
                         method = thisMethod;
-                        synchronized(methodCache)
-                        {
+                        synchronized (methodCache) {
                             Method method2 = methodCache.get(methodKey);
                             if (method2 == null || method2 != method)
                                 methodCache.put(methodKey, method);
@@ -165,12 +149,9 @@
             }
         }
 
-        if (method == null)
-        {
+        if (method == null) {
             methodNotFound(methodName, suppliedParamTypes, bestMatch);
-        }
-        else if (bestMatch.paramTypeConversionFailure != null)
-        {
+        } else if (bestMatch.paramTypeConversionFailure != null) {
             //Error occurred while attempting to convert an input argument's type.
             MessageException me = new MessageException();
             me.setMessage(ARGUMENT_CONVERSION_ERROR);
@@ -193,13 +174,12 @@
      * of the progress of the conversion to allow callers to gauge the success of the conversion.
      * This is important for ranking overloaded-methods and debugging purposes.
      *
-     * @param parameters actual parameters for an invocation
+     * @param parameters        actual parameters for an invocation
      * @param desiredParamTypes classes in the signature of a potential match for the invocation
-     * @param currentMatch the currently best known match
-     * @param convert determines whether the actual conversion should take place.
+     * @param currentMatch      the currently best known match
+     * @param convert           determines whether the actual conversion should take place.
      */
-    public static void convertParams(List parameters, Class[] desiredParamTypes, Match currentMatch, boolean convert)
-    {
+    public static void convertParams(List parameters, Class[] desiredParamTypes, Match currentMatch, boolean convert) {
         int matchCount = 0;
         int exactMatchCount = 0;
 
@@ -208,41 +188,30 @@
 
         TypeMarshaller marshaller = TypeMarshallingContext.getTypeMarshaller();
 
-        for (int i = 0; i < desiredParamTypes.length; i++)
-        {
+        for (int i = 0; i < desiredParamTypes.length; i++) {
             Object param = parameters.get(i);
 
             // Consider null param to match
-            if (param != null)
-            {
+            if (param != null) {
                 Object obj = null;
                 Class objClass = null;
 
-                if (marshaller != null)
-                {
-                    try
-                    {
+                if (marshaller != null) {
+                    try {
                         obj = marshaller.convert(param, desiredParamTypes[i]);
-                    }
-                    catch (MessageException ex)
-                    {
+                    } catch (MessageException ex) {
                         currentMatch.paramTypeConversionFailure = ex;
                         break;
-                    }
-                    catch (ClassCastException ex)
-                    {
+                    } catch (ClassCastException ex) {
                         currentMatch.paramTypeConversionFailure = ex;
                         break;
                     }
                     // We need to catch the exception here as the conversion of parameter types could fail
-                    catch(Exception e)
-                    {
+                    catch (Exception e) {
                         currentMatch.paramTypeConversionFailure = e;
                         break;
                     }
-                }
-                else
-                {
+                } else {
                     obj = param;
                 }
 
@@ -251,8 +220,7 @@
                 // Things match if we now have an object which is assignable from the
                 // method param class type or if we have an Object which corresponds to
                 // a primitive
-                if (objClass != null && isAssignableFrom(desiredParamTypes[i], objClass))
-                {
+                if (objClass != null && isAssignableFrom(desiredParamTypes[i], objClass)) {
                     // See if there's an exact match before parameter is converted.
                     if (isAssignableFrom(desiredParamTypes[i], param.getClass()))
                         exactMatchCount++;
@@ -261,14 +229,10 @@
                         parameters.set(i, obj);
 
                     matchCount++;
-                }
-                else
-                {
+                } else {
                     break;
                 }
-            }
-            else
-            {
+            } else {
                 matchCount++;
             }
         }
@@ -277,17 +241,16 @@
         currentMatch.exactMatchedParamCount = exactMatchCount;
     }
 
-    private static boolean isAssignableFrom(Class first, Class second)
-    {
+    private static boolean isAssignableFrom(Class first, Class second) {
         return (first.isAssignableFrom(second)) ||
-            (first == Integer.TYPE && Integer.class.isAssignableFrom(second)) ||
-            (first == Double.TYPE && Double.class.isAssignableFrom(second)) ||
-            (first == Long.TYPE && Long.class.isAssignableFrom(second)) ||
-            (first == Boolean.TYPE && Boolean.class.isAssignableFrom(second)) ||
-            (first == Character.TYPE && Character.class.isAssignableFrom(second)) ||
-            (first == Float.TYPE && Float.class.isAssignableFrom(second)) ||
-            (first == Short.TYPE && Short.class.isAssignableFrom(second)) ||
-            (first == Byte.TYPE && Byte.class.isAssignableFrom(second));
+                (first == Integer.TYPE && Integer.class.isAssignableFrom(second)) ||
+                (first == Double.TYPE && Double.class.isAssignableFrom(second)) ||
+                (first == Long.TYPE && Long.class.isAssignableFrom(second)) ||
+                (first == Boolean.TYPE && Boolean.class.isAssignableFrom(second)) ||
+                (first == Character.TYPE && Character.class.isAssignableFrom(second)) ||
+                (first == Float.TYPE && Float.class.isAssignableFrom(second)) ||
+                (first == Short.TYPE && Short.class.isAssignableFrom(second)) ||
+                (first == Byte.TYPE && Byte.class.isAssignableFrom(second));
     }
 
     /**
@@ -298,13 +261,10 @@
      *
      * @param parameters - A list of supplied parameters.
      * @return An array of <tt>Class</tt> instances indicating the class of each corresponding parameter.
-     *
      */
-    public static Class[] paramTypes(List parameters)
-    {
+    public static Class[] paramTypes(List parameters) {
         Class[] paramTypes = new Class[parameters.size()];
-        for (int i = 0; i < paramTypes.length; i++)
-        {
+        for (int i = 0; i < paramTypes.length; i++) {
             Object p = parameters.get(i);
             paramTypes[i] = p == null ? Object.class : p.getClass();
         }
@@ -319,8 +279,7 @@
      * @param suppliedParamTypes the types of parameters supplied for the search
      * @param bestMatch          the best match found during the search
      */
-    public static void methodNotFound(String methodName, Class[] suppliedParamTypes, Match bestMatch)
-    {
+    public static void methodNotFound(String methodName, Class[] suppliedParamTypes, Match bestMatch) {
         // Set default error message...
         // Cannot invoke method '{methodName}'.
         int errorCode = CANNOT_INVOKE_METHOD;
@@ -329,8 +288,7 @@
         // Method '{methodName}' not found.
         Object[] errorDetailParams = new Object[]{methodName};
 
-        if (bestMatch.matchedMethodName != null)
-        {
+        if (bestMatch.matchedMethodName != null) {
             // Cannot invoke method '{bestMatch.matchedMethodName}'.
             errorCode = CANNOT_INVOKE_METHOD;
             errorParams = new Object[]{bestMatch.matchedMethodName};
@@ -338,50 +296,38 @@
             int suppliedParamCount = suppliedParamTypes.length;
             int expectedParamCount = bestMatch.methodParamTypes != null ? bestMatch.methodParamTypes.length : 0;
 
-            if (suppliedParamCount != expectedParamCount)
-            {
+            if (suppliedParamCount != expectedParamCount) {
                 // {suppliedParamCount} arguments were sent but {expectedParamCount} were expected.
                 errorDetailVariant = "1";
                 errorDetailParams = new Object[]{new Integer(suppliedParamCount), new Integer(expectedParamCount)};
 
-            }
-            else
-            {
+            } else {
                 String suppliedTypes = bestMatch.listTypes(suppliedParamTypes);
                 String convertedTypes = bestMatch.listConvertedTypes();
                 String expectedTypes = bestMatch.listExpectedTypes();
 
-                if (expectedTypes != null)
-                {
-                    if (suppliedTypes != null)
-                    {
-                        if (convertedTypes != null)
-                        {
+                if (expectedTypes != null) {
+                    if (suppliedTypes != null) {
+                        if (convertedTypes != null) {
                             // The expected argument types are ({expectedTypes})
                             // but the supplied types were ({suppliedTypes})
                             // and converted to ({convertedTypes}).
                             errorDetailVariant = "2";
                             errorDetailParams = new Object[]{expectedTypes, suppliedTypes, convertedTypes};
-                        }
-                        else
-                        {
+                        } else {
                             // The expected argument types are ({expectedTypes})
                             // but the supplied types were ({suppliedTypes})
                             // with none successfully converted.
                             errorDetailVariant = "3";
                             errorDetailParams = new Object[]{expectedTypes, suppliedTypes};
                         }
-                    }
-                    else
-                    {
+                    } else {
                         // The expected argument types are ({expectedTypes})
                         // but no arguments were provided.
                         errorDetailVariant = "4";
                         errorDetailParams = new Object[]{expectedTypes};
                     }
-                }
-                else
-                {
+                } else {
                     // No arguments were expected but the following types were supplied (suppliedTypes)
                     errorDetailVariant = "5";
                     errorDetailParams = new Object[]{suppliedTypes};
@@ -405,45 +351,43 @@
      * A utility class to help rank methods in the search
      * for a best match, given a name and collection of
      * input parameters.
-     *
      */
-    public static class Match
-    {
+    public static class Match {
         /**
          * Constructor.
+         *
          * @param name the name of the method to match
          */
-        public Match(String name)
-        {
+        public Match(String name) {
             this.methodName = name;
         }
 
         /**
          * Returns true if desired and found method names match.
+         *
          * @return true if desired and found method names match
          */
-        public boolean matchedExactlyByName()
-        {
-            return matchedMethodName != null? matchedMethodName.equals(methodName) : false;
+        public boolean matchedExactlyByName() {
+            return matchedMethodName != null ? matchedMethodName.equals(methodName) : false;
         }
 
         /**
          * Returns true if desired and found method names match only when case is ignored.
+         *
          * @return true if desired and found method names match only when case is ignored
          */
-        public boolean matchedLooselyByName()
-        {
-            return matchedMethodName != null?
+        public boolean matchedLooselyByName() {
+            return matchedMethodName != null ?
                     (!matchedExactlyByName() && matchedMethodName.equalsIgnoreCase(methodName)) : false;
         }
 
 
         /**
          * Lists the classes in the signature of the method matched.
+         *
          * @return the classes in the signature of the method matched
          */
-        public String listExpectedTypes()
-        {
+        public String listExpectedTypes() {
             return listTypes(methodParamTypes);
         }
 
@@ -455,8 +399,7 @@
          * @return the classes corresponding to actual invocation parameters once they have been
          * converted as best they could to match the classes in the invoked method's signature
          */
-        public String listConvertedTypes()
-        {
+        public String listConvertedTypes() {
             return listTypes(convertedSuppliedTypes);
         }
 
@@ -467,34 +410,26 @@
          * @param types an array of types whose names are to be listed
          * @return a string representation of the class names in the array of types
          */
-        public String listTypes(Class[] types)
-        {
+        public String listTypes(Class[] types) {
             if (types == null || types.length == 0)
                 return null;
 
             StringBuffer sb = new StringBuffer();
 
-            for (int i = 0; i < types.length; i++)
-            {
+            for (int i = 0; i < types.length; i++) {
                 if (i > 0)
                     sb.append(", ");
 
                 Class c = types[i];
 
-                if (c != null)
-                {
-                    if (c.isArray())
-                    {
+                if (c != null) {
+                    if (c.isArray()) {
                         c = c.getComponentType();
                         sb.append(c.getName()).append("[]");
-                    }
-                    else
-                    {
+                    } else {
                         sb.append(c.getName());
                     }
-                }
-                else
-                {
+                } else {
                     sb.append("null");
                 }
             }
diff --git a/core/src/main/java/flex/messaging/util/RedeployManager.java b/core/src/main/java/flex/messaging/util/RedeployManager.java
index b14c812..71cc743 100644
--- a/core/src/main/java/flex/messaging/util/RedeployManager.java
+++ b/core/src/main/java/flex/messaging/util/RedeployManager.java
@@ -30,11 +30,8 @@
 
 /**
  * This class watches for changes on files and forces a re-deploy by touching the specified files.
- * 
- *
  */
-public class RedeployManager implements FlexComponent
-{
+public class RedeployManager implements FlexComponent {
     private boolean enabled;
     private long watchInterval;
     private List watches;
@@ -42,37 +39,35 @@
 
     private ScheduledExecutorService redeployService;
     private boolean started;
-    
+
     //--------------------------------------------------------------------------
     //
     // Constructor
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Constructs a new <code>RedeployManager</code> with default settings.
      */
-    public RedeployManager()
-    {
+    public RedeployManager() {
         this(null);
     }
 
     /**
      * Constructs a new <code>RedeployManager</code> with the supplied thread
      * factory.
-     * 
+     *
      * @param tf Thread factory to use for the scheduled service used.
      */
-    public RedeployManager(ThreadFactory tf)
-    {
+    public RedeployManager(ThreadFactory tf) {
         if (tf == null)
             tf = new MonitorThreadFactory();
 
-        enabled = false;        
+        enabled = false;
         touches = new ArrayList();
         watchInterval = 20;
         watches = new ArrayList();
-        
+
         redeployService = Executors.newSingleThreadScheduledExecutor(tf);
     }
 
@@ -81,175 +76,156 @@
     // Initialize, validate, start, and stop methods. 
     //
     //--------------------------------------------------------------------------
-   
+
     /**
      * Implements FlexComponents.initialize.
-     * This is no-op for RedeployManager as it does not have an id and all 
-     * its properties are directly settable. 
+     * This is no-op for RedeployManager as it does not have an id and all
+     * its properties are directly settable.
      */
-    public void initialize(String id, ConfigMap properties)
-    {       
+    public void initialize(String id, ConfigMap properties) {
         // No-op
     }
-    
+
     /**
      * Implements FlexComponent.start.
-     * Starts the <code>RedeployManager</code>. 
+     * Starts the <code>RedeployManager</code>.
      */
-    public void start()
-    {      
-        if (!started && enabled)
-        {
+    public void start() {
+        if (!started && enabled) {
             redeployService.schedule(new RedeployTask(), 20 * 1000, TimeUnit.MILLISECONDS);
             started = true;
         }
     }
 
     /**
-     * Stops the <code>RedeployManager</code>. 
+     * Stops the <code>RedeployManager</code>.
      */
-    public void stop()
-    {
-        if (started && enabled)
-        {
+    public void stop() {
+        if (started && enabled) {
             started = false;
         }
         redeployService.shutdownNow();
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Public Methods
     //         
     //--------------------------------------------------------------------------
-    
+
     /**
      * Returns whether redeploy is enabled or not.
-     * 
-     * @return <code>true</code> if redeploy is enabled; otherwise <code>false</code>. 
+     *
+     * @return <code>true</code> if redeploy is enabled; otherwise <code>false</code>.
      */
-    public boolean isEnabled()
-    {
+    public boolean isEnabled() {
         return enabled;
     }
-    
+
     /**
      * Sets whether redeploy is enabled or not.
-     * 
+     *
      * @param enabled Whether redeploy is enabled or not.
      */
-    public void setEnabled(boolean enabled)
-    {
-        this.enabled = enabled;        
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
     }
 
     /**
      * Implements FlexComponent.isStarted.
      * Returns whether the RedeployManager is started or not.
-     * 
+     *
      * @return <code>true</code> if the component is started; otherwise <code>false</code>.
      */
-    public boolean isStarted()
-    {
+    public boolean isStarted() {
         return started;
     }
-    
+
     /**
      * Returns the watch interval.
-     * 
+     *
      * @return The watch interval.
      */
-    public long getWatchInterval()
-    {
+    public long getWatchInterval() {
         return watchInterval;
     }
 
     /**
      * Sets the watch interval.
-     * 
+     *
      * @param watchInterval The watch interval to set.
      */
-    public void setWatchInterval(long watchInterval)
-    {
+    public void setWatchInterval(long watchInterval) {
         this.watchInterval = watchInterval;
     }
 
     /**
      * Returns the list of watch files.
-     * 
+     *
      * @return The list of watch files.
      */
-    public List getWatchFiles()
-    {
+    public List getWatchFiles() {
         return watches;
     }
 
     /**
-     * Adds a watch file. Note that the watch file set with this method should 
+     * Adds a watch file. Note that the watch file set with this method should
      * not contain the context.root token.
-     * 
+     *
      * @param watch The watch file to add.
      */
-    public void addWatchFile(String watch)
-    {       
+    public void addWatchFile(String watch) {
         watches.add(watch);
     }
-    
+
     /**
-     * Sets the list of watch files. Note that watch files set with this method 
+     * Sets the list of watch files. Note that watch files set with this method
      * should not contain contain the context.root token.
-     * 
+     *
      * @param watches The list of watch files to set.
      */
-    public void setWatchFiles(List watches)
-    {
+    public void setWatchFiles(List watches) {
         this.watches = watches;
     }
-    
+
     /**
      * Returns the list of touch files.
-     * 
+     *
      * @return The list of touch files.
      */
-    public List getTouchFiles()
-    {
+    public List getTouchFiles() {
         return touches;
     }
 
     /**
      * Adds a touch file. Note that the touch file set with this method should
      * not contain the context.root token.
-     * 
+     *
      * @param touch The touch file to add.
      */
-    public void addTouchFile(String touch)
-    {
+    public void addTouchFile(String touch) {
         touches.add(touch);
     }
-    
+
     /**
      * Sets the list of touch files. Note that touch files set with this method
      * should not contain the context.root token.
-     * 
+     *
      * @param touches The list of touch files to set.
      */
-    public void setTouchFiles(List touches)
-    {
+    public void setTouchFiles(List touches) {
         this.touches = touches;
     }
-    
+
     /**
      * Forces the redeployment.
      */
-    public void forceRedeploy()
-    {
+    public void forceRedeploy() {
         Iterator iter = touches.iterator();
-        while (iter.hasNext())
-        {
-            String filename = (String)iter.next();
+        while (iter.hasNext()) {
+            String filename = (String) iter.next();
             File file = new File(filename);
-            if (file.exists() && (file.isFile() || file.isDirectory()))
-            {
+            if (file.exists() && (file.isFile() || file.isDirectory())) {
                 file.setLastModified(System.currentTimeMillis());
             }
         }
@@ -260,11 +236,9 @@
     // Nested Classes
     //
     //--------------------------------------------------------------------------
-    
-    class MonitorThreadFactory implements ThreadFactory
-    {
-        public Thread newThread(Runnable r)
-        {
+
+    class MonitorThreadFactory implements ThreadFactory {
+        public Thread newThread(Runnable r) {
             Thread t = new Thread(r);
             t.setDaemon(true);
             t.setName("RedeployManager");
@@ -272,17 +246,14 @@
         }
     }
 
-    class RedeployTask implements Runnable
-    {
-        public void run()
-        {
+    class RedeployTask implements Runnable {
+        public void run() {
             boolean redeploy = false;
 
             // check if any of the redeploy watches have changed
             Iterator iter = watches.iterator();
-            while (iter.hasNext() && !redeploy)
-            {
-                WatchedObject watched = (WatchedObject)iter.next();
+            while (iter.hasNext() && !redeploy) {
+                WatchedObject watched = (WatchedObject) iter.next();
                 if (!watched.isUptodate())
                     redeploy = true;
             }
diff --git a/core/src/main/java/flex/messaging/util/SettingsReplaceUtil.java b/core/src/main/java/flex/messaging/util/SettingsReplaceUtil.java
index 5edc4e0..177ca3f 100644
--- a/core/src/main/java/flex/messaging/util/SettingsReplaceUtil.java
+++ b/core/src/main/java/flex/messaging/util/SettingsReplaceUtil.java
@@ -31,11 +31,8 @@
 /**
  * Methods for replacing tokens in config files
  * {context.root}, {context-root}, {server.name}, {server-name}, {server.port}, {server-port}.
- * 
- *
  */
-public class SettingsReplaceUtil
-{
+public class SettingsReplaceUtil {
     private static final int TOKEN_NOT_SUPPORTED = 10129;
     private static final int TOKEN_NOT_SUPPORTED_ANY = 10130;
     private static final int PARSE_ERROR_DYNAMIC_URL = 10131;
@@ -50,45 +47,35 @@
 
     /**
      * Replace {context.root} in the url string.
-     * @param url the url string
+     *
+     * @param url         the url string
      * @param contextPath the context path
      * @return String the url string after replacement
      */
-    public static String replaceContextPath(String url, String contextPath)
-    {
+    public static String replaceContextPath(String url, String contextPath) {
         String token = CONTEXT_PATH_TOKEN;
         int contextIndex = url.indexOf(CONTEXT_PATH_ALT_TOKEN);
-        if (contextIndex != -1)
-        {
+        if (contextIndex != -1) {
             token = CONTEXT_PATH_ALT_TOKEN;
             url = StringUtils.substitute(url, CONTEXT_PATH_ALT_TOKEN, CONTEXT_PATH_TOKEN);
         }
         contextIndex = url.indexOf(CONTEXT_PATH_TOKEN);
 
-        if ((contextPath == null) && (contextIndex != -1))
-        {
+        if ((contextPath == null) && (contextIndex != -1)) {
             MessageException me = new MessageException();
             if (FlexContext.getHttpRequest() == null)
-                me.setMessage(TOKEN_NOT_SUPPORTED, "0", new Object[] {token});
+                me.setMessage(TOKEN_NOT_SUPPORTED, "0", new Object[]{token});
             else
-                me.setMessage(TOKEN_NOT_SUPPORTED, new Object[] {token});
+                me.setMessage(TOKEN_NOT_SUPPORTED, new Object[]{token});
             throw me;
-        }
-        else if (contextPath != null)
-        {
-            if (contextIndex == 0)
-            {
+        } else if (contextPath != null) {
+            if (contextIndex == 0) {
                 url = contextPath + url.substring(CONTEXT_PATH_TOKEN.length());
-            }
-            else if (contextIndex > 0)
-            {
+            } else if (contextIndex > 0) {
                 // Avoid adding //contextPath to URLs that have a /{context.root} pattern
-                if (url.indexOf(SLASH_CONTEXT_PATH_TOKEN) != -1)
-                {
+                if (url.indexOf(SLASH_CONTEXT_PATH_TOKEN) != -1) {
                     url = StringUtils.substitute(url, SLASH_CONTEXT_PATH_TOKEN, contextPath);
-                }
-                else
-                {
+                } else {
                     url = StringUtils.substitute(url, CONTEXT_PATH_TOKEN, contextPath);
                 }
             }
@@ -98,51 +85,41 @@
     }
 
     public static String replaceAllTokensGivenServerName(String url, String contextPath, String serverName,
-                                                         String serverPort, String serverProtocol)
-    {
-        if (url.startsWith("/"))
-        {
+                                                         String serverPort, String serverProtocol) {
+        if (url.startsWith("/")) {
             url = serverProtocol + "://{server.name}:{server.port}" + url;
         }
         url = SettingsReplaceUtil.replaceContextPath(url, contextPath);
 
         String token = SERVER_NAME_TOKEN;
         int serverNameIndex = url.indexOf(SERVER_NAME_ALT_TOKEN);
-        if (serverNameIndex != -1)
-        {
+        if (serverNameIndex != -1) {
             token = SERVER_NAME_ALT_TOKEN;
             url = StringUtils.substitute(url, SERVER_NAME_ALT_TOKEN, SERVER_NAME_TOKEN);
         }
 
         serverNameIndex = url.indexOf(SERVER_NAME_TOKEN);
-        if ((serverName == null) && (serverNameIndex != -1))
-        {
+        if ((serverName == null) && (serverNameIndex != -1)) {
             MessageException me = new MessageException();
-            me.setMessage(TOKEN_NOT_SUPPORTED, new Object[] {token});
+            me.setMessage(TOKEN_NOT_SUPPORTED, new Object[]{token});
             throw me;
-        }
-        else if ((serverName != null) && (serverNameIndex != -1))
-        {
+        } else if ((serverName != null) && (serverNameIndex != -1)) {
             url = StringUtils.substitute(url, SERVER_NAME_TOKEN, serverName);
         }
 
         token = SERVER_PORT_TOKEN;
         int serverPortIndex = url.indexOf(SERVER_PORT_ALT_TOKEN);
-        if (serverPortIndex != -1)
-        {
+        if (serverPortIndex != -1) {
             token = SERVER_PORT_ALT_TOKEN;
             url = StringUtils.substitute(url, SERVER_PORT_ALT_TOKEN, SERVER_PORT_TOKEN);
         }
 
         serverPortIndex = url.indexOf(SERVER_PORT_TOKEN);
-        if ((serverPort == null) && (serverPortIndex != -1))
-        {
+        if ((serverPort == null) && (serverPortIndex != -1)) {
             MessageException me = new MessageException();
-            me.setMessage(TOKEN_NOT_SUPPORTED, new Object[] {token});
+            me.setMessage(TOKEN_NOT_SUPPORTED, new Object[]{token});
             throw me;
-        }
-        else if ((serverPort != null) && (serverPortIndex != -1))
-        {
+        } else if ((serverPort != null) && (serverPortIndex != -1)) {
             url = StringUtils.substitute(url, SERVER_PORT_TOKEN, serverPort);
         }
 
@@ -151,19 +128,18 @@
 
     /**
      * Replace all tokens in the urls.
-     * @param urls a list of urls
+     *
+     * @param urls        a list of urls
      * @param contextPath the context path
      * @return Set a set of urls after replacement
      */
-    public static Set replaceAllTokensCalculateServerName(List urls, String contextPath)
-    {
+    public static Set replaceAllTokensCalculateServerName(List urls, String contextPath) {
         List contextParsedUrls = new ArrayList(urls.size());
         Set newURLs = new HashSet(urls.size());
 
         // first replace context path
-        for (int i = 0; i < urls.size(); i++)
-        {
-            String url = (String)urls.get(i);
+        for (int i = 0; i < urls.size(); i++) {
+            String url = (String) urls.get(i);
             url = url.toLowerCase().trim();
             url = SettingsReplaceUtil.replaceContextPath(url, contextPath);
             contextParsedUrls.add(url);
@@ -180,146 +156,121 @@
      * Replace {server.name} a horribly complicated way.  This is needed to support relative
      * URLs.  I would like for us to rethink this someday and find a better way to do this
      *
-     * @param urls the list of urls to replace
+     * @param urls    the list of urls to replace
      * @param newURLs the set of new urls
      */
-    public static void replaceServerNameWithLocalHost(List urls, Set newURLs)
-    {
-        for (Iterator iterator = urls.iterator(); iterator.hasNext();)
-        {
+    public static void replaceServerNameWithLocalHost(List urls, Set newURLs) {
+        for (Iterator iterator = urls.iterator(); iterator.hasNext(); ) {
             String url = (String) iterator.next();
             url = url.toLowerCase().trim();
 
             String token = SERVER_PORT_TOKEN;
             int serverPortIndex = url.indexOf(SERVER_PORT_ALT_TOKEN);
-            if (serverPortIndex != -1)
-            {
+            if (serverPortIndex != -1) {
                 token = SERVER_PORT_ALT_TOKEN;
                 url = StringUtils.substitute(url, SERVER_PORT_ALT_TOKEN, SERVER_PORT_TOKEN);
             }
 
             serverPortIndex = url.indexOf(SERVER_PORT_TOKEN);
-            if (serverPortIndex != -1)
-            {
+            if (serverPortIndex != -1) {
                 MessageException me = new MessageException();
-                me.setMessage(TOKEN_NOT_SUPPORTED_ANY, new Object[] {token});
+                me.setMessage(TOKEN_NOT_SUPPORTED_ANY, new Object[]{token});
                 throw me;
             }
 
-            if (url.indexOf(SERVER_NAME_ALT_TOKEN) != 0)
-            {
+            if (url.indexOf(SERVER_NAME_ALT_TOKEN) != 0) {
                 StringUtils.substitute(url, SERVER_NAME_ALT_TOKEN, SERVER_NAME_TOKEN);
             }
 
-            if (url.indexOf(SERVER_NAME_TOKEN) != 0)
-            {
+            if (url.indexOf(SERVER_NAME_TOKEN) != 0) {
 
-                try
-                {
+                try {
                     addLocalServerURL(url, "localhost", newURLs);
                     addLocalServerURL(url, "127.0.0.1", newURLs);
                     addLocalServerURL(url, "[::1]", newURLs); // for IPv6
-                    
-                    InetAddress local  = InetAddress.getLocalHost();
+
+                    InetAddress local = InetAddress.getLocalHost();
                     addInetAddress(local, url, newURLs);
 
                     // if we're using JDK 1.4 or higher, we use NetworkInterface to get the list of hostnames
                     // and IP addresses.
                     Enumeration e = NetworkInterface.getNetworkInterfaces();
-                    while (e.hasMoreElements())
-                    {
-                        NetworkInterface address = (NetworkInterface)e.nextElement();
-                        Enumeration e2 = (Enumeration)address.getInetAddresses();
-                        while (e2.hasMoreElements())
-                        {
+                    while (e.hasMoreElements()) {
+                        NetworkInterface address = (NetworkInterface) e.nextElement();
+                        Enumeration e2 = (Enumeration) address.getInetAddresses();
+                        while (e2.hasMoreElements()) {
                             local = (InetAddress) e2.nextElement();
                             addInetAddress(local, url, newURLs);
                         }
                     }
-                }
-                catch(Exception e)
-                {
+                } catch (Exception e) {
                     MessageException me = new MessageException();
                     me.setMessage(PARSE_ERROR_DYNAMIC_URL);
                     throw me;
                 }
-            }
-            else {
+            } else {
                 addParsedURL(url, newURLs);
             }
         }
     }
 
-    private static void addInetAddress(InetAddress local, String url, Set newURLs) throws Exception
-    {
+    private static void addInetAddress(InetAddress local, String url, Set newURLs) throws Exception {
         String localHostAddress = local.getHostAddress();
-        if (localHostAddress != null)
-        {
+        if (localHostAddress != null) {
             addLocalServerURL(url, localHostAddress, newURLs);
         }
 
         String localHostName = local.getHostName();
-        if (localHostName != null)
-        {
+        if (localHostName != null) {
             addLocalServerURL(url, localHostName, newURLs);
 
             InetAddress[] addrs = InetAddress.getAllByName(localHostName);
-            for (int i = 0; i < addrs.length; i++)
-            {
+            for (int i = 0; i < addrs.length; i++) {
                 InetAddress addr = addrs[i];
                 String hostName = addr.getHostName();
-                if (! hostName.equals(localHostName))
-                {
+                if (!hostName.equals(localHostName)) {
                     addLocalServerURL(url, hostName, newURLs);
                 }
                 String hostAddress = addr.getHostAddress();
-                if (! hostAddress.equals(localHostAddress))
-                {
+                if (!hostAddress.equals(localHostAddress)) {
                     addLocalServerURL(url, hostAddress, newURLs);
                 }
             }
         }
     }
 
-    private static void addLocalServerURL(String url, String sub, Set newURLs)
-    {
+    private static void addLocalServerURL(String url, String sub, Set newURLs) {
         String toSub = null;
-        
+
         // if ipv6, then add square brackets
-        if (sub.indexOf(":") != -1)
-        {
+        if (sub.indexOf(":") != -1) {
             StringBuffer ipv6Sub = new StringBuffer("[");
             ipv6Sub.append(sub);
             ipv6Sub.append("]");
             toSub = ipv6Sub.toString();
-        }
-        else
-        {
+        } else {
             toSub = sub;
         }
-            
+
         String newUrl = StringUtils.substitute(url, SERVER_NAME_TOKEN, toSub);
         addParsedURL(newUrl, newURLs);
     }
 
-    private static void addParsedURL(String url, Set newURLs)
-    {
-        if (! newURLs.contains(url))
-        {
+    private static void addParsedURL(String url, Set newURLs) {
+        if (!newURLs.contains(url)) {
             newURLs.add(updateIPv6(url));
         }
     }
-    
+
     /**
      * Update IPv6 IP address.
+     *
      * @param src the source IP address string
      * @return String the updated IP address string
      */
-    public static String updateIPv6(String src)
-    {
+    public static String updateIPv6(String src) {
         // if the ip address has "[" and "]" then it's IPv6, check that it's long form as well
-        if ((src != null) && (src.indexOf('[') != -1) && (src.indexOf(']') != -1))
-        {
+        if ((src != null) && (src.indexOf('[') != -1) && (src.indexOf(']') != -1)) {
             // then, it's IPv6 and remove the square brackets and update to long form if required    
             int start = src.indexOf('[');
             int end = src.indexOf(']');
@@ -327,43 +278,37 @@
             StringBuffer updated = new StringBuffer(src.substring(0, start + 1));
             updated.append(updateToLongForm(src.substring(start + 1, end)));
             updated.append(src.substring(end));
-            
+
             return updated.toString();
-        }
-        else
-        {
+        } else {
             return src;
         }
     }
 
-    protected static String updateToLongForm(String src)
-    {
+    protected static String updateToLongForm(String src) {
         // Let's see if the short form is in use.
         int numberOfTokens = 0;
         int doubleColonIndex = src.indexOf("::", 0);
-        if (doubleColonIndex != -1)
-        {
+        if (doubleColonIndex != -1) {
             String[] hexTokens = src.split("\\:");
-            for (int i = 0; i < hexTokens.length; i++) 
-            {
+            for (int i = 0; i < hexTokens.length; i++) {
                 if (!hexTokens[i].equals(""))
                     numberOfTokens++;
-            }               
+            }
 
             // Replace missing zeros
             int numberOfMissingZeros = 8 - numberOfTokens;
-            if (numberOfMissingZeros > 0)
-            {
+            if (numberOfMissingZeros > 0) {
                 String replacement = "";
                 if (!src.startsWith("::"))
                     replacement = ":";
                 while (numberOfMissingZeros-- > 0)
-                    replacement += "0:";                
+                    replacement += "0:";
                 src = src.replaceFirst("\\::", replacement);
             }
         }
 
         return src;
     }
-    
+
 }
diff --git a/core/src/main/java/flex/messaging/util/TimeoutAbstractObject.java b/core/src/main/java/flex/messaging/util/TimeoutAbstractObject.java
index 1314ef0..bc3661a 100644
--- a/core/src/main/java/flex/messaging/util/TimeoutAbstractObject.java
+++ b/core/src/main/java/flex/messaging/util/TimeoutAbstractObject.java
@@ -22,11 +22,8 @@
  * This class defines the default implementation of TimeoutCapable,
  * providing the default behavior for an object that is capable of timing
  * out where that time out mechanism is managed by TimeoutManager.
- *
- *
  */
-public abstract class TimeoutAbstractObject implements TimeoutCapable
-{
+public abstract class TimeoutAbstractObject implements TimeoutCapable {
     private long lastUse;
     private volatile boolean timeoutCanceled;
     private TimeoutManager timeoutManager;
@@ -35,9 +32,10 @@
     private long timeoutPeriod;
     private final Object lock = new Object();
 
-    /** {@inheritDoc} */
-    public void cancelTimeout()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public void cancelTimeout() {
         if (timeoutCanceled)
             return;
 
@@ -45,31 +43,29 @@
         if ((timeoutManager != null) && (timeoutTask != null) && (timeoutFuture != null))
             purged = timeoutManager.unscheduleTimeout(this);
 
-        if (!purged && (timeoutFuture != null))
-        {
+        if (!purged && (timeoutFuture != null)) {
             timeoutFuture.cancel(false);
         }
 
         timeoutCanceled = true;
     }
 
-    /** {@inheritDoc} */
-    public long getLastUse()
-    {
-        synchronized (lock)
-        {
+    /**
+     * {@inheritDoc}
+     */
+    public long getLastUse() {
+        synchronized (lock) {
             return lastUse;
         }
     }
 
     /**
      * Updates the time this object was last used.
+     *
      * @param lastUse time this object was last used
      */
-    public void setLastUse(long lastUse)
-    {
-        synchronized (lock)
-        {
+    public void setLastUse(long lastUse) {
+        synchronized (lock) {
             this.lastUse = lastUse;
         }
     }
@@ -77,100 +73,92 @@
     /**
      * Updates the time this object was last used to be the current time.
      */
-    public void updateLastUse()
-    {
-        synchronized (lock)
-        {
+    public void updateLastUse() {
+        synchronized (lock) {
             this.lastUse = System.currentTimeMillis();
         }
     }
 
     /**
      * Returns manager responsible for this object.
+     *
      * @return manager responsible for this object
      */
-    public TimeoutManager getTimeoutManager()
-    {
-        synchronized (lock)
-        {
+    public TimeoutManager getTimeoutManager() {
+        synchronized (lock) {
             return timeoutManager;
         }
     }
 
     /**
      * Sets the manager responsible for this object.
+     *
      * @param timeoutManager manager responsible for this object
      */
-    public void setTimeoutManager(TimeoutManager timeoutManager)
-    {
-        synchronized (lock)
-        {
+    public void setTimeoutManager(TimeoutManager timeoutManager) {
+        synchronized (lock) {
             this.timeoutManager = timeoutManager;
         }
     }
 
     /**
      * Returns the runnable task that will be executed once this object times out.
+     *
      * @return the runnable task that will be executed once this object times out
      */
-    public Runnable getTimeoutTask()
-    {
-        synchronized (lock)
-        {
+    public Runnable getTimeoutTask() {
+        synchronized (lock) {
             return timeoutTask;
         }
     }
 
     /**
      * Sets the runnable task that will be executed once this object times out.
+     *
      * @param timeoutTask the runnable task that will be executed once this object times out
      */
-    public void setTimeoutTask(Runnable timeoutTask)
-    {
-        synchronized (lock)
-        {
+    public void setTimeoutTask(Runnable timeoutTask) {
+        synchronized (lock) {
             this.timeoutTask = timeoutTask;
         }
     }
 
     /**
      * Return the object encapsulating result of the execution of this object once it has timed out.
+     *
      * @return the object encapsulating result of the execution of this object once it has timed out
      */
-    public Future getTimeoutFuture()
-    {
-        synchronized (lock)
-        {
+    public Future getTimeoutFuture() {
+        synchronized (lock) {
             return timeoutFuture;
         }
     }
 
-    /** {@inheritDoc} */
-    public void setTimeoutFuture(Future timeoutFuture)
-    {
-        synchronized (lock)
-        {
+    /**
+     * {@inheritDoc}
+     */
+    public void setTimeoutFuture(Future timeoutFuture) {
+        synchronized (lock) {
             this.timeoutFuture = timeoutFuture;
         }
     }
 
-    /** {@inheritDoc} */
-    public long getTimeoutPeriod()
-    {
-        synchronized (lock)
-        {
+    /**
+     * {@inheritDoc}
+     */
+    public long getTimeoutPeriod() {
+        synchronized (lock) {
             return timeoutPeriod;
         }
     }
 
     /**
      * Set the time to be elapsed before this object times out and its associated task gets executed.
+     *
      * @param timeoutPeriod the time to be elapsed before this object times out and its associated task gets executed
      */
-    public void setTimeoutPeriod(long timeoutPeriod)
-    {
-        synchronized (lock)
-        {
+    public void setTimeoutPeriod(long timeoutPeriod) {
+        synchronized (lock) {
             this.timeoutPeriod = timeoutPeriod;
         }
     }
diff --git a/core/src/main/java/flex/messaging/util/TimeoutCapable.java b/core/src/main/java/flex/messaging/util/TimeoutCapable.java
index e6226ae..c640d3e 100644
--- a/core/src/main/java/flex/messaging/util/TimeoutCapable.java
+++ b/core/src/main/java/flex/messaging/util/TimeoutCapable.java
@@ -22,11 +22,8 @@
  * This interface defines the contract for an object that can time
  * out, where the timeout mechanism is provided by the TimeoutManager
  * class.
- *
- *
  */
-public interface TimeoutCapable
-{
+public interface TimeoutCapable {
     /**
      * Revoke the timeout task, removing it from future evaluation and execution.
      */
@@ -35,7 +32,7 @@
     /**
      * Determine the timestamp of this object's last use, where "last use" should
      * denote all tasks that eliminate idleness.
-     * 
+     *
      * @return last used time
      */
     long getLastUse();
@@ -43,7 +40,7 @@
     /**
      * Determine the time, in milliseconds, that this object is allowed to idle
      * before having its timeout method invoked.
-     * 
+     *
      * @return timeout period
      */
     long getTimeoutPeriod();
@@ -52,7 +49,7 @@
      * Set the Future used to provide access to the Runnable task that invokes
      * the timeout method. A Future is used instead of a Runnable so that it may
      * be canceled according to the Java concurrency standard.
-     * 
+     *
      * @param future Future used to provide access to the Runnable task that invokes the timeout method.
      */
     void setTimeoutFuture(Future future);
diff --git a/core/src/main/java/flex/messaging/util/TimeoutManager.java b/core/src/main/java/flex/messaging/util/TimeoutManager.java
index 3c794d3..d2f5ba3 100644
--- a/core/src/main/java/flex/messaging/util/TimeoutManager.java
+++ b/core/src/main/java/flex/messaging/util/TimeoutManager.java
@@ -28,45 +28,38 @@
  * This class provides a means of managing TimeoutCapable objects. It leverages
  * facilities in the the Java concurrency package to provide a common utility
  * for scheduling timeout Futures and managing the underlying worker thread pools.
- *
- *
  */
-public class TimeoutManager
-{
+public class TimeoutManager {
     private static final String LOG_CATEGORY = LogCategories.TIMEOUT;
 
     private ScheduledThreadPoolExecutor timeoutService;
-    
+
     /**
      * Default constructor calls parameterized constructor will a null factory argument.
      */
-    public TimeoutManager()
-    {
+    public TimeoutManager() {
         this(null);
     }
 
     /**
      * Constructs a new TimeoutManager using the passed in factory for thread creation.
      * and a single thread of the TimeoutManager.
-     * 
+     *
      * @param tf ThreadFactory
      */
-    public TimeoutManager(ThreadFactory tf)
-    {
+    public TimeoutManager(ThreadFactory tf) {
         this(tf, 1);
     }
 
     /**
      * Constructs a new TimeoutManager using the passe din factory for thread creation
      * and the passed in number of threads for TimeoutManager to use.
-     * 
-     * @param tf The ThreadFactory to use.
+     *
+     * @param tf              The ThreadFactory to use.
      * @param numberOfThreads The number of threads for the ThreadFactory to use.
      */
-    public TimeoutManager(ThreadFactory tf, int numberOfThreads)
-    {
-        if (tf == null)
-        {
+    public TimeoutManager(ThreadFactory tf, int numberOfThreads) {
+        if (tf == null) {
             tf = new MonitorThreadFactory();
         }
         if (numberOfThreads < 1)
@@ -76,84 +69,75 @@
 
     /**
      * Schedule a task to be executed in the future.
-     * 
+     *
      * @param t task to be executed at some future time
      * @return a Future object that enables access to the value(s) returned by the task
      */
-    public Future scheduleTimeout(TimeoutCapable t)
-    {
+    public Future scheduleTimeout(TimeoutCapable t) {
         Future future = null;
-        if (t.getTimeoutPeriod() > 0)
-        {
+        if (t.getTimeoutPeriod() > 0) {
             Runnable timeoutTask = new TimeoutTask(t);
             future = timeoutService.schedule(timeoutTask, t.getTimeoutPeriod(), TimeUnit.MILLISECONDS);
             t.setTimeoutFuture(future);
-            if (t instanceof TimeoutAbstractObject)
-            {
-                TimeoutAbstractObject timeoutAbstract = (TimeoutAbstractObject)t;
+            if (t instanceof TimeoutAbstractObject) {
+                TimeoutAbstractObject timeoutAbstract = (TimeoutAbstractObject) t;
                 timeoutAbstract.setTimeoutManager(this);
                 timeoutAbstract.setTimeoutTask(timeoutTask);
             }
             if (Log.isDebug())
                 Log.getLogger(LOG_CATEGORY).debug("TimeoutManager '" + System.identityHashCode(this) + "' has scheduled instance '" +
-                    System.identityHashCode(t) + "' of type '" + t.getClass().getName() + "' to be timed out in " + t.getTimeoutPeriod() + " milliseconds. Task queue size: "+ timeoutService.getQueue().size());
+                        System.identityHashCode(t) + "' of type '" + t.getClass().getName() + "' to be timed out in " + t.getTimeoutPeriod() + " milliseconds. Task queue size: " + timeoutService.getQueue().size());
         }
         return future;
     }
 
     /**
      * Cancel the execution of a future task and remove all references to it.
-     * 
+     *
      * @param timeoutAbstract the task to be canceled
      * @return true if cancellation were successful
      */
-    public boolean unscheduleTimeout(TimeoutAbstractObject timeoutAbstract)
-    {
+    public boolean unscheduleTimeout(TimeoutAbstractObject timeoutAbstract) {
         Object toRemove = timeoutAbstract.getTimeoutFuture();
         /*
          * In more recent versions of the backport, they are requiring that we
-         * pass in the Future returned by the schedule method.  This should always 
+         * pass in the Future returned by the schedule method.  This should always
          * implement Runnable even in 2.2 but I'm a little paranoid here so just
          * to be sure, if we get a future which is not a runnable we go back to the old
          * code which calls the remove on the instance we passed into the schedule method.
          */
         if (!(toRemove instanceof Runnable))
             toRemove = timeoutAbstract.getTimeoutTask();
-        if (timeoutService.remove((Runnable) toRemove))
-        {
+        if (timeoutService.remove((Runnable) toRemove)) {
             if (Log.isDebug())
                 Log.getLogger(LOG_CATEGORY).debug("TimeoutManager '" + System.identityHashCode(this) + "' has removed the timeout task for instance '" +
-                    System.identityHashCode(timeoutAbstract) + "' of type '" + timeoutAbstract.getClass().getName() + "' that has requested its timeout be cancelled. Task queue size: "+ timeoutService.getQueue().size());
-        }
-        else
-        {
+                        System.identityHashCode(timeoutAbstract) + "' of type '" + timeoutAbstract.getClass().getName() + "' that has requested its timeout be cancelled. Task queue size: " + timeoutService.getQueue().size());
+        } else {
             Future timeoutFuture = timeoutAbstract.getTimeoutFuture();
             timeoutFuture.cancel(false); // Don't interrupt it if it's running.
             if (Log.isDebug())
                 Log.getLogger(LOG_CATEGORY).debug("TimeoutManager '" + System.identityHashCode(this) + "' cancelling timeout task for instance '" +
-                    System.identityHashCode(timeoutAbstract) + "' of type '" + timeoutAbstract.getClass().getName() + "' that has requested its timeout be cancelled. Task queue size: "+ timeoutService.getQueue().size());
-            if (timeoutFuture.isDone())
-            {
+                        System.identityHashCode(timeoutAbstract) + "' of type '" + timeoutAbstract.getClass().getName() + "' that has requested its timeout be cancelled. Task queue size: " + timeoutService.getQueue().size());
+            if (timeoutFuture.isDone()) {
                 timeoutService.purge(); // Force the service to give up refs to task immediately rather than hanging on to them.
                 if (Log.isDebug())
-                    Log.getLogger(LOG_CATEGORY).debug("TimeoutManager '" + System.identityHashCode(this) + "' purged queue of any cancelled or completed tasks. Task queue size: "+ timeoutService.getQueue().size());
+                    Log.getLogger(LOG_CATEGORY).debug("TimeoutManager '" + System.identityHashCode(this) + "' purged queue of any cancelled or completed tasks. Task queue size: " + timeoutService.getQueue().size());
             }
         }
-        
+
         // to aggressively clean up memory remove the reference from the unscheduled timeout to its 
         // time out object
         Object unscheduledTimeoutTask = timeoutAbstract.getTimeoutTask();
         if (unscheduledTimeoutTask != null && unscheduledTimeoutTask instanceof TimeoutTask)
-            ((TimeoutTask)timeoutAbstract.getTimeoutTask()).clearTimeoutCapable();
-        
+            ((TimeoutTask) timeoutAbstract.getTimeoutTask()).clearTimeoutCapable();
+
         return true;
     }
-    
+
     /**
      * Cancel all outstanding and any future tasks.
      */
-    public void shutdown()
-    {
+    public void shutdown() {
         timeoutService.shutdownNow();
         // shutdownNow() returns List<Runnable> for all unexecuted tasks
         // but we ignore these because we're only queuing dependent tasks
@@ -165,10 +149,8 @@
         // which does not return handles to any queued, unexecuted tasks.
     }
 
-    class MonitorThreadFactory implements ThreadFactory
-    {
-        public Thread newThread(Runnable r)
-        {
+    class MonitorThreadFactory implements ThreadFactory {
+        public Thread newThread(Runnable r) {
             Thread t = new Thread(r);
             t.setDaemon(true);
             t.setName("TimeoutManager");
@@ -176,55 +158,45 @@
         }
     }
 
-    class TimeoutTask implements Runnable
-    {
+    class TimeoutTask implements Runnable {
         private TimeoutCapable timeoutObject;
-        
-        
+
+
         /**
-         * Removes the reference from this timeout task to the object that would 
-         * have been timed out.  This is useful for memory clean up when timeouts are unscheduled. 
+         * Removes the reference from this timeout task to the object that would
+         * have been timed out.  This is useful for memory clean up when timeouts are unscheduled.
          */
-        public void clearTimeoutCapable()
-        {
+        public void clearTimeoutCapable() {
             timeoutObject = null;
         }
 
-        public TimeoutTask(TimeoutCapable timeoutObject)
-        {
+        public TimeoutTask(TimeoutCapable timeoutObject) {
             this.timeoutObject = timeoutObject;
         }
 
-        public void run()
-        {
+        public void run() {
             // Because of the weird clearTimeCapable() in the middle of timeout call, we got NPE in the debug log level.
             // Now copy the reference to local varable
             TimeoutCapable timeoutObject = this.timeoutObject;
             long inactiveMillis = System.currentTimeMillis() - timeoutObject.getLastUse();
-            if (inactiveMillis >= timeoutObject.getTimeoutPeriod())
-            {
-                try
-                {
+            if (inactiveMillis >= timeoutObject.getTimeoutPeriod()) {
+                try {
                     timeoutObject.timeout();
-                    
+
                     if (Log.isDebug())
                         Log.getLogger(LOG_CATEGORY).debug("TimeoutManager '" + System.identityHashCode(TimeoutManager.this) + "' has run the timeout task for instance '" +
-                            System.identityHashCode(timeoutObject) + "' of type '" + timeoutObject.getClass().getName() + "'. Task queue size: "+ timeoutService.getQueue().size());
-                }
-                catch (Throwable t)
-                {
+                                System.identityHashCode(timeoutObject) + "' of type '" + timeoutObject.getClass().getName() + "'. Task queue size: " + timeoutService.getQueue().size());
+                } catch (Throwable t) {
                     if (Log.isError())
                         Log.getLogger(LOG_CATEGORY).error("TimeoutManager '" + System.identityHashCode(TimeoutManager.this) + "' encountered an error running the timeout task for instance '" +
-                            System.identityHashCode(timeoutObject) + "' of type '" + timeoutObject.getClass().getName() + "'. Task queue size: "+ timeoutService.getQueue().size(), t);   
+                                System.identityHashCode(timeoutObject) + "' of type '" + timeoutObject.getClass().getName() + "'. Task queue size: " + timeoutService.getQueue().size(), t);
                 }
-            }
-            else
-            {
+            } else {
                 // Reschedule timeout and store new Future for cancellation.
-                timeoutObject.setTimeoutFuture(timeoutService.schedule(this, (timeoutObject.getTimeoutPeriod()-inactiveMillis), TimeUnit.MILLISECONDS));
+                timeoutObject.setTimeoutFuture(timeoutService.schedule(this, (timeoutObject.getTimeoutPeriod() - inactiveMillis), TimeUnit.MILLISECONDS));
                 if (Log.isDebug())
                     Log.getLogger(LOG_CATEGORY).debug("TimeoutManager '" + System.identityHashCode(TimeoutManager.this) + "' has rescheduled a timeout for the active instance '" +
-                        System.identityHashCode(timeoutObject) + "' of type '" + timeoutObject.getClass().getName() + "'. Task queue size: "+ timeoutService.getQueue().size());
+                            System.identityHashCode(timeoutObject) + "' of type '" + timeoutObject.getClass().getName() + "'. Task queue size: " + timeoutService.getQueue().size());
             }
         }
     }
diff --git a/core/src/main/java/flex/messaging/util/ToStringPrettyPrinter.java b/core/src/main/java/flex/messaging/util/ToStringPrettyPrinter.java
index 9f4b434..ad616f2 100644
--- a/core/src/main/java/flex/messaging/util/ToStringPrettyPrinter.java
+++ b/core/src/main/java/flex/messaging/util/ToStringPrettyPrinter.java
@@ -34,92 +34,79 @@
  * Recursively convert an Object graph into a String
  * for logging/debugging purposes. Cyclical references are
  * handled by tracking known objects.
- * 
+ * <p>
  *  TODO: Remove check for custom toString implementations... we
  *  should be able to extend the PrettyPrintable interface to handle
  *  any custom toString requirements without needing to actually call
  *  toString on a custom object.
  */
-public class ToStringPrettyPrinter extends BasicPrettyPrinter
-{
+public class ToStringPrettyPrinter extends BasicPrettyPrinter {
     private IdentityHashMap knownObjects;
     private int knownObjectsCount;
 
     /**
      * Default constructor.
      */
-    public ToStringPrettyPrinter()
-    {
+    public ToStringPrettyPrinter() {
         super();
     }
-    
-    /** {@inheritDoc} */
-    public String prettify(Object o)
-    {
-        try
-        {
+
+    /**
+     * {@inheritDoc}
+     */
+    public String prettify(Object o) {
+        try {
             knownObjects = new IdentityHashMap();
             knownObjectsCount = 0;
-            return super.prettify(o);    
-        }
-        finally
-        {
+            return super.prettify(o);
+        } finally {
             knownObjects = null;
             knownObjectsCount = 0;
         }
     }
-    
-    /** {@inheritDoc} */
-    public Object copy()
-    {
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object copy() {
         return new ToStringPrettyPrinter();
     }
 
-    protected void prettifyComplexType(Object o)
-    {
+    protected void prettifyComplexType(Object o) {
         // Avoid circular references
-        if (!isKnownObject(o))
-        {
-            StringBuffer header = new StringBuffer(); 
+        if (!isKnownObject(o)) {
+            StringBuffer header = new StringBuffer();
 
             Class c = o.getClass();
 
-            if (hasCustomToStringMethod(c))
-            {
+            if (hasCustomToStringMethod(c)) {
                 trace.write(String.valueOf(o));
-            }
-            else if (o instanceof Collection)
-            {
-                Collection col = ((Collection)o);
+            } else if (o instanceof Collection) {
+                Collection col = ((Collection) o);
                 header.append(c.getName()).append(" (Collection size:").append(col.size()).append(")");
                 trace.startArray(header.toString());
 
                 Iterator it = col.iterator();
                 int i = 0;
-                while (it.hasNext())
-                {
+                while (it.hasNext()) {
                     trace.arrayElement(i);
                     internalPrettify(it.next());
                     trace.newLine();
                     i++;
                 }
-                
+
                 trace.endArray();
-            }
-            else if (c.isArray())
-            {
+            } else if (c.isArray()) {
                 Class componentType = c.getComponentType();
                 int count = Array.getLength(o);
 
                 header.append(componentType.getName()).append("[] (Array length:").append(count).append(")");
                 trace.startArray(header.toString());
-                
+
                 // Check whether it is primitive array case, we omit printing the content of primitive array
                 // To avoid cases like large byte array. 
-                if (!componentType.isPrimitive())
-                {
-                    for (int i = 0; i < count; i++)
-                    {
+                if (!componentType.isPrimitive()) {
+                    for (int i = 0; i < count; i++) {
                         trace.arrayElement(i);
                         internalPrettify(Array.get(o, i));
                         trace.newLine();
@@ -127,68 +114,49 @@
                 }
 
                 trace.endArray();
-            }
-            else if (o instanceof Document)
-            {
-                try
-                {
-                    String xml = XMLUtil.documentToString((Document)o);
+            } else if (o instanceof Document) {
+                try {
+                    String xml = XMLUtil.documentToString((Document) o);
                     trace.write(xml);
-                }
-                catch (IOException ex)
-                {
+                } catch (IOException ex) {
                     trace.write("(Document not printable)");
                 }
-            }
-            else
-            {
+            } else {
                 PropertyProxy proxy = PropertyProxyRegistry.getProxy(o);
-                
-                if (o instanceof PrettyPrintable)
-                {
-                    PrettyPrintable pp = (PrettyPrintable)o;
-                    header.append(pp.toStringHeader()); 
-                }
-                else
-                {
+
+                if (o instanceof PrettyPrintable) {
+                    PrettyPrintable pp = (PrettyPrintable) o;
+                    header.append(pp.toStringHeader());
+                } else {
                     header.append(c.getName());
-                    if (o instanceof Map)
-                    {
-                        header.append(" (Map size:").append(((Map)o).size()).append(")");
+                    if (o instanceof Map) {
+                        header.append(" (Map size:").append(((Map) o).size()).append(")");
                     }
                 }
 
                 trace.startObject(header.toString());
 
                 List propertyNames = proxy.getPropertyNames();
-                if (propertyNames != null)
-                {
+                if (propertyNames != null) {
                     Iterator it = propertyNames.iterator();
-                    while (it.hasNext())
-                    {
-                        String propName = (String)it.next();
+                    while (it.hasNext()) {
+                        String propName = (String) it.next();
                         trace.namedElement(propName);
-                        
+
                         Object value = null;
-                        if (trace.nextElementExclude)
-                        {
+                        if (trace.nextElementExclude) {
                             trace.nextElementExclude = false;
                             value = Log.VALUE_SUPRESSED;
-                        }
-                        else
-                        {
-                            if (o instanceof PrettyPrintable)
-                            {
-                                String customToString = ((PrettyPrintable)o).toStringCustomProperty(propName);
-                                if (customToString != null)
-                                {
+                        } else {
+                            if (o instanceof PrettyPrintable) {
+                                String customToString = ((PrettyPrintable) o).toStringCustomProperty(propName);
+                                if (customToString != null) {
                                     value = customToString;
                                 }
                             }
 
 
-                            if (value == null)
-                            {
+                            if (value == null) {
                                 value = proxy.getValue(propName);
                             }
                         }
@@ -202,31 +170,23 @@
             }
         }
     }
-    
-    private boolean isKnownObject(Object o)
-    {
+
+    private boolean isKnownObject(Object o) {
         Object ref = knownObjects.get(o);
-        if (ref != null)
-        {
-            try
-            {
-                int refNum = ((Integer)ref).intValue();
+        if (ref != null) {
+            try {
+                int refNum = ((Integer) ref).intValue();
                 trace.writeRef(refNum);
-            }
-            catch (ClassCastException e)
-            {
+            } catch (ClassCastException e) {
                 // Ignore
             }
-        }
-        else
-        {
+        } else {
             rememberObject(o);
         }
         return (ref != null);
     }
-    
-    private void rememberObject(Object o)
-    {
+
+    private void rememberObject(Object o) {
         knownObjects.put(o, new Integer(knownObjectsCount++));
     }
 }
diff --git a/core/src/main/java/flex/messaging/util/Trace.java b/core/src/main/java/flex/messaging/util/Trace.java
index 39a5604..e1198f0 100644
--- a/core/src/main/java/flex/messaging/util/Trace.java
+++ b/core/src/main/java/flex/messaging/util/Trace.java
@@ -21,14 +21,14 @@
 
 /**
  * Primitive run-time tracing class
- *
+ * <p>
  * Code as follows:
  * if (Trace.foo)
- *     Trace.trace("trace msg"...);
- *
+ * Trace.trace("trace msg"...);
+ * <p>
  * Enable as follows:
  * java -Dtrace.foo -Dtrace.foo2 -Dtrace.foo3 or -Dtrace.all
- *
+ * <p>
  * Special flags:
  * -Dtrace.flex                  -- enables all tracing
  * -Dtrace.foo                   -- enables tracing on foo subsystem
@@ -36,14 +36,11 @@
  * -Dtrace.caller                -- print the Class:method caller
  * -Dtrace.stackLines=10         -- print 10 stack lines
  * -Dtrace.stackPrefix=java.lang -- print the stack up to java.lang
- *
+ * <p>
  * Add new xxx members as desired.
- *
- *
  */
 
-public class Trace 
-{
+public class Trace {
     public static final boolean config = (System.getProperty("trace.config") != null);
 
     public static final boolean amf = (System.getProperty("trace.amf") != null);
@@ -67,15 +64,14 @@
 
     // print this number of stack lines
     public static int stackLines = 0;
+
     static {
-        try 
-        {
+        try {
             stackLines = Integer.parseInt(System.getProperty("trace.stackLines"));
-        } 
-        catch (NumberFormatException e) 
-        {
+        } catch (NumberFormatException e) {
         }
     }
+
     // print a timestamp with each line
     public static final boolean timeStamp = (System.getProperty("trace.timeStamp") != null);
 
@@ -83,15 +79,14 @@
      * Write the string as a line to the trace stream. If the
      * "stack" property is enabled, then the caller's stack call
      * is also shown in the date.
-     * 
+     *
      * @param str string to write to the trace stream
      */
-    public static void trace(String str) 
-    {
+    public static void trace(String str) {
         if (timeStamp)
             System.err.print(new Date());
 
-        if(caller)
+        if (caller)
             System.err.print(ExceptionUtil.getCallAt(new Throwable(), 1) + " ");
 
         System.err.println(str);
diff --git a/core/src/main/java/flex/messaging/util/URLDecoder.java b/core/src/main/java/flex/messaging/util/URLDecoder.java
index c240e83..ae8e74c 100644
--- a/core/src/main/java/flex/messaging/util/URLDecoder.java
+++ b/core/src/main/java/flex/messaging/util/URLDecoder.java
@@ -22,24 +22,17 @@
 /**
  * Utility class for URL decoding.
  */
-public final class URLDecoder
-{
-    public static String decode(String s)
-    {
-        try
-        {
+public final class URLDecoder {
+    public static String decode(String s) {
+        try {
             return decode(s, "UTF8");
-        }
-        catch (UnsupportedEncodingException ex)
-        {
+        } catch (UnsupportedEncodingException ex) {
             throw new IllegalArgumentException("UTF8");
         }
     }
 
-    public static String decode(String s, String enc) throws UnsupportedEncodingException
-    {
-        if (!needsDecoding(s))
-        {
+    public static String decode(String s, String enc) throws UnsupportedEncodingException {
+        if (!needsDecoding(s)) {
             return s;
         }
 
@@ -49,30 +42,20 @@
         s.getBytes(0, length, bytes, 0);
         int k = 0;
         length = bytes.length;
-        for (int i = 0; i < length; i++)
-        {
-            if (bytes[i] == '%')
-            {
-                while (bytes[i + 1] == '%')
-                {
+        for (int i = 0; i < length; i++) {
+            if (bytes[i] == '%') {
+                while (bytes[i + 1] == '%') {
                     i++;
                 }
-                if (i < length - 2)
-                {
+                if (i < length - 2) {
                     bytes[k] = x2c(bytes, i);
                     i += 2;
-                }
-                else
-                {
+                } else {
                     throw new IllegalArgumentException(s);
                 }
-            }
-            else if (bytes[i] == '+')
-            {
-                bytes[k] = (byte)' ';
-            }
-            else
-            {
+            } else if (bytes[i] == '+') {
+                bytes[k] = (byte) ' ';
+            } else {
                 bytes[k] = bytes[i];
             }
             k++;
@@ -81,20 +64,16 @@
         return new String(bytes, 0, k, enc);
     }
 
-    private static boolean needsDecoding(String s)
-    {
-        if (s == null)
-        {
+    private static boolean needsDecoding(String s) {
+        if (s == null) {
             return false;
         }
 
         int length = s.length();
 
-        for (int i = 0; i < length; i++)
-        {
-            int c = (int)s.charAt(i);
-            if (c == '+' || c == '%')
-            {
+        for (int i = 0; i < length; i++) {
+            int c = (int) s.charAt(i);
+            if (c == '+' || c == '%') {
                 return true;
             }
         }
@@ -103,8 +82,7 @@
 
     }
 
-    private static byte x2c(byte[] b, int i)
-    {
+    private static byte x2c(byte[] b, int i) {
         int result;
         byte b1 = b[i + 1];
         byte b2 = b[i + 2];
@@ -112,14 +90,13 @@
         // return Byte.parseByte("" + (char) b1 + (char) b2, 16);
 
         if (b1 < '0' || (b1 > 'F' && b1 < 'a') || b1 > 'f' ||
-                b2 < '0' || (b2 > 'F' && b2 < 'a') || b2 > 'f')
-        {
-            throw new IllegalArgumentException("%" + (char)b1 + (char)b2);
+                b2 < '0' || (b2 > 'F' && b2 < 'a') || b2 > 'f') {
+            throw new IllegalArgumentException("%" + (char) b1 + (char) b2);
         }
 
         result = b1 >= 'A' ? (b1 & 0xdf) - 'A' + 10 : b1 - '0';
         result *= 16;
         result += b2 >= 'A' ? (b2 & 0xdf) - 'A' + 10 : b2 - '0';
-        return (byte)result;
+        return (byte) result;
     }
 }
diff --git a/core/src/main/java/flex/messaging/util/URLEncoder.java b/core/src/main/java/flex/messaging/util/URLEncoder.java
index 65e1ffa..39a7368 100644
--- a/core/src/main/java/flex/messaging/util/URLEncoder.java
+++ b/core/src/main/java/flex/messaging/util/URLEncoder.java
@@ -24,33 +24,23 @@
 
 /**
  * Utility class for URL encoding.
- * 
- *
  */
-public final class URLEncoder
-{
+public final class URLEncoder {
     public static String charset = "UTF8";
 
-    private URLEncoder()
-    {
+    private URLEncoder() {
     }
 
-    public static String encode(String s)
-    {
-        try
-        {
+    public static String encode(String s) {
+        try {
             return encode(s, charset);
-        }
-        catch (UnsupportedEncodingException ex)
-        {
+        } catch (UnsupportedEncodingException ex) {
             throw new IllegalArgumentException(charset);
         }
     }
 
-    public static String encode(String s, String enc) throws UnsupportedEncodingException
-    {
-        if (!needsEncoding(s))
-        {
+    public static String encode(String s, String enc) throws UnsupportedEncodingException {
+        if (!needsEncoding(s)) {
             return s;
         }
 
@@ -62,89 +52,70 @@
 
         BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(buf, enc));
 
-        for (int i = 0; i < length; i++)
-        {
-            int c = (int)s.charAt(i);
-            if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c == ' ')
-            {
-                if (c == ' ')
-                {
+        for (int i = 0; i < length; i++) {
+            int c = (int) s.charAt(i);
+            if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c == ' ') {
+                if (c == ' ') {
                     c = '+';
                 }
 
                 toHex(out, buf.toByteArray());
                 buf.reset();
 
-                out.append((char)c);
-            }
-            else
-            {
-                try
-                {
+                out.append((char) c);
+            } else {
+                try {
                     writer.write(c);
 
-                    if (c >= 0xD800 && c <= 0xDBFF && i < length - 1)
-                    {
-                        int d = (int)s.charAt(i + 1);
-                        if (d >= 0xDC00 && d <= 0xDFFF)
-                        {
+                    if (c >= 0xD800 && c <= 0xDBFF && i < length - 1) {
+                        int d = (int) s.charAt(i + 1);
+                        if (d >= 0xDC00 && d <= 0xDFFF) {
                             writer.write(d);
                             i++;
                         }
                     }
 
                     writer.flush();
-                }
-                catch (IOException ex)
-                {
+                } catch (IOException ex) {
                     throw new IllegalArgumentException(s);
                 }
             }
         }
-        try
-        {
+        try {
             writer.close();
-        }
-        catch (IOException ioe)
-        {
+        } catch (IOException ioe) {
             // Ignore exceptions on close.
         }
 
         toHex(out, buf.toByteArray());
-       
+
         return out.toString();
     }
 
-    private static void toHex(StringBuffer buffer, byte[] b)
-    {
-        for (int i = 0; i < b.length; i++)
-        {
+    private static void toHex(StringBuffer buffer, byte[] b) {
+        for (int i = 0; i < b.length; i++) {
             buffer.append('%');
 
             char ch = Character.forDigit((b[i] >> 4) & 0xF, 16);
-            if (Character.isLetter(ch))
-            {
+            if (Character.isLetter(ch)) {
                 ch -= 32;
             }
             buffer.append(ch);
 
             ch = Character.forDigit(b[i] & 0xF, 16);
-            if (Character.isLetter(ch))
-            {
+            if (Character.isLetter(ch)) {
                 ch -= 32;
             }
             buffer.append(ch);
         }
     }
 
-    private static boolean needsEncoding(String s)
-    {
+    private static boolean needsEncoding(String s) {
         if (s == null)
             return false;
 
-        for (int i = 0; i < s.length(); i++)
-        {
-            int c = (int)s.charAt(i);
+        for (int i = 0; i < s.length(); i++) {
+            int c = (int) s.charAt(i);
             if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9'))
                 return true;
             // Otherwise, keep going
diff --git a/core/src/main/java/flex/messaging/util/URLEncoderUtil.java b/core/src/main/java/flex/messaging/util/URLEncoderUtil.java
index 9b8433b..6d7c2a1 100644
--- a/core/src/main/java/flex/messaging/util/URLEncoderUtil.java
+++ b/core/src/main/java/flex/messaging/util/URLEncoderUtil.java
@@ -21,22 +21,18 @@
 
 /**
  * Utility class for URL encoding
- * 
- *
  */
-public class URLEncoderUtil
-{
+public class URLEncoderUtil {
     /**
      * Encode a URL into using the specified encoding string.
-     * 
-     * @param s URL to encode
+     *
+     * @param s        URL to encode
      * @param encoding encoding string
      * @return encoded URL
      * @throws UnsupportedEncodingException Throws UnsupportedEncodingException
      */
     public static String encode(String s, String encoding)
-        throws UnsupportedEncodingException
-    {
+            throws UnsupportedEncodingException {
         return URLEncoder.encode(s, encoding);
     }
 }
diff --git a/core/src/main/java/flex/messaging/util/UUIDGenerator.java b/core/src/main/java/flex/messaging/util/UUIDGenerator.java
index cedba04..ac0e36d 100644
--- a/core/src/main/java/flex/messaging/util/UUIDGenerator.java
+++ b/core/src/main/java/flex/messaging/util/UUIDGenerator.java
@@ -20,11 +20,10 @@
  * A custom UUID generator can be set on MessageBroker in order to provide custom
  * uuid generation for NIO-HTTP session cookie and FlexClient id.
  */
-public interface UUIDGenerator
-{
+public interface UUIDGenerator {
     /**
      * Creates and returns a UUID.
-     * 
+     *
      * @return UUID.
      */
     String createUUID();
diff --git a/core/src/main/java/flex/messaging/util/UserAgentManager.java b/core/src/main/java/flex/messaging/util/UserAgentManager.java
index b02d375..7c0d5c8 100644
--- a/core/src/main/java/flex/messaging/util/UserAgentManager.java
+++ b/core/src/main/java/flex/messaging/util/UserAgentManager.java
@@ -27,16 +27,15 @@
 /**
  * Manages user agent information.
  */
-public class UserAgentManager
-{
+public class UserAgentManager {
     /**
      * The name of the HTTP header that transports the user agent value.
      */
     public static final String USER_AGENT_HEADER_NAME = "User-Agent";
 
     /*
-    * Configuration constants
-    */
+     * Configuration constants
+     */
     private static final String KICKSTART_BYTES = "kickstart-bytes";
     private static final String MATCH_ON = "match-on";
     // max-streaming-connections-per-session is deprecated; use max-persistent-connections-per-session instead.
@@ -62,10 +61,9 @@
      *
      * @param matchOn The match-on string used to match a specific user agent.
      * @return The settings for that user agent, or null if no user agent settings
-     *         exist for that match-on string.
+     * exist for that match-on string.
      */
-    public UserAgentSettings getUserAgentSettings(String matchOn)
-    {
+    public UserAgentSettings getUserAgentSettings(String matchOn) {
         return userAgentSettingsMap.get(matchOn);
     }
 
@@ -75,8 +73,7 @@
      *
      * @return The (possibly empty) collection of user agent settings.
      */
-    public Collection<UserAgentSettings> getUserAgentSettings()
-    {
+    public Collection<UserAgentSettings> getUserAgentSettings() {
         return userAgentSettingsMap.values();
     }
 
@@ -84,30 +81,30 @@
      * Puts a new user agent to the existing list of user agents. If an existing
      * user agent with the same match-on property as the new user agent exists,
      * it is simply overwritten.
+     *
      * @param userAgent the UserAgentSettings
      */
-    public void putUserAgentSettings(UserAgentSettings userAgent)
-    {
+    public void putUserAgentSettings(UserAgentSettings userAgent) {
         userAgentSettingsMap.put(userAgent.getMatchOn(), userAgent);
     }
 
     /**
      * Removes the user agent with the same match-on property from the list of
      * existing user agents.
+     *
      * @param useAgent the UserAgentSettings object
      */
-    public void removeUserAgentSettings(UserAgentSettings userAgent)
-    {
+    public void removeUserAgentSettings(UserAgentSettings userAgent) {
         if (userAgent != null)
             userAgentSettingsMap.remove(userAgent.getMatchOn());
     }
 
     /**
      * Set the default settings to return when there is no match found.
+     *
      * @param settings the UserAgentSettings object
      */
-    public void setDefaultUserAgentSettings(UserAgentSettings settings)
-    {
+    public void setDefaultUserAgentSettings(UserAgentSettings settings) {
         defaultSettings = settings;
     }
 
@@ -119,21 +116,16 @@
      * @return settings or null if no match and no default.
      * @see UserAgentManager#setDefaultUserAgentSettings(flex.messaging.client.UserAgentSettings)
      */
-    public UserAgentSettings match(String userAgent)
-    {
+    public UserAgentSettings match(String userAgent) {
         // Dearch for the longest match
-        if (userAgent != null && userAgentSettingsMap.size() > 0)
-        {
+        if (userAgent != null && userAgentSettingsMap.size() > 0) {
             // Search for the best match based upon length.
             int bestMatchLength = 0;
             String matchedAgent = null;
-            for (String key : userAgentSettingsMap.keySet())
-            {
-                if (userAgent.indexOf(key) != -1)
-                {
+            for (String key : userAgentSettingsMap.keySet()) {
+                if (userAgent.indexOf(key) != -1) {
                     int matchLength = key.length();
-                    if (matchLength > bestMatchLength)
-                    {
+                    if (matchLength > bestMatchLength) {
                         bestMatchLength = matchLength;
                         matchedAgent = key;
                     }
@@ -155,8 +147,7 @@
      * @param properties configuration properties, possibly containing "user-agent-settings" element
      * @param manager    the UserAgentManager to configure
      */
-    public static void setupUserAgentManager(ConfigMap properties, UserAgentManager manager)
-    {
+    public static void setupUserAgentManager(ConfigMap properties, UserAgentManager manager) {
         // Add default entries for user agents.
         manager.putUserAgentSettings(UserAgentSettings.getAgent(UserAgentSettings.USER_AGENT_ANDROID));
         manager.putUserAgentSettings(UserAgentSettings.getAgent(UserAgentSettings.USER_AGENT_CHROME));
@@ -183,9 +174,8 @@
         if (userAgent == null || userAgent.size() == 0)
             return;
 
-        for (Object anUserAgent : userAgent)
-        {
-            ConfigMap agent = (ConfigMap)anUserAgent;
+        for (Object anUserAgent : userAgent) {
+            ConfigMap agent = (ConfigMap) anUserAgent;
             String matchOn = agent.getPropertyAsString(MATCH_ON, null);
             if (matchOn == null)
                 continue;
diff --git a/core/src/main/java/flex/messaging/util/WatchedObject.java b/core/src/main/java/flex/messaging/util/WatchedObject.java
index baa0471..6fa543b 100644
--- a/core/src/main/java/flex/messaging/util/WatchedObject.java
+++ b/core/src/main/java/flex/messaging/util/WatchedObject.java
@@ -21,47 +21,40 @@
 
 /**
  * Used by redeployment manager to monitor for changes to the files.
- *
- *
  */
-public class WatchedObject
-{
+public class WatchedObject {
     private String filename;
     private long modified;
 
     /**
      * Creates a watched object for the specified file.
-     * 
+     *
      * @param filename file to watch
      * @throws FileNotFoundException when specified file could not be found
      */
-    public WatchedObject(String filename) throws FileNotFoundException
-    {
+    public WatchedObject(String filename) throws FileNotFoundException {
         this.filename = filename;
         File file = new File(filename);
 
-        if (!file.isFile() && !file.isDirectory())
-        {
+        if (!file.isFile() && !file.isDirectory()) {
             throw new FileNotFoundException();
         }
         this.modified = file.lastModified();
     }
 
     /**
-     * Returns true if the watched file has been modified since creation of this 
+     * Returns true if the watched file has been modified since creation of this
      * watched object or since the last call to this method.
-     * 
-     * @return true if the watched file has been modified since creation of this 
+     *
+     * @return true if the watched file has been modified since creation of this
      * watched object or since the last call to this method
      */
-    public boolean isUptodate()
-    {
+    public boolean isUptodate() {
         boolean uptodate = true;
 
         long current = new File(filename).lastModified();
 
-        if (Math.abs(current - modified) > 1000)
-        {
+        if (Math.abs(current - modified) > 1000) {
             uptodate = false;
         }
 
diff --git a/core/src/main/java/flex/messaging/util/XMLUtil.java b/core/src/main/java/flex/messaging/util/XMLUtil.java
index e27149c..32534ef 100644
--- a/core/src/main/java/flex/messaging/util/XMLUtil.java
+++ b/core/src/main/java/flex/messaging/util/XMLUtil.java
@@ -35,16 +35,12 @@
 /**
  * Utility class for converting strings to XML documents and
  * vice versa.
- *
- *
  */
-public class XMLUtil
-{
+public class XMLUtil {
     public static String INDENT_XML = "no";
     public static String OMIT_XML_DECLARATION = "yes";
 
-    private XMLUtil()
-    {
+    private XMLUtil() {
     }
 
     /**
@@ -55,12 +51,10 @@
      * @return An XML String.
      * @throws IOException if an error occurs during transformation.
      */
-    public static String documentToString(Document document) throws IOException
-    {
+    public static String documentToString(Document document) throws IOException {
         String xml;
 
-        try
-        {
+        try {
             DOMSource dom = new DOMSource(document);
             StringWriter writer = new StringWriter();
             StreamResult output = new StreamResult(writer);
@@ -80,9 +74,7 @@
             transformer.transform(dom, output);
 
             xml = writer.toString();
-        }
-        catch (TransformerException te)
-        {
+        } catch (TransformerException te) {
             throw new IOException("Error serializing Document as String: " + te.getMessageAndLocation());
         }
         return xml;
@@ -95,8 +87,7 @@
      * @param xml XML serialized as a String
      * @return Document
      */
-    public static Document stringToDocument(String xml)
-    {
+    public static Document stringToDocument(String xml) {
         return stringToDocument(xml, true, false, false);
     }
 
@@ -104,32 +95,27 @@
      * Uses the current DocumentBuilderFactory to converts a String
      * representation of XML into a Document.
      *
-     * @param xml XML serialized as a String
+     * @param xml            XML serialized as a String
      * @param nameSpaceAware determines whether the constructed Document
-     * is name-space aware
+     *                       is name-space aware
      * @return Document
      */
     public static Document stringToDocument(String xml, boolean nameSpaceAware, boolean allowXmlDoctypeDeclaration,
-                                            boolean allowXmlExternalEntityExpansion)
-    {
+                                            boolean allowXmlExternalEntityExpansion) {
         ClassUtil.validateCreation(Document.class);
 
         Document document = null;
-        try
-        {
-            if (xml != null)
-            {
+        try {
+            if (xml != null) {
                 StringReader reader = new StringReader(xml);
                 InputSource input = new InputSource(reader);
                 DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
 
-                if(!allowXmlDoctypeDeclaration)
-                {
+                if (!allowXmlDoctypeDeclaration) {
                     factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
                 }
 
-                if(!allowXmlExternalEntityExpansion)
-                {
+                if (!allowXmlExternalEntityExpansion) {
                     // Disable local resolution of entities due to security issues
                     // See: https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing
                     factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
@@ -144,9 +130,7 @@
 
                 document = builder.parse(input);
             }
-        }
-        catch (Exception ex)
-        {
+        } catch (Exception ex) {
             throw new MessageException("Error deserializing XML type " + ex.getMessage());
         }
 
diff --git a/core/src/main/java/flex/messaging/util/concurrent/DefaultThreadPoolExecutor.java b/core/src/main/java/flex/messaging/util/concurrent/DefaultThreadPoolExecutor.java
index 3298507..0b3c4bd 100644
--- a/core/src/main/java/flex/messaging/util/concurrent/DefaultThreadPoolExecutor.java
+++ b/core/src/main/java/flex/messaging/util/concurrent/DefaultThreadPoolExecutor.java
@@ -30,11 +30,8 @@
 /**
  * Implements {@link Executor} and extends the <code>ThreadPoolExecutor</code> provided by the
  * Java 1.4.x-friendly backport of the <code>java.util.concurrent</code> API.
- * 
- *
  */
-public class DefaultThreadPoolExecutor extends ThreadPoolExecutor implements Executor
-{
+public class DefaultThreadPoolExecutor extends ThreadPoolExecutor implements Executor {
     //--------------------------------------------------------------------------
     //
     // Constructors
@@ -45,43 +42,38 @@
      * Constructs a <code>DefaultThreadPoolExecutor</code> with configuration that
      * matches the return from {@link java.util.concurrent.Executors#newCachedThreadPool()}.
      */
-    public DefaultThreadPoolExecutor()
-    {
+    public DefaultThreadPoolExecutor() {
         super(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue());
-    }   
-    
+    }
+
     /**
      * @see java.util.concurrent.ThreadPoolExecutor#ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue)
      */
-    public DefaultThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue workQueue)
-    {
+    public DefaultThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue workQueue) {
         super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue);
     }
-    
+
     /**
      * @see java.util.concurrent.ThreadPoolExecutor#ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue, java.util.concurrent.RejectedExecutionHandler)
      */
-    public DefaultThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue workQueue, RejectedExecutionHandler handler)
-    {
-        super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, handler);        
+    public DefaultThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue workQueue, RejectedExecutionHandler handler) {
+        super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, handler);
     }
-    
+
     /**
      * @see java.util.concurrent.ThreadPoolExecutor#ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue, java.util.concurrent.ThreadFactory)
      */
-    public DefaultThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue workQueue, ThreadFactory threadFactory)
-    {
-        super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory);        
+    public DefaultThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue workQueue, ThreadFactory threadFactory) {
+        super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory);
     }
-    
+
     /**
      * @see java.util.concurrent.ThreadPoolExecutor#ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue, java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler)
      */
-    public DefaultThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler)
-    {
-        super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, handler);        
+    public DefaultThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler) {
+        super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, handler);
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Variables
@@ -92,67 +84,55 @@
      * Instance-level lock.
      */
     private final Object lock = new Object();
-    
+
     //--------------------------------------------------------------------------
     //
     // Properties
     //
     //--------------------------------------------------------------------------
-    
+
     //----------------------------------
     //  failedExecutionHandler
     //----------------------------------
 
     private FailedExecutionHandler handler;
-    
+
     /**
      * @see Executor#getFailedExecutionHandler()
      */
-    public FailedExecutionHandler getFailedExecutionHandler()
-    {
-        synchronized (lock)
-        {
+    public FailedExecutionHandler getFailedExecutionHandler() {
+        synchronized (lock) {
             return handler;
         }
     }
-    
+
     /**
      * @see Executor#setFailedExecutionHandler(FailedExecutionHandler)
      */
-    public void setFailedExecutionHandler(FailedExecutionHandler value)
-    {
-        synchronized (lock)
-        {
+    public void setFailedExecutionHandler(FailedExecutionHandler value) {
+        synchronized (lock) {
             handler = value;
         }
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Overridden Public Methods
     //
     //--------------------------------------------------------------------------
-    
+
     /**
-     *
      * This implementation relies on the default <code>RejectedExecutionHandler</code>, {@link java.util.concurrent.ThreadPoolExecutor.AbortPolicy}, which
      * throws a <code>RejectedExecutionException</code> if the command cannot be queued for execution.
      */
-    public void execute(Runnable command)
-    {
-        try
-        {
+    public void execute(Runnable command) {
+        try {
             super.execute(command);
-        }
-        catch (RejectedExecutionException e)
-        {
+        } catch (RejectedExecutionException e) {
             FailedExecutionHandler handler = getFailedExecutionHandler();
-            if (handler != null)
-            {
+            if (handler != null) {
                 handler.failedExecution(command, this, e);
-            }
-            else if (Log.isError())
-            {
+            } else if (Log.isError()) {
                 Log.getLogger(LogCategories.EXECUTOR).error("DefaultThreadPoolExecutor hit a RejectedExecutionException but no FailedExecutionHandler is registered to handle the error.", e);
             }
         }
diff --git a/core/src/main/java/flex/messaging/util/concurrent/Executor.java b/core/src/main/java/flex/messaging/util/concurrent/Executor.java
index b8c3507..1a429c9 100644
--- a/core/src/main/java/flex/messaging/util/concurrent/Executor.java
+++ b/core/src/main/java/flex/messaging/util/concurrent/Executor.java
@@ -19,40 +19,38 @@
 /**
  * This interface allows different Executor implementations to be chosen and used
  * without creating a direct dependency upon <code>java.util.concurrent.Executor</code>
- * added in Java 1.5, the Java 1.4.x-friendly backport of the <code>java.util.concurrent</code> APIs 
+ * added in Java 1.5, the Java 1.4.x-friendly backport of the <code>java.util.concurrent</code> APIs
  * which has a different package structure, or alternative work execution frameworks such as
- * IBM WebSphere 5's <code>com.ibm.websphere.asynchbeans.WorkManager</code> or the 
+ * IBM WebSphere 5's <code>com.ibm.websphere.asynchbeans.WorkManager</code> or the
  * <code>commonj.work.WorkManager</code> available in IBM WebSphere 6, BEA WebLogic 9 or
  * other application servers that support the <code>commonj</code> API.
- * Implementations should notify clients of any failure with executing a command by invoking 
+ * Implementations should notify clients of any failure with executing a command by invoking
  * the callback on the <code>FailedExecutionHandler</code> if one has been set.
- * 
- * @see java.util.concurrent.Executor
  *
- */ 
-public interface Executor
-{
+ * @see java.util.concurrent.Executor
+ */
+public interface Executor {
     /**
      * Executes the given command at some time in the future.
-     * The command may execute in a new thread, in a pooled thread, or in the calling thread, at the 
+     * The command may execute in a new thread, in a pooled thread, or in the calling thread, at the
      * discretion of the <code>Executor</code> implementation.
      * Implementation classes are free to throw a <code>RuntimeException</code> if the command can not
      * be executed.
-     * 
+     *
      * @param command The command to execute.
      */
     void execute(Runnable command);
-    
+
     /**
      * Returns the current handler for failed executions.
-     * 
+     *
      * @return The current handler.
      */
     FailedExecutionHandler getFailedExecutionHandler();
-    
+
     /**
      * Sets the handler for failed executions.
-     * 
+     *
      * @param handler The new handler.
      */
     void setFailedExecutionHandler(FailedExecutionHandler handler);
diff --git a/core/src/main/java/flex/messaging/util/concurrent/FailedExecutionHandler.java b/core/src/main/java/flex/messaging/util/concurrent/FailedExecutionHandler.java
index 92753b4..f50d459 100644
--- a/core/src/main/java/flex/messaging/util/concurrent/FailedExecutionHandler.java
+++ b/core/src/main/java/flex/messaging/util/concurrent/FailedExecutionHandler.java
@@ -20,17 +20,16 @@
  * This interface defines a callback that can be registered with an {@link Executor}
  * to be notified when execution of a <code>Runnable</code> has failed.
  */
-public interface FailedExecutionHandler
-{
+public interface FailedExecutionHandler {
     /**
      * Invoked when a <code>Runnable</code> has failed to execute.
      * This is most commonly invoked when the <code>Runnable</code> can not be queued
      * for execution, but may also be invoked if an uncaught <code>Exception</code> was
      * thrown and the <code>Executor</code> implementation has support for catching this
      * and notifying via this callback.
-     * 
-     * @param command The <code>Runnable</code> command that failed to execute.
-     * @param executor The <code>Executor</code> that was unable to execute the command.
+     *
+     * @param command   The <code>Runnable</code> command that failed to execute.
+     * @param executor  The <code>Executor</code> that was unable to execute the command.
      * @param exception The <code>Exception</code> identifying why the command failed to execute.
      */
     void failedExecution(Runnable command, Executor executor, Exception exception);
diff --git a/core/src/main/java/flex/messaging/validators/DeserializationValidator.java b/core/src/main/java/flex/messaging/validators/DeserializationValidator.java
index b4dabd0..a1554d4 100644
--- a/core/src/main/java/flex/messaging/validators/DeserializationValidator.java
+++ b/core/src/main/java/flex/messaging/validators/DeserializationValidator.java
@@ -23,15 +23,14 @@
  * opportunity to validate the creation of classes and assignment of a property
  * of an instance to a value for incoming (client-to-server) deserialization.
  */
-public interface DeserializationValidator extends FlexConfigurable
-{
+public interface DeserializationValidator extends FlexConfigurable {
 
     /**
      * Validate the assignment of a value to an index of an Array or List instance.
      *
      * @param instance The Array or List instance.
-     * @param index The index at which the value is being assigned.
-     * @param value The value that is assigned to the index.
+     * @param index    The index at which the value is being assigned.
+     * @param value    The value that is assigned to the index.
      * @return True if the assignment is valid.
      */
     boolean validateAssignment(Object instance, int index, Object value);
@@ -39,9 +38,9 @@
     /**
      * Validate the assignment of a property of an instance to a value.
      *
-     * @param instance The instance with the property that is being assigned a new value.
+     * @param instance     The instance with the property that is being assigned a new value.
      * @param propertyName The name of the property that is being assigned.
-     * @param value The value that the property is being assigned to.
+     * @param value        The value that the property is being assigned to.
      * @return True if the assignment is valid.
      */
     boolean validateAssignment(Object instance, String propertyName, Object value);
diff --git a/core/src/test/java/flex/messaging/cluster/SerializationProxyTest.java b/core/src/test/java/flex/messaging/cluster/SerializationProxyTest.java
index ceb9d05..00a62ab 100644
--- a/core/src/test/java/flex/messaging/cluster/SerializationProxyTest.java
+++ b/core/src/test/java/flex/messaging/cluster/SerializationProxyTest.java
@@ -28,8 +28,7 @@
 import java.io.ObjectOutputStream;
 
 
-public class SerializationProxyTest
-{
+public class SerializationProxyTest {
     /**
      * For clustering, SerializationProxys must be serialized and
      * deserialized.  This is because any message with a SerializationProxy,
@@ -39,8 +38,7 @@
      * Bug: LCDS-910
      */
     @Test
-    public void testRoundTripSerialization() throws Exception
-    {
+    public void testRoundTripSerialization() throws Exception {
         ASObject as = new ASObject();
         as.put("name", "cathy");
         SerializationProxy proxy = new SerializationProxy(as);
diff --git a/core/src/test/java/flex/messaging/config/ConfigurationParserTest.java b/core/src/test/java/flex/messaging/config/ConfigurationParserTest.java
index 924c007..f2d07c9 100644
--- a/core/src/test/java/flex/messaging/config/ConfigurationParserTest.java
+++ b/core/src/test/java/flex/messaging/config/ConfigurationParserTest.java
@@ -62,7 +62,7 @@
     private void processDirectory(File dir, String resourcePath) throws IOException {
         File[] files = dir.listFiles(new XMLFilenameFilter());
 
-        if(files != null) {
+        if (files != null) {
             for (File f : files) {
                 if (f.isDirectory()) {
                     resourcePath = getResourcePath(f.getAbsolutePath());
diff --git a/core/src/test/java/flex/messaging/config/services/Confirm1a.java b/core/src/test/java/flex/messaging/config/services/Confirm1a.java
index 92a0307..41f3ed3 100644
--- a/core/src/test/java/flex/messaging/config/services/Confirm1a.java
+++ b/core/src/test/java/flex/messaging/config/services/Confirm1a.java
@@ -22,12 +22,10 @@
 import flex.messaging.config.ServiceSettings;
 import flex.messaging.LocalizedException;
 
-public class Confirm1a extends ConfigurationConfirmation
-{
+public class Confirm1a extends ConfigurationConfirmation {
     private MessagingConfiguration EXPECTED_VALUE;
 
-    public Confirm1a()
-    {
+    public Confirm1a() {
         MessagingConfiguration config = new MessagingConfiguration();
 
         ServiceSettings service = new ServiceSettings("foo-service");
@@ -41,13 +39,11 @@
         EXPECTED_VALUE = config;
     }
 
-    public MessagingConfiguration getExpectedConfiguration()
-    {
+    public MessagingConfiguration getExpectedConfiguration() {
         return EXPECTED_VALUE;
     }
 
-    public LocalizedException getExpectedException()
-    {
+    public LocalizedException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/config/services/Confirm1b.java b/core/src/test/java/flex/messaging/config/services/Confirm1b.java
index 64435f2..dc6c5bb 100644
--- a/core/src/test/java/flex/messaging/config/services/Confirm1b.java
+++ b/core/src/test/java/flex/messaging/config/services/Confirm1b.java
@@ -24,12 +24,10 @@
 import flex.messaging.config.ChannelSettings;
 import flex.messaging.LocalizedException;
 
-public class Confirm1b extends ConfigurationConfirmation
-{
+public class Confirm1b extends ConfigurationConfirmation {
     private MessagingConfiguration EXPECTED_VALUE;
 
-    public Confirm1b()
-    {
+    public Confirm1b() {
         MessagingConfiguration config = new MessagingConfiguration();
 
         // Channels
@@ -74,13 +72,11 @@
         EXPECTED_VALUE = config;
     }
 
-    public MessagingConfiguration getExpectedConfiguration()
-    {
+    public MessagingConfiguration getExpectedConfiguration() {
         return EXPECTED_VALUE;
     }
 
-    public LocalizedException getExpectedException()
-    {
+    public LocalizedException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/config/services/Confirm1c.java b/core/src/test/java/flex/messaging/config/services/Confirm1c.java
index fa51131..7e0926f 100644
--- a/core/src/test/java/flex/messaging/config/services/Confirm1c.java
+++ b/core/src/test/java/flex/messaging/config/services/Confirm1c.java
@@ -30,12 +30,10 @@
 import java.util.List;
 import java.util.Iterator;
 
-public class Confirm1c extends ConfigurationConfirmation
-{
+public class Confirm1c extends ConfigurationConfirmation {
     protected MessagingConfiguration EXPECTED_VALUE;
 
-    public Confirm1c()
-    {
+    public Confirm1c() {
         MessagingConfiguration config = new MessagingConfiguration();
 
         ChannelSettings fooChannel = new ChannelSettings("foo-channel");
@@ -60,16 +58,14 @@
         // Destination Channels (from default)
         List defaultChannels = fooService.getDefaultChannels();
         Iterator it = defaultChannels.iterator();
-        while (it.hasNext())
-        {
-            ChannelSettings c = (ChannelSettings)it.next();
+        while (it.hasNext()) {
+            ChannelSettings c = (ChannelSettings) it.next();
             fooDest.addChannelSettings(c);
         }
 
         // Destination Adapters (from default)
         AdapterSettings defaultAdapter = fooService.getDefaultAdapter();
-        if (fooDest.getAdapterSettings() == null && defaultAdapter != null)
-        {
+        if (fooDest.getAdapterSettings() == null && defaultAdapter != null) {
             fooDest.setAdapterSettings(defaultAdapter);
         }
 
@@ -86,13 +82,11 @@
         EXPECTED_VALUE = config;
     }
 
-    public MessagingConfiguration getExpectedConfiguration()
-    {
+    public MessagingConfiguration getExpectedConfiguration() {
         return EXPECTED_VALUE;
     }
 
-    public LocalizedException getExpectedException()
-    {
+    public LocalizedException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/config/services/Confirm1d.java b/core/src/test/java/flex/messaging/config/services/Confirm1d.java
index 2125f88..d84fa84 100644
--- a/core/src/test/java/flex/messaging/config/services/Confirm1d.java
+++ b/core/src/test/java/flex/messaging/config/services/Confirm1d.java
@@ -27,12 +27,10 @@
 import flex.messaging.config.DestinationSettings;
 import flex.messaging.LocalizedException;
 
-public class Confirm1d extends ConfigurationConfirmation
-{
+public class Confirm1d extends ConfigurationConfirmation {
     private MessagingConfiguration EXPECTED_VALUE;
 
-    public Confirm1d()
-    {
+    public Confirm1d() {
         MessagingConfiguration config = new MessagingConfiguration();
 
         // Security
@@ -99,13 +97,11 @@
         EXPECTED_VALUE = config;
     }
 
-    public MessagingConfiguration getExpectedConfiguration()
-    {
+    public MessagingConfiguration getExpectedConfiguration() {
         return EXPECTED_VALUE;
     }
 
-    public LocalizedException getExpectedException()
-    {
+    public LocalizedException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/config/services/Confirm1e.java b/core/src/test/java/flex/messaging/config/services/Confirm1e.java
index cffc29b..f561929 100644
--- a/core/src/test/java/flex/messaging/config/services/Confirm1e.java
+++ b/core/src/test/java/flex/messaging/config/services/Confirm1e.java
@@ -21,20 +21,16 @@
 import flex.messaging.LocalizedException;
 
 
-public class Confirm1e extends Confirm1c
-{
-    public Confirm1e()
-    {
+public class Confirm1e extends Confirm1c {
+    public Confirm1e() {
         super();
     }
 
-    public MessagingConfiguration getExpectedConfiguration()
-    {
+    public MessagingConfiguration getExpectedConfiguration() {
         return EXPECTED_VALUE;
     }
 
-    public LocalizedException getExpectedException()
-    {
+    public LocalizedException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/config/services/Confirm1f.java b/core/src/test/java/flex/messaging/config/services/Confirm1f.java
index 8863878..fc31421 100644
--- a/core/src/test/java/flex/messaging/config/services/Confirm1f.java
+++ b/core/src/test/java/flex/messaging/config/services/Confirm1f.java
@@ -20,20 +20,16 @@
 import flex.messaging.config.MessagingConfiguration;
 import flex.messaging.LocalizedException;
 
-public class Confirm1f extends Confirm1c
-{
-    public Confirm1f()
-    {
+public class Confirm1f extends Confirm1c {
+    public Confirm1f() {
         super();
     }
 
-    public MessagingConfiguration getExpectedConfiguration()
-    {
+    public MessagingConfiguration getExpectedConfiguration() {
         return EXPECTED_VALUE;
     }
 
-    public LocalizedException getExpectedException()
-    {
+    public LocalizedException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/config/services/Confirm1g.java b/core/src/test/java/flex/messaging/config/services/Confirm1g.java
index b2e0279..bb70b6a 100644
--- a/core/src/test/java/flex/messaging/config/services/Confirm1g.java
+++ b/core/src/test/java/flex/messaging/config/services/Confirm1g.java
@@ -22,24 +22,19 @@
 import flex.messaging.LocalizedException;
 import flex.messaging.MessageException;
 
-public class Confirm1g extends ConfigurationConfirmation
-{
-    public Confirm1g()
-    {
+public class Confirm1g extends ConfigurationConfirmation {
+    public Confirm1g() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public MessagingConfiguration getExpectedConfiguration()
-    {
+    public MessagingConfiguration getExpectedConfiguration() {
         return null;
     }
 
-    public LocalizedException getExpectedException()
-    {
+    public LocalizedException getExpectedException() {
         return new MessageException("Invalid service id 'foo-service,'.");
     }
 }
diff --git a/core/src/test/java/flex/messaging/config/services/Confirm1h.java b/core/src/test/java/flex/messaging/config/services/Confirm1h.java
index af5e0ec..cec1bc0 100644
--- a/core/src/test/java/flex/messaging/config/services/Confirm1h.java
+++ b/core/src/test/java/flex/messaging/config/services/Confirm1h.java
@@ -22,24 +22,19 @@
 import flex.messaging.LocalizedException;
 import flex.messaging.MessageException;
 
-public class Confirm1h extends ConfigurationConfirmation
-{
-    public Confirm1h()
-    {
+public class Confirm1h extends ConfigurationConfirmation {
+    public Confirm1h() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public MessagingConfiguration getExpectedConfiguration()
-    {
+    public MessagingConfiguration getExpectedConfiguration() {
         return null;
     }
 
-    public LocalizedException getExpectedException()
-    {
+    public LocalizedException getExpectedException() {
         return new MessageException("Unexpected attribute 'security' found in 'destination' from file: 1h.xml.");
     }
 }
diff --git a/core/src/test/java/flex/messaging/config/services/Confirm1i.java b/core/src/test/java/flex/messaging/config/services/Confirm1i.java
index bfa2d6b..e2f6664 100644
--- a/core/src/test/java/flex/messaging/config/services/Confirm1i.java
+++ b/core/src/test/java/flex/messaging/config/services/Confirm1i.java
@@ -21,20 +21,16 @@
 import flex.messaging.config.MessagingConfiguration;
 
 
-public class Confirm1i extends Confirm1c
-{
-    public Confirm1i()
-    {
+public class Confirm1i extends Confirm1c {
+    public Confirm1i() {
         super();
     }
 
-    public MessagingConfiguration getExpectedConfiguration()
-    {
+    public MessagingConfiguration getExpectedConfiguration() {
         return EXPECTED_VALUE;
     }
 
-    public LocalizedException getExpectedException()
-    {
+    public LocalizedException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/config/services/Confirm1j.java b/core/src/test/java/flex/messaging/config/services/Confirm1j.java
index 4c74e4c..0d98692 100644
--- a/core/src/test/java/flex/messaging/config/services/Confirm1j.java
+++ b/core/src/test/java/flex/messaging/config/services/Confirm1j.java
@@ -20,20 +20,16 @@
 import flex.messaging.LocalizedException;
 import flex.messaging.config.MessagingConfiguration;
 
-public class Confirm1j extends Confirm1c
-{
-    public Confirm1j()
-    {
+public class Confirm1j extends Confirm1c {
+    public Confirm1j() {
         super();
     }
 
-    public MessagingConfiguration getExpectedConfiguration()
-    {
+    public MessagingConfiguration getExpectedConfiguration() {
         return EXPECTED_VALUE;
     }
 
-    public LocalizedException getExpectedException()
-    {
+    public LocalizedException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/AmfxSerializationTest.java b/core/src/test/java/flex/messaging/io/amfx/AmfxSerializationTest.java
index 84c32d2..aff86e0 100644
--- a/core/src/test/java/flex/messaging/io/amfx/AmfxSerializationTest.java
+++ b/core/src/test/java/flex/messaging/io/amfx/AmfxSerializationTest.java
@@ -86,7 +86,7 @@
     private void processDirectory(File dir, String resourcePath) throws IOException {
         File[] files = dir.listFiles(new XMLFilenameFilter());
 
-        if(files != null) {
+        if (files != null) {
             for (File f : files) {
                 if (f.isDirectory()) {
                     resourcePath = getResourcePath(f.getAbsolutePath());
@@ -245,11 +245,9 @@
 
             if (f.isDirectory() && !name.startsWith(".svn")) {
                 return true;
-            }
-            else if (name.toLowerCase().endsWith(".xml")) {
+            } else if (name.toLowerCase().endsWith(".xml")) {
                 return true;
-            }
-            else {
+            } else {
                 return false;
             }
         }
diff --git a/core/src/test/java/flex/messaging/io/amfx/DeserializationConfirmation.java b/core/src/test/java/flex/messaging/io/amfx/DeserializationConfirmation.java
index c4b5794..c5d244a 100644
--- a/core/src/test/java/flex/messaging/io/amfx/DeserializationConfirmation.java
+++ b/core/src/test/java/flex/messaging/io/amfx/DeserializationConfirmation.java
@@ -40,52 +40,42 @@
  * Verifies that a deserialized ActionMessage
  * from an AMFX request matches the expected value.
  */
-public abstract class DeserializationConfirmation
-{
+public abstract class DeserializationConfirmation {
     public static final int EXPECTED_VERSION = 3;
 
     private IdentityHashMap knownObjects;
 
     protected SerializationContext context;
 
-    protected DeserializationConfirmation()
-    {
+    protected DeserializationConfirmation() {
     }
 
-    private void init()
-    {
+    private void init() {
         knownObjects = new IdentityHashMap(64);
     }
 
-    public void setContext(SerializationContext context)
-    {
+    public void setContext(SerializationContext context) {
         this.context = context;
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return false;
     }
 
-    public boolean successMatches(ActionMessage m)
-    {
+    public boolean successMatches(ActionMessage m) {
         init();
 
-        try
-        {
+        try {
             boolean match = messagesMatch(m, getExpectedMessage());
             return match;
-        }
-        catch (Exception ex)
-        {
+        } catch (Exception ex) {
             return false;
         }
     }
 
     public abstract ActionMessage getExpectedMessage();
 
-    public boolean negativeMatches(ActionMessage m)
-    {
+    public boolean negativeMatches(ActionMessage m) {
         init();
 
         MessageException ex = null;
@@ -94,7 +84,7 @@
         if ((body == null) || (body.getData() == null) || (!(body.getData() instanceof MessageException)))
             return false;
         else
-            ex = (MessageException)body.getData();
+            ex = (MessageException) body.getData();
 
         String message1 = ex.getMessage();
         String message2 = getExpectedException().getMessage();
@@ -111,8 +101,7 @@
     public abstract MessageException getExpectedException();
 
 
-    protected boolean headersMatch(MessageHeader header1, MessageHeader header2)
-    {
+    protected boolean headersMatch(MessageHeader header1, MessageHeader header2) {
         if ((header1 == null && header2 != null) || (header1 != null && header2 == null))
             return false;
 
@@ -131,13 +120,11 @@
         return true;
     }
 
-    protected boolean headerValuesMatch(Object o1, Object o2)
-    {
+    protected boolean headerValuesMatch(Object o1, Object o2) {
         return valuesMatch(o1, o2);
     }
 
-    protected boolean bodiesMatch(MessageBody body1, MessageBody body2)
-    {
+    protected boolean bodiesMatch(MessageBody body1, MessageBody body2) {
         if ((body1 == null && body2 != null) || (body1 != null && body2 == null))
             return false;
 
@@ -156,13 +143,11 @@
         return true;
     }
 
-    protected boolean bodyValuesMatch(Object o1, Object o2)
-    {
+    protected boolean bodyValuesMatch(Object o1, Object o2) {
         return valuesMatch(o1, o2);
     }
 
-    protected boolean messagesMatch(ActionMessage m1, ActionMessage m2)
-    {
+    protected boolean messagesMatch(ActionMessage m1, ActionMessage m2) {
         if ((m1 == null && m2 != null) || (m2 == null && m1 != null))
             return false;
 
@@ -175,8 +160,7 @@
         if (headerCount1 != headerCount2)
             return false;
 
-        for (int i = 0; i < headerCount1; i++)
-        {
+        for (int i = 0; i < headerCount1; i++) {
             MessageHeader header1 = m1.getHeader(i);
             MessageHeader header2 = m2.getHeader(i);
             if (!headersMatch(header1, header2))
@@ -189,8 +173,7 @@
         if (bodyCount1 != bodyCount2)
             return false;
 
-        for (int i = 0; i < bodyCount1; i++)
-        {
+        for (int i = 0; i < bodyCount1; i++) {
             MessageBody body1 = m1.getBody(i);
             MessageBody body2 = m2.getBody(i);
 
@@ -201,51 +184,35 @@
         return true;
     }
 
-    protected boolean valuesMatch(Object o1, Object o2)
-    {
+    protected boolean valuesMatch(Object o1, Object o2) {
         if (o1 == null && o2 == null)
             return true;
 
-        if (o1 instanceof ASObject)
-        {
-            return objectsMatch((ASObject)o1, (Map)o2);
-        }
-        else if (o1 instanceof Map)
-        {
-            return mapsMatch((Map)o1, (Map)o2);
-        }
-        else if (o1 instanceof List)
-        {
-            return listsMatch((List)o1, (List)o2);
-        }
-        else if (o1.getClass().isArray())
-        {
+        if (o1 instanceof ASObject) {
+            return objectsMatch((ASObject) o1, (Map) o2);
+        } else if (o1 instanceof Map) {
+            return mapsMatch((Map) o1, (Map) o2);
+        } else if (o1 instanceof List) {
+            return listsMatch((List) o1, (List) o2);
+        } else if (o1.getClass().isArray()) {
             return arraysMatch(o1, o2);
-        }
-        else if (o1 instanceof Document)
-        {
-            return documentsMatch((Document)o1, (Document)o2);
-        }
-        else if (o1 != null)
-        {
-            if (hasComplexChildren(o1))
-            {
+        } else if (o1 instanceof Document) {
+            return documentsMatch((Document) o1, (Document) o2);
+        } else if (o1 != null) {
+            if (hasComplexChildren(o1)) {
                 // We avoid checking a complex/custom types twice in
                 // case of circular dependencies
                 Object known = knownObjects.get(o1);
-                if (known != null)
-                {
+                if (known != null) {
                     return true;
-                }
-                else
-                {
+                } else {
                     knownObjects.put(o1, o2);
                 }
             }
 
             // Special case Double and Integer
             if (o1 instanceof Double && o2 instanceof Integer)
-                return new Integer(((Double)o1).intValue()).equals(o2);
+                return new Integer(((Double) o1).intValue()).equals(o2);
 
             return o1.equals(o2);
         }
@@ -253,26 +220,21 @@
         return false;
     }
 
-    protected boolean documentsMatch(Document doc1, Document doc2)
-    {
+    protected boolean documentsMatch(Document doc1, Document doc2) {
         boolean match = false;
 
-        try
-        {
+        try {
             CachedXPathAPI xpath1 = new CachedXPathAPI();
             CachedXPathAPI xpath2 = new CachedXPathAPI();
             Node root1 = xpath1.selectSingleNode(doc1, "/");
             Node root2 = xpath2.selectSingleNode(doc2, "/");
 
-            if (!nodesMatch(xpath1, root1, xpath2, root2))
-            {
+            if (!nodesMatch(xpath1, root1, xpath2, root2)) {
                 return false;
             }
 
             match = true;
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             throw new MessageException("Error comparing XML Documents: " + t.getMessage(), t);
         }
 
@@ -280,41 +242,33 @@
 
     }
 
-    protected boolean nodesMatch(CachedXPathAPI xpath1, Node node1, CachedXPathAPI xpath2, Node node2)
-    {
+    protected boolean nodesMatch(CachedXPathAPI xpath1, Node node1, CachedXPathAPI xpath2, Node node2) {
         boolean match = false;
 
-        try
-        {
+        try {
             NodeList list1 = xpath1.selectNodeList(node1, "*");
             NodeList list2 = xpath2.selectNodeList(node2, "*");
 
-            if (list1.getLength() == list2.getLength())
-            {
-                for (int i = 0; i < list1.getLength(); i++)
-                {
+            if (list1.getLength() == list2.getLength()) {
+                for (int i = 0; i < list1.getLength(); i++) {
                     Node n1 = list1.item(i);
                     Node n2 = list2.item(i);
 
                     NodeList attributes1 = xpath1.selectNodeList(n1, "@*");
                     NodeList attributes2 = xpath2.selectNodeList(n2, "@*");
 
-                    if (!attributesMatch(attributes1, attributes2))
-                    {
+                    if (!attributesMatch(attributes1, attributes2)) {
                         return false;
                     }
 
-                    if (!nodesMatch(xpath1, n1, xpath2, n2))
-                    {
+                    if (!nodesMatch(xpath1, n1, xpath2, n2)) {
                         return false;
                     }
                 }
 
                 match = true;
             }
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             throw new MessageException("Error comparing XML nodes: " + t.getMessage(), t);
         }
 
@@ -322,17 +276,14 @@
 
     }
 
-    protected boolean attributesMatch(NodeList attributes1, NodeList attributes2)
-    {
+    protected boolean attributesMatch(NodeList attributes1, NodeList attributes2) {
         if (attributes1 == null && attributes2 == null)
             return true;
 
         boolean match = false;
 
-        if (attributes1.getLength() == attributes2.getLength())
-        {
-            for (int i = 0; i < attributes1.getLength(); i++)
-            {
+        if (attributes1.getLength() == attributes2.getLength()) {
+            for (int i = 0; i < attributes1.getLength(); i++) {
                 Node a1 = attributes1.item(i);
                 Node a2 = attributes2.item(i);
 
@@ -350,16 +301,14 @@
     }
 
 
-    protected boolean objectsMatch(ASObject aso1, Map aso2)
-    {
+    protected boolean objectsMatch(ASObject aso1, Map aso2) {
         String type1 = aso1.getType();
 
         // We may have an anonymous ASObject and an ECMA Array
         // which get serialized in the same way, i.e. a Map,
         // so we ignore this difference
-        if (type1 != null)
-        {
-            String type2 = ((ASObject)aso2).getType();
+        if (type1 != null) {
+            String type2 = ((ASObject) aso2).getType();
 
             if (!stringValuesMatch(type1, type2))
                 return false;
@@ -368,8 +317,7 @@
         return mapsMatch(aso1, aso2);
     }
 
-    protected boolean stringValuesMatch(String str1, String str2)
-    {
+    protected boolean stringValuesMatch(String str1, String str2) {
         if (str1 == null && str2 == null)
             return true;
 
@@ -379,38 +327,30 @@
         return true;
     }
 
-    protected boolean mapsMatch(Map map1, Map map2)
-    {
+    protected boolean mapsMatch(Map map1, Map map2) {
         if (map1.size() != map2.size())
             return false;
 
         // We avoid checking a Map twice in case
         // of circular dependencies
         Object known = knownObjects.get(map1);
-        if (known != null)
-        {
+        if (known != null) {
             return true;
-        }
-        else
-        {
+        } else {
             knownObjects.put(map1, map2);
         }
 
         Iterator it = map1.keySet().iterator();
-        while (it.hasNext())
-        {
+        while (it.hasNext()) {
             Object next = it.next();
-            if (next instanceof String)
-            {
-                String key = (String)next;
+            if (next instanceof String) {
+                String key = (String) next;
                 Object val1 = map1.get(key);
                 Object val2 = map2.get(key);
 
                 if (!valuesMatch(val1, val2))
                     return false;
-            }
-            else
-            {
+            } else {
                 return false;
             }
         }
@@ -418,25 +358,20 @@
         return true;
     }
 
-    protected boolean listsMatch(List list1, List list2)
-    {
+    protected boolean listsMatch(List list1, List list2) {
         if (list1.size() != list2.size())
             return false;
 
         // We avoid checking a List twice in case
         // of circular dependencies
         Object known = knownObjects.get(list1);
-        if (known != null)
-        {
+        if (known != null) {
             return true;
-        }
-        else
-        {
+        } else {
             knownObjects.put(list1, list2);
         }
 
-        for (int i = 0; i < list1.size(); i++)
-        {
+        for (int i = 0; i < list1.size(); i++) {
             Object o1 = list1.get(i);
             Object o2 = list2.get(i);
 
@@ -447,8 +382,7 @@
         return true;
     }
 
-    protected boolean arraysMatch(Object array1, Object array2)
-    {
+    protected boolean arraysMatch(Object array1, Object array2) {
         int len1 = Array.getLength(array1);
         int len2 = Array.getLength(array2);
 
@@ -458,17 +392,13 @@
         // We avoid checking an Array twice in case
         // of circular dependencies
         Object known = knownObjects.get(array1);
-        if (known != null)
-        {
+        if (known != null) {
             return true;
-        }
-        else
-        {
+        } else {
             knownObjects.put(array1, array2);
         }
 
-        for (int i = 0; i < len1; i++)
-        {
+        for (int i = 0; i < len1; i++) {
             Object o1 = Array.get(array1, i);
             Object o2 = Array.get(array2, i);
 
@@ -479,38 +409,33 @@
         return true;
     }
 
-    protected void addToList(Object list, int index, Object value)
-    {
+    protected void addToList(Object list, int index, Object value) {
         if (list instanceof List)
-            ((List)list).add(value);
+            ((List) list).add(value);
         else if (list.getClass().isArray())
             Array.set(list, index, value);
     }
 
-    protected Object getFromList(Object list, int index)
-    {
+    protected Object getFromList(Object list, int index) {
         if (list instanceof List)
-            return ((List)list).get(index);
+            return ((List) list).get(index);
         else
             return Array.get(list, index);
     }
 
-    protected Object createList(int length)
-    {
+    protected Object createList(int length) {
         if (context.legacyCollection)
             return new ArrayList(length);
         else
             return new Object[length];
     }
 
-    private static boolean hasComplexChildren(Object o)
-    {
+    private static boolean hasComplexChildren(Object o) {
         if (o instanceof String
                 || o instanceof Boolean
                 || o instanceof Number
                 || o instanceof Character
-                || o instanceof Date)
-        {
+                || o instanceof Date) {
             return false;
         }
 
diff --git a/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1a.java b/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1a.java
index 0de5480..4de9e2f 100644
--- a/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1a.java
@@ -20,23 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm1a extends DeserializationConfirmation
-{
+public class Confirm1a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm1a()
-    {
+    public Confirm1a() {
         ActionMessage m = new ActionMessage();
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1b.java b/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1b.java
index 48387d0..676d882 100644
--- a/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1b.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.MessageHeader;
 import flex.messaging.MessageException;
 
-public class Confirm1b extends DeserializationConfirmation
-{
+public class Confirm1b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm1b()
-    {
+    public Confirm1b() {
         ActionMessage m = new ActionMessage();
 
         MessageHeader header = new MessageHeader();
@@ -42,13 +40,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1c.java b/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1c.java
index 3819ec0..7e25666 100644
--- a/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/amfx_tag/Confirm1c.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm1c extends DeserializationConfirmation
-{
-    public Confirm1c()
-    {
+public class Confirm1c extends DeserializationConfirmation {
+    public Confirm1c() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Unknown version: Invalid");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2a.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2a.java
index 5f10150..08f794d 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2a.java
@@ -14,25 +14,21 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- package flex.messaging.io.amfx.array_tag;
+package flex.messaging.io.amfx.array_tag;
 
 import flex.messaging.io.amfx.DeserializationConfirmation;
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm2a extends DeserializationConfirmation
-{
+public class Confirm2a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm2a()
-    {
+    public Confirm2a() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -52,8 +48,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2b.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2b.java
index 0072b72..a610ac3 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2b.java
@@ -22,18 +22,14 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm2b extends DeserializationConfirmation
-{
+public class Confirm2b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm2b()
-    {
+    public Confirm2b() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -60,8 +56,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2c.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2c.java
index 258eb6e..ebabd91 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2c.java
@@ -23,18 +23,14 @@
 
 import java.util.Date;
 
-public class Confirm2c extends DeserializationConfirmation
-{
+public class Confirm2c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm2c()
-    {
+    public Confirm2c() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -55,8 +51,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2d.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2d.java
index 7f8c9c6..fd0e50b 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2d.java
@@ -22,18 +22,14 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm2d extends DeserializationConfirmation
-{
+public class Confirm2d extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm2d()
-    {
+    public Confirm2d() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -58,8 +54,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2e.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2e.java
index 747de55..2c7c5ea 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2e.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2e.java
@@ -21,18 +21,14 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm2e extends DeserializationConfirmation
-{
+public class Confirm2e extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm2e()
-    {
+    public Confirm2e() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -47,19 +43,16 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 
-    protected boolean bodyValuesMatch(Object o1, Object o2)
-    {
+    protected boolean bodyValuesMatch(Object o1, Object o2) {
         boolean match = super.bodyValuesMatch(o1, o2);
 
         // Also check that by-reference serialization of the array restored
         // the pointers to the original array...
-        if (match)
-        {
+        if (match) {
             Object list1 = getFromList(o1, 0);
 
             if (o1 != list1)
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2f.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2f.java
index 2f63c7e..4609497 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2f.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2f.java
@@ -22,18 +22,14 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm2f extends DeserializationConfirmation
-{
+public class Confirm2f extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm2f()
-    {
+    public Confirm2f() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -59,24 +55,21 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 
-    protected boolean bodyValuesMatch(Object o1, Object o2)
-    {
+    protected boolean bodyValuesMatch(Object o1, Object o2) {
         boolean match = super.bodyValuesMatch(o1, o2);
 
         // Also check that by-reference serialization of the array restored
         // the pointers to the original array in the parent object's sub property...
-        if (match)
-        {
-            ASObject aso1 = (ASObject)o1;
-            ASObject aso2 = (ASObject)o2;
+        if (match) {
+            ASObject aso1 = (ASObject) o1;
+            ASObject aso2 = (ASObject) o2;
 
-            ASObject prop01 = (ASObject)aso1.get("prop0");
-            ASObject prop02 = (ASObject)aso2.get("prop0");
+            ASObject prop01 = (ASObject) aso1.get("prop0");
+            ASObject prop02 = (ASObject) aso2.get("prop0");
 
             Object subprop01 = prop01.get("subprop0");
             Object subprop02 = prop02.get("subprop0");
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2g.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2g.java
index a647dd3..c3a4d16 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2g.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2g.java
@@ -24,12 +24,10 @@
 import java.util.Map;
 import java.util.HashMap;
 
-public class Confirm2g extends DeserializationConfirmation
-{
+public class Confirm2g extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm2g()
-    {
+    public Confirm2g() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -41,13 +39,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2h.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2h.java
index eccd05a..1893d85 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2h.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2h.java
@@ -24,12 +24,10 @@
 import java.util.Map;
 import java.util.HashMap;
 
-public class Confirm2h extends DeserializationConfirmation
-{
+public class Confirm2h extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm2h()
-    {
+    public Confirm2h() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -42,13 +40,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2i.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2i.java
index 64602cb..095b7ef 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2i.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2i.java
@@ -24,18 +24,14 @@
 import java.util.Map;
 import java.util.HashMap;
 
-public class Confirm2i extends DeserializationConfirmation
-{
+public class Confirm2i extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm2i()
-    {
+    public Confirm2i() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -67,8 +63,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2j.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2j.java
index 9f11f5d..3e40162 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2j.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2j.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm2j extends DeserializationConfirmation
-{
-    public Confirm2j()
-    {
+public class Confirm2j extends DeserializationConfirmation {
+    public Confirm2j() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Invalid array length: Invalid");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2k.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2k.java
index ec34a79..63e51af 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2k.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2k.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm2k extends DeserializationConfirmation
-{
-    public Confirm2k()
-    {
+public class Confirm2k extends DeserializationConfirmation {
+    public Confirm2k() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Array item names cannot be the empty string.");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2l.java b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2l.java
index b73572a..299cfe0 100644
--- a/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2l.java
+++ b/core/src/test/java/flex/messaging/io/amfx/array_tag/Confirm2l.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm2l extends DeserializationConfirmation
-{
-    public Confirm2l()
-    {
+public class Confirm2l extends DeserializationConfirmation {
+    public Confirm2l() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         String name = "prop0";
         return new MessageException("Unexpected array item name: " + name + ". Please set the ecma attribute to 'true'.");
     }
diff --git a/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3a.java b/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3a.java
index 7e575c1..2c2b936 100644
--- a/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3a.java
@@ -21,25 +21,21 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm3a extends DeserializationConfirmation
-{
+public class Confirm3a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm3a()
-    {
+    public Confirm3a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3b.java b/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3b.java
index ae070e7..7e22f07 100644
--- a/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3b.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm3b extends DeserializationConfirmation
-{
+public class Confirm3b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm3b()
-    {
+    public Confirm3b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         body.setData("Sample Value");
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3c.java b/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3c.java
index 8eabac1..8d22d2b 100644
--- a/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3c.java
@@ -22,18 +22,14 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm3c extends DeserializationConfirmation
-{
+public class Confirm3c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm3c()
-    {
+    public Confirm3c() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
 
             MessageBody body = new MessageBody();
@@ -59,8 +55,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3d.java b/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3d.java
index 8f129e3..806a1a6 100644
--- a/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/body_tag/Confirm3d.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm3d extends DeserializationConfirmation
-{
-    public Confirm3d()
-    {
+public class Confirm3d extends DeserializationConfirmation {
+    public Confirm3d() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Unexpected body tag.");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/bytes_tag/Confirm16a.java b/core/src/test/java/flex/messaging/io/amfx/bytes_tag/Confirm16a.java
index 37740a6..5a293e4 100644
--- a/core/src/test/java/flex/messaging/io/amfx/bytes_tag/Confirm16a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/bytes_tag/Confirm16a.java
@@ -21,33 +21,28 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm16a extends DeserializationConfirmation
-{
+public class Confirm16a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm16a()
-    {
+    public Confirm16a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
 
         byte[] bytes = new byte[17];
-        for (int i = 0; i < 17; i++)
-        {
-            bytes[i] = (byte)i;
+        for (int i = 0; i < 17; i++) {
+            bytes[i] = (byte) i;
         }
 
         body.setData(bytes);
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4a.java b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4a.java
index 19b380e..4a67da6 100644
--- a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4a.java
@@ -23,12 +23,10 @@
 
 import java.util.Date;
 
-public class Confirm4a extends DeserializationConfirmation
-{
+public class Confirm4a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm4a()
-    {
+    public Confirm4a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -36,13 +34,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4b.java b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4b.java
index 68fe531..d77080b 100644
--- a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4b.java
@@ -24,12 +24,10 @@
 
 import java.util.Date;
 
-public class Confirm4b extends DeserializationConfirmation
-{
+public class Confirm4b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm4b()
-    {
+    public Confirm4b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -37,18 +35,16 @@
         ASObject aso = new ASObject();
         aso.put("prop0", new Date(1119647239994L));
         aso.put("prop1", new Date(1119647639994L));
-        
+
         body.setData(aso);
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4c.java b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4c.java
index e6e7eb2..d0a7e9a 100644
--- a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4c.java
@@ -23,18 +23,14 @@
 
 import java.sql.Date;
 
-public class Confirm4c extends DeserializationConfirmation
-{
+public class Confirm4c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm4c()
-    {
+    public Confirm4c() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -50,8 +46,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4d.java b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4d.java
index 3072914..a9db475 100644
--- a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4d.java
@@ -24,19 +24,16 @@
 
 import java.util.Date;
 
-public class Confirm4d extends DeserializationConfirmation
-{
+public class Confirm4d extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm4d()
-    {
+    public Confirm4d() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
 
         ASObject aso = new ASObject();
-        for (int i = 0; i < 10; i++)
-        {
+        for (int i = 0; i < 10; i++) {
             Date d = new Date(1119647239994L);
             aso.put("prop" + i, d);
         }
@@ -45,13 +42,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4e.java b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4e.java
index 5dd8596..709fa77 100644
--- a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4e.java
+++ b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4e.java
@@ -23,18 +23,14 @@
 
 import java.util.Date;
 
-public class Confirm4e extends DeserializationConfirmation
-{
+public class Confirm4e extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm4e()
-    {
+    public Confirm4e() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -51,13 +47,11 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 
-    protected boolean bodyValuesMatch(Object o1, Object o2)
-    {
+    protected boolean bodyValuesMatch(Object o1, Object o2) {
         boolean match = super.bodyValuesMatch(o1, o2);
 
         // Also check that by-reference serialization of dates restored
@@ -65,16 +59,16 @@
         Object list1 = o1;
         Object list2 = o2;
 
-        Date d11 = (Date)getFromList(list1, 0);
-        Date d12 = (Date)getFromList(list1, 1);
-        Date d13 = (Date)getFromList(list1, 2);
+        Date d11 = (Date) getFromList(list1, 0);
+        Date d12 = (Date) getFromList(list1, 1);
+        Date d13 = (Date) getFromList(list1, 2);
 
         if (d11 != d12 || d12 != d13)
             return false;
 
-        Date d21 = (Date)getFromList(list2, 0);
-        Date d22 = (Date)getFromList(list2, 1);
-        Date d23 = (Date)getFromList(list2, 2);
+        Date d21 = (Date) getFromList(list2, 0);
+        Date d22 = (Date) getFromList(list2, 1);
+        Date d23 = (Date) getFromList(list2, 2);
 
         if (d21 != d22 || d22 != d23)
             return false;
diff --git a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4f.java b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4f.java
index 6d1416b..c42b169 100644
--- a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4f.java
+++ b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4f.java
@@ -23,12 +23,10 @@
 
 import java.util.Date;
 
-public class Confirm4f extends DeserializationConfirmation
-{
+public class Confirm4f extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm4f()
-    {
+    public Confirm4f() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -36,13 +34,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4g.java b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4g.java
index 908eeec..72b0edd 100644
--- a/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4g.java
+++ b/core/src/test/java/flex/messaging/io/amfx/date_tag/Confirm4g.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm4g extends DeserializationConfirmation
-{
-    public Confirm4g()
-    {
+public class Confirm4g extends DeserializationConfirmation {
+    public Confirm4g() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Invalid date: -57411036000009999999999");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5a.java b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5a.java
index 84da4b4..a99f078 100644
--- a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5a.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm5a extends DeserializationConfirmation
-{
+public class Confirm5a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm5a()
-    {
+    public Confirm5a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5b.java b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5b.java
index d9a9090..c893fd4 100644
--- a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5b.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm5b extends DeserializationConfirmation
-{
+public class Confirm5b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm5b()
-    {
+    public Confirm5b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -49,13 +47,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5c.java b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5c.java
index c6970bc..9280582 100644
--- a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5c.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm5c extends DeserializationConfirmation
-{
+public class Confirm5c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm5c()
-    {
+    public Confirm5c() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -43,13 +41,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5d.java b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5d.java
index f360b92..20d31cf 100644
--- a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5d.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm5d extends DeserializationConfirmation
-{
+public class Confirm5d extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm5d()
-    {
+    public Confirm5d() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -48,13 +46,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5e.java b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5e.java
index 4f77751..31308c5 100644
--- a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5e.java
+++ b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5e.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm5e extends DeserializationConfirmation
-{
-    public Confirm5e()
-    {
+public class Confirm5e extends DeserializationConfirmation {
+    public Confirm5e() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Invalid double: THIS IS AN INVALID DOUBLE");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5f.java b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5f.java
index 79ec707..6745314 100644
--- a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5f.java
+++ b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5f.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm5f extends DeserializationConfirmation
-{
-    public Confirm5f()
-    {
+public class Confirm5f extends DeserializationConfirmation {
+    public Confirm5f() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Invalid double: nan");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5g.java b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5g.java
index 4d213d0..c27151e 100644
--- a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5g.java
+++ b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5g.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm5g extends DeserializationConfirmation
-{
-    public Confirm5g()
-    {
+public class Confirm5g extends DeserializationConfirmation {
+    public Confirm5g() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Invalid double: INFINITY");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5h.java b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5h.java
index 8234c9e..b470679 100644
--- a/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5h.java
+++ b/core/src/test/java/flex/messaging/io/amfx/double_tag/Confirm5h.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm5h extends DeserializationConfirmation
-{
-    public Confirm5h()
-    {
+public class Confirm5h extends DeserializationConfirmation {
+    public Confirm5h() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Invalid double: -infinity");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6a.java b/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6a.java
index 3792766..532bc91 100644
--- a/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6a.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm6a extends DeserializationConfirmation
-{
+public class Confirm6a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm6a()
-    {
+    public Confirm6a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6b.java b/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6b.java
index f1177c0..6efa98a 100644
--- a/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6b.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm6b extends DeserializationConfirmation
-{
+public class Confirm6b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm6b()
-    {
+    public Confirm6b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -40,13 +38,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6c.java b/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6c.java
index e958d75..e7ca9f0 100644
--- a/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6c.java
@@ -21,18 +21,14 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm6c extends DeserializationConfirmation
-{
+public class Confirm6c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm6c()
-    {
+    public Confirm6c() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -48,8 +44,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6d.java b/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6d.java
index a65706a..8e63881 100644
--- a/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/false_tag/Confirm6d.java
@@ -21,25 +21,20 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm6d extends DeserializationConfirmation
-{
+public class Confirm6d extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm6d()
-    {
+    public Confirm6d() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
 
             Object list = createList(7);
-            for (int i = 0; i < 7; i++)
-            {
+            for (int i = 0; i < 7; i++) {
                 addToList(list, i, Boolean.FALSE);
             }
 
@@ -49,8 +44,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7a.java b/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7a.java
index cb1e565..c2171cb 100644
--- a/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7a.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageHeader;
 import flex.messaging.MessageException;
 
-public class Confirm7a extends DeserializationConfirmation
-{
+public class Confirm7a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm7a()
-    {
+    public Confirm7a() {
         ActionMessage m = new ActionMessage();
         MessageHeader header = new MessageHeader();
         header.setName("Empty");
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7b.java b/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7b.java
index 224982f..2017800 100644
--- a/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7b.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageHeader;
 import flex.messaging.MessageException;
 
-public class Confirm7b extends DeserializationConfirmation
-{
+public class Confirm7b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm7b()
-    {
+    public Confirm7b() {
         ActionMessage m = new ActionMessage();
         MessageHeader header = new MessageHeader();
         header.setName("Sample Header");
@@ -36,13 +34,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7c.java b/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7c.java
index b38764e..6e637ad 100644
--- a/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7c.java
@@ -22,18 +22,14 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm7c extends DeserializationConfirmation
-{
+public class Confirm7c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm7c()
-    {
+    public Confirm7c() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
 
             MessageHeader header = new MessageHeader();
@@ -65,8 +61,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7d.java b/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7d.java
index b873ab4..1d1d141 100644
--- a/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/header_tag/Confirm7d.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm7d extends DeserializationConfirmation
-{
-    public Confirm7d()
-    {
+public class Confirm7d extends DeserializationConfirmation {
+    public Confirm7d() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Unexpected header tag.");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8a.java b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8a.java
index 791b7e6..d917b2d 100644
--- a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8a.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm8a extends DeserializationConfirmation
-{
+public class Confirm8a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm8a()
-    {
+    public Confirm8a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8b.java b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8b.java
index ad83de3..28bcf41 100644
--- a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8b.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm8b extends DeserializationConfirmation
-{
+public class Confirm8b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm8b()
-    {
+    public Confirm8b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -41,13 +39,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8c.java b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8c.java
index c1636fc..aaad811 100644
--- a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8c.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm8c extends DeserializationConfirmation
-{
+public class Confirm8c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm8c()
-    {
+    public Confirm8c() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -43,13 +41,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8d.java b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8d.java
index c3d5571..f80afee 100644
--- a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8d.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm8d extends DeserializationConfirmation
-{
+public class Confirm8d extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm8d()
-    {
+    public Confirm8d() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -48,13 +46,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8e.java b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8e.java
index fe96676..cd8293a 100644
--- a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8e.java
+++ b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8e.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm8e extends DeserializationConfirmation
-{
-    public Confirm8e()
-    {
+public class Confirm8e extends DeserializationConfirmation {
+    public Confirm8e() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Invalid int: THIS IS AN INVALID INTEGER");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8f.java b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8f.java
index 896ebcb..d634936 100644
--- a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8f.java
+++ b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8f.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm8f extends DeserializationConfirmation
-{
-    public Confirm8f()
-    {
+public class Confirm8f extends DeserializationConfirmation {
+    public Confirm8f() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Invalid int: 92147483647");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8g.java b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8g.java
index e8499d5..83abb52 100644
--- a/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8g.java
+++ b/core/src/test/java/flex/messaging/io/amfx/int_tag/Confirm8g.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm8g extends DeserializationConfirmation
-{
-    public Confirm8g()
-    {
+public class Confirm8g extends DeserializationConfirmation {
+    public Confirm8g() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Invalid int: -92147483648");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9a.java b/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9a.java
index 2a50609..2e289b8 100644
--- a/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9a.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm9a extends DeserializationConfirmation
-{
+public class Confirm9a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm9a()
-    {
+    public Confirm9a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9b.java b/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9b.java
index 4168c69..b3524ee 100644
--- a/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9b.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm9b extends DeserializationConfirmation
-{
+public class Confirm9b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm9b()
-    {
+    public Confirm9b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -40,13 +38,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9c.java b/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9c.java
index f590bb0..6932646 100644
--- a/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9c.java
@@ -21,18 +21,14 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm9c extends DeserializationConfirmation
-{
+public class Confirm9c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm9c()
-    {
+    public Confirm9c() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -48,8 +44,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9d.java b/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9d.java
index 238e2d4..1881f2e 100644
--- a/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/null_tag/Confirm9d.java
@@ -21,26 +21,21 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm9d extends DeserializationConfirmation
-{
+public class Confirm9d extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm9d()
-    {
+    public Confirm9d() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
 
             Object list = createList(7);
-            for (int i = 0; i < 7; i++)
-            {
-                addToList(list, i , null);
+            for (int i = 0; i < 7; i++) {
+                addToList(list, i, null);
             }
 
             body.setData(list);
@@ -49,8 +44,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10a.java b/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10a.java
index 595f953..01154b8 100644
--- a/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10a.java
@@ -22,25 +22,20 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm10a extends DeserializationConfirmation
-{
+public class Confirm10a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm10a()
-    {
+    public Confirm10a() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
 
             Object list = createList(6);
-            for (int i = 0; i < 6; i++)
-            {
+            for (int i = 0; i < 6; i++) {
                 addToList(list, i, new ASObject());
             }
 
@@ -50,8 +45,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10b.java b/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10b.java
index c018693..4184a76 100644
--- a/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10b.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm10b extends DeserializationConfirmation
-{
+public class Confirm10b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm10b()
-    {
+    public Confirm10b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -62,13 +60,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10c.java b/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10c.java
index 21604ed..836d782 100644
--- a/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10c.java
@@ -24,18 +24,14 @@
 
 import java.util.Date;
 
-public class Confirm10c extends DeserializationConfirmation
-{
+public class Confirm10c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm10c()
-    {
+    public Confirm10c() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -62,32 +58,29 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 
-    protected boolean bodyValuesMatch(Object o1, Object o2)
-    {
+    protected boolean bodyValuesMatch(Object o1, Object o2) {
         boolean match = super.bodyValuesMatch(o1, o2);
 
         // Also check that by-reference serialization of objects
-        if (match)
-        {
-            ASObject aso1 = (ASObject)o1;
-            ASObject aso2 = (ASObject)o2;
+        if (match) {
+            ASObject aso1 = (ASObject) o1;
+            ASObject aso2 = (ASObject) o2;
 
             Object prop01 = aso1.get("prop0");
             Object prop02 = aso2.get("prop0");
 
-            ASObject prop011 = (ASObject)getFromList(prop01, 1);
-            ASObject prop012 = (ASObject)getFromList(prop02, 1);
+            ASObject prop011 = (ASObject) getFromList(prop01, 1);
+            ASObject prop012 = (ASObject) getFromList(prop02, 1);
 
-            ASObject subprop01 = (ASObject)prop011.get("subprop0");
-            ASObject subprop02 = (ASObject)prop012.get("subprop0");
+            ASObject subprop01 = (ASObject) prop011.get("subprop0");
+            ASObject subprop02 = (ASObject) prop012.get("subprop0");
 
-            ASObject prop11 = (ASObject)aso1.get("prop1");
-            ASObject prop12 = (ASObject)aso2.get("prop1");
+            ASObject prop11 = (ASObject) aso1.get("prop1");
+            ASObject prop12 = (ASObject) aso2.get("prop1");
 
             if (prop11 != subprop01)
                 return false;
diff --git a/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10d.java b/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10d.java
index 95564e3..792c33c 100644
--- a/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/object_tag/Confirm10d.java
@@ -24,12 +24,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm10d extends DeserializationConfirmation
-{
+public class Confirm10d extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm10d()
-    {
+    public Confirm10d() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -47,25 +45,21 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 
-    protected boolean bodyValuesMatch(Object o1, Object o2)
-    {
-        if (!(o1 instanceof Bleu_dAuvergne) || !(o2 instanceof Bleu_dAuvergne))
-        {
+    protected boolean bodyValuesMatch(Object o1, Object o2) {
+        if (!(o1 instanceof Bleu_dAuvergne) || !(o2 instanceof Bleu_dAuvergne)) {
             return false;
         }
 
-        Bleu_dAuvergne b1 = (Bleu_dAuvergne)o1;
-        Bleu_dAuvergne b2 = (Bleu_dAuvergne)o2;
+        Bleu_dAuvergne b1 = (Bleu_dAuvergne) o1;
+        Bleu_dAuvergne b2 = (Bleu_dAuvergne) o2;
 
         if (!b1.getName().equals(b2.getName()))
             return false;
@@ -82,8 +76,8 @@
         if (!(p1 instanceof Roquefort) || !(p2 instanceof Roquefort))
             return false;
 
-        Roquefort r1 = (Roquefort)p1;
-        Roquefort r2 = (Roquefort)p2;
+        Roquefort r1 = (Roquefort) p1;
+        Roquefort r2 = (Roquefort) p2;
 
         if (r1.getParing() != b1 || r2.getParing() != b2)
             return false;
diff --git a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11a.java b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11a.java
index 6802198..0e47627 100644
--- a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11a.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm11a extends DeserializationConfirmation
-{
+public class Confirm11a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm11a()
-    {
+    public Confirm11a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11b.java b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11b.java
index 7fae6c1..9636666 100644
--- a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11b.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm11b extends DeserializationConfirmation
-{
+public class Confirm11b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm11b()
-    {
+    public Confirm11b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -35,18 +33,16 @@
         ASObject aso = new ASObject();
         aso.put("prop0", "Hydrogen");
         aso.put("prop1", "Helium");
-        
+
         body.setData(aso);
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11c.java b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11c.java
index 2ec4089..cc564ca 100644
--- a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11c.java
@@ -21,18 +21,14 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm11c extends DeserializationConfirmation
-{
+public class Confirm11c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm11c()
-    {
+    public Confirm11c() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -48,8 +44,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11d.java b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11d.java
index bcaefe6..88bdaa5 100644
--- a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11d.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm11d extends DeserializationConfirmation
-{
+public class Confirm11d extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm11d()
-    {
+    public Confirm11d() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -48,13 +46,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11e.java b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11e.java
index 374d8d8..6b693f2 100644
--- a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11e.java
+++ b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11e.java
@@ -21,18 +21,14 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm11e extends DeserializationConfirmation
-{
+public class Confirm11e extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm11e()
-    {
+    public Confirm11e() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -49,13 +45,11 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 
-    protected boolean bodyValuesMatch(Object o1, Object o2)
-    {
+    protected boolean bodyValuesMatch(Object o1, Object o2) {
         boolean match = super.bodyValuesMatch(o1, o2);
 
         // Also check that by-reference serialization of dates restored
@@ -63,16 +57,16 @@
         Object list1 = o1;
         Object list2 = o2;
 
-        String s11 = (String)getFromList(list1, 0);
-        String s12 = (String)getFromList(list1, 1);
-        String s13 = (String)getFromList(list1, 2);
+        String s11 = (String) getFromList(list1, 0);
+        String s12 = (String) getFromList(list1, 1);
+        String s13 = (String) getFromList(list1, 2);
 
         if (s11 != s12 || s12 != s13)
             return false;
 
-        String s21 = (String)getFromList(list2, 0);
-        String s22 = (String)getFromList(list2, 1);
-        String s23 = (String)getFromList(list2, 2);
+        String s21 = (String) getFromList(list2, 0);
+        String s22 = (String) getFromList(list2, 1);
+        String s23 = (String) getFromList(list2, 2);
 
         if (s21 != s22 || s22 != s23)
             return false;
diff --git a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11f.java b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11f.java
index e553e1f..e367adb 100644
--- a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11f.java
+++ b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11f.java
@@ -21,18 +21,14 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm11f extends DeserializationConfirmation
-{
+public class Confirm11f extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm11f()
-    {
+    public Confirm11f() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -51,13 +47,11 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 
-    protected boolean bodyValuesMatch(Object o1, Object o2)
-    {
+    protected boolean bodyValuesMatch(Object o1, Object o2) {
         boolean match = super.bodyValuesMatch(o1, o2);
 
         // Also check that by-reference serialization of dates restored
@@ -65,11 +59,11 @@
         Object list1 = o1;
         Object list2 = o2;
 
-        String s11 = (String)getFromList(list1, 0);
-        String s12 = (String)getFromList(list1, 1);
-        String s13 = (String)getFromList(list1, 2);
-        String s14 = (String)getFromList(list1, 3);
-        String s15 = (String)getFromList(list1, 4);
+        String s11 = (String) getFromList(list1, 0);
+        String s12 = (String) getFromList(list1, 1);
+        String s13 = (String) getFromList(list1, 2);
+        String s14 = (String) getFromList(list1, 3);
+        String s15 = (String) getFromList(list1, 4);
 
         if (s11.length() > 0 || s12.length() > 0)
             return false;
@@ -77,14 +71,14 @@
         if (s13 != s14 || s14 != s15)
             return false;
 
-        String s21 = (String)getFromList(list2, 0);
-        String s22 = (String)getFromList(list2, 1);
-        String s23 = (String)getFromList(list2, 2);
-        String s24 = (String)getFromList(list2, 3);
-        String s25 = (String)getFromList(list2, 4);
+        String s21 = (String) getFromList(list2, 0);
+        String s22 = (String) getFromList(list2, 1);
+        String s23 = (String) getFromList(list2, 2);
+        String s24 = (String) getFromList(list2, 3);
+        String s25 = (String) getFromList(list2, 4);
 
         if (s21.length() > 0 || s22.length() > 0)
-                    return false;
+            return false;
 
         if (s23 != s24 || s24 != s25)
             return false;
diff --git a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11g.java b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11g.java
index 23657f6..858e42f 100644
--- a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11g.java
+++ b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11g.java
@@ -21,18 +21,14 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm11g extends DeserializationConfirmation
-{
+public class Confirm11g extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm11g()
-    {
+    public Confirm11g() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -48,8 +44,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11h.java b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11h.java
index 9751df4..aae0a61 100644
--- a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11h.java
+++ b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11h.java
@@ -20,24 +20,19 @@
 import flex.messaging.io.amf.ActionMessage;
 import flex.messaging.MessageException;
 
-public class Confirm11h extends DeserializationConfirmation
-{
-    public Confirm11h()
-    {
+public class Confirm11h extends DeserializationConfirmation {
+    public Confirm11h() {
     }
 
-    public boolean isNegativeTest()
-    {
+    public boolean isNegativeTest() {
         return true;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return null;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return new MessageException("Unknown string reference: 5");
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11i.java b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11i.java
index 1c9c867..fdfad86 100644
--- a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11i.java
+++ b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11i.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm11i extends DeserializationConfirmation
-{
+public class Confirm11i extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm11i()
-    {
+    public Confirm11i() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11j.java b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11j.java
index 4004444..c811f7f 100644
--- a/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11j.java
+++ b/core/src/test/java/flex/messaging/io/amfx/string_tag/Confirm11j.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm11j extends DeserializationConfirmation
-{
+public class Confirm11j extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm11j()
-    {
+    public Confirm11j() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/testtypes/Bleu_dAuvergne.java b/core/src/test/java/flex/messaging/io/amfx/testtypes/Bleu_dAuvergne.java
index 6118991..293a116 100644
--- a/core/src/test/java/flex/messaging/io/amfx/testtypes/Bleu_dAuvergne.java
+++ b/core/src/test/java/flex/messaging/io/amfx/testtypes/Bleu_dAuvergne.java
@@ -16,10 +16,8 @@
  */
 package flex.messaging.io.amfx.testtypes;
 
-public class Bleu_dAuvergne extends EweCheese
-{
-    public Bleu_dAuvergne()
-    {
+public class Bleu_dAuvergne extends EweCheese {
+    public Bleu_dAuvergne() {
         super();
     }
 
@@ -28,23 +26,19 @@
         return 8;
     }
 
-    public String getName()
-    {
+    public String getName() {
         return "Bleu d'Auvergne";
     }
 
-    public String getRegion()
-    {
+    public String getRegion() {
         return "Auvergne";
     }
 
-    public Cheese getParing()
-    {
+    public Cheese getParing() {
         return paring;
     }
 
-    public void setParing(Cheese c)
-    {
+    public void setParing(Cheese c) {
         paring = c;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/testtypes/Cheese.java b/core/src/test/java/flex/messaging/io/amfx/testtypes/Cheese.java
index 23fe295..7024935 100644
--- a/core/src/test/java/flex/messaging/io/amfx/testtypes/Cheese.java
+++ b/core/src/test/java/flex/messaging/io/amfx/testtypes/Cheese.java
@@ -16,8 +16,7 @@
  */
 package flex.messaging.io.amfx.testtypes;
 
-public interface Cheese
-{
+public interface Cheese {
     String getName();
 
     String getMilkType();
diff --git a/core/src/test/java/flex/messaging/io/amfx/testtypes/CowCheese.java b/core/src/test/java/flex/messaging/io/amfx/testtypes/CowCheese.java
index 5009de8..9691a2b 100644
--- a/core/src/test/java/flex/messaging/io/amfx/testtypes/CowCheese.java
+++ b/core/src/test/java/flex/messaging/io/amfx/testtypes/CowCheese.java
@@ -16,18 +16,15 @@
  */
 package flex.messaging.io.amfx.testtypes;
 
-public abstract class CowCheese implements Cheese
-{
-    protected CowCheese()
-    {
+public abstract class CowCheese implements Cheese {
+    protected CowCheese() {
         rating = 2.5;
     }
 
     public double rating;
     protected Cheese paring;
 
-    public String getMilkType()
-    {
+    public String getMilkType() {
         return "Cow";
     }
 
diff --git a/core/src/test/java/flex/messaging/io/amfx/testtypes/EweCheese.java b/core/src/test/java/flex/messaging/io/amfx/testtypes/EweCheese.java
index 1ea8729..4e721c3 100644
--- a/core/src/test/java/flex/messaging/io/amfx/testtypes/EweCheese.java
+++ b/core/src/test/java/flex/messaging/io/amfx/testtypes/EweCheese.java
@@ -16,18 +16,15 @@
  */
 package flex.messaging.io.amfx.testtypes;
 
-public abstract class EweCheese implements Cheese
-{
-    protected EweCheese()
-    {
+public abstract class EweCheese implements Cheese {
+    protected EweCheese() {
         rating = 2.5;
     }
 
     public double rating;
     protected Cheese paring;
 
-    public String getMilkType()
-    {
+    public String getMilkType() {
         return "Ewe";
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/testtypes/Roquefort.java b/core/src/test/java/flex/messaging/io/amfx/testtypes/Roquefort.java
index 73d534d..d7c3a9c 100644
--- a/core/src/test/java/flex/messaging/io/amfx/testtypes/Roquefort.java
+++ b/core/src/test/java/flex/messaging/io/amfx/testtypes/Roquefort.java
@@ -16,34 +16,27 @@
  */
 package flex.messaging.io.amfx.testtypes;
 
-public class Roquefort extends EweCheese
-{
-    public Roquefort()
-    {
+public class Roquefort extends EweCheese {
+    public Roquefort() {
     }
 
-    public int getMaturation()
-    {
+    public int getMaturation() {
         return 24;
     }
 
-    public String getName()
-    {
+    public String getName() {
         return "Roquefort";
     }
 
-    public String getRegion()
-    {
+    public String getRegion() {
         return "Midi-Pyrnes";
     }
 
-    public Cheese getParing()
-    {
+    public Cheese getParing() {
         return paring;
     }
 
-    public void setParing(Cheese c)
-    {
+    public void setParing(Cheese c) {
         paring = c;
     }
 
diff --git a/core/src/test/java/flex/messaging/io/amfx/traits_tag/Confirm12a.java b/core/src/test/java/flex/messaging/io/amfx/traits_tag/Confirm12a.java
index aeb4f78..2d1d7d1 100644
--- a/core/src/test/java/flex/messaging/io/amfx/traits_tag/Confirm12a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/traits_tag/Confirm12a.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm12a extends DeserializationConfirmation
-{
+public class Confirm12a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm12a()
-    {
+    public Confirm12a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -43,13 +41,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/traits_tag/Confirm12b.java b/core/src/test/java/flex/messaging/io/amfx/traits_tag/Confirm12b.java
index a918eaa..ea5ca02 100644
--- a/core/src/test/java/flex/messaging/io/amfx/traits_tag/Confirm12b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/traits_tag/Confirm12b.java
@@ -22,18 +22,14 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm12b extends DeserializationConfirmation
-{
+public class Confirm12b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm12b()
-    {
+    public Confirm12b() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -64,8 +60,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13a.java b/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13a.java
index 79b1c73..aa90b56 100644
--- a/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13a.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm13a extends DeserializationConfirmation
-{
+public class Confirm13a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm13a()
-    {
+    public Confirm13a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13b.java b/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13b.java
index bee45e0..265e0e3 100644
--- a/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13b.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm13b extends DeserializationConfirmation
-{
+public class Confirm13b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm13b()
-    {
+    public Confirm13b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -40,13 +38,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13c.java b/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13c.java
index 5828afe..92a9293 100644
--- a/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13c.java
@@ -21,18 +21,14 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm13c extends DeserializationConfirmation
-{
+public class Confirm13c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm13c()
-    {
+    public Confirm13c() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -48,8 +44,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13d.java b/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13d.java
index a7327c3..dc47475 100644
--- a/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/true_tag/Confirm13d.java
@@ -21,25 +21,20 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm13d extends DeserializationConfirmation
-{
+public class Confirm13d extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm13d()
-    {
+    public Confirm13d() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
 
             Object list = createList(7);
-            for (int i = 0; i < 7; i++)
-            {
+            for (int i = 0; i < 7; i++) {
                 addToList(list, i, Boolean.TRUE);
             }
 
@@ -49,8 +44,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14a.java b/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14a.java
index f10c240..c783089 100644
--- a/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14a.java
@@ -21,12 +21,10 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm14a extends DeserializationConfirmation
-{
+public class Confirm14a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm14a()
-    {
+    public Confirm14a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -34,13 +32,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14b.java b/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14b.java
index 64040c5..bef358c 100644
--- a/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14b.java
@@ -22,12 +22,10 @@
 import flex.messaging.io.amf.ASObject;
 import flex.messaging.MessageException;
 
-public class Confirm14b extends DeserializationConfirmation
-{
+public class Confirm14b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm14b()
-    {
+    public Confirm14b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
@@ -40,13 +38,11 @@
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14c.java b/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14c.java
index f8c5615..05e2e18 100644
--- a/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14c.java
+++ b/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14c.java
@@ -21,18 +21,14 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm14c extends DeserializationConfirmation
-{
+public class Confirm14c extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm14c()
-    {
+    public Confirm14c() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
@@ -48,8 +44,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14d.java b/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14d.java
index 696fc4f..ee38c87 100644
--- a/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14d.java
+++ b/core/src/test/java/flex/messaging/io/amfx/undefined_tag/Confirm14d.java
@@ -21,25 +21,20 @@
 import flex.messaging.io.amf.MessageBody;
 import flex.messaging.MessageException;
 
-public class Confirm14d extends DeserializationConfirmation
-{
+public class Confirm14d extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm14d()
-    {
+    public Confirm14d() {
     }
 
-    public ActionMessage getExpectedMessage()
-    {
-        if (EXPECTED_VALUE == null)
-        {
+    public ActionMessage getExpectedMessage() {
+        if (EXPECTED_VALUE == null) {
             ActionMessage m = new ActionMessage();
             MessageBody body = new MessageBody();
             m.addBody(body);
 
             Object list = createList(7);
-            for (int i = 0; i < 7; i++)
-            {
+            for (int i = 0; i < 7; i++) {
                 addToList(list, i, null);
             }
 
@@ -49,8 +44,7 @@
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/xml_tag/Confirm15a.java b/core/src/test/java/flex/messaging/io/amfx/xml_tag/Confirm15a.java
index 8db8d8b..06d0134 100644
--- a/core/src/test/java/flex/messaging/io/amfx/xml_tag/Confirm15a.java
+++ b/core/src/test/java/flex/messaging/io/amfx/xml_tag/Confirm15a.java
@@ -22,18 +22,15 @@
 import flex.messaging.util.XMLUtil;
 import flex.messaging.MessageException;
 
-public class Confirm15a extends DeserializationConfirmation
-{
+public class Confirm15a extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm15a()
-    {
+    public Confirm15a() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
 
-        try
-        {
+        try {
             StringBuffer xml = new StringBuffer(512);
             xml.append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n");
             xml.append("<stock>");
@@ -44,22 +41,18 @@
 
             Object data = XMLUtil.stringToDocument(xml.toString());
             body.setData(data);
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             throw new MessageException("Error creating expected message for test 15a: " + t.getMessage());
         }
 
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/io/amfx/xml_tag/Confirm15b.java b/core/src/test/java/flex/messaging/io/amfx/xml_tag/Confirm15b.java
index 25ac381..7ac2331 100644
--- a/core/src/test/java/flex/messaging/io/amfx/xml_tag/Confirm15b.java
+++ b/core/src/test/java/flex/messaging/io/amfx/xml_tag/Confirm15b.java
@@ -22,18 +22,15 @@
 import flex.messaging.util.XMLUtil;
 import flex.messaging.MessageException;
 
-public class Confirm15b extends DeserializationConfirmation
-{
+public class Confirm15b extends DeserializationConfirmation {
     private ActionMessage EXPECTED_VALUE;
 
-    public Confirm15b()
-    {
+    public Confirm15b() {
         ActionMessage m = new ActionMessage();
         MessageBody body = new MessageBody();
         m.addBody(body);
 
-        try
-        {
+        try {
             StringBuffer xml = new StringBuffer(512);
             xml.append("<stock>");
             xml.append("    <item id=\"5\">");
@@ -43,22 +40,18 @@
 
             Object data = XMLUtil.stringToDocument(xml.toString());
             body.setData(data);
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             throw new MessageException("Error creating expected message for test 15b: " + t.getMessage());
         }
 
         EXPECTED_VALUE = m;
     }
 
-    public ActionMessage getExpectedMessage()
-    {
+    public ActionMessage getExpectedMessage() {
         return EXPECTED_VALUE;
     }
 
-    public MessageException getExpectedException()
-    {
+    public MessageException getExpectedException() {
         return null;
     }
 }
diff --git a/core/src/test/java/flex/messaging/util/UUIDUtilTest.java b/core/src/test/java/flex/messaging/util/UUIDUtilTest.java
index 4cb3a82..4a72e62 100644
--- a/core/src/test/java/flex/messaging/util/UUIDUtilTest.java
+++ b/core/src/test/java/flex/messaging/util/UUIDUtilTest.java
@@ -19,11 +19,9 @@
 
 import org.junit.*;
 
-public class UUIDUtilTest
-{
-   @Test
-    public void testIsUID()
-    {
+public class UUIDUtilTest {
+    @Test
+    public void testIsUID() {
         // Randomly generated
         String uid = UUIDUtils.createUUID();
         boolean result = UUIDUtils.isUID(uid);
@@ -105,8 +103,7 @@
     }
 
     @Test
-    public void testUIDToByteArray()
-    {
+    public void testUIDToByteArray() {
         // Randomly generated
         String uid = UUIDUtils.createUUID();
         byte[] result = UUIDUtils.toByteArray(uid);
@@ -126,8 +123,7 @@
     }
 
     @Test
-    public void testUIDFromByteArray()
-    {
+    public void testUIDFromByteArray() {
         // Randomly generated
         String uid1 = UUIDUtils.createUUID();
         byte[] ba = UUIDUtils.toByteArray(uid1);
diff --git a/core/src/test/java/flex/messaging/util/concurrent/DefaultThreadPoolExecutorTest.java b/core/src/test/java/flex/messaging/util/concurrent/DefaultThreadPoolExecutorTest.java
index 799f656..ae26e04 100644
--- a/core/src/test/java/flex/messaging/util/concurrent/DefaultThreadPoolExecutorTest.java
+++ b/core/src/test/java/flex/messaging/util/concurrent/DefaultThreadPoolExecutorTest.java
@@ -27,130 +27,107 @@
 import java.util.concurrent.SynchronousQueue;
 import java.util.concurrent.TimeUnit;
 
-public class DefaultThreadPoolExecutorTest
-{
+public class DefaultThreadPoolExecutorTest {
 
     @Test
-    public void testSimpleExecution()
-    {
+    public void testSimpleExecution() {
         // Create a small pool with a synchronous queue (no bounding or storage).
         Executor executor = new DefaultThreadPoolExecutor(1, 1, Integer.MAX_VALUE, TimeUnit.SECONDS, new SynchronousQueue());
-                
+
         final CountDownLatch continueSignal = new CountDownLatch(1);
-        executor.execute(new Runnable(){
-            public void run()
-            {
+        executor.execute(new Runnable() {
+            public void run() {
                 // Indicate that we've run.
                 continueSignal.countDown();
             }
         });
-        try
-        {
+        try {
             boolean success = continueSignal.await(2, TimeUnit.SECONDS);
-            if (!success)
-            {
+            if (!success) {
                 Assert.fail("Test timed out waiting for execution to complete.");
             }
-        }
-        catch (InterruptedException e)
-        {
+        } catch (InterruptedException e) {
             Assert.fail("Test was interrupted: " + e);
         }
-        
+
         // Shut down; because we create the thread pool in this specific impl be sure to shut it down.
-        DefaultThreadPoolExecutor tpe = (DefaultThreadPoolExecutor)executor;
+        DefaultThreadPoolExecutor tpe = (DefaultThreadPoolExecutor) executor;
         tpe.shutdown();
     }
 
     @Test
-    public void testFailedExecutionHandling()
-    {
+    public void testFailedExecutionHandling() {
         // Create a small pool with a bounded queue that can only contain one queued task.
         final DefaultThreadPoolExecutor executor = new DefaultThreadPoolExecutor(1, 1, Integer.MAX_VALUE, TimeUnit.SECONDS, new ArrayBlockingQueue(1));
         final CountDownLatch taskPauseSignal = new CountDownLatch(1);
         final CountDownLatch executorPauseSignal = new CountDownLatch(1);
         final ArrayList<Runnable> failedTasks = new ArrayList<Runnable>();
-        executor.setFailedExecutionHandler(new FailedExecutionHandler(){
-            public void failedExecution(Runnable command, Executor ex, Exception exception)
-            {
+        executor.setFailedExecutionHandler(new FailedExecutionHandler() {
+            public void failedExecution(Runnable command, Executor ex, Exception exception) {
                 Assert.assertEquals(executor, ex);
                 Assert.assertTrue(exception instanceof RejectedExecutionException);
-                
+
                 failedTasks.add(command);
                 // Unpause the initial task processing.
                 taskPauseSignal.countDown();
             }
         });
-        
+
         // This first task will pause.
         executor.execute(new Task("first", taskPauseSignal, executorPauseSignal, executor));
         // Now queue two more tasks to overflow the executor's queue.
         executor.execute(new Task("second", null, null, null));
         executor.execute(new Task("third", null, null, null));
         // and wait.
-        try
-        {
+        try {
             boolean success = executorPauseSignal.await(5 * 60, TimeUnit.SECONDS);
-            if (!success)
-            {
+            if (!success) {
                 Assert.fail("Test timed out waiting for execution to complete.");
             }
-        }
-        catch (InterruptedException e)
-        {
+        } catch (InterruptedException e) {
             Assert.fail("Test was interrupted: " + e);
-        }       
-                
+        }
+
         // Test failed execution handling
         Assert.assertEquals(failedTasks.size(), 1);
-        Assert.assertTrue(((Task)failedTasks.get(0)).name.equals("third"));
-        
+        Assert.assertTrue(((Task) failedTasks.get(0)).name.equals("third"));
+
         // Shut down; because we create the thread pool in this specific impl be sure we shut it down.        
         executor.shutdown();
     }
-    
-    static class Task implements Runnable
-    {
-        Task(String name, CountDownLatch taskPauseSignal, CountDownLatch executorPauseSignal, DefaultThreadPoolExecutor executor)
-        {
+
+    static class Task implements Runnable {
+        Task(String name, CountDownLatch taskPauseSignal, CountDownLatch executorPauseSignal, DefaultThreadPoolExecutor executor) {
             this.name = name;
             this.taskPauseSignal = taskPauseSignal;
             this.executorPauseSignal = executorPauseSignal;
             this.executor = executor;
         }
-        
+
         public String name;
         private CountDownLatch taskPauseSignal;
         private CountDownLatch executorPauseSignal;
         private DefaultThreadPoolExecutor executor;
-        
-        public void run()
-        {
-            if (taskPauseSignal != null)
-            {
-                try
-                {
+
+        public void run() {
+            if (taskPauseSignal != null) {
+                try {
                     boolean success = taskPauseSignal.await(5 * 60, TimeUnit.SECONDS);
-                    if (!success)
-                    {
+                    if (!success) {
                         Assert.fail("Test timed out waiting for execution to complete.");
-                    }
-                    else
-                    {
+                    } else {
                         // At this point we should have the second task queued and the third task should have failed (overflow).
                         Assert.assertEquals(executor.getQueue().size(), 1);
-                        Assert.assertTrue(((Task)executor.getQueue().peek()).name.equals("second"));
-                        
+                        Assert.assertTrue(((Task) executor.getQueue().peek()).name.equals("second"));
+
                         // Unblock the executor test thread.
                         executorPauseSignal.countDown();
                     }
-                }
-                catch (InterruptedException e)
-                {
+                } catch (InterruptedException e) {
                     Assert.fail("Test was interrupted: " + e);
                 }
             }
-                
+
         }
     }
 }
diff --git a/core/src/test/java/macromedia/qa/metrics/AbstractDatabase.java b/core/src/test/java/macromedia/qa/metrics/AbstractDatabase.java
index 106350a..add7f6b 100644
--- a/core/src/test/java/macromedia/qa/metrics/AbstractDatabase.java
+++ b/core/src/test/java/macromedia/qa/metrics/AbstractDatabase.java
@@ -27,23 +27,18 @@
 import java.util.Map;
 import java.util.Calendar;
 
-public abstract class AbstractDatabase
-{
-    protected AbstractDatabase()
-    {
+public abstract class AbstractDatabase {
+    protected AbstractDatabase() {
     }
 
     protected Connection connection;
 
-    public PreparedStatement select(String[] columns, String[] tables, Map clauses, String other) throws SQLException
-    {
+    public PreparedStatement select(String[] columns, String[] tables, Map clauses, String other) throws SQLException {
         StringBuffer sb = new StringBuffer(256);
         sb.append("SELECT ");
 
-        if (columns != null && columns.length > 0)
-        {
-            for (int i = 0; i < columns.length; i++)
-            {
+        if (columns != null && columns.length > 0) {
+            for (int i = 0; i < columns.length; i++) {
                 sb.append(" ").append(columns[i]);
 
                 if (i < columns.length - 1)
@@ -51,18 +46,14 @@
             }
 
             sb.append("\r\n");
-        }
-        else
-        {
+        } else {
             sb.append(" * \r\n");
         }
 
-        if (tables != null && tables.length > 0)
-        {
+        if (tables != null && tables.length > 0) {
             sb.append("\tFROM ");
 
-            for (int i = 0; i < tables.length; i++)
-            {
+            for (int i = 0; i < tables.length; i++) {
                 sb.append(" \"").append(tables[i]).append("\"");
 
                 if (i < tables.length - 1)
@@ -72,17 +63,15 @@
             sb.append("\r\n");
         }
 
-        if (clauses != null && clauses.size() > 0)
-        {
+        if (clauses != null && clauses.size() > 0) {
             sb.append("\tWHERE \r\n");
 
             Set keys = clauses.keySet();
             Iterator kit = keys.iterator();
             int i = 0;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
 
                 if (i > 0)
                     sb.append("\t\tAND ");
@@ -101,15 +90,13 @@
         PreparedStatement statement = connection.prepareStatement(sb.toString(), ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
 
         //WHERE (VALUES)
-        if (clauses != null && clauses.size() > 0)
-        {
+        if (clauses != null && clauses.size() > 0) {
             Set keys = clauses.keySet();
             Iterator kit = keys.iterator();
             int i = 1;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
                 Object value = clauses.get(key);
                 addParameter(statement, i, value);
                 i++;
@@ -122,7 +109,7 @@
 
     /**
      * Creates a <code>PreparedStatement</code> for a SQL INSERT.
-     *
+     * <p>
      * e.g.
      * <pre>
      * INSERT INTO myTable ( field1, field2 )
@@ -132,13 +119,12 @@
      * </pre>
      *
      * @param table   The table name to insert
-     * @param values A collection of key-value pairs to insert, with column aliases appropriately formatted
+     * @param values  A collection of key-value pairs to insert, with column aliases appropriately formatted
      * @param clauses A collection of key-value pairs for the WHERE clause; the key must be a string and the value can be any valid ODBC object
      * @return A PreparedStatement that can be subsequently executed.
      * @throws SQLException
      */
-    public PreparedStatement insert(String table, Map values, Map clauses, String other) throws SQLException
-    {
+    public PreparedStatement insert(String table, Map values, Map clauses, String other) throws SQLException {
         StringBuffer sb = new StringBuffer(256);
         sb.append("INSERT INTO ");
 
@@ -146,14 +132,12 @@
         sb.append(table).append(" ( ");
 
         //COLUMNS (can include aliases if correctly formatted)
-        if (values != null && values.size() > 0)
-        {
+        if (values != null && values.size() > 0) {
             Set keys = values.keySet();
             Iterator kit = keys.iterator();
             int i = 0;
 
-            while (kit.hasNext())
-            {
+            while (kit.hasNext()) {
                 sb.append(" ").append(kit.next());
 
                 if (i < values.size() - 1)
@@ -169,16 +153,14 @@
 
 
         //VALUES
-        if (values != null && values.size() > 0)
-        {
+        if (values != null && values.size() > 0) {
             sb.append("\tVALUES ( ");
 
             Set keys = values.keySet();
             Iterator kit = keys.iterator();
             int i = 0;
 
-            while (kit.hasNext())
-            {
+            while (kit.hasNext()) {
                 kit.next();
                 sb.append(" ? ");
 
@@ -192,17 +174,15 @@
         }
 
         //WHERE (KEYS)
-        if (clauses != null && clauses.size() > 0)
-        {
+        if (clauses != null && clauses.size() > 0) {
             sb.append("\tWHERE \r\n");
 
             Set keys = clauses.keySet();
             Iterator kit = keys.iterator();
             int i = 0;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
 
                 if (i > 0)
                     sb.append("\t\tAND ");
@@ -222,15 +202,13 @@
         PreparedStatement statement = connection.prepareStatement(sb.toString());
 
         //VALUES (AS SQL PARAMETERS)
-        if (values != null && values.size() > 0)
-        {
+        if (values != null && values.size() > 0) {
             Set keys = values.keySet();
             Iterator kit = keys.iterator();
             int i = 1;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
                 Object value = values.get(key);
                 addParameter(statement, i, value);
                 i++;
@@ -238,15 +216,13 @@
         }
 
         //WHERE (VALUES)
-        if (clauses != null && clauses.size() > 0)
-        {
+        if (clauses != null && clauses.size() > 0) {
             Set keys = clauses.keySet();
             Iterator kit = keys.iterator();
             int i = 1;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
                 Object value = clauses.get(key);
                 addParameter(statement, i, value);
                 i++;
@@ -258,7 +234,7 @@
 
     /**
      * Creates a <code>PreparedStatement</code> for a SQL UPDATE.
-     *
+     * <p>
      * e.g.
      * <pre>
      * UPDATE Job
@@ -273,8 +249,7 @@
      * @return A PreparedStatement that can be subsequently executed.
      * @throws SQLException
      */
-    public PreparedStatement update(String table, Map updates, Map clauses, String other) throws SQLException
-    {
+    public PreparedStatement update(String table, Map updates, Map clauses, String other) throws SQLException {
         StringBuffer sb = new StringBuffer(256);
         sb.append("UPDATE ");
 
@@ -282,17 +257,15 @@
         sb.append(table).append(" \r\n");
 
         //SET (KEYS)
-        if (updates != null && updates.size() > 0)
-        {
+        if (updates != null && updates.size() > 0) {
             sb.append("\tSET \r\n");
 
             Set keys = updates.keySet();
             Iterator kit = keys.iterator();
             int i = 0;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
 
                 if (i > 0)
                     sb.append("\t\tAND ");
@@ -306,17 +279,15 @@
         }
 
         //WHERE (KEYS)
-        if (clauses != null && clauses.size() > 0)
-        {
+        if (clauses != null && clauses.size() > 0) {
             sb.append("\tWHERE \r\n");
 
             Set keys = clauses.keySet();
             Iterator kit = keys.iterator();
             int i = 0;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
 
                 if (i > 0)
                     sb.append("\t\tAND ");
@@ -337,15 +308,13 @@
         PreparedStatement statement = connection.prepareStatement(sb.toString());
 
         //SET (VALUES)
-        if (updates != null && updates.size() > 0)
-        {
+        if (updates != null && updates.size() > 0) {
             Set keys = updates.keySet();
             Iterator kit = keys.iterator();
             int i = 1;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
                 Object value = updates.get(key);
                 addParameter(statement, i, value);
                 i++;
@@ -353,15 +322,13 @@
         }
 
         //WHERE (VALUES)
-        if (clauses != null && clauses.size() > 0)
-        {
+        if (clauses != null && clauses.size() > 0) {
             Set keys = clauses.keySet();
             Iterator kit = keys.iterator();
             int i = 1;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
                 Object value = clauses.get(key);
                 addParameter(statement, i, value);
                 i++;
@@ -373,7 +340,7 @@
 
     /**
      * Creates a <code>PreparedStatement</code> for a SQL DELETE.
-     *
+     * <p>
      * e.g.
      * <pre>
      * DELETE FROM Employee
@@ -386,8 +353,7 @@
      * @return A PreparedStatement that can be subsequently executed.
      * @throws SQLException
      */
-    public PreparedStatement delete(String table, Map clauses, String other) throws SQLException
-    {
+    public PreparedStatement delete(String table, Map clauses, String other) throws SQLException {
         StringBuffer sb = new StringBuffer(256);
         sb.append("DELETE FROM ");
 
@@ -395,17 +361,15 @@
         sb.append(table).append(" \r\n");
 
         //WHERE (KEYS)
-        if (clauses != null && clauses.size() > 0)
-        {
+        if (clauses != null && clauses.size() > 0) {
             sb.append("\tWHERE \r\n");
 
             Set keys = clauses.keySet();
             Iterator kit = keys.iterator();
             int i = 0;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
 
                 if (i > 0)
                     sb.append("\t\tAND ");
@@ -426,15 +390,13 @@
         PreparedStatement statement = connection.prepareStatement(sb.toString());
 
         //WHERE (VALUES)
-        if (clauses != null && clauses.size() > 0)
-        {
+        if (clauses != null && clauses.size() > 0) {
             Set keys = clauses.keySet();
             Iterator kit = keys.iterator();
             int i = 1;
 
-            while (kit.hasNext())
-            {
-                String key = (String)kit.next();
+            while (kit.hasNext()) {
+                String key = (String) kit.next();
                 Object value = clauses.get(key);
                 addParameter(statement, i, value);
                 i++;
@@ -444,18 +406,13 @@
         return statement;
     }
 
-    public static long getId(Object val)
-    {
+    public static long getId(Object val) {
         long id = -1;
 
-        if (val != null)
-        {
-            if (val instanceof Number)
-            {
-                id = ((Number)val).longValue();
-            }
-            else
-            {
+        if (val != null) {
+            if (val instanceof Number) {
+                id = ((Number) val).longValue();
+            } else {
                 id = Long.parseLong(val.toString());
             }
         }
@@ -464,42 +421,30 @@
     }
 
 
-    public static int countRecords(ResultSet resultSet)
-    {
+    public static int countRecords(ResultSet resultSet) {
         int rowCount = 0;
 
         //Determine rs size
-        if (resultSet != null)
-        {
-            try
-            {
+        if (resultSet != null) {
+            try {
                 int currentIndex = resultSet.getRow();
 
                 //Go to the end and get that row number
-                if (resultSet.last())
-                {
+                if (resultSet.last()) {
                     rowCount = resultSet.getRow();
                 }
 
                 //Put the cursor back
-                if (currentIndex > 0)
-                {
+                if (currentIndex > 0) {
                     resultSet.absolute(currentIndex);
-                }
-                else
-                {
+                } else {
                     resultSet.beforeFirst();
                 }
-            }
-            catch (SQLException ex)
-            {
+            } catch (SQLException ex) {
                 //TODO: Decide whether if absolute() not be supported, try first() as a last resort??
-                try
-                {
+                try {
                     resultSet.first();
-                }
-                catch (SQLException se)
-                {
+                } catch (SQLException se) {
                     //we won't try anymore.
                 }
             }
@@ -508,36 +453,35 @@
         return rowCount;
     }
 
-    private void addParameter(PreparedStatement statement, int i, Object value) throws SQLException
-    {
+    private void addParameter(PreparedStatement statement, int i, Object value) throws SQLException {
         if (value == null)
             statement.setObject(i, value);
         else if (value instanceof String)
             statement.setString(i, value.toString());
         else if (value instanceof Persistable)
-            statement.setLong(i, ((Persistable)value).id);
+            statement.setLong(i, ((Persistable) value).id);
         else if (value instanceof Boolean)
-            statement.setBoolean(i, ((Boolean)value).booleanValue());
+            statement.setBoolean(i, ((Boolean) value).booleanValue());
         else if (value instanceof Integer)
-            statement.setInt(i, ((Integer)value).intValue());
+            statement.setInt(i, ((Integer) value).intValue());
         else if (value instanceof Double)
-            statement.setDouble(i, ((Double)value).doubleValue());
+            statement.setDouble(i, ((Double) value).doubleValue());
         else if (value instanceof Float)
-            statement.setFloat(i, ((Float)value).floatValue());
+            statement.setFloat(i, ((Float) value).floatValue());
         else if (value instanceof Short)
-            statement.setShort(i, ((Short)value).shortValue());
+            statement.setShort(i, ((Short) value).shortValue());
         else if (value instanceof Long)
-            statement.setLong(i, ((Long)value).longValue());
+            statement.setLong(i, ((Long) value).longValue());
         else if (value instanceof Calendar)
-            statement.setDate(i, new java.sql.Date(((Calendar)value).getTime().getTime()));
+            statement.setDate(i, new java.sql.Date(((Calendar) value).getTime().getTime()));
         else if (value instanceof java.util.Date)
-            statement.setDate(i, new java.sql.Date(((java.util.Date)value).getTime()));
+            statement.setDate(i, new java.sql.Date(((java.util.Date) value).getTime()));
         else if (value instanceof java.sql.Date)
-            statement.setDate(i, ((java.sql.Date)value));
+            statement.setDate(i, ((java.sql.Date) value));
         else if (value instanceof java.sql.Timestamp)
-            statement.setTimestamp(i, ((java.sql.Timestamp)value));
+            statement.setTimestamp(i, ((java.sql.Timestamp) value));
         else if (value instanceof java.sql.Time)
-            statement.setTime(i, ((java.sql.Time)value));
+            statement.setTime(i, ((java.sql.Time) value));
         else
             statement.setObject(i, value);
     }
diff --git a/core/src/test/java/macromedia/qa/metrics/Build.java b/core/src/test/java/macromedia/qa/metrics/Build.java
index e14540f..7311324 100644
--- a/core/src/test/java/macromedia/qa/metrics/Build.java
+++ b/core/src/test/java/macromedia/qa/metrics/Build.java
@@ -25,8 +25,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-public class Build extends Persistable
-{
+public class Build extends Persistable {
     public static final String TABLE_NAME = "Build";
     public final Project project;
     public final String number;
@@ -34,79 +33,62 @@
     private Map clauses;
     private String[] tables = new String[]{TABLE_NAME};
 
-    Build(Project project, String number)
-    {
+    Build(Project project, String number) {
         this.project = project;
         this.number = number;
     }
 
-    public void load(MetricsDatabase database)
-    {
+    public void load(MetricsDatabase database) {
         PreparedStatement statement = null;
         ResultSet rs = null;
 
-        try
-        {
+        try {
             statement = get(database);
             rs = statement.executeQuery();
             rs.first(); //move to first row
 
             Object i = rs.getObject("id");
-            if (i != null)
-            {
+            if (i != null) {
                 id = MetricsDatabase.getId(i);
-            }
-            else
-            {
+            } else {
                 id = -1;
             }
-        }
-        catch (SQLException ex)
-        {
+        } catch (SQLException ex) {
             if (UnitTrace.errors)
                 System.err.println("Error loading " + getIdentity() + ". " + ex == null ? "" : ex.getMessage());
 
-        }
-        finally
-        {
+        } finally {
             closeResultSet(rs);
             closeStatement(statement);
         }
     }
 
-    public String getIdentity()
-    {
+    public String getIdentity() {
         return TABLE_NAME + ": " + number + ", Project " + project.getIdentity() + ", id: " + id;
     }
 
-    public String getTableName()
-    {
+    public String getTableName() {
         return TABLE_NAME;
     }
 
-    protected String[] getTables()
-    {
+    protected String[] getTables() {
         return tables;
     }
 
-    protected Map getInserts()
-    {
+    protected Map getInserts() {
         Map inserts = getUpdates();
         inserts.put("number", number);
         return inserts;
     }
 
-    protected Map getUpdates()
-    {
+    protected Map getUpdates() {
         Map updates = new HashMap();
         updates.put("project_id", project);
         return updates;
     }
 
-    protected Map getClauses()
-    {
-        if (clauses == null)
-        {
+    protected Map getClauses() {
+        if (clauses == null) {
             clauses = new HashMap();
             clauses.put("number", number);
             clauses.put("project_id", project);
diff --git a/core/src/test/java/macromedia/qa/metrics/Metric.java b/core/src/test/java/macromedia/qa/metrics/Metric.java
index c9fa23e..caedb5e 100644
--- a/core/src/test/java/macromedia/qa/metrics/Metric.java
+++ b/core/src/test/java/macromedia/qa/metrics/Metric.java
@@ -25,8 +25,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-public class Metric extends Persistable
-{
+public class Metric extends Persistable {
     public static final String TABLE_NAME = "Metric";
 
     public final String name;
@@ -36,70 +35,55 @@
     private Map clause;
     private String[] tables = new String[]{TABLE_NAME};
 
-    Metric(String name)
-    {
+    Metric(String name) {
         this.name = name;
     }
 
-    public void load(MetricsDatabase database)
-    {
+    public void load(MetricsDatabase database) {
         PreparedStatement statement = null;
         ResultSet rs = null;
 
-        try
-        {
+        try {
             statement = get(database);
             rs = statement.executeQuery();
             rs.first(); //move to first row
 
             Object i = rs.getObject("id");
-            if (i != null)
-            {
+            if (i != null) {
                 id = MetricsDatabase.getId(i);
                 units = rs.getString("units");
                 description = rs.getString("description");
-            }
-            else
-            {
+            } else {
                 id = -1;
             }
-        }
-        catch (SQLException ex)
-        {
+        } catch (SQLException ex) {
             if (UnitTrace.errors)
                 System.err.println("Error loading " + getIdentity() + ". " + ex == null ? "" : ex.getMessage());
-        }
-        finally
-        {
+        } finally {
             closeResultSet(rs);
             closeStatement(statement);
         }
     }
 
-    public String getIdentity()
-    {
+    public String getIdentity() {
         return TABLE_NAME + ": " + name + ", id: " + id;
     }
 
-    public String getTableName()
-    {
+    public String getTableName() {
         return TABLE_NAME;
     }
 
-    protected String[] getTables()
-    {
+    protected String[] getTables() {
         return tables;
     }
 
-    protected Map getInserts()
-    {
+    protected Map getInserts() {
         Map inserts = getUpdates();
         inserts.put("name", name);
         return inserts;
     }
 
-    protected Map getUpdates()
-    {
+    protected Map getUpdates() {
         Map updates = new HashMap();
 
         if (units != null)
@@ -111,10 +95,8 @@
         return updates;
     }
 
-    protected Map getClauses()
-    {
-        if (clause == null)
-        {
+    protected Map getClauses() {
+        if (clause == null) {
             clause = new HashMap();
             clause.put("name", name);
         }
diff --git a/core/src/test/java/macromedia/qa/metrics/MetricsDatabase.java b/core/src/test/java/macromedia/qa/metrics/MetricsDatabase.java
index 25b1efe..983ca0e 100644
--- a/core/src/test/java/macromedia/qa/metrics/MetricsDatabase.java
+++ b/core/src/test/java/macromedia/qa/metrics/MetricsDatabase.java
@@ -26,8 +26,7 @@
 import java.sql.DriverManager;
 import java.sql.SQLException;
 
-public class MetricsDatabase extends AbstractDatabase
-{
+public class MetricsDatabase extends AbstractDatabase {
     private Properties properties;
 
     private static final String DEFAULT_HOST = "10.1.144.66";
@@ -36,77 +35,59 @@
     private static final String DEFAULT_URLBASE = "jdbc:odbc:";
     private static final String DEFAULT_DATASOURCE = "master";
 
-    public MetricsDatabase()
-    {
+    public MetricsDatabase() {
         init(null);
     }
 
-    public MetricsDatabase(Properties props)
-    {
+    public MetricsDatabase(Properties props) {
         properties = props;
         init(null);
     }
 
-    public MetricsDatabase(File f)
-    {
+    public MetricsDatabase(File f) {
         init(f);
     }
 
-    private void init(File f)
-    {
+    private void init(File f) {
         if (f != null)
             loadProperties(f);
 
         if (properties == null)
             properties = new Properties();
 
-        try
-        {
+        try {
             Class.forName(getDriver()).newInstance();
             connection = getConnection();
-        }
-        catch (Exception e)
-        {
+        } catch (Exception e) {
             e.printStackTrace();
         }
     }
 
-    public Connection getConnection() throws SQLException
-    {
+    public Connection getConnection() throws SQLException {
         if (connection == null)
             connection = DriverManager.getConnection(getConnectionURL(), getConnectionProperties());
 
         return connection;
     }
 
-    public void dispose()
-    {
-        try
-        {
+    public void dispose() {
+        try {
             connection.close();
             connection = null;
-        }
-        catch (Exception ex)
-        {
+        } catch (Exception ex) {
         }
     }
 
-    public void loadProperties(File f)
-    {
-        try
-        {
+    public void loadProperties(File f) {
+        try {
             FileInputStream fis = new FileInputStream(f);
             properties = new Properties();
             properties.load(fis);
-        }
-        catch (FileNotFoundException ex)
-        {
+        } catch (FileNotFoundException ex) {
             System.err.println();
             System.err.println("Could not find database properties file " + f.getAbsolutePath());
             System.err.println("\t" + ex.getMessage());
-        }
-        catch (IOException ioe)
-        {
+        } catch (IOException ioe) {
             System.err.println();
             System.err.println("Error reading database properties file " + f.getAbsolutePath());
             System.err.println("\t" + ioe.getMessage());
@@ -114,8 +95,7 @@
 
     }
 
-    String getDriver()
-    {
+    String getDriver() {
         String driver = properties.getProperty("driver");
         if (driver == null)
             driver = DEFAULT_DRIVER;
@@ -125,8 +105,7 @@
         return driver;
     }
 
-    String getHost()
-    {
+    String getHost() {
         String host = properties.getProperty("host");
         if (host == null)
             host = DEFAULT_HOST;
@@ -136,8 +115,7 @@
         return host;
     }
 
-    String getPort()
-    {
+    String getPort() {
         String port = properties.getProperty("port");
         if (port == null)
             port = DEFAULT_PORT;
@@ -147,8 +125,7 @@
         return port;
     }
 
-    String getAccount()
-    {
+    String getAccount() {
         String account = properties.getProperty("account");
         if (account != null)
             account = account.trim();
@@ -156,8 +133,7 @@
         return account;
     }
 
-    String getPassword()
-    {
+    String getPassword() {
         String pass = properties.getProperty("password");
         if (pass != null)
             pass = pass.trim();
@@ -166,8 +142,7 @@
     }
 
 
-    String getDatabase()
-    {
+    String getDatabase() {
         String db = properties.getProperty("database");
         if (db != null)
             db = db.trim();
@@ -175,8 +150,7 @@
         return db;
     }
 
-    String getDatasource()
-    {
+    String getDatasource() {
         String ds = properties.getProperty("datasource");
         if (ds != null)
             ds = ds.trim();
@@ -184,8 +158,7 @@
         return ds;
     }
 
-    String getURLBase()
-    {
+    String getURLBase() {
         String urlb = properties.getProperty("urlbase");
         if (urlb == null)
             urlb = DEFAULT_URLBASE;
@@ -193,13 +166,11 @@
         return urlb;
     }
 
-    String getConnectionURL()
-    {
+    String getConnectionURL() {
         StringBuffer sb = new StringBuffer();
         String urlb = getURLBase();
 
-        if (DEFAULT_URLBASE.equals(urlb))
-        {
+        if (DEFAULT_URLBASE.equals(urlb)) {
             String odbc = getDatasource();
             if (odbc == null)
                 odbc = DEFAULT_DATASOURCE;
@@ -212,17 +183,14 @@
                 sb.append(":");
 
             sb.append(odbc);
-        }
-        else
-        {
+        } else {
             sb.append(urlb).append(getHost()).append(":").append(getPort());
         }
 
         return sb.toString();
     }
 
-    private Properties getConnectionProperties()
-    {
+    private Properties getConnectionProperties() {
         Properties connectionProps = new Properties();
 
         if (getDatabase() != null)
diff --git a/core/src/test/java/macromedia/qa/metrics/MetricsManager.java b/core/src/test/java/macromedia/qa/metrics/MetricsManager.java
index d36256f..9b2e548 100644
--- a/core/src/test/java/macromedia/qa/metrics/MetricsManager.java
+++ b/core/src/test/java/macromedia/qa/metrics/MetricsManager.java
@@ -21,56 +21,45 @@
 import java.sql.SQLException;
 import java.util.Calendar;
 
-public class MetricsManager
-{
+public class MetricsManager {
     private Project project;
     private Build build;
     private MetricsDatabase database;
     private Run currentRun;
     private Metric currentMetric;
 
-    public MetricsManager(String projectName, String buildNumber, File props) throws SQLException
-    {
+    public MetricsManager(String projectName, String buildNumber, File props) throws SQLException {
         validate(projectName, buildNumber, props);
 
-        try
-        {
+        try {
             this.database = new MetricsDatabase(props);
             initProject(projectName);
             initBuild(buildNumber);
-        }
-        catch (SQLException ex)
-        {
-            try
-            {
+        } catch (SQLException ex) {
+            try {
                 database.dispose();
+            } catch (Throwable t) {
             }
-            catch(Throwable t) {}
 
             throw ex;
         }
     }
 
-    private void initProject(String projectName) throws SQLException
-    {
+    private void initProject(String projectName) throws SQLException {
         project = new Project(projectName);
-        if (!project.exists(database))
-        {
+        if (!project.exists(database)) {
             project.save(database);
         }
     }
 
-    private void initBuild(String buildNumber) throws SQLException
-    {
+    private void initBuild(String buildNumber) throws SQLException {
         build = new Build(project, buildNumber);
-        if (!build.exists(database))
-        {
+        if (!build.exists(database)) {
             build.save(database);
         }
     }
 
-    public Run newRun() throws SQLException
-    {
+    public Run newRun() throws SQLException {
         currentRun = new Run(build);
         currentRun.time = Calendar.getInstance().getTime().getTime();
 
@@ -82,18 +71,15 @@
         return getCurrentRun();
     }
 
-    public Run getCurrentRun()
-    {
+    public Run getCurrentRun() {
         return currentRun;
     }
 
-    public Metric newMetric(String name, String units) throws SQLException
-    {
+    public Metric newMetric(String name, String units) throws SQLException {
         currentMetric = new Metric(name);
         currentMetric.units = units;
 
-        if (!currentMetric.exists(database))
-        {
+        if (!currentMetric.exists(database)) {
             if (currentMetric.id >= 0)
                 currentMetric.save(database);
             else
@@ -103,29 +89,24 @@
         return getCurrentMetric();
     }
 
-    public Metric getCurrentMetric()
-    {
+    public Metric getCurrentMetric() {
         return currentMetric;
     }
 
-    public Value createValue(double val)
-    {
+    public Value createValue(double val) {
         Value v = new Value(currentRun, currentMetric);
         v.numberValue = new Double(val);
         return v;
     }
 
-    public Value createValue(String val)
-    {
+    public Value createValue(String val) {
         Value v = new Value(currentRun, currentMetric);
         v.textValue = val;
         return v;
     }
 
-    public void saveValue(Value val) throws SQLException
-    {
-        if (val != null)
-        {
+    public void saveValue(Value val) throws SQLException {
+        if (val != null) {
             if (val.id >= 0)
                 val.save(database); //Attempt an update as we have an id
             else
@@ -134,10 +115,7 @@
     }
 
 
-
-
-    private void validate(String project, String buildNumber, File props)
-    {
+    private void validate(String project, String buildNumber, File props) {
         if (!validProjectName(project))
             throw new IllegalStateException("Invalid project " + project);
 
@@ -148,18 +126,15 @@
             throw new IllegalStateException("Invalid database properties " + props);
     }
 
-    private static boolean validProjectName(String project)
-    {
+    private static boolean validProjectName(String project) {
         return project != null && project.trim().length() > 0;
     }
 
-    private static boolean validBuildNumber(String buildNumber)
-    {
+    private static boolean validBuildNumber(String buildNumber) {
         return buildNumber != null && buildNumber.trim().length() > 0;
     }
 
-    private static boolean validProps(File props)
-    {
+    private static boolean validProps(File props) {
         return props != null && props.exists() && props.canRead();
     }
 
diff --git a/core/src/test/java/macromedia/qa/metrics/Persistable.java b/core/src/test/java/macromedia/qa/metrics/Persistable.java
index 96429e4..edecca7 100644
--- a/core/src/test/java/macromedia/qa/metrics/Persistable.java
+++ b/core/src/test/java/macromedia/qa/metrics/Persistable.java
@@ -25,45 +25,35 @@
 import java.sql.Statement;
 import java.util.Map;
 
-public abstract class Persistable
-{
+public abstract class Persistable {
     protected long id = -1;
 
-    public boolean exists(MetricsDatabase database) throws SQLException
-    {
-        if (database != null)
-        {
+    public boolean exists(MetricsDatabase database) throws SQLException {
+        if (database != null) {
             PreparedStatement statement = null;
             ResultSet rs = null;
 
-            try
-            {
+            try {
                 int count = 0;
                 statement = get(database);
                 rs = statement.executeQuery();
 
                 count = MetricsDatabase.countRecords(rs);
 
-                if (count > 0)
-                {
+                if (count > 0) {
                     rs.first();
                     Object val = rs.getObject("id");
-                    if (val != null)
-                    {
+                    if (val != null) {
                         id = MetricsDatabase.getId(val);
                         return id >= 0;
                     }
                 }
-            }
-            catch (SQLException ex)
-            {
+            } catch (SQLException ex) {
                 if (UnitTrace.errors)
                     System.err.println("Error checking if " + getIdentity() + " exists." + ex == null ? "" : ex.getMessage());
 
                 throw ex;
-            }
-            finally
-            {
+            } finally {
                 closeResultSet(rs);
                 closeStatement(statement);
             }
@@ -72,92 +62,66 @@
         return false;
     }
 
-    protected PreparedStatement get(MetricsDatabase database) throws SQLException
-    {
+    protected PreparedStatement get(MetricsDatabase database) throws SQLException {
         PreparedStatement statement = null;
         statement = database.select(null, getTables(), getClauses(), null);
         return statement;
     }
 
-    protected void closeResultSet(ResultSet rs)
-    {
-        if (rs != null)
-        {
-            try
-            {
+    protected void closeResultSet(ResultSet rs) {
+        if (rs != null) {
+            try {
                 rs.close();
-            }
-            catch (Exception ex)
-            {
+            } catch (Exception ex) {
             }
         }
     }
 
-    protected void closeStatement(Statement stmt)
-    {
-        if (stmt != null)
-        {
-            try
-            {
+    protected void closeStatement(Statement stmt) {
+        if (stmt != null) {
+            try {
                 stmt.close();
-            }
-            catch (Exception ex)
-            {
+            } catch (Exception ex) {
             }
         }
     }
 
 
-    public void save(MetricsDatabase database) throws SQLException
-    {
+    public void save(MetricsDatabase database) throws SQLException {
         PreparedStatement statement = null;
 
-        try
-        {
-            if (exists(database))
-            {
+        try {
+            if (exists(database)) {
                 statement = database.update(getTableName(), getUpdates(), getClauses(), null);
                 statement.executeUpdate();
-            }
-            else
-            {
+            } else {
                 statement = database.insert(getTableName(), getInserts(), null, null);
                 statement.executeUpdate();
                 load(database);
             }
-        }
-        catch (SQLException ex)
-        {
+        } catch (SQLException ex) {
             if (UnitTrace.errors)
                 System.err.println("Error saving " + getIdentity() + ". " + ex == null ? "" : ex.getMessage());
 
             throw ex;
-        }
-        finally
-        {
+        } finally {
             closeStatement(statement);
         }
     }
 
-    public void insert(MetricsDatabase database) throws SQLException
-    {
+    public void insert(MetricsDatabase database) throws SQLException {
         PreparedStatement statement = null;
 
-        try
-        {
+        try {
             statement = database.insert(getTableName(), getInserts(), null, null);
             statement.executeUpdate();
             load(database);
-        }
-        catch (SQLException ex)
-        {
+        } catch (SQLException ex) {
             if (UnitTrace.errors)
                 System.err.println("Error saving " + getIdentity() + ". " + ex == null ? "" : ex.getMessage());
 
             throw ex;
-        }
-        finally
-        {
+        } finally {
             closeStatement(statement);
         }
     }
diff --git a/core/src/test/java/macromedia/qa/metrics/Project.java b/core/src/test/java/macromedia/qa/metrics/Project.java
index aa96b02..6a268d0 100644
--- a/core/src/test/java/macromedia/qa/metrics/Project.java
+++ b/core/src/test/java/macromedia/qa/metrics/Project.java
@@ -23,75 +23,61 @@
 import java.sql.SQLException;
 import java.sql.PreparedStatement;
 
-public class Project extends Persistable
-{
+public class Project extends Persistable {
     public static final String TABLE_NAME = "Project";
     public final String name;
     public String contact;
     public String email;
 
     private Map clause;
-    private String[] tables = new String[] {TABLE_NAME};
+    private String[] tables = new String[]{TABLE_NAME};
 
-    Project (String name)
-    {
+    Project(String name) {
         this.name = name;
     }
 
-    public void load(MetricsDatabase database)
-    {
+    public void load(MetricsDatabase database) {
         PreparedStatement statement = null;
         ResultSet rs = null;
 
-        try
-        {
+        try {
             statement = get(database);
             rs = statement.executeQuery();
             rs.first(); //move to first row
 
             Object i = rs.getObject("id");
-            if (i != null)
-            {
+            if (i != null) {
                 id = MetricsDatabase.getId(i);
                 contact = rs.getString("contact");
                 email = rs.getString("email");
             }
-        }
-        catch (SQLException ex)
-        {
+        } catch (SQLException ex) {
 
-        }
-        finally
-        {
+        } finally {
             closeResultSet(rs);
             closeStatement(statement);
         }
     }
 
-    public String getIdentity()
-    {
+    public String getIdentity() {
         return TABLE_NAME + ": " + name + ", id: " + id;
     }
 
-    public String getTableName()
-    {
+    public String getTableName() {
         return TABLE_NAME;
     }
 
-    protected String[] getTables()
-    {
+    protected String[] getTables() {
         return tables;
     }
 
-    protected Map getInserts()
-    {
+    protected Map getInserts() {
         Map inserts = getUpdates();
         inserts.put("name", name);
         return inserts;
     }
 
-    protected Map getUpdates()
-    {
+    protected Map getUpdates() {
         HashMap updates = new HashMap();
 
         if (contact != null)
@@ -103,10 +89,8 @@
         return updates;
     }
 
-    protected Map getClauses()
-    {
-        if (clause == null)
-        {
+    protected Map getClauses() {
+        if (clause == null) {
             clause = new HashMap();
             clause.put("name", name);
         }
diff --git a/core/src/test/java/macromedia/qa/metrics/Run.java b/core/src/test/java/macromedia/qa/metrics/Run.java
index ce270bd..aeeeafd 100644
--- a/core/src/test/java/macromedia/qa/metrics/Run.java
+++ b/core/src/test/java/macromedia/qa/metrics/Run.java
@@ -25,8 +25,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-public class Run extends Persistable
-{
+public class Run extends Persistable {
     public static final String TABLE_NAME = "Run";
     public final Build build;
     public String description;
@@ -35,20 +34,16 @@
     private Map clauses;
     private String[] tables = new String[]{TABLE_NAME};
 
-    Run(Build build)
-    {
+    Run(Build build) {
         this.build = build;
     }
 
-    public void load(MetricsDatabase database)
-    {
+    public void load(MetricsDatabase database) {
         PreparedStatement statement = null;
         ResultSet rs = null;
 
-        try
-        {
-            if (time > 0)
-            {
+        try {
+            if (time > 0) {
                 getClauses();
                 clauses.put("runtime", new Long(time));
             }
@@ -62,59 +57,46 @@
             rs.first(); //move to first row
 
             Object i = rs.getObject("id");
-            if (i != null)
-            {
+            if (i != null) {
                 id = MetricsDatabase.getId(i);
                 description = rs.getString("description");
 
                 java.sql.Date sqlDate = rs.getDate("runtime");
-                if (sqlDate != null)
-                {
+                if (sqlDate != null) {
                     time = sqlDate.getTime();
                 }
-            }
-            else
-            {
+            } else {
                 id = -1;
             }
-        }
-        catch (SQLException ex)
-        {
+        } catch (SQLException ex) {
             if (UnitTrace.errors)
                 System.err.println("Error loading " + getIdentity() + ". " + ex == null ? "" : ex.getMessage());
-        }
-        finally
-        {
+        } finally {
             closeResultSet(rs);
             closeStatement(statement);
         }
     }
 
 
-    public String getIdentity()
-    {
+    public String getIdentity() {
         return TABLE_NAME + ": " + build.getIdentity() + ", id: " + id;
     }
 
-    public String getTableName()
-    {
+    public String getTableName() {
         return TABLE_NAME;
     }
 
-    protected String[] getTables()
-    {
+    protected String[] getTables() {
         return tables;
     }
 
-    protected Map getInserts()
-    {
+    protected Map getInserts() {
         Map inserts = getUpdates();
         inserts.put("build_id", build);
         return inserts;
     }
 
-    protected Map getUpdates()
-    {
+    protected Map getUpdates() {
         HashMap updates = new HashMap();
 
         if (description != null)
@@ -126,10 +108,8 @@
         return updates;
     }
 
-    protected Map getClauses()
-    {
-        if (clauses == null)
-        {
+    protected Map getClauses() {
+        if (clauses == null) {
             clauses = new HashMap();
             clauses.put("build_id", build);
         }
diff --git a/core/src/test/java/macromedia/qa/metrics/Value.java b/core/src/test/java/macromedia/qa/metrics/Value.java
index 4f6f70b..f78e5f8 100644
--- a/core/src/test/java/macromedia/qa/metrics/Value.java
+++ b/core/src/test/java/macromedia/qa/metrics/Value.java
@@ -25,8 +25,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
-public class Value extends Persistable
-{
+public class Value extends Persistable {
     public static final String TABLE_NAME = "Value";
 
     public final Run run;
@@ -38,73 +37,58 @@
     private Map clause;
     private String[] tables = new String[]{TABLE_NAME};
 
-    Value(Run run, Metric statistic)
-    {
+    Value(Run run, Metric statistic) {
         this.run = run;
         this.metric = statistic;
     }
 
-    public void load(MetricsDatabase database)
-    {
+    public void load(MetricsDatabase database) {
         PreparedStatement statement = null;
         ResultSet rs = null;
 
-        try
-        {
+        try {
             statement = get(database);
             rs = statement.executeQuery();
             rs.first(); //move to first row
 
             Object i = rs.getObject("id");
-            if (i != null)
-            {
+            if (i != null) {
                 id = MetricsDatabase.getId(i);
                 outlier = rs.getBoolean("outlier");
                 textValue = rs.getString("textvalue");
                 numberValue = new Double(rs.getDouble("numvalue"));
-            }
-            else
-            {
+            } else {
                 id = -1;
             }
-        }
-        catch (SQLException ex)
-        {
+        } catch (SQLException ex) {
             if (UnitTrace.errors)
                 System.err.println("Error loading " + getIdentity() + ". " + ex == null ? "" : ex.getMessage());
-        }
-        finally
-        {
+        } finally {
             closeResultSet(rs);
             closeStatement(statement);
         }
     }
 
-    public String getIdentity()
-    {
+    public String getIdentity() {
         return TABLE_NAME + ": " + run.build.getIdentity() + ", " + metric.getIdentity() + ", id: " + id;
     }
 
-    public String getTableName()
-    {
+    public String getTableName() {
         return TABLE_NAME;
     }
 
-    protected String[] getTables()
-    {
+    protected String[] getTables() {
         return tables;
     }
 
-    protected Map getInserts()
-    {
+    protected Map getInserts() {
         Map inserts = getUpdates();
         inserts.put("metric_id", metric);
         inserts.put("run_id", run);
         return inserts;
     }
 
-    protected Map getUpdates()
-    {
+    protected Map getUpdates() {
         HashMap updates = new HashMap();
         updates.put("outlier", outlier ? Boolean.TRUE : Boolean.FALSE);
 
@@ -117,10 +101,8 @@
         return updates;
     }
 
-    protected Map getClauses()
-    {
-        if (clause == null)
-        {
+    protected Map getClauses() {
+        if (clause == null) {
             clause = new HashMap();
             clause.put("metric_id", metric);
             clause.put("run_id", run);
diff --git a/core/src/test/java/macromedia/util/UnitTrace.java b/core/src/test/java/macromedia/util/UnitTrace.java
index ff53763..c2b3d37 100644
--- a/core/src/test/java/macromedia/util/UnitTrace.java
+++ b/core/src/test/java/macromedia/util/UnitTrace.java
@@ -17,13 +17,11 @@
 
 package macromedia.util;
 
-public class UnitTrace
-{
+public class UnitTrace {
     public static final boolean errors = (System.getProperty("trace.metrics.errors") != null);
     public static final boolean debug = (System.getProperty("trace.debug") != null);
 
-    public UnitTrace()
-    {
+    public UnitTrace() {
 
     }
 }
diff --git a/core/src/test/resources/amf_request.xml b/core/src/test/resources/amf_request.xml
index 8a74429..1432206 100644
--- a/core/src/test/resources/amf_request.xml
+++ b/core/src/test/resources/amf_request.xml
@@ -78,7 +78,7 @@
                             <string>Envelope</string>
                         </property>
                         <property name="headers">
-                            <array count="0" />
+                            <array count="0"/>
                         </property>
                         <property name="body">
                             <string>Hello World</string>
diff --git a/core/src/test/resources/flex/messaging/config/services/1a.xml b/core/src/test/resources/flex/messaging/config/services/1a.xml
index 8733aca..38880f0 100644
--- a/core/src/test/resources/flex/messaging/config/services/1a.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1a.xml
@@ -20,16 +20,16 @@
 <services-config xmlns="http://www.adobe.com/2006/flex-enterprise-services">
     <services>
         <service id="foo-service"
-            class="flex.messaging.services.FooService"
-            messageTypes="flex.messaging.messages.FooMessage"/>
+                 class="flex.messaging.services.FooService"
+                 messageTypes="flex.messaging.messages.FooMessage"/>
 
         <service id="bar-service"
-            class="flex.messaging.services.BarService"
-            messageTypes="flex.messaging.messages.BarMessage">
+                 class="flex.messaging.services.BarService"
+                 messageTypes="flex.messaging.messages.BarMessage">
 
-            <adapters />
+            <adapters/>
 
-            <default-channels />
+            <default-channels/>
         </service>
 
 
diff --git a/core/src/test/resources/flex/messaging/config/services/1b.xml b/core/src/test/resources/flex/messaging/config/services/1b.xml
index 94a2c97..23022f2 100644
--- a/core/src/test/resources/flex/messaging/config/services/1b.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1b.xml
@@ -21,32 +21,32 @@
 
     <services>
         <service id="foo-service"
-            class="flex.messaging.services.FooService"
-            messageTypes="flex.messaging.messages.FooMessage">
+                 class="flex.messaging.services.FooService"
+                 messageTypes="flex.messaging.messages.FooMessage">
 
             <adapters>
-                <adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo" />
+                <adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo"/>
             </adapters>
 
             <default-channels>
-                <channel ref="foo-channel" />
+                <channel ref="foo-channel"/>
             </default-channels>
         </service>
 
         <service id="bar-service"
-            class="flex.messaging.services.BarService"
-            messageTypes="flex.messaging.messages.BarMessage">
+                 class="flex.messaging.services.BarService"
+                 messageTypes="flex.messaging.messages.BarMessage">
 
             <adapters>
-                <adapter-definition class="flex.messaging.services.bar.BarAdapter" id="bar1" />
-                <adapter-definition class="flex.messaging.services.bar.BarAdapter" id="bar2" />
+                <adapter-definition class="flex.messaging.services.bar.BarAdapter" id="bar1"/>
+                <adapter-definition class="flex.messaging.services.bar.BarAdapter" id="bar2"/>
             </adapters>
 
             <default-channels>
-                <channel ref="bar-channel" />
-                <channel ref="foo-channel" />
+                <channel ref="bar-channel"/>
+                <channel ref="foo-channel"/>
             </default-channels>
-       </service>
+        </service>
 
     </services>
 
diff --git a/core/src/test/resources/flex/messaging/config/services/1c.xml b/core/src/test/resources/flex/messaging/config/services/1c.xml
index a2aa5eb..1d44df5 100644
--- a/core/src/test/resources/flex/messaging/config/services/1c.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1c.xml
@@ -22,15 +22,15 @@
     <services>
 
         <service id="foo-service"
-            class="flex.messaging.services.FooService"
-            messageTypes="flex.messaging.messages.FooMessage">
+                 class="flex.messaging.services.FooService"
+                 messageTypes="flex.messaging.messages.FooMessage">
 
             <adapters>
-                <adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo" default="true" />
+                <adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo" default="true"/>
             </adapters>
 
             <default-channels>
-                <channel ref="foo-channel" />
+                <channel ref="foo-channel"/>
             </default-channels>
 
             <destination id="foo-dest">
diff --git a/core/src/test/resources/flex/messaging/config/services/1d.xml b/core/src/test/resources/flex/messaging/config/services/1d.xml
index 9dd2270..f470b0e 100644
--- a/core/src/test/resources/flex/messaging/config/services/1d.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1d.xml
@@ -22,16 +22,16 @@
     <services>
 
         <service id="foo-service"
-            class="flex.messaging.services.FooService"
-            messageTypes="flex.messaging.messages.FooMessage">
+                 class="flex.messaging.services.FooService"
+                 messageTypes="flex.messaging.messages.FooMessage">
 
             <adapters>
-                <adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo" />
-                <adapter-definition class="flex.messaging.services.bar.BarAdapter" id="bar" default="true" />
+                <adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo"/>
+                <adapter-definition class="flex.messaging.services.bar.BarAdapter" id="bar" default="true"/>
             </adapters>
 
             <default-channels>
-                <channel ref="foo-channel" />
+                <channel ref="foo-channel"/>
             </default-channels>
 
             <destination id="foo-dest">
@@ -40,20 +40,20 @@
                 </properties>
 
                 <channels>
-                    <channel ref="foo-channel" />
+                    <channel ref="foo-channel"/>
                 </channels>
 
                 <security>
-                    <security-constraint ref="foo-constraint" />
+                    <security-constraint ref="foo-constraint"/>
                 </security>
 
-                <adapter ref="foo" />
+                <adapter ref="foo"/>
             </destination>
 
             <destination id="bar-dest"
-                channels="bar-channel,foo-channel"
-                security-constraint="bar-constraint"
-                adapter="bar">
+                         channels="bar-channel,foo-channel"
+                         security-constraint="bar-constraint"
+                         adapter="bar">
 
                 <properties>
                     <barString>barValue</barString>
diff --git a/core/src/test/resources/flex/messaging/config/services/1e.xml b/core/src/test/resources/flex/messaging/config/services/1e.xml
index b8cf92c..29c0700 100644
--- a/core/src/test/resources/flex/messaging/config/services/1e.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1e.xml
@@ -22,25 +22,25 @@
     <services>
 
         <service id="foo-service"
-            class="flex.messaging.services.FooService"
-            messageTypes="flex.messaging.messages.FooMessage">
+                 class="flex.messaging.services.FooService"
+                 messageTypes="flex.messaging.messages.FooMessage">
 
             <adapters>
-                <adapter-include file-path="1e_adapter_include.xml" />
+                <adapter-include file-path="1e_adapter_include.xml"/>
             </adapters>
 
             <default-channels>
-                <channel ref="foo-channel" />
+                <channel ref="foo-channel"/>
             </default-channels>
 
-            <destination-include file-path="1e_destination_include.xml" />
+            <destination-include file-path="1e_destination_include.xml"/>
 
         </service>
 
     </services>
 
     <channels>
-        <channel-include file-path="1e_channel_include.xml" />
+        <channel-include file-path="1e_channel_include.xml"/>
     </channels>
 
     <security>
diff --git a/core/src/test/resources/flex/messaging/config/services/1e_adapter_include.xml b/core/src/test/resources/flex/messaging/config/services/1e_adapter_include.xml
index 798911d..a79b5ac 100644
--- a/core/src/test/resources/flex/messaging/config/services/1e_adapter_include.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1e_adapter_include.xml
@@ -23,5 +23,5 @@
 An include for the 1e Unit Test.
  -->
 <adapters>
-    <adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo" default="true" />
+    <adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo" default="true"/>
 </adapters>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/config/services/1f.xml b/core/src/test/resources/flex/messaging/config/services/1f.xml
index 4c77120..f32e700 100644
--- a/core/src/test/resources/flex/messaging/config/services/1f.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1f.xml
@@ -21,7 +21,7 @@
 
     <services>
 
-        <service-include file-path="1f_service_include.xml" />
+        <service-include file-path="1f_service_include.xml"/>
 
     </services>
 
diff --git a/core/src/test/resources/flex/messaging/config/services/1g.xml b/core/src/test/resources/flex/messaging/config/services/1g.xml
index d1bed16..fddc0be 100644
--- a/core/src/test/resources/flex/messaging/config/services/1g.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1g.xml
@@ -20,7 +20,7 @@
 <services-config xmlns="http://www.adobe.com/2006/flex-enterprise-services">
     <services>
         <service id="foo-service,"
-            class="flex.messaging.services.FooService"
-            messageTypes="flex.messaging.messages.FooMessage"/>
+                 class="flex.messaging.services.FooService"
+                 messageTypes="flex.messaging.messages.FooMessage"/>
     </services>
 </services-config>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/config/services/1h.xml b/core/src/test/resources/flex/messaging/config/services/1h.xml
index 1933a8b..a2e73db 100644
--- a/core/src/test/resources/flex/messaging/config/services/1h.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1h.xml
@@ -22,15 +22,15 @@
     <services>
 
         <service id="foo-service"
-            class="flex.messaging.services.FooService"
-            messageTypes="flex.messaging.messages.FooMessage">
+                 class="flex.messaging.services.FooService"
+                 messageTypes="flex.messaging.messages.FooMessage">
 
             <adapters>
-                <adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo" default="true" />
+                <adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo" default="true"/>
             </adapters>
 
             <default-channels>
-                <channel ref="foo-channel" />
+                <channel ref="foo-channel"/>
             </default-channels>
 
             <destination id="foo-dest" security="error">
diff --git a/core/src/test/resources/flex/messaging/config/services/1i.xml b/core/src/test/resources/flex/messaging/config/services/1i.xml
index e39e25c..d02fd13 100644
--- a/core/src/test/resources/flex/messaging/config/services/1i.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1i.xml
@@ -27,25 +27,25 @@
     <services>
 
         <service id="foo-service"
-            class="flex.messaging.services.FooService"
-            messageTypes="flex.messaging.messages.FooMessage">
+                 class="flex.messaging.services.FooService"
+                 messageTypes="flex.messaging.messages.FooMessage">
 
             <adapters>
-                <adapter-include directory-path="adapters" />
+                <adapter-include directory-path="adapters"/>
             </adapters>
 
             <default-channels>
-                <channel ref="foo-channel" />
+                <channel ref="foo-channel"/>
             </default-channels>
 
-            <destination-include directory-path="destinations" />
+            <destination-include directory-path="destinations"/>
 
         </service>
 
     </services>
 
     <channels>
-        <channel-include directory-path="channels" />
+        <channel-include directory-path="channels"/>
     </channels>
 
     <security>
diff --git a/core/src/test/resources/flex/messaging/config/services/1j.xml b/core/src/test/resources/flex/messaging/config/services/1j.xml
index 6d7c45e..bfd7613 100644
--- a/core/src/test/resources/flex/messaging/config/services/1j.xml
+++ b/core/src/test/resources/flex/messaging/config/services/1j.xml
@@ -27,7 +27,7 @@
 
     <services>
 
-        <service-include directory-path="services" />
+        <service-include directory-path="services"/>
 
     </services>
 
diff --git a/core/src/test/resources/flex/messaging/config/services/adapters/1i_adapter_include.xml b/core/src/test/resources/flex/messaging/config/services/adapters/1i_adapter_include.xml
index f897733..7ba5404 100644
--- a/core/src/test/resources/flex/messaging/config/services/adapters/1i_adapter_include.xml
+++ b/core/src/test/resources/flex/messaging/config/services/adapters/1i_adapter_include.xml
@@ -22,4 +22,4 @@
 
 An include for the 1i Unit Test.
  -->
-<adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo" default="true" />
+<adapter-definition class="flex.messaging.services.foo.FooAdapter" id="foo" default="true"/>
diff --git a/core/src/test/resources/flex/messaging/io/amfx/amfx.xsd b/core/src/test/resources/flex/messaging/io/amfx/amfx.xsd
index e33a929..8179eec 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/amfx.xsd
+++ b/core/src/test/resources/flex/messaging/io/amfx/amfx.xsd
@@ -18,36 +18,36 @@
 
 -->
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-    xmlns="http://www.macromedia.com/2005/amfx"
-    targetNamespace="http://www.macromedia.com/2005/amfx"
-    elementFormDefault="qualified">
+            xmlns="http://www.macromedia.com/2005/amfx"
+            targetNamespace="http://www.macromedia.com/2005/amfx"
+            elementFormDefault="qualified">
 
 
-    <xsd:element name="amfx" type="amfx-type" />
+    <xsd:element name="amfx" type="amfx-type"/>
 
     <xsd:complexType name="amfx-type">
         <xsd:sequence>
             <xsd:element name="header" type="header-type" minOccurs="0" maxOccurs="unbounded"/>
-            <xsd:element name="body" type="body-type" minOccurs="1" maxOccurs="1" />
+            <xsd:element name="body" type="body-type" minOccurs="1" maxOccurs="1"/>
         </xsd:sequence>
-        <xsd:attribute name="ver" type="xsd:unsignedShort" use="required" />
-        <xsd:attribute name="xmlns" type="xsd:string" use="optional" default="http://www.macromedia.com/2005/amfx" />
+        <xsd:attribute name="ver" type="xsd:unsignedShort" use="required"/>
+        <xsd:attribute name="xmlns" type="xsd:string" use="optional" default="http://www.macromedia.com/2005/amfx"/>
     </xsd:complexType>
 
     <xsd:complexType name="header-type">
         <xsd:sequence>
-            <xsd:group ref="as-types" minOccurs="0" maxOccurs="1" />
+            <xsd:group ref="as-types" minOccurs="0" maxOccurs="1"/>
         </xsd:sequence>
-        <xsd:attribute name="name" type="xsd:string" use="required" />
-        <xsd:attribute name="mustUnderstand" type="xsd:boolean" use="optional" default="false" />
+        <xsd:attribute name="name" type="xsd:string" use="required"/>
+        <xsd:attribute name="mustUnderstand" type="xsd:boolean" use="optional" default="false"/>
     </xsd:complexType>
 
     <xsd:complexType name="body-type">
         <xsd:sequence>
-            <xsd:group ref="as-types" minOccurs="1" maxOccurs="1" />
+            <xsd:group ref="as-types" minOccurs="1" maxOccurs="1"/>
         </xsd:sequence>
-        <xsd:attribute name="targetURI" type="xsd:string" use="optional" />
-        <xsd:attribute name="responseURI" type="xsd:string" use="optional" />
+        <xsd:attribute name="targetURI" type="xsd:string" use="optional"/>
+        <xsd:attribute name="responseURI" type="xsd:string" use="optional"/>
     </xsd:complexType>
 
     <!--
@@ -58,82 +58,82 @@
 
     <xsd:complexType name="array-type">
         <xsd:sequence>
-            <xsd:element name="item" type="ecma-item-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:group ref="as-types" minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="item" type="ecma-item-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:group ref="as-types" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
-        <xsd:attribute name="length" type="xsd:unsignedInt" use="optional" />
-        <xsd:attribute name="ecma" type="xsd:boolean" use="optional" default="false" />
+        <xsd:attribute name="length" type="xsd:unsignedInt" use="optional"/>
+        <xsd:attribute name="ecma" type="xsd:boolean" use="optional" default="false"/>
     </xsd:complexType>
 
     <xsd:complexType name="date-type">
         <xsd:simpleContent>
-            <xsd:extension base="xsd:long" />
+            <xsd:extension base="xsd:long"/>
         </xsd:simpleContent>
     </xsd:complexType>
 
     <xsd:complexType name="double-type">
         <xsd:simpleContent>
-            <xsd:extension base="xsd:double" />
+            <xsd:extension base="xsd:double"/>
         </xsd:simpleContent>
     </xsd:complexType>
 
     <xsd:complexType name="ecma-item-type">
         <xsd:sequence>
-            <xsd:group ref="as-types" minOccurs="1" maxOccurs="1" />
+            <xsd:group ref="as-types" minOccurs="1" maxOccurs="1"/>
         </xsd:sequence>
-        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="name" type="xsd:string" use="required"/>
     </xsd:complexType>
 
-    <xsd:complexType name="empty-type" />
+    <xsd:complexType name="empty-type"/>
 
     <xsd:complexType name="int-type">
         <xsd:simpleContent>
-            <xsd:extension base="xsd:int" />
+            <xsd:extension base="xsd:int"/>
         </xsd:simpleContent>
     </xsd:complexType>
 
     <xsd:complexType name="object-type">
         <xsd:sequence>
-            <xsd:element name="traits" type="traits-type" minOccurs="1" maxOccurs="1" />
-            <xsd:group ref="as-types" minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="traits" type="traits-type" minOccurs="1" maxOccurs="1"/>
+            <xsd:group ref="as-types" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
-        <xsd:attribute name="type" type="xsd:string" use="optional" />
+        <xsd:attribute name="type" type="xsd:string" use="optional"/>
     </xsd:complexType>
 
     <xsd:complexType name="ref-type">
-        <xsd:attribute name="id" type="xsd:unsignedInt" use="required" />
+        <xsd:attribute name="id" type="xsd:unsignedInt" use="required"/>
     </xsd:complexType>
 
     <xsd:complexType name="string-type">
         <xsd:simpleContent>
             <xsd:extension base="xsd:string">
-                <xsd:attribute name="id" type="xsd:unsignedInt" use="optional" />
+                <xsd:attribute name="id" type="xsd:unsignedInt" use="optional"/>
             </xsd:extension>
         </xsd:simpleContent>
     </xsd:complexType>
 
     <xsd:complexType name="traits-type">
         <xsd:sequence>
-            <xsd:element name="string" type="string-type" minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="string" type="string-type" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:sequence>
-        <xsd:attribute name="id" type="xsd:unsignedInt" use="optional" />
+        <xsd:attribute name="id" type="xsd:unsignedInt" use="optional"/>
         <xsd:attribute name="dynamic" type="xsd:boolean" use="optional" default="false"/>
     </xsd:complexType>
 
     <xsd:group name="as-types">
         <xsd:choice>
-            <xsd:element name="array" type="array-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="date" type="date-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="double" type="double-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="false" type="empty-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="int" type="int-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="null" type="empty-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="object" type="object-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="ref" type="ref-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="string" type="string-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="true" type="empty-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="undefined" type="empty-type" minOccurs="0" maxOccurs="unbounded" />
-            <xsd:element name="xml" type="string-type" minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="array" type="array-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="date" type="date-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="double" type="double-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="false" type="empty-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="int" type="int-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="null" type="empty-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="object" type="object-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="ref" type="ref-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="string" type="string-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="true" type="empty-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="undefined" type="empty-type" minOccurs="0" maxOccurs="unbounded"/>
+            <xsd:element name="xml" type="string-type" minOccurs="0" maxOccurs="unbounded"/>
         </xsd:choice>
     </xsd:group>
 </xsd:schema>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1a.xml b/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1a.xml
index ec58531..e6d823d 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1a.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1a.xml
@@ -17,4 +17,4 @@
   limitations under the License.
 
 -->
-<amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx" />
+<amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx"/>
diff --git a/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1b.xml b/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1b.xml
index 471007f..bb74726 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1b.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1b.xml
@@ -19,7 +19,7 @@
 -->
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <header name="Some Header">
-         <int>100</int>
+        <int>100</int>
     </header>
     <body>
         <string>Sample Value</string>
diff --git a/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1c.xml b/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1c.xml
index f8f36b5..5623826 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1c.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/amfx_tag/1c.xml
@@ -19,6 +19,6 @@
 -->
 <amfx ver="Invalid" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
-        <null />
+        <null/>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2c.xml b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2c.xml
index efa3ef6..a729e14 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2c.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2c.xml
@@ -24,10 +24,10 @@
             <int>-2000</int>
             <double>1000000</double>
             <string>Macromedia</string>
-            <null />
-            <undefined />
-            <true />
-            <false />
+            <null/>
+            <undefined/>
+            <true/>
+            <false/>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2d.xml b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2d.xml
index 183b272..507bbb7 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2d.xml
@@ -28,16 +28,18 @@
                 <string>prop4</string>
                 <string>prop5</string>
             </traits>
-            <array length="0" benign="true"     />
+            <array length="0" benign="true"/>
             <array length="0">
 
             </array>
-            <array length="0" 	></array>
-            <array length="0">	</array>
-            <array length="1">	<string>One</string>	</array>
+            <array length="0"></array>
+            <array length="0"></array>
             <array length="1">
-                  <string>One</string>
-    </array>
+                <string>One</string>
+            </array>
+            <array length="1">
+                <string>One</string>
+            </array>
         </object>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2e.xml b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2e.xml
index 9c8a24a..3155b88 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2e.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2e.xml
@@ -20,7 +20,7 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="1">
-            <ref id="0" />
+            <ref id="0"/>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2f.xml b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2f.xml
index 8e73538..86805b1 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2f.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2f.xml
@@ -33,7 +33,7 @@
                 </array>
             </object>
             <array length="1">
-                <ref id="2" />
+                <ref id="2"/>
             </array>
         </object>
     </body>
diff --git a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2i.xml b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2i.xml
index 9601016..191aee5 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2i.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2i.xml
@@ -29,13 +29,13 @@
                     </array>
                 </item>
                 <array length="2">
-                    <true />
-                    <false />
+                    <true/>
+                    <false/>
                 </array>
             </array>
             <array length="2">
-                <null />
-                <ref id="2" />
+                <null/>
+                <ref id="2"/>
             </array>
         </array>
     </body>
diff --git a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2j.xml b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2j.xml
index 1bfb71b..378f667 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/array_tag/2j.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/array_tag/2j.xml
@@ -19,6 +19,6 @@
 -->
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
-        <array length="Invalid" />
+        <array length="Invalid"/>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/body_tag/3a.xml b/core/src/test/resources/flex/messaging/io/amfx/body_tag/3a.xml
index 26e13aa..2fd8d92 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/body_tag/3a.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/body_tag/3a.xml
@@ -18,5 +18,5 @@
 
 -->
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
-    <body />
+    <body/>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/body_tag/3c.xml b/core/src/test/resources/flex/messaging/io/amfx/body_tag/3c.xml
index e9d118b..dc7bae6 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/body_tag/3c.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/body_tag/3c.xml
@@ -36,8 +36,8 @@
 
     <body>
         <array length="2">
-            <false />
-            <true />
+            <false/>
+            <true/>
         </array>
     </body>
 
diff --git a/core/src/test/resources/flex/messaging/io/amfx/body_tag/3d.xml b/core/src/test/resources/flex/messaging/io/amfx/body_tag/3d.xml
index cafde10..83a46cb 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/body_tag/3d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/body_tag/3d.xml
@@ -20,6 +20,6 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <string>A property.</string>
-        <body />
+        <body/>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/date_tag/4d.xml b/core/src/test/resources/flex/messaging/io/amfx/date_tag/4d.xml
index ea75740..de509a2 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/date_tag/4d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/date_tag/4d.xml
@@ -35,34 +35,35 @@
 
             <date>1119647239994</date>
 
-            <date>1119647239994  </date>
+            <date>1119647239994</date>
 
             <!-- Both sides with spaces -->
-            <date>  1119647239994  </date>
+            <date>1119647239994</date>
 
             <!-- Leading new line -->
             <date>
-1119647239994</date>
+                1119647239994
+            </date>
             <!-- Trailing new line -->
             <date>1119647239994
-</date>
+            </date>
 
             <!-- Both sides with new lines -->
-<date>
-1119647239994
-</date>
+            <date>
+                1119647239994
+            </date>
             <!-- Leading tab -->
-            <date>	1119647239994</date>
+            <date>1119647239994</date>
 
             <!-- Trailing tab -->
-            <date>1119647239994	</date>
+            <date>1119647239994</date>
 
             <!-- Both sides with tab -->
-            <date>	1119647239994	</date>
+            <date>1119647239994</date>
 
             <!-- Mixed -->
             <date>
-	      1119647239994
+                1119647239994
 
             </date>
 
diff --git a/core/src/test/resources/flex/messaging/io/amfx/date_tag/4e.xml b/core/src/test/resources/flex/messaging/io/amfx/date_tag/4e.xml
index 43cce6c..0bd8162 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/date_tag/4e.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/date_tag/4e.xml
@@ -21,8 +21,8 @@
     <body>
         <array length="3">
             <date>1119647239994</date>
-            <ref id="1" />
-            <ref id="1" />
+            <ref id="1"/>
+            <ref id="1"/>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/double_tag/5d.xml b/core/src/test/resources/flex/messaging/io/amfx/double_tag/5d.xml
index aa6d9ac..6579a4e 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/double_tag/5d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/double_tag/5d.xml
@@ -35,34 +35,35 @@
 
             <double>-1.000001</double>
 
-            <double>2.2  </double>
+            <double>2.2</double>
 
             <!-- Both sides with spaces -->
-            <double>  -3  </double>
+            <double>-3</double>
 
             <!-- Leading new line -->
             <double>
-4.040005</double>
+                4.040005
+            </double>
             <!-- Trailing new line -->
             <double>-5.0505
-</double>
+            </double>
 
             <!-- Both sides with new lines -->
-<double>
-6.60005
-</double>
+            <double>
+                6.60005
+            </double>
             <!-- Leading tab -->
-            <double>	-7.755</double>
+            <double>-7.755</double>
 
             <!-- Trailing tab -->
-            <double>8.890	</double>
+            <double>8.890</double>
 
             <!-- Both sides with tab -->
-            <double>	-9.999999	</double>
+            <double>-9.999999</double>
 
             <!-- Mixed -->
             <double>
-	      10.1010
+                10.1010
 
             </double>
 
diff --git a/core/src/test/resources/flex/messaging/io/amfx/false_tag/6a.xml b/core/src/test/resources/flex/messaging/io/amfx/false_tag/6a.xml
index d2dd607..2f67af7 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/false_tag/6a.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/false_tag/6a.xml
@@ -19,6 +19,6 @@
 -->
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
-        <false />
+        <false/>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/false_tag/6c.xml b/core/src/test/resources/flex/messaging/io/amfx/false_tag/6c.xml
index d7030ec..e978eb0 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/false_tag/6c.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/false_tag/6c.xml
@@ -20,9 +20,9 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="3">
-            <false />
-            <false />
-            <false />
+            <false/>
+            <false/>
+            <false/>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/false_tag/6d.xml b/core/src/test/resources/flex/messaging/io/amfx/false_tag/6d.xml
index ac91ce2..e68b56a 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/false_tag/6d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/false_tag/6d.xml
@@ -20,17 +20,17 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="7">
-            <false benign="true"  />
-            <false   />
+            <false benign="true"/>
+            <false/>
             <false></false>
-            <false>     	 </false>
-            <false   	 >
+            <false></false>
+            <false>
 
             </false>
-            <false>     </false  >
-            <false  benign="">
+            <false></false>
+            <false benign="">
 
-	            </false    >
+            </false>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/header_tag/7a.xml b/core/src/test/resources/flex/messaging/io/amfx/header_tag/7a.xml
index c42be7e..a2386ee 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/header_tag/7a.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/header_tag/7a.xml
@@ -18,5 +18,5 @@
 
 -->
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
-    <header name="Empty" />
+    <header name="Empty"/>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/header_tag/7d.xml b/core/src/test/resources/flex/messaging/io/amfx/header_tag/7d.xml
index 4ec59a8..2cfb1dc 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/header_tag/7d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/header_tag/7d.xml
@@ -20,6 +20,6 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <string>A property.</string>
-        <header name="Some Header" />
+        <header name="Some Header"/>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/int_tag/8d.xml b/core/src/test/resources/flex/messaging/io/amfx/int_tag/8d.xml
index a32e4a8..09eb05b 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/int_tag/8d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/int_tag/8d.xml
@@ -35,34 +35,35 @@
 
             <int>-1</int>
 
-            <int>2  </int>
+            <int>2</int>
 
             <!-- Both sides with spaces -->
-            <int>  -3  </int>
+            <int>-3</int>
 
             <!-- Leading new line -->
             <int>
-4</int>
+                4
+            </int>
             <!-- Trailing new line -->
             <int>-5
-</int>
+            </int>
 
             <!-- Both sides with new lines -->
-<int>
-6
-</int>
+            <int>
+                6
+            </int>
             <!-- Leading tab -->
-            <int>	-7</int>
+            <int>-7</int>
 
             <!-- Trailing tab -->
-            <int>8	</int>
+            <int>8</int>
 
             <!-- Both sides with tab -->
-            <int>	-9	</int>
+            <int>-9</int>
 
             <!-- Mixed -->
             <int>
-	      10
+                10
 
             </int>
 
diff --git a/core/src/test/resources/flex/messaging/io/amfx/null_tag/9a.xml b/core/src/test/resources/flex/messaging/io/amfx/null_tag/9a.xml
index fe9edf4..3afb597 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/null_tag/9a.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/null_tag/9a.xml
@@ -19,6 +19,6 @@
 -->
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
-        <null />
+        <null/>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/null_tag/9c.xml b/core/src/test/resources/flex/messaging/io/amfx/null_tag/9c.xml
index 1108b2b..b37a5a9 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/null_tag/9c.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/null_tag/9c.xml
@@ -20,9 +20,9 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="3">
-            <null />
-            <null />
-            <null />
+            <null/>
+            <null/>
+            <null/>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/null_tag/9d.xml b/core/src/test/resources/flex/messaging/io/amfx/null_tag/9d.xml
index 6d4991e..5df94ed 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/null_tag/9d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/null_tag/9d.xml
@@ -20,17 +20,17 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="7">
-            <null benign="true"  />
-            <null   />
+            <null benign="true"/>
+            <null/>
             <null></null>
-            <null>     	 </null>
-            <null   	 >
+            <null></null>
+            <null>
 
             </null>
-            <null>     </null  >
-            <null  benign="">
+            <null></null>
+            <null benign="">
 
-	            </null    >
+            </null>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/object_tag/10c.xml b/core/src/test/resources/flex/messaging/io/amfx/object_tag/10c.xml
index 7e7cd49..8407827 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/object_tag/10c.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/object_tag/10c.xml
@@ -43,7 +43,7 @@
                     </object>
                 </object>
             </array>
-            <ref id="5" />
+            <ref id="5"/>
         </object>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/object_tag/10d.xml b/core/src/test/resources/flex/messaging/io/amfx/object_tag/10d.xml
index f7cba68..59e33b9 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/object_tag/10d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/object_tag/10d.xml
@@ -31,7 +31,7 @@
                     <string>paring</string>
                 </traits>
                 <double>4.5</double>
-                <ref id="0" />
+                <ref id="0"/>
             </object>
         </object>
     </body>
diff --git a/core/src/test/resources/flex/messaging/io/amfx/string_tag/11e.xml b/core/src/test/resources/flex/messaging/io/amfx/string_tag/11e.xml
index 22bf049..04df7dc 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/string_tag/11e.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/string_tag/11e.xml
@@ -21,8 +21,8 @@
     <body>
         <array length="3">
             <string>Locus classicus</string>
-            <string id="0" />
-            <string id="0" />
+            <string id="0"/>
+            <string id="0"/>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/string_tag/11f.xml b/core/src/test/resources/flex/messaging/io/amfx/string_tag/11f.xml
index e5d4ff0..422eb51 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/string_tag/11f.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/string_tag/11f.xml
@@ -20,11 +20,11 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="5">
-            <string />
+            <string/>
             <string></string>
             <string>Locus classicus</string>
-            <string id="0" />
-            <string id="0" />
+            <string id="0"/>
+            <string id="0"/>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/string_tag/11g.xml b/core/src/test/resources/flex/messaging/io/amfx/string_tag/11g.xml
index cc78bb9..f95bc22 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/string_tag/11g.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/string_tag/11g.xml
@@ -20,7 +20,7 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="3">
-            <string benign="true"  />
+            <string benign="true"/>
             <string benign=""></string>
             <string benign="true">foo</string>
         </array>
diff --git a/core/src/test/resources/flex/messaging/io/amfx/string_tag/11h.xml b/core/src/test/resources/flex/messaging/io/amfx/string_tag/11h.xml
index e36aba4..56076ec 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/string_tag/11h.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/string_tag/11h.xml
@@ -25,7 +25,7 @@
                 <string>prop1</string>
             </traits>
             <string>Hydrogen</string>
-            <string id="5" />
+            <string id="5"/>
         </object>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/traits_tag/12b.xml b/core/src/test/resources/flex/messaging/io/amfx/traits_tag/12b.xml
index 096f3b4..a1cd793 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/traits_tag/12b.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/traits_tag/12b.xml
@@ -31,13 +31,13 @@
                 <false/>
             </object>
             <object>
-                <traits id="0" />
+                <traits id="0"/>
                 <false/>
                 <false/>
                 <false/>
             </object>
             <object>
-                <traits id="0" />
+                <traits id="0"/>
                 <true/>
                 <true/>
                 <false/>
diff --git a/core/src/test/resources/flex/messaging/io/amfx/true_tag/13a.xml b/core/src/test/resources/flex/messaging/io/amfx/true_tag/13a.xml
index 4d2693a..393f142 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/true_tag/13a.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/true_tag/13a.xml
@@ -19,6 +19,6 @@
 -->
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
-        <true />
+        <true/>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/true_tag/13c.xml b/core/src/test/resources/flex/messaging/io/amfx/true_tag/13c.xml
index 5c481b0..a4b4c34 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/true_tag/13c.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/true_tag/13c.xml
@@ -20,9 +20,9 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="3">
-            <true />
-            <true />
-            <true />
+            <true/>
+            <true/>
+            <true/>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/true_tag/13d.xml b/core/src/test/resources/flex/messaging/io/amfx/true_tag/13d.xml
index 1a08a1e..56d746b 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/true_tag/13d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/true_tag/13d.xml
@@ -20,17 +20,17 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="7">
-            <true benign="true"  />
-            <true   />
+            <true benign="true"/>
+            <true/>
             <true></true>
-            <true>     	 </true>
-            <true   	 >
+            <true></true>
+            <true>
 
             </true>
-            <true>     </true  >
-            <true  benign="">
+            <true></true>
+            <true benign="">
 
-	            </true    >
+            </true>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14a.xml b/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14a.xml
index 8ccbb01..c1e4dc3 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14a.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14a.xml
@@ -19,6 +19,6 @@
 -->
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
-        <undefined />
+        <undefined/>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14c.xml b/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14c.xml
index 2177671..56e58ea 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14c.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14c.xml
@@ -20,9 +20,9 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="3">
-            <undefined />
-            <undefined />
-            <undefined />
+            <undefined/>
+            <undefined/>
+            <undefined/>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14d.xml b/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14d.xml
index 22b0482..90e2dbc 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14d.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/undefined_tag/14d.xml
@@ -20,17 +20,17 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <array length="7">
-            <undefined benign="true"  />
-            <undefined   />
+            <undefined benign="true"/>
+            <undefined/>
             <undefined></undefined>
-            <undefined>     	 </undefined>
-            <undefined   	 >
+            <undefined></undefined>
+            <undefined>
 
             </undefined>
-            <undefined>     </undefined  >
-            <undefined  benign="">
+            <undefined></undefined>
+            <undefined benign="">
 
-	            </undefined    >
+            </undefined>
         </array>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/core/src/test/resources/flex/messaging/io/amfx/xml_tag/15a.xml b/core/src/test/resources/flex/messaging/io/amfx/xml_tag/15a.xml
index 7a27fad..4c5e615 100644
--- a/core/src/test/resources/flex/messaging/io/amfx/xml_tag/15a.xml
+++ b/core/src/test/resources/flex/messaging/io/amfx/xml_tag/15a.xml
@@ -20,11 +20,11 @@
 <amfx ver="3" xmlns="http://www.macromedia.com/2005/amfx">
     <body>
         <xml>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
-&lt;stock&gt;
-    &lt;item id=&quot;5&quot;&gt;
-        &lt;discontinued /&gt;
-    &lt;/item&gt;
-&lt;/stock&gt;
+            &lt;stock&gt;
+            &lt;item id=&quot;5&quot;&gt;
+            &lt;discontinued /&gt;
+            &lt;/item&gt;
+            &lt;/stock&gt;
         </xml>
     </body>
 </amfx>
\ No newline at end of file
diff --git a/downloads.xml b/downloads.xml
index 65e965a..8671d63 100644
--- a/downloads.xml
+++ b/downloads.xml
@@ -20,142 +20,144 @@
 
 <project name="downloads" default="main" basedir=".">
 
-	<!-- properties -->
-	<property file="${basedir}/build.properties"/>
+    <!-- properties -->
+    <property file="${basedir}/build.properties"/>
 
 
     <!-- 
        To clean these you must call thirdparty-clean or super-clean to clean everything.  
        clean does not remove these since they don't change often and the downloads take time.
     -->
-    <target name="main" 
-        depends="servlet-download,activemq-download,codec-download,collections-download,httpclient-download,logging-download,log4j-download,spring-download,xalan-download,doclet-download,cat-download,cat7-download,cat4-download"
-        description="Copies third-party software into place for build">
-        <echo message="Use thirdparty-clean or super-clean to remove these."/> 
+    <target name="main"
+            depends="servlet-download,activemq-download,codec-download,collections-download,httpclient-download,logging-download,log4j-download,spring-download,xalan-download,doclet-download,cat-download,cat7-download,cat4-download"
+            description="Copies third-party software into place for build">
+        <echo message="Use thirdparty-clean or super-clean to remove these."/>
     </target>
-    
+
     <target name="clean"
-        description="Cleans thirdparty downloaded files."
-        depends="check-if-maven" unless="no.clean">
+            description="Cleans thirdparty downloaded files."
+            depends="check-if-maven" unless="no.clean">
         <delete failonerror="false">
             <fileset dir="${lib.dir}">
                 <include name="**/**"/>
             </fileset>
         </delete>
-        <delete failonerror="false" file="${modules.core.dir}/src/ExcludeDoclet.java" />
+        <delete failonerror="false" file="${modules.core.dir}/src/ExcludeDoclet.java"/>
         <echo>downloads cleaned</echo>
-     </target>
-    
-    <target name="check-if-maven" >
+    </target>
+
+    <target name="check-if-maven">
         <condition property="no.clean">
-            <contains string="${lib.dir}" substring="repository" />
+            <contains string="${lib.dir}" substring="repository"/>
         </condition>
     </target>
-    
-	<!--
+
+    <!--
         servlet-api 2.5
     -->
     <target name="servlet-check" description="Checks if the Tomcat server has been downloaded.">
         <available file="${servlet.dir}/servlet-api-${servlet.version}.jar" property="servlet.present"/>
     </target>
-   
+
     <target name="servlet-download" depends="servlet-check" unless="servlet.present">
-        <antcall target="download-servlet-zip" />
+        <antcall target="download-servlet-zip"/>
     </target>
 
     <target name="download-servlet-zip" unless="servlet.zip.exists">
         <mkdir dir="${servlet.dir}"/>
         <get src="https://repo1.maven.org/maven2/javax/servlet/servlet-api/${servlet.version}/servlet-api-${servlet.version}.jar"
-            dest="${servlet.dir}/servlet-api-${servlet.version}.jar"
-            verbose="false"/>
+             dest="${servlet.dir}/servlet-api-${servlet.version}.jar"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         activemq-5.3.1.zip 
     -->
     <target name="activemq-check" description="Checks if the ActiveMQ jars have been downloaded.">
-        <available file="${activemq.dir}/activemq-core/${activemq.version}/activemq-core-${activemq.version}.jar" property="activemq.present"/>
+        <available file="${activemq.dir}/activemq-core/${activemq.version}/activemq-core-${activemq.version}.jar"
+                   property="activemq.present"/>
     </target>
-   
+
     <target name="activemq-download" depends="activemq-check" unless="activemq.present">
         <available file="${activemq.zip.file}" type="file" property="activemq.zip.exists"/>
-        <antcall target="download-activemq-zip" />
-        
+        <antcall target="download-activemq-zip"/>
+
         <unzip src="${activemq.zip.file}" dest="${download.dir}/activemq">
             <patternset>
                 <include name="**/*"/>
             </patternset>
         </unzip>
-        <mkdir dir="${activemq.dir}/activemq-core/${activemq.version}" />
+        <mkdir dir="${activemq.dir}/activemq-core/${activemq.version}"/>
         <copy toDir="${activemq.dir}/activemq-core/${activemq.version}"
-            file="${download.dir}/activemq/apache-activemq-${activemq.version}/lib/activemq-core-${activemq.version}.jar" />
-        <mkdir dir="${jms.dir}" />
+              file="${download.dir}/activemq/apache-activemq-${activemq.version}/lib/activemq-core-${activemq.version}.jar"/>
+        <mkdir dir="${jms.dir}"/>
         <copy toDir="${jms.dir}"
-            file="${download.dir}/activemq/apache-activemq-${activemq.version}/lib/${jms.jar}" />
+              file="${download.dir}/activemq/apache-activemq-${activemq.version}/lib/${jms.jar}"/>
     </target>
 
     <target name="download-activemq-zip" unless="activemq.zip.exists">
         <mkdir dir="${download.dir}"/>
         <get src="http://archive.apache.org/dist/activemq/apache-activemq/${activemq.version}/apache-activemq-${activemq.version}-bin.zip"
-            dest="${activemq.zip.file}" 
-            verbose="false"/>
+             dest="${activemq.zip.file}"
+             verbose="false"/>
     </target>
 
-	<!--
+    <!--
         commons-codec-1.5.jar 
     -->
     <target name="codec-check" description="Checks if the commons-codec jar have been downloaded.">
         <available file="${codec.dir}/commons-codec-${codec.version}.jar" property="codec.present"/>
     </target>
-   
+
     <target name="codec-download" depends="codec-check" unless="codec.present">
         <available file="${codec.zip.file}" type="file" property="codec.zip.exists"/>
-        <antcall target="download-codec-zip" />
-        
+        <antcall target="download-codec-zip"/>
+
         <unzip src="${codec.zip.file}" dest="${download.dir}/commons-codec">
             <patternset>
                 <include name="**/*"/>
             </patternset>
         </unzip>
         <copy toDir="${codec.dir}"
-            file="${download.dir}/commons-codec/commons-codec-${codec.version}/commons-codec-${codec.version}.jar" />
+              file="${download.dir}/commons-codec/commons-codec-${codec.version}/commons-codec-${codec.version}.jar"/>
     </target>
 
     <target name="download-codec-zip" unless="codec.zip.exists">
         <mkdir dir="${download.dir}"/>
         <get src="http://archive.apache.org/dist/commons/codec/binaries/commons-codec-${codec.version}-bin.zip"
-            dest="${codec.zip.file}" 
-            verbose="false"/>
+             dest="${codec.zip.file}"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         commons-collection-3.1.jar 
     -->
     <target name="collections-check" description="Checks if the commons-collections jar have been downloaded.">
-        <available file="${collections.dir}/commons-collections-${collections.version}.jar" property="collections.present"/>
+        <available file="${collections.dir}/commons-collections-${collections.version}.jar"
+                   property="collections.present"/>
     </target>
-   
+
     <target name="collections-download" depends="collections-check" unless="collections.present">
         <available file="${collections.zip.file}" type="file" property="collections.zip.exists"/>
-        <antcall target="download-collections-zip" />
-        
+        <antcall target="download-collections-zip"/>
+
         <unzip src="${collections.zip.file}" dest="${download.dir}/commons-collections">
             <patternset>
                 <include name="**/*"/>
             </patternset>
         </unzip>
         <copy toDir="${collections.dir}"
-            file="${download.dir}/commons-collections/commons-collections-${collections.version}/commons-collections-${collections.version}.jar" />
+              file="${download.dir}/commons-collections/commons-collections-${collections.version}/commons-collections-${collections.version}.jar"/>
     </target>
 
     <target name="download-collections-zip" unless="collections.zip.exists">
         <mkdir dir="${download.dir}"/>
         <get src="http://archive.apache.org/dist/commons/collections/binaries/commons-collections-${collections.version}-bin.zip"
-            dest="${collections.zip.file}"
-            verbose="false"/>
+             dest="${collections.zip.file}"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         commons-fileupload-1.1.jar 
     <target name="fileupload-check" description="Checks if the commons-fileupload jar have been downloaded.">
         <available file="${lib.dir}/commons-fileupload-1.1.jar" property="fileupload.present"/>
@@ -181,62 +183,62 @@
             verbose="false"/>
     </target>
      -->
-    
-	<!--
+
+    <!--
         commons-httpclient-3.1.jar 
     -->
     <target name="httpclient-check" description="Checks if the commons-httpclient jar have been downloaded.">
         <available file="${httpclient.dir}/commons-httpclient-${httpclient.version}.jar" property="httpclient.present"/>
     </target>
-   
+
     <target name="httpclient-download" depends="httpclient-check" unless="httpclient.present">
         <available file="${httpclient.zip.file}" type="file" property="httpclient.zip.exists"/>
-        <antcall target="download-httpclient-zip" />
-        
+        <antcall target="download-httpclient-zip"/>
+
         <unzip src="${httpclient.zip.file}" dest="${download.dir}/commons-httpclient">
             <patternset>
                 <include name="**/*"/>
             </patternset>
         </unzip>
         <copy toDir="${httpclient.dir}"
-            file="${download.dir}/commons-httpclient/commons-httpclient-${httpclient.version}/commons-httpclient-${httpclient.version}.jar" />
+              file="${download.dir}/commons-httpclient/commons-httpclient-${httpclient.version}/commons-httpclient-${httpclient.version}.jar"/>
     </target>
 
     <target name="download-httpclient-zip" unless="httpclient.zip.exists">
         <mkdir dir="${download.dir}"/>
         <get src="http://archive.apache.org/dist/httpcomponents/commons-httpclient/3.0/binary/commons-httpclient-${httpclient.version}.zip"
-            dest="${httpclient.zip.file}" 
-            verbose="false"/>
+             dest="${httpclient.zip.file}"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         commons-logging-1.1.1.jar 
     -->
     <target name="logging-check" description="Checks if the commons-logging jar have been downloaded.">
         <available file="${logging.dir}/commons-logging-${logging.version}.jar" property="logging.present"/>
     </target>
-   
+
     <target name="logging-download" depends="logging-check" unless="logging.present">
         <available file="${logging.zip.file}" type="file" property="logging.zip.exists"/>
-        <antcall target="download-logging-zip" />
-        
+        <antcall target="download-logging-zip"/>
+
         <unzip src="${logging.zip.file}" dest="${download.dir}/commons-logging">
             <patternset>
                 <include name="**/*"/>
             </patternset>
         </unzip>
         <copy toDir="${logging.dir}"
-            file="${download.dir}/commons-logging/commons-logging-${logging.version}/commons-logging-${logging.version}.jar" />
+              file="${download.dir}/commons-logging/commons-logging-${logging.version}/commons-logging-${logging.version}.jar"/>
     </target>
 
     <target name="download-logging-zip" unless="logging.zip.exists">
         <mkdir dir="${download.dir}"/>
         <get src="http://archive.apache.org/dist/commons/logging/binaries/commons-logging-${logging.version}-bin.zip"
-            dest="${logging.zip.file}" 
-            verbose="false"/>
+             dest="${logging.zip.file}"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         hsqldb.jar 
     <target name="hsqldb-check" description="Checks if the hsqldb jar have been downloaded.">
         <available file="${lib.dir}/hsqldb/hsqldb.jar" property="hsqldb.present"/>
@@ -266,8 +268,8 @@
             verbose="false"/>
     </target>
      -->
-    
-	<!--
+
+    <!--
         jms.jar 
     <target name="jms-check" description="Checks if the jms jar have been downloaded.">
         <available file="${lib.dir}/jms.jar" property="jms.present"/>
@@ -293,88 +295,89 @@
             verbose="false"/>
     </target>
      -->
-    
-	<!--
+
+    <!--
         log4j.jar 
     -->
     <target name="log4j-check" description="Checks if the log4j jar have been downloaded.">
         <available file="${log4j.dir}/log4j-${log4j.version}.jar" property="log4j.present"/>
     </target>
-   
+
     <target name="log4j-download" depends="log4j-check" unless="log4j.present">
         <available file="${log4j.zip.file}" type="file" property="log4j.zip.exists"/>
-        <antcall target="download-log4j-zip" />
-        
+        <antcall target="download-log4j-zip"/>
+
         <unzip src="${log4j.zip.file}" dest="${download.dir}/log4j">
             <patternset>
                 <include name="**/*"/>
             </patternset>
         </unzip>
-        <copy file="${download.dir}/log4j/logging-log4j-${log4j.version}/dist/lib/log4j-${log4j.version}.jar" toDir="${log4j.dir}"/>
+        <copy file="${download.dir}/log4j/logging-log4j-${log4j.version}/dist/lib/log4j-${log4j.version}.jar"
+              toDir="${log4j.dir}"/>
     </target>
 
     <target name="download-log4j-zip" unless="log4j.zip.exists">
         <mkdir dir="${download.dir}"/>
         <get src="http://archive.apache.org/dist/logging/log4j/${log4j.version}/logging-log4j-${log4j.version}.zip"
-            dest="${log4j.zip.file}" 
-            verbose="false"/>
+             dest="${log4j.zip.file}"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         spring 
     -->
     <target name="spring-check" description="Checks if the spring jars have been downloaded.">
         <available file="${spring.dir}/spring-core-${spring.version}.RELEASE.jar" property="spring.present"/>
     </target>
-   
+
     <target name="spring-download" depends="spring-check" unless="spring.present">
         <available file="${spring.zip.file}" type="file" property="spring.zip.exists"/>
-        <antcall target="download-spring-zip" />
-        
+        <antcall target="download-spring-zip"/>
+
         <unzip src="${spring.zip.file}" dest="${download.dir}/spring">
             <patternset>
                 <include name="**/*"/>
             </patternset>
         </unzip>
         <copy tofile="${spring.dir}/spring-core-${spring.version}.RELEASE.jar"
-            file="${download.dir}/spring/spring-framework-${spring.version}.RELEASE/dist/org.springframework.core-${spring.version}.RELEASE.jar" />
-    <!--
-        <unzip src="${springsecurity.zip.file}" dest="${download.dir}/springsecurity">
-            <patternset>
-                <include name="**/*"/>
-            </patternset>
-        </unzip>
-        <copy file="${download.dir}/springsecurity/spring-security-3.0.3.RELEASE/dist/spring-security-config-3.0.3.RELEASE.jar" toDir="${lib.dir}/spring"/>
-        <copy file="${download.dir}/springsecurity/spring-security-3.0.3.RELEASE/dist/spring-security-core-3.0.3.RELEASE.jar" toDir="${lib.dir}/spring"/>
-        <copy file="${download.dir}/springsecurity/spring-security-3.0.3.RELEASE/dist/spring-security-web-3.0.3.RELEASE.jar" toDir="${lib.dir}/spring"/>
-        <unzip src="${taglibs.zip.file}" dest="${download.dir}/taglibs">
-            <patternset>
-                <include name="**/*"/>
-            </patternset>
-        </unzip>
-        <copy file="${download.dir}/taglibs/jakarta-taglibs-standard-1.1.2/lib/jstl.jar" toFile="${lib.dir}/spring/jstl-1.1.2.jar"/>
-        <copy file="${download.dir}/taglibs/jakarta-taglibs-standard-1.1.2/lib/standard.jar" toFile="${lib.dir}/spring/standard-1.1.2.jar"/>
-        <unzip src="${aopalliance.zip.file}" dest="${download.dir}/aopalliance">
-            <patternset>
-                <include name="**/*"/>
-            </patternset>
-        </unzip>
-        <copy file="${download.dir}/aopalliance/aopalliance.jar" toFile="${lib.dir}/spring/aopalliance-1.0.jar"/>
-        <unzip src="${backport.zip.file}" dest="${download.dir}/backport">
-            <patternset>
-                <include name="**/*"/>
-            </patternset>
-        </unzip>
-        <copy file="${download.dir}/backport/backport-util-concurrent-2.2/backport-util-concurrent.jar" toFile="${lib.dir}/spring/backport-util-concurrent-2.2.jar"/>
-         -->
+              file="${download.dir}/spring/spring-framework-${spring.version}.RELEASE/dist/org.springframework.core-${spring.version}.RELEASE.jar"/>
+        <!--
+            <unzip src="${springsecurity.zip.file}" dest="${download.dir}/springsecurity">
+                <patternset>
+                    <include name="**/*"/>
+                </patternset>
+            </unzip>
+            <copy file="${download.dir}/springsecurity/spring-security-3.0.3.RELEASE/dist/spring-security-config-3.0.3.RELEASE.jar" toDir="${lib.dir}/spring"/>
+            <copy file="${download.dir}/springsecurity/spring-security-3.0.3.RELEASE/dist/spring-security-core-3.0.3.RELEASE.jar" toDir="${lib.dir}/spring"/>
+            <copy file="${download.dir}/springsecurity/spring-security-3.0.3.RELEASE/dist/spring-security-web-3.0.3.RELEASE.jar" toDir="${lib.dir}/spring"/>
+            <unzip src="${taglibs.zip.file}" dest="${download.dir}/taglibs">
+                <patternset>
+                    <include name="**/*"/>
+                </patternset>
+            </unzip>
+            <copy file="${download.dir}/taglibs/jakarta-taglibs-standard-1.1.2/lib/jstl.jar" toFile="${lib.dir}/spring/jstl-1.1.2.jar"/>
+            <copy file="${download.dir}/taglibs/jakarta-taglibs-standard-1.1.2/lib/standard.jar" toFile="${lib.dir}/spring/standard-1.1.2.jar"/>
+            <unzip src="${aopalliance.zip.file}" dest="${download.dir}/aopalliance">
+                <patternset>
+                    <include name="**/*"/>
+                </patternset>
+            </unzip>
+            <copy file="${download.dir}/aopalliance/aopalliance.jar" toFile="${lib.dir}/spring/aopalliance-1.0.jar"/>
+            <unzip src="${backport.zip.file}" dest="${download.dir}/backport">
+                <patternset>
+                    <include name="**/*"/>
+                </patternset>
+            </unzip>
+            <copy file="${download.dir}/backport/backport-util-concurrent-2.2/backport-util-concurrent.jar" toFile="${lib.dir}/spring/backport-util-concurrent-2.2.jar"/>
+             -->
     </target>
 
     <target name="download-spring-zip" unless="spring.zip.exists">
         <mkdir dir="${lib.dir}/spring"/>
         <mkdir dir="${download.dir}"/>
         <get src="http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-${spring.version}.RELEASE.zip"
-            dest="${spring.zip.file}" 
-            verbose="false"/>
+             dest="${spring.zip.file}"
+             verbose="false"/>
         <!--
         <get src="http://s3.amazonaws.com/dist.springframework.org/release/SEC/spring-security-3.0.3.RELEASE.zip"
             dest="${springsecurity.zip.file}" 
@@ -400,137 +403,139 @@
          -->
     </target>
 
-	<!--
+    <!--
         xalan.jar 
     -->
     <target name="xalan-check" description="Checks if the xalan jar have been downloaded.">
         <available file="${xalan.dir}/xalan-${xalan.version}.jar" property="xalan.present"/>
     </target>
-   
+
     <target name="xalan-download" depends="xalan-check" unless="xalan.present">
         <available file="${xalan.zip.file}" type="file" property="xalan.zip.exists"/>
-        <antcall target="download-xalan-zip" />
-        
+        <antcall target="download-xalan-zip"/>
+
         <unzip src="${xalan.zip.file}" dest="${download.dir}/xalan">
             <patternset>
                 <include name="**/*"/>
             </patternset>
         </unzip>
-        <copy file="${download.dir}/xalan/xalan-j_2_6_0/bin/xalan.jar" toFile="${xalan.dir}/xalan-${xalan.version}.jar"/>
+        <copy file="${download.dir}/xalan/xalan-j_2_6_0/bin/xalan.jar"
+              toFile="${xalan.dir}/xalan-${xalan.version}.jar"/>
     </target>
-    
+
     <target name="download-xalan-zip" unless="xalan.zip.exists">
         <mkdir dir="${download.dir}"/>
-        <get src="http://archive.apache.org/dist/xml/xalan-j/xalan-j_2_6_0-bin-2jars.zip" 
-            dest="${xalan.zip.file}" 
-            verbose="false"/>
+        <get src="http://archive.apache.org/dist/xml/xalan-j/xalan-j_2_6_0-bin-2jars.zip"
+             dest="${xalan.zip.file}"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         ExcludeDoclet.java 
     -->
     <target name="doclet-check" description="Checks if the excludedoclet.java has been downloaded.">
         <available file="${modules.core.dir}/src/ExcludeDoclet.java" property="doclet.present"/>
     </target>
-   
+
     <target name="doclet-download" depends="doclet-check" unless="doclet.present">
         <available file="${doclet.zip.file}" type="file" property="doclet.zip.exists"/>
-        <antcall target="download-doclet-java" />
-        
+        <antcall target="download-doclet-java"/>
+
     </target>
-    
+
     <target name="download-doclet-java" unless="doclet.zip.exists">
-        <get src="https://github.com/couchbase/couchbase-lite-java-core/blob/master/extra/doclet/ExcludeDoclet.java" 
-            dest="${modules.core.dir}/src/ExcludeDoclet.java" 
-            verbose="false"/>
+        <get src="https://github.com/couchbase/couchbase-lite-java-core/blob/master/extra/doclet/ExcludeDoclet.java"
+             dest="${modules.core.dir}/src/ExcludeDoclet.java"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         mx4j-jmx.jar 
     -->
     <target name="mx4j-check" description="Checks if the mx4j jar has been downloaded.">
         <available file="${lib.dir}/mx4j-jmx.jar" property="mx4j.present"/>
     </target>
-   
+
     <target name="mx4j-download" depends="mx4j-check" unless="mx4j.present">
         <available file="${mx4j.zip.file}" type="file" property="mx4j.zip.exists"/>
-        <antcall target="download-mx4j-java" />
-        
+        <antcall target="download-mx4j-java"/>
+
     </target>
-    
+
     <target name="download-mx4j-java" unless="mx4j.zip.exists">
-		<mkdir dir="${lib.dir}"/>
-		<get src="http://repo1.maven.org/maven2/mx4j/mx4j-jmx/1.1.1/mx4j-jmx-1.1.1.jar" 
-            dest="${lib.dir}/mx4j-jmx.jar"
-            verbose="false"/>
+        <mkdir dir="${lib.dir}"/>
+        <get src="http://repo1.maven.org/maven2/mx4j/mx4j-jmx/1.1.1/mx4j-jmx-1.1.1.jar"
+             dest="${lib.dir}/mx4j-jmx.jar"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         catalina-7xx.jar
     -->
     <target name="cat7-check" description="Checks if the catalina-7xx jar has been downloaded.">
         <available file="${catalina7.dir}/tomcat-catalina-${catalina7.version}.jar" property="cat7.present"/>
     </target>
-   
+
     <target name="cat7-download" depends="cat7-check" unless="cat7.present">
-        <antcall target="download-cat7-java" />
-        
+        <antcall target="download-cat7-java"/>
+
     </target>
-    
+
     <target name="download-cat7-java" unless="cat7.zip.exists">
-		<mkdir dir="${catalina7.dir}"/>
+        <mkdir dir="${catalina7.dir}"/>
         <get src="http://repo1.maven.org/maven2/org/apache/tomcat/tomcat-catalina/${catalina7.version}/tomcat-catalina-${catalina7.version}.jar"
-            dest="${catalina7.dir}/tomcat-catalina-${catalina7.version}.jar"
-            verbose="false"/>
+             dest="${catalina7.dir}/tomcat-catalina-${catalina7.version}.jar"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         catalina-4.jar
     -->
     <target name="cat4-check" description="Checks if the catalina-4 jar have been downloaded.">
         <available file="${catalina4.dir}/catalina-${catalina4.version}.jar" property="cat4.present"/>
     </target>
-   
+
     <target name="cat4-download" depends="cat4-check" unless="cat4.present">
         <available file="${catalina4.zip.file}" type="file" property="cat4.zip.exists"/>
-        <antcall target="download-cat4-zip" />
-        
+        <antcall target="download-cat4-zip"/>
+
         <unzip src="${catalina4.zip.file}" dest="${download.dir}/catalina4">
             <patternset>
                 <include name="**/*"/>
             </patternset>
         </unzip>
-		<mkdir dir="${catalina4.dir}"/>
-        <copy file="${download.dir}/catalina4/jakarta-tomcat-${catalina4.version}/server/lib/catalina.jar" toFile="${catalina4.dir}/catalina-${catalina4.version}.jar"/>
+        <mkdir dir="${catalina4.dir}"/>
+        <copy file="${download.dir}/catalina4/jakarta-tomcat-${catalina4.version}/server/lib/catalina.jar"
+              toFile="${catalina4.dir}/catalina-${catalina4.version}.jar"/>
     </target>
-    
+
     <target name="download-cat4-zip" unless="cat4.zip.exists">
         <mkdir dir="${download.dir}"/>
         <get src="http://archive.apache.org/dist/tomcat/tomcat-4/archive/v${catalina4.version}/bin/jakarta-tomcat-${catalina4.version}.zip"
-            dest="${catalina4.zip.file}"
-            verbose="false"/>
+             dest="${catalina4.zip.file}"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         catalina.jar 
     -->
     <target name="cat-check" description="Checks if the catalina jar has been downloaded.">
         <available file="${catalina.dir}/catalina-${catalina.version}.jar" property="cat.present"/>
     </target>
-   
+
     <target name="cat-download" depends="cat-check" unless="cat.present">
-        <antcall target="download-cat-java" />
-        
+        <antcall target="download-cat-java"/>
+
     </target>
-    
+
     <target name="download-cat-java" unless="cat.zip.exists">
-		<mkdir dir="${catalina.dir}"/>
+        <mkdir dir="${catalina.dir}"/>
         <get src="http://repo1.maven.org/maven2/org/apache/tomcat/catalina/${catalina.version}/catalina-${catalina.version}.jar"
-            dest="${catalina.dir}/catalina-${catalina.version}.jar"
-            verbose="false"/>
+             dest="${catalina.dir}/catalina-${catalina.version}.jar"
+             verbose="false"/>
     </target>
-    
-	<!--
+
+    <!--
         axis.jar 
     <target name="axis-check" description="Checks if the axis jar have been downloaded.">
         <available file="${qa.lib.dir}/axis.jar" property="axis.present"/>
@@ -558,9 +563,9 @@
             verbose="false"/>
     </target>
      -->
-    
 
-	<!--
+
+    <!--
         testng.jar 
     <target name="testng-check" description="Checks if the testng jar has been downloaded.">
         <available file="${qa.lib.dir}/testng-5.8-jdk15.jar" property="testng.present"/>
@@ -578,5 +583,5 @@
             verbose="false"/>
     </target>
      -->
-    
+
 </project>
diff --git a/opt/blazeds-spring-boot-starter/README.adoc b/opt/blazeds-spring-boot-starter/README.adoc
index f04114e..175b6f4 100644
--- a/opt/blazeds-spring-boot-starter/README.adoc
+++ b/opt/blazeds-spring-boot-starter/README.adoc
@@ -1,11 +1,26 @@
+//
+//  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
+//
+//      https://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.
+//
 = BlazeDS Spring-Boot Starter
 
 This module can be used to configure a BlazeDS server with Spring-Boot.
 It automatically kicks in as soon as a services-config.xml is detected in
 `META-INF/flex/services-config.xml`
 
-In order to call your Spring services from Flex using Remote objects, all
-you need is a Spring-Boot starter:
+In order to call your Spring services from Flex using Remote objects, all you need is a Spring-Boot starter:
 
 .init/Application.java
 ----
@@ -26,15 +41,14 @@
 }
 ----
 
-In order to do it's magic, you need to add a depdendency to the
-the BlazeDS Spring-Boot starter in your pom.xml
+In order to do it's magic, you need to add a depdendency to the the BlazeDS Spring-Boot starter in your pom.xml
 
 .pom.xml
 ----
 
 ...
         <dependency>
-            <groupId>org.apache.flex.blazeds</groupId>
+                <groupId>org.apache.flex.blazeds</groupId>
             <artifactId>blazeds-spring-boot-starter</artifactId>
             <version>4.7.3-SNAPSHOT</version>
         </dependency>
@@ -42,9 +56,8 @@
 
 ----
 
-The services-config.xml is the core part of this, as it describes
-which channels the BlazeDS instance will provide. It has to be located
-in the applications classpath in `META-INF/flex/servcies-config.xml`:
+The services-config.xml is the core part of this, as it describes which channels the BlazeDS instance will provide.
+It has to be located in the applications classpath in `META-INF/flex/servcies-config.xml`:
 
 .src/main/resources/META-INF/flex/services-config.xml
 ----
diff --git a/opt/blazeds-spring-boot-starter/pom.xml b/opt/blazeds-spring-boot-starter/pom.xml
index 5da1b9c..1a56953 100644
--- a/opt/blazeds-spring-boot-starter/pom.xml
+++ b/opt/blazeds-spring-boot-starter/pom.xml
@@ -16,28 +16,34 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>org.apache.flex.blazeds</groupId>
         <artifactId>flex-messaging-opt</artifactId>
-        <version>4.7.3</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>blazeds-spring-boot-starter</artifactId>
 
+    <properties>
+        <spring.version>5.3.21</spring.version>
+        <spring-boot.version>2.7.0</spring-boot.version>
+    </properties>
+
     <dependencies>
         <!-- Spring-Boot dependencies -->
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-autoconfigure</artifactId>
-            <version>1.4.1.RELEASE</version>
+            <version>${spring-boot.version}</version>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-beans</artifactId>
-            <version>4.3.3.RELEASE</version>
+            <version>${spring.version}</version>
         </dependency>
 
         <!--
@@ -49,7 +55,7 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
-            <version>1.4.1.RELEASE</version>
+            <version>${spring-boot.version}</version>
             <exclusions>
                 <exclusion>
                     <groupId>org.springframework.boot</groupId>
@@ -60,29 +66,29 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-jetty</artifactId>
-            <version>1.4.1.RELEASE</version>
+            <version>${spring-boot.version}</version>
         </dependency>
 
         <!-- Add a reference to Apache Flex BlazeDS -->
         <dependency>
             <groupId>org.apache.flex.blazeds</groupId>
             <artifactId>flex-messaging-core</artifactId>
-            <version>4.7.3</version>
+            <version>4.8.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.flex.blazeds</groupId>
             <artifactId>flex-messaging-common</artifactId>
-            <version>4.7.3</version>
+            <version>4.8.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.flex.blazeds</groupId>
             <artifactId>flex-messaging-proxy</artifactId>
-            <version>4.7.3</version>
+            <version>4.8.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.flex.blazeds</groupId>
             <artifactId>flex-messaging-remoting</artifactId>
-            <version>4.7.3</version>
+            <version>4.8.0-SNAPSHOT</version>
         </dependency>
 
         <!--
@@ -114,4 +120,29 @@
         </dependency>
     </dependencies>
 
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-aop</artifactId>
+                <version>5.3.21</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-asm</artifactId>
+                <version>3.1.4.RELEASE</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-context</artifactId>
+                <version>5.3.21</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-context-support</artifactId>
+                <version>5.3.21</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
 </project>
diff --git a/opt/blazeds-spring-boot-starter/src/main/resources/META-INF/spring.factories b/opt/blazeds-spring-boot-starter/src/main/resources/META-INF/spring.factories
index 7803ab8..6010223 100644
--- a/opt/blazeds-spring-boot-starter/src/main/resources/META-INF/spring.factories
+++ b/opt/blazeds-spring-boot-starter/src/main/resources/META-INF/spring.factories
@@ -16,5 +16,4 @@
 ##  limitations under the License.
 ##
 ################################################################################
-
 org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.apache.flex.blazeds.spring.BlazeDsAutoConfiguration
diff --git a/opt/build.xml b/opt/build.xml
index 1a470b9..c6d8644 100755
--- a/opt/build.xml
+++ b/opt/build.xml
@@ -46,53 +46,54 @@
     <property name="build.number" value=""/>
 
     <condition property="javacexecutable" value="javac.exe">
-        <os family="windows" />
+        <os family="windows"/>
     </condition>
     <property name="javacexecutable" value="javac"/>
- 
+
     <path id="base.classpath">
         <fileset dir="${lib.dir}" erroronmissingdir="false" includes="flex-messaging-common.jar"/>
         <fileset dir="${lib.dir}" erroronmissingdir="false" includes="flex-messaging-core.jar"/>
         <fileset dir="${servlet.dir}" erroronmissingdir="false" includes="servlet-api-${servlet.version}.jar"/>
-        <fileset dir="${httpclient.dir}" erroronmissingdir="false" includes="commons-httpclient-${httpclient.version}.jar"/>
+        <fileset dir="${httpclient.dir}" erroronmissingdir="false"
+                 includes="commons-httpclient-${httpclient.version}.jar"/>
     </path>
-    
+
     <path id="jrun.classpath">
         <path refid="base.classpath"/>
         <fileset dir="${jrun.dir}/lib" includes="jrun.jar"/>
     </path>
-    
+
     <path id="tomcat-4150.classpath">
         <path refid="base.classpath"/>
         <fileset dir="${catalina4.dir}">
             <include name="catalina-${catalina4.version}.jar"/>
-<!--            <include name="mx4j-jmx.jar"/> -->
+            <!--            <include name="mx4j-jmx.jar"/> -->
         </fileset>
     </path>
-        
+
     <path id="tomcat.classpath">
         <path refid="base.classpath"/>
         <fileset dir="${catalina.dir}">
             <include name="catalina-${catalina.version}.jar"/>
-<!--            <include name="mx4j-jmx.jar"/> -->
+            <!--            <include name="mx4j-jmx.jar"/> -->
         </fileset>
     </path>
-    
+
     <path id="tomcat-708.classpath">
         <path refid="base.classpath"/>
         <fileset dir="${catalina7.dir}">
             <include name="tomcat-catalina-${catalina7.version}.jar"/>
-<!--            <include name="mx4j-jmx.jar"/> -->
+            <!--            <include name="mx4j-jmx.jar"/> -->
         </fileset>
     </path>
-    
+
     <path id="weblogic.classpath">
         <path refid="base.classpath"/>
         <fileset dir="${module.lib.dir}">
             <include name="weblogic.jar"/>
         </fileset>
     </path>
-    
+
     <path id="websphere.classpath">
         <path refid="base.classpath"/>
         <fileset dir="${module.lib.dir}">
@@ -123,40 +124,40 @@
         <depend cache="${module.classes}" srcdir="${jrun.src}" destdir="${module.classes}"/>
         <depend cache="${module.classes}" srcdir="${tomcat.src}" destdir="${module.classes}"/>
     </target>
-    
+
     <target name="compile-jrun" depends="prepare" description="compile the jrun-related classes">
-		<mkdir dir="${jrun.src}"/>
+        <mkdir dir="${jrun.src}"/>
         <javac debug="${src.debug}" destdir="${module.classes}" srcdir="${jrun.src}"
-            classpathref="jrun.classpath">
+               classpathref="jrun.classpath">
             <include name="**/*.java"/>
         </javac>
     </target>
 
     <target name="compile-tomcat" depends="prepare" description="compile the tomcat-related classes">
-		<mkdir dir="${tomcat.src}"/>
-		<javac debug="${src.debug}" destdir="${module.classes}" srcdir="${tomcat.src}"
-            classpathref="tomcat-4150.classpath">
+        <mkdir dir="${tomcat.src}"/>
+        <javac debug="${src.debug}" destdir="${module.classes}" srcdir="${tomcat.src}"
+               classpathref="tomcat-4150.classpath">
             <include name="**/*.java"/>
             <exclude name="flex/messaging/security/TomcatValve.java"/>
             <exclude name="flex/messaging/security/Tomcat7Valve.java"/>
         </javac>
         <javac debug="${src.debug}" destdir="${module.classes}" srcdir="${tomcat.src}"
-            classpathref="tomcat.classpath">
+               classpathref="tomcat.classpath">
             <include name="**/*.java"/>
             <exclude name="flex/messaging/security/TomcatValve4150.java"/>
             <exclude name="flex/messaging/security/Tomcat7Valve.java"/>
         </javac>
-        <antcall target="build.for.tomcat7"/>           
+        <antcall target="build.for.tomcat7"/>
     </target>
-    
-    <target name="build.for.tomcat7" if="env.JAVA16_HOME">  
+
+    <target name="build.for.tomcat7" if="env.JAVA16_HOME">
         <javac debug="${src.debug}" destdir="${module.classes}" srcdir="${tomcat.src}"
                fork="yes" compiler="javac1.6" executable="${env.JAVA16_HOME}/bin/${javacexecutable}"
                classpathref="tomcat-708.classpath">
-             <include name="**/*.java"/>
-             <exclude name="flex/messaging/security/TomcatValve.java"/>
-             <exclude name="flex/messaging/security/TomcatValve4150.java"/>
-         </javac>   
+            <include name="**/*.java"/>
+            <exclude name="flex/messaging/security/TomcatValve.java"/>
+            <exclude name="flex/messaging/security/TomcatValve4150.java"/>
+        </javac>
     </target>
 
     <target name="jar-tomcat" depends="compile-tomcat" description="create the tomcat specific jars">
@@ -172,7 +173,7 @@
             <manifest>
                 <attribute name="Sealed" value="${manifest.sealed}"/>
                 <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Tomcat 4.1 Value"/>
-                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/> 
+                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
                 <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
             </manifest>
         </jar>
@@ -186,7 +187,7 @@
             <manifest>
                 <attribute name="Sealed" value="${manifest.sealed}"/>
                 <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Tomcat 5 Valve"/>
-                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/> 
+                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
                 <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
             </manifest>
         </jar>
@@ -196,94 +197,94 @@
         </delete>
         <copy todir="${tomcat.jar.dir}" file="${tomcat.src}/flex/messaging/security/${tomcat.valve}"/>
     </target>
-    
-    <target name="jar.for.tomcat7" >
+
+    <target name="jar.for.tomcat7">
         <jar destfile="${tomcat-server-708.jar}" basedir="${module.classes}">
-              <include name="flex/messaging/security/Tomcat7Valve.class"/>
-              <include name="flex/messaging/security/Tomcat7Valve$*"/>
-              <include name="flex/messaging/security/tomcat-descriptor.xml"/>
-              <include name="flex/messaging/security/TomcatLogin.class"/>
-              <include name="flex/messaging/security/TomcatLoginCommand.class"/>
-              <include name="flex/messaging/security/TomcatLoginHolder*.class"/>
-              <manifest>
-                  <attribute name="Sealed" value="${manifest.sealed}"/>
-                  <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Tomcat 7 Valve"/>
-                  <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/> 
-                  <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
-             </manifest>
-         </jar>
-    </target>
-    
-	<!--Edit Starts here; Making the dependencies of weblogic.jar, asynchbeans.jar, jazncore.jar and oc4j-api.jar conditional-->
-	<target name="compile-weblogic" depends="prepare" description="compile the weblogic-related classes">
-		<mkdir dir="${weblogic.src}"/>
-		<available file="${module.lib.dir}/weblogic.jar" property="isWeblogic"/>
-		<antcall target="actual.weblogic.compile" />
-	</target>
-
-    <target name="check.weblogic" unless="isWeblogic" >
-        <echo message="**** compiling without weblogic jar ****" />
+            <include name="flex/messaging/security/Tomcat7Valve.class"/>
+            <include name="flex/messaging/security/Tomcat7Valve$*"/>
+            <include name="flex/messaging/security/tomcat-descriptor.xml"/>
+            <include name="flex/messaging/security/TomcatLogin.class"/>
+            <include name="flex/messaging/security/TomcatLoginCommand.class"/>
+            <include name="flex/messaging/security/TomcatLoginHolder*.class"/>
+            <manifest>
+                <attribute name="Sealed" value="${manifest.sealed}"/>
+                <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Tomcat 7 Valve"/>
+                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+                <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+            </manifest>
+        </jar>
     </target>
 
-    <target name="actual.weblogic.compile" depends="check.weblogic" if="isWeblogic" >
-        <echo message="**** compiling with weblogic jar ****" />
+    <!--Edit Starts here; Making the dependencies of weblogic.jar, asynchbeans.jar, jazncore.jar and oc4j-api.jar conditional-->
+    <target name="compile-weblogic" depends="prepare" description="compile the weblogic-related classes">
+        <mkdir dir="${weblogic.src}"/>
+        <available file="${module.lib.dir}/weblogic.jar" property="isWeblogic"/>
+        <antcall target="actual.weblogic.compile"/>
+    </target>
+
+    <target name="check.weblogic" unless="isWeblogic">
+        <echo message="**** compiling without weblogic jar ****"/>
+    </target>
+
+    <target name="actual.weblogic.compile" depends="check.weblogic" if="isWeblogic">
+        <echo message="**** compiling with weblogic jar ****"/>
         <javac debug="${src.debug}" destdir="${module.classes}" srcdir="${weblogic.src}"
-            classpathref="weblogic.classpath">
+               classpathref="weblogic.classpath">
             <include name="**/*.java"/>
-        </javac>    
+        </javac>
     </target>
-    
-	<!--If asynchbeans.jar is present it looks for sas.jar and wsexception.jar otherwise the build will fail -->
-	<target name="compile-websphere" depends="prepare" description="compile the websphere-related classes">
-		<mkdir dir="${websphere.src}"/>
-		<condition property="isWebsphere">
-			<and>
-				<available file="${module.lib.dir}/asynchbeans.jar"/>
-				<available file="${module.lib.dir}/sas.jar"/>
-				<available file="${module.lib.dir}/wsexception.jar"/>
-			</and>
-		</condition>
-        <antcall target="actual.websphere.compile" />
-	</target>
-    
-    <target name="check.websphere" unless="isWebsphere" >
-        <echo message="**** compiling without websphere jars: asynchbeans jar, sas.jar and wsexception.jar ****" />
+
+    <!--If asynchbeans.jar is present it looks for sas.jar and wsexception.jar otherwise the build will fail -->
+    <target name="compile-websphere" depends="prepare" description="compile the websphere-related classes">
+        <mkdir dir="${websphere.src}"/>
+        <condition property="isWebsphere">
+            <and>
+                <available file="${module.lib.dir}/asynchbeans.jar"/>
+                <available file="${module.lib.dir}/sas.jar"/>
+                <available file="${module.lib.dir}/wsexception.jar"/>
+            </and>
+        </condition>
+        <antcall target="actual.websphere.compile"/>
     </target>
-    
-    <target name="actual.websphere.compile" depends="check.websphere" if="isWebsphere" >
-        <echo message="**** compiling with websphere jars: asynchbeans jar, sas.jar and wsexception.jar ****" />
+
+    <target name="check.websphere" unless="isWebsphere">
+        <echo message="**** compiling without websphere jars: asynchbeans jar, sas.jar and wsexception.jar ****"/>
+    </target>
+
+    <target name="actual.websphere.compile" depends="check.websphere" if="isWebsphere">
+        <echo message="**** compiling with websphere jars: asynchbeans jar, sas.jar and wsexception.jar ****"/>
         <javac debug="${src.debug}" destdir="${module.classes}" srcdir="${websphere.src}"
-            classpathref="websphere.classpath">
+               classpathref="websphere.classpath">
             <include name="**/*.java"/>
         </javac>
     </target>
-	
-	<!-- Both the jar "jazncore and oc4j-api" files are in and condition because both are interdependent and with the absense of either one jar the build will fail.-->
-	<target name="compile-oracle" depends="prepare" description="compile the oracle-related classes">
-		<mkdir dir="${oracle.src}"/>
-		<condition property="isOracle">
-			<and>
-				<available file="${module.lib.dir}/jazncore.jar"/>
-				<available file="${module.lib.dir}/oc4j-api.jar"/>
-			</and>
-		</condition>
-        <antcall target="actual.oracle.compile" />
-	</target>
-    
-    <target name="check.oracle" unless="isOracle" >
-        <echo message="**** compiling without oracle jar ****" />
+
+    <!-- Both the jar "jazncore and oc4j-api" files are in and condition because both are interdependent and with the absense of either one jar the build will fail.-->
+    <target name="compile-oracle" depends="prepare" description="compile the oracle-related classes">
+        <mkdir dir="${oracle.src}"/>
+        <condition property="isOracle">
+            <and>
+                <available file="${module.lib.dir}/jazncore.jar"/>
+                <available file="${module.lib.dir}/oc4j-api.jar"/>
+            </and>
+        </condition>
+        <antcall target="actual.oracle.compile"/>
     </target>
-    
-    <target name="actual.oracle.compile" depends="check.oracle" if="isOracle" >
-        <echo message="**** compiling with oracle jar ****" />
+
+    <target name="check.oracle" unless="isOracle">
+        <echo message="**** compiling without oracle jar ****"/>
+    </target>
+
+    <target name="actual.oracle.compile" depends="check.oracle" if="isOracle">
+        <echo message="**** compiling with oracle jar ****"/>
         <javac debug="${src.debug}" destdir="${module.classes}" srcdir="${oracle.src}"
-            classpathref="oracle.classpath">
+               classpathref="oracle.classpath">
             <include name="**/*.java"/>
         </javac>
     </target>
-    
-	<!--Edit Ends here; Making the dependencies of weblogic.jar, asynchbeans.jar, jazncore.jar and oc4j-api.jar conditional-->
-	      
+
+    <!--Edit Ends here; Making the dependencies of weblogic.jar, asynchbeans.jar, jazncore.jar and oc4j-api.jar conditional-->
+
     <target name="jar" depends="compile-jrun,jar-tomcat,compile-oracle,compile-weblogic,compile-websphere">
         <echo file="${module.classes}/flex/messaging/version.properties" append="false">build=${build.number}</echo>
         <copy todir="${module.classes}/flex/messaging" overwrite="true">
@@ -307,8 +308,8 @@
         <delete file="${tomcat-server.jar}" failonerror="false"/>
         <delete file="${tomcat-server-708.jar}" failonerror="false"/>
         <delete file="${tomcat.jar.dir}/${tomcat.valve}" failonerror="false"/>
-        <delete dir="${appserver.dir}/lib/blazeds" failonerror="false" />
-        <delete dir="${module.classes}" failonerror="false" />
+        <delete dir="${appserver.dir}/lib/blazeds" failonerror="false"/>
+        <delete dir="${module.classes}" failonerror="false"/>
         <echo>modules/opt clean</echo>
     </target>
 
diff --git a/opt/oracle/pom.xml b/opt/oracle/pom.xml
index 50d64ce..943c184 100644
--- a/opt/oracle/pom.xml
+++ b/opt/oracle/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.flex.blazeds</groupId>
         <artifactId>flex-messaging-opt</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>flex-messaging-opt-oracle</artifactId>
diff --git a/opt/oracle/src/main/java/flex/messaging/security/OracleLoginCommand.java b/opt/oracle/src/main/java/flex/messaging/security/OracleLoginCommand.java
index cedd842..7aa590f 100755
--- a/opt/oracle/src/main/java/flex/messaging/security/OracleLoginCommand.java
+++ b/opt/oracle/src/main/java/flex/messaging/security/OracleLoginCommand.java
@@ -28,64 +28,57 @@
  * A Oracle specific implementation of LoginCommand to manually authenticate
  * a user with the current web-app container.
  */
-public class OracleLoginCommand extends AppServerLoginCommand
-{
-    /** {@inheritDoc} */
+public class OracleLoginCommand extends AppServerLoginCommand {
+    /**
+     * {@inheritDoc}
+     */
     public Principal doAuthentication(String username, Object credentials)
-        throws SecurityException
-    {
+            throws SecurityException {
         OracleUser user;
-        try
-        {
+        try {
             CallbackHandler callbackHandler = new JAZNCallbackHandler
-                (JAZNConfig.getJAZNConfig(), null, 
-                 username, extractPassword(credentials));
+                    (JAZNConfig.getJAZNConfig(), null,
+                            username, extractPassword(credentials));
             LoginContext context = new LoginContext
-                ("oracle.security.jazn.oc4j.JAZNUserManager", callbackHandler);
+                    ("oracle.security.jazn.oc4j.JAZNUserManager", callbackHandler);
             user = new OracleUser(context);
-        }
-        catch (LoginException loginException)
-        {
+        } catch (LoginException loginException) {
             throw wrapLoginException(loginException);
         }
         return user;
     }
 
-    /** {@inheritDoc} */
-    public boolean doAuthorization(Principal principal, List roles) 
-        throws SecurityException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean doAuthorization(Principal principal, List roles)
+            throws SecurityException {
         boolean result = false;
-        if (principal instanceof OracleUser)
-        {
+        if (principal instanceof OracleUser) {
             OracleUser user = (OracleUser) principal;
             result = user.isMemberOf(roles);
-        }        
+        }
         return result;
     }
 
-    /** {@inheritDoc} */
-    public boolean logout(Principal principal) throws SecurityException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean logout(Principal principal) throws SecurityException {
         boolean result = false;
-        if (principal instanceof OracleUser)
-        {
+        if (principal instanceof OracleUser) {
             OracleUser user = (OracleUser) principal;
-            try
-            {
+            try {
                 user.logout();
                 result = true;
-            }
-            catch (LoginException loginException)
-            {
+            } catch (LoginException loginException) {
                 throw wrapLoginException(loginException);
             }
         }
         return result;
     }
 
-    private SecurityException wrapLoginException(LoginException exception)
-    {
+    private SecurityException wrapLoginException(LoginException exception) {
         SecurityException result = new SecurityException();
         result.setRootCause(exception);
         return result;
diff --git a/opt/oracle/src/main/java/flex/messaging/security/OracleUser.java b/opt/oracle/src/main/java/flex/messaging/security/OracleUser.java
index b41078e..b85e668 100755
--- a/opt/oracle/src/main/java/flex/messaging/security/OracleUser.java
+++ b/opt/oracle/src/main/java/flex/messaging/security/OracleUser.java
@@ -31,88 +31,71 @@
 
 /**
  * An Oracle specific implementation of java.security.Principal.
- * 
- *
  */
-public class OracleUser implements Principal
-{
+public class OracleUser implements Principal {
     private LoginContext context;
     private Subject subject;
 
-    public OracleUser(LoginContext context) throws LoginException
-    {
+    public OracleUser(LoginContext context) throws LoginException {
         this.context = context;
         context.logout();
         context.login();
         this.subject = context.getSubject();
     }
 
-    public void logout() throws LoginException
-    {
+    public void logout() throws LoginException {
         context.logout();
     }
 
-    private Principal userPrincipal()
-    {
+    private Principal userPrincipal() {
         Set possibleUsers = subject.getPrincipals(RealmUser.class);
         return (Principal) possibleUsers.iterator().next();
     }
 
-    public boolean isMemberOf(List roleNames)
-    {
+    public boolean isMemberOf(List roleNames) {
         boolean result = false;
         Set possibleUsers = subject.getPrincipals(RealmRole.class);
         Iterator itr = possibleUsers.iterator();
-        while (itr.hasNext())
-        {
+        while (itr.hasNext()) {
             RealmRole role = (RealmRole) itr.next();
             Realm realm = role.getRealm();
             String realmFullName = realm.getFullName();
             String roleSimpleName = role.getName();
             if ((realmFullName.length() > 0) &&
-                roleSimpleName.startsWith(realmFullName))
-            {
+                    roleSimpleName.startsWith(realmFullName)) {
                 // Format is "<realm full name>\<role name>"
                 roleSimpleName = roleSimpleName.substring
-                    (realmFullName.length() + 1);
+                        (realmFullName.length() + 1);
             }
-            
-            if (roleNames.contains(roleSimpleName))
-            {
+
+            if (roleNames.contains(roleSimpleName)) {
                 result = true;
                 break;
             }
         }
         return result;
     }
-   
-    public boolean equals(Object object)
-    {
+
+    public boolean equals(Object object) {
         boolean result = false;
-        if (object == this)
-        {
+        if (object == this) {
             result = true;
-        }
-        else if (object instanceof OracleUser)
-        {
+        } else if (object instanceof OracleUser) {
             OracleUser other = (OracleUser) object;
             result = this.subject.equals(other.subject);
         }
         return result;
     }
 
-    public String getName() 
-    {
+    public String getName() {
         return userPrincipal().getName();
     }
 
-    public int hashCode() 
-    {
+    public int hashCode() {
         return this.subject.hashCode();
     }
 
-    public String toString()
-    {
+    public String toString() {
         return this.subject.toString();
     }
 }
diff --git a/opt/pom.xml b/opt/pom.xml
index 1f280a5..549e0a3 100755
--- a/opt/pom.xml
+++ b/opt/pom.xml
@@ -16,50 +16,52 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>blazeds</artifactId>
-    <version>4.7.3</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>blazeds</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-opt</artifactId>
-  <packaging>pom</packaging>
+    <artifactId>flex-messaging-opt</artifactId>
+    <packaging>pom</packaging>
 
-  <modules>
-    <module>tomcat</module>
-    <!-- TODO: Commented out these project as they have third-party dependencies that might be problematic. -->
-    <!--module>websphere</module-->
-    <!--module>weblogic</module-->
-    <!--module>oracle</module-->
-    <module>blazeds-spring-boot-starter</module>
-  </modules>
+    <modules>
+        <module>tomcat</module>
+        <!-- TODO: Commented out these project as they have third-party dependencies that might be problematic. -->
+        <!--module>websphere</module-->
+        <!--module>weblogic</module-->
+        <!--module>oracle</module-->
+        <!-- TODO: Commented out this project, as the spring-flex-core project is not continued and it pulls in loads of CVEs, even Spring would be challenging to rid of all reported CVEs with really high threat-levels -->
+        <!--module>blazeds-spring-boot-starter</module-->
+    </modules>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.flex.blazeds</groupId>
-      <artifactId>flex-messaging-core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 
-    <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-    </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+        </dependency>
 
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
 
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
 </project>
diff --git a/opt/tomcat/pom.xml b/opt/tomcat/pom.xml
index 1c7d585..442570a 100644
--- a/opt/tomcat/pom.xml
+++ b/opt/tomcat/pom.xml
@@ -16,23 +16,27 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>flex-messaging-opt</artifactId>
-    <version>4.7.3</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>flex-messaging-opt</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-opt-tomcat</artifactId>
-  <packaging>pom</packaging>
+    <artifactId>flex-messaging-opt-tomcat</artifactId>
+    <packaging>pom</packaging>
 
-  <modules>
-    <module>tomcat-base</module>
-    <module>tomcat-4</module>
-    <module>tomcat-6</module>
-    <module>tomcat-7</module>
-  </modules>
+    <modules>
+        <module>tomcat-base</module>
+        <!-- For tomcat 4 there is no release without known vulnerabilities -->
+        <!--module>tomcat-4</module-->
+        <!-- For tomcat 6 there is no release without known vulnerabilities -->
+        <!--module>tomcat-6</module-->
+        <!-- For tomcat 6 there is no release without known vulnerabilities -->
+        <!--module>tomcat-7</module-->
+    </modules>
 
 </project>
diff --git a/opt/tomcat/tomcat-4/pom.xml b/opt/tomcat/tomcat-4/pom.xml
index 3e764ea..54a6e9c 100644
--- a/opt/tomcat/tomcat-4/pom.xml
+++ b/opt/tomcat/tomcat-4/pom.xml
@@ -16,31 +16,32 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>flex-messaging-opt-tomcat</artifactId>
-    <version>4.7.3</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>flex-messaging-opt-tomcat</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-opt-tomcat-4</artifactId>
+    <artifactId>flex-messaging-opt-tomcat-4</artifactId>
 
-  <dependencies>
-    <dependency>
-      <groupId>tomcat</groupId>
-      <artifactId>catalina</artifactId>
-      <version>4.0.6</version>
-      <scope>provided</scope>
-    </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>tomcat</groupId>
+            <artifactId>catalina</artifactId>
+            <version>4.1.36</version>
+            <scope>provided</scope>
+        </dependency>
 
-    <dependency>
-      <groupId>org.apache.flex.blazeds</groupId>
-      <artifactId>flex-messaging-opt-tomcat-base</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-opt-tomcat-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
 
 
 </project>
diff --git a/opt/tomcat/tomcat-4/src/main/java/flex/messaging/security/TomcatValve4150.java b/opt/tomcat/tomcat-4/src/main/java/flex/messaging/security/TomcatValve4150.java
index 182bce4..9eac7e2 100755
--- a/opt/tomcat/tomcat-4/src/main/java/flex/messaging/security/TomcatValve4150.java
+++ b/opt/tomcat/tomcat-4/src/main/java/flex/messaging/security/TomcatValve4150.java
@@ -48,40 +48,33 @@
  * normally to a servlet, and allows login to the current realm.  The pieces interacting with Tomcat are taken from
  * org.apache.catalina.authenticator.AuthenticatorBase.  It would be nice if we could just extend that class or
  * call some of its methods, but things aren't set up in that class in such a way that this is possible
- *
+ * <p>
  * FIXME: doesn't support Tomcat's SingleSignOn idea.  This is a way to write custom valves that associate
  * the principal to different web apps or locations.  See AuthenticatorBase for details
- *
+ * <p>
  * JAR NOTE: this class is not in flex-messaging.jar but rather flex-tomcat-server.jar
- *
- *
  */
-public class TomcatValve4150 extends ValveBase implements Lifecycle
-{
+public class TomcatValve4150 extends ValveBase implements Lifecycle {
 
     private static String AMF_MATCH = "/amfgateway";
     private static String GATEWAY_MATCH = "/flashgateway";
     private static String MESSAGEBROKER_MATCH = "/messagebroker";
     private static String CUSTOM_MATCH = System.getProperty("flex.tomcatValveMatch");
 
-    public void addLifecycleListener(LifecycleListener listener)
-    {
+    public void addLifecycleListener(LifecycleListener listener) {
         // ignore
     }
 
-    public LifecycleListener[] findLifecycleListeners()
-    {
+    public LifecycleListener[] findLifecycleListeners() {
         // ignore
         return null;
     }
 
-    public void removeLifecycleListener(LifecycleListener listener)
-    {
+    public void removeLifecycleListener(LifecycleListener listener) {
         // ignore
     }
 
-    public void start() throws LifecycleException
-    {
+    public void start() throws LifecycleException {
 
         // RTMP may not go through invoke so we need to put at least one TomcatLoginImpl in the holder.
         TomcatLogin login = new TomcatLoginImpl(getContainer(), null);
@@ -91,55 +84,45 @@
         TomcatLoginHolder.setNioBasedLogin(login);
     }
 
-    public void stop() throws LifecycleException
-    {
+    public void stop() throws LifecycleException {
         // ignore
     }
 
     public void invoke(Request request, Response response, ValveContext context)
-            throws IOException, ServletException
-    {
+            throws IOException, ServletException {
         ServletRequest servRequest = request.getRequest();
-        if (servRequest instanceof HttpServletRequest)
-        {
+        if (servRequest instanceof HttpServletRequest) {
             // we only set the TomcatLoginImpl for gateway paths
 
-            HttpServletRequest hrequest = ((HttpServletRequest)servRequest);
+            HttpServletRequest hrequest = ((HttpServletRequest) servRequest);
             String path = hrequest.getServletPath();
             boolean match = false;
-            if (path == null)
-            {
+            if (path == null) {
                 // We need to use a slighly-weaker uri match for 4.1
                 String uri = hrequest.getRequestURI();
                 match = (uri != null &&
-                    (uri.indexOf(MESSAGEBROKER_MATCH) != -1 ||
-                    uri.indexOf(AMF_MATCH) != -1 ||
-                    uri.indexOf(GATEWAY_MATCH) != -1 ||
-                    (CUSTOM_MATCH != null && uri.indexOf(CUSTOM_MATCH) != -1)));
-            }
-            else
-            {
-                 match = (path.startsWith(MESSAGEBROKER_MATCH) ||
-                         path.startsWith(AMF_MATCH) ||
-                         path.startsWith(GATEWAY_MATCH) ||
-                         (CUSTOM_MATCH != null && path.startsWith(CUSTOM_MATCH)));
+                        (uri.indexOf(MESSAGEBROKER_MATCH) != -1 ||
+                                uri.indexOf(AMF_MATCH) != -1 ||
+                                uri.indexOf(GATEWAY_MATCH) != -1 ||
+                                (CUSTOM_MATCH != null && uri.indexOf(CUSTOM_MATCH) != -1)));
+            } else {
+                match = (path.startsWith(MESSAGEBROKER_MATCH) ||
+                        path.startsWith(AMF_MATCH) ||
+                        path.startsWith(GATEWAY_MATCH) ||
+                        (CUSTOM_MATCH != null && path.startsWith(CUSTOM_MATCH)));
             }
 
-            if (match)
-            {
-                HttpRequest httpRequest = (HttpRequest)request;
+            if (match) {
+                HttpRequest httpRequest = (HttpRequest) request;
                 TomcatLoginHolder.setLogin(new TomcatLoginImpl(getContainer(), httpRequest));
 
                 // copy over user princicpal and auth type values, just like in AuthenticatorBase.invoke()
                 Principal principal = hrequest.getUserPrincipal();
-                if (principal == null) 
-                {
+                if (principal == null) {
                     Session session = getSession(httpRequest, false);
-                    if (session != null) 
-                    {
+                    if (session != null) {
                         principal = session.getPrincipal();
-                        if (principal != null) 
-                        {
+                        if (principal != null) {
                             httpRequest.setAuthType(session.getAuthType());
                             httpRequest.setUserPrincipal(principal);
                         }
@@ -151,11 +134,10 @@
     }
 
     // from AuthenticatorBase.getSession()
-    static Session getSession(HttpRequest request, boolean create) 
-    {
+    static Session getSession(HttpRequest request, boolean create) {
 
         HttpServletRequest hreq =
-            (HttpServletRequest) request.getRequest();
+                (HttpServletRequest) request.getRequest();
 
         HttpSession hses = hreq.getSession(create);
 
@@ -165,51 +147,42 @@
 
         if (manager == null)
             return (null);
-        else 
-        {
-            try 
-            {
+        else {
+            try {
                 return (manager.findSession(hses.getId()));
-            } catch (IOException e) 
-            {
+            } catch (IOException e) {
                 Log.getLogger(LogCategories.SECURITY).error("Error in TomcatValve getting session id " + hses.getId() + " : " + ExceptionUtil.toString(e));
                 return (null);
             }
         }
     }
 
-    class TomcatLoginImpl implements TomcatLogin
-    {
+    class TomcatLoginImpl implements TomcatLogin {
         private Container container;
         private HttpRequest request;
 
-        TomcatLoginImpl(Container container, HttpRequest request)
-        {
+        TomcatLoginImpl(Container container, HttpRequest request) {
             this.container = container;
             this.request = request;
         }
 
         // authenticate the user and associate with the current session.  This is taken
         // from AuthenticatorBase.register()
-        public Principal login(String username, String password, HttpServletRequest servletRequest)
-        {
+        public Principal login(String username, String password, HttpServletRequest servletRequest) {
             Realm realm = container.getRealm();
             if (realm == null)
                 return null;
             Principal principal = realm.authenticate(username, password);
 
-            if (principal != null) 
-            {
-                if (this.request != null && this.request.getRequest() == servletRequest)
-                {
+            if (principal != null) {
+                if (this.request != null && this.request.getRequest() == servletRequest) {
                     request.setAuthType("flexmessaging"); //was "flashgateway"
                     request.setUserPrincipal(principal);
 
                     Session session = getSession(request, true);
 
                     // Cache the authentication information in our session, if any
-                    if (session != null) 
-                    {
+                    if (session != null) {
                         session.setAuthType("flexmessaging"); //was "flashgateway"
                         session.setPrincipal(principal);
                         if (username != null)
@@ -227,27 +200,22 @@
             return principal;
         }
 
-        public boolean authorize(Principal principal, List roles)
-        {
+        public boolean authorize(Principal principal, List roles) {
 
             Realm realm = container.getRealm();
             Iterator iter = roles.iterator();
-            while (iter.hasNext())
-            {
-                String role = (String)iter.next();
+            while (iter.hasNext()) {
+                String role = (String) iter.next();
                 if (realm.hasRole(principal, role))
                     return true;
             }
             return false;
         }
 
-        public boolean logout(HttpServletRequest request)
-        {
-            if (this.request != null && this.request.getRequest() == request)
-            {
+        public boolean logout(HttpServletRequest request) {
+            if (this.request != null && this.request.getRequest() == request) {
                 Session session = getSession(this.request, false);
-                if (session != null)
-                {
+                if (session != null) {
                     session.setPrincipal(null);
                     session.setAuthType(null);
                     session.removeNote(Constants.SESS_USERNAME_NOTE);
@@ -257,10 +225,11 @@
             }
             return false;
         }
-        
-        /** {@inheritDoc} */
-        public Principal convertPrincipal(Principal principal)
-        {
+
+        /**
+         * {@inheritDoc}
+         */
+        public Principal convertPrincipal(Principal principal) {
             return principal;
         }
     }
diff --git a/opt/tomcat/tomcat-6/pom.xml b/opt/tomcat/tomcat-6/pom.xml
index 21a37b0..8552fdd 100644
--- a/opt/tomcat/tomcat-6/pom.xml
+++ b/opt/tomcat/tomcat-6/pom.xml
@@ -16,35 +16,36 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>flex-messaging-opt-tomcat</artifactId>
-    <version>4.7.3</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>flex-messaging-opt-tomcat</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-opt-tomcat-6</artifactId>
+    <artifactId>flex-messaging-opt-tomcat-6</artifactId>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.tomcat</groupId>
-      <artifactId>servlet-api</artifactId>
-      <version>6.0.26</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tomcat</groupId>
-      <artifactId>catalina</artifactId>
-      <version>6.0.26</version>
-      <scope>provided</scope>
-    </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>6.0.26</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>catalina</artifactId>
+            <version>6.0.53</version>
+            <scope>provided</scope>
+        </dependency>
 
-    <dependency>
-      <groupId>org.apache.flex.blazeds</groupId>
-      <artifactId>flex-messaging-opt-tomcat-base</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-opt-tomcat-base</artifactId>
+            <version>4.8.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
 
 </project>
diff --git a/opt/tomcat/tomcat-6/src/main/java/flex/messaging/security/TomcatValve.java b/opt/tomcat/tomcat-6/src/main/java/flex/messaging/security/TomcatValve.java
index 02a5b31..6a9f697 100755
--- a/opt/tomcat/tomcat-6/src/main/java/flex/messaging/security/TomcatValve.java
+++ b/opt/tomcat/tomcat-6/src/main/java/flex/messaging/security/TomcatValve.java
@@ -44,26 +44,23 @@
 import org.apache.catalina.valves.ValveBase;
 
 /**
- *
- * A Tomcat valve for allowing programmatic login.  This valve saves the container, 
- * something not available normally to a servlet, and allows login to the current realm. 
+ * A Tomcat valve for allowing programmatic login.  This valve saves the container,
+ * something not available normally to a servlet, and allows login to the current realm.
  * The pieces interacting with Tomcat are taken from org.apache.catalina.authenticator.AuthenticatorBase.
- * It would be nice if we could just extend that class or call some of its methods, 
+ * It would be nice if we could just extend that class or call some of its methods,
  * but things aren't set up in that class in such a way that this is possible
- *
+ * <p>
  * FIXME: Doesn't support Tomcat's SingleSignOn which is a way to write custom valves that associate
  * the principal to different web apps or locations. See AuthenticatorBase for details
  */
-public class TomcatValve extends ValveBase implements Lifecycle
-{
+public class TomcatValve extends ValveBase implements Lifecycle {
     private static final String AUTH_TYPE = "flexmessaging"; // was "flashgateway"
     private static final String AMF_MATCH = "/amfgateway";
     private static final String GATEWAY_MATCH = "/flashgateway";
-    private static final String MESSAGEBROKER_MATCH = "/messagebroker"; 
+    private static final String MESSAGEBROKER_MATCH = "/messagebroker";
     private static String CUSTOM_MATCH = System.getProperty("flex.tomcatValveMatch");
 
-    public void invoke(Request request, Response response) throws IOException, ServletException
-    {
+    public void invoke(Request request, Response response) throws IOException, ServletException {
         invokeServletRequest(request);
 
         Valve next = getNext();
@@ -71,21 +68,19 @@
             next.invoke(request, response);
     }
 
-    private void invokeServletRequest(Request request)
-    {
+    private void invokeServletRequest(Request request) {
         ServletRequest servRequest = request.getRequest();
         if (!(servRequest instanceof HttpServletRequest))
             return;
 
         // We only set the TomcatLoginImpl for gateway paths
-        HttpServletRequest hrequest = (HttpServletRequest)servRequest;
+        HttpServletRequest hrequest = (HttpServletRequest) servRequest;
         boolean match = checkIfPathMatches(hrequest.getServletPath(), hrequest.getRequestURI());
         if (match)
             handleMatch(request, hrequest.getUserPrincipal());
     }
 
-    private void handleMatch(Request request, Principal principal)
-    {
+    private void handleMatch(Request request, Principal principal) {
         TomcatLoginHolder.setLogin(new TomcatLoginImpl(getContainer(), request));
 
         // Copy over user principal and auth type values, just like in AuthenticatorBase.invoke()
@@ -97,26 +92,21 @@
             return;
 
         principal = session.getPrincipal();
-        if (principal != null) 
-        {
+        if (principal != null) {
             request.setAuthType(session.getAuthType());
             request.setUserPrincipal(principal);
         }
     }
 
-    private boolean checkIfPathMatches(String path, String uri)
-    {
-        if (path == null)
-        {
+    private boolean checkIfPathMatches(String path, String uri) {
+        if (path == null) {
             // We need to use a slighly-weaker uri match for 4.1
             return (uri != null &&
                     (uri.indexOf(MESSAGEBROKER_MATCH) != -1 ||
                             uri.indexOf(AMF_MATCH) != -1 ||
                             uri.indexOf(GATEWAY_MATCH) != -1 ||
                             (CUSTOM_MATCH != null && uri.indexOf(CUSTOM_MATCH) != -1)));
-        }
-        else
-        {
+        } else {
             return (path.startsWith(MESSAGEBROKER_MATCH) ||
                     path.startsWith(AMF_MATCH) ||
                     path.startsWith(GATEWAY_MATCH) ||
@@ -124,23 +114,19 @@
         }
     }
 
-    public void addLifecycleListener(LifecycleListener listener)
-    {
+    public void addLifecycleListener(LifecycleListener listener) {
         // No-op.
     }
 
-    public LifecycleListener[] findLifecycleListeners()
-    {
+    public LifecycleListener[] findLifecycleListeners() {
         return null;
     }
 
-    public void removeLifecycleListener(LifecycleListener listener)
-    {
+    public void removeLifecycleListener(LifecycleListener listener) {
         // No-op.
     }
 
-    public void start() throws LifecycleException
-    {
+    public void start() throws LifecycleException {
         // RTMP may not go through invoke so we need to put at least one TomcatLoginImpl in the holder.
         TomcatLogin login = new TomcatLoginImpl(getContainer(), null);
         TomcatLoginHolder.setLogin(login);
@@ -149,16 +135,14 @@
         TomcatLoginHolder.setNioBasedLogin(login);
     }
 
-    public void stop() throws LifecycleException
-    {
+    public void stop() throws LifecycleException {
         // No-op.
     }
 
     // from AuthenticatorBase.getSession()
-    static Session getSession(Request request, boolean create) 
-    {
+    static Session getSession(Request request, boolean create) {
 
-        HttpServletRequest hreq = (HttpServletRequest)request.getRequest();
+        HttpServletRequest hreq = (HttpServletRequest) request.getRequest();
         HttpSession hses = hreq.getSession(create);
 
         if (hses == null)
@@ -168,32 +152,26 @@
         if (manager == null)
             return null;
 
-        try 
-        {
+        try {
             return manager.findSession(hses.getId());
-        }
-        catch (IOException e) 
-        {
+        } catch (IOException e) {
             Log.getLogger(LogCategories.SECURITY).error("Error in TomcatValve getting session id " + hses.getId() + " : " + ExceptionUtil.toString(e));
             return null;
         }
     }
 
-    class TomcatLoginImpl implements TomcatLogin
-    {
+    class TomcatLoginImpl implements TomcatLogin {
         private Container container;
         private Request request;
 
-        TomcatLoginImpl(Container container, Request request)
-        {
+        TomcatLoginImpl(Container container, Request request) {
             this.container = container;
             this.request = request;
         }
 
         // Authenticate the user and associate with the current session.
         // This is taken from AuthenticatorBase.register()
-        public Principal login(String username, String password, HttpServletRequest servletRequest)
-        {
+        public Principal login(String username, String password, HttpServletRequest servletRequest) {
             Realm realm = container.getRealm();
             if (realm == null)
                 return null;
@@ -202,16 +180,14 @@
             if (principal == null)
                 return null;
 
-            if (servletRequestMatches(servletRequest))
-            {
+            if (servletRequestMatches(servletRequest)) {
                 request.setAuthType(AUTH_TYPE);
                 request.setUserPrincipal(principal);
 
                 Session session = getSession(request, true);
 
                 // Cache the authentication information in our session.
-                if (session != null) 
-                {
+                if (session != null) {
                     session.setAuthType(AUTH_TYPE);
                     session.setPrincipal(principal);
 
@@ -230,26 +206,21 @@
             return principal;
         }
 
-        public boolean authorize(Principal principal, List roles)
-        {
+        public boolean authorize(Principal principal, List roles) {
             Realm realm = container.getRealm();
             Iterator iter = roles.iterator();
-            while (iter.hasNext())
-            {
-                String role = (String)iter.next();
+            while (iter.hasNext()) {
+                String role = (String) iter.next();
                 if (realm.hasRole(principal, role))
                     return true;
             }
             return false;
         }
 
-        public boolean logout(HttpServletRequest servletRequest)
-        {
-            if (servletRequestMatches(servletRequest))
-            {
+        public boolean logout(HttpServletRequest servletRequest) {
+            if (servletRequestMatches(servletRequest)) {
                 Session session = getSession(request, false);
-                if (session != null)
-                {
+                if (session != null) {
                     session.setPrincipal(null);
                     session.setAuthType(null);
                     session.removeNote(Constants.SESS_USERNAME_NOTE);
@@ -260,14 +231,14 @@
             return false;
         }
 
-        private boolean servletRequestMatches(HttpServletRequest servletRequest)
-        {
+        private boolean servletRequestMatches(HttpServletRequest servletRequest) {
             return request != null && request.getRequest() == servletRequest;
         }
-        
-        /** {@inheritDoc} */
-        public Principal convertPrincipal(Principal principal)
-        {
+
+        /**
+         * {@inheritDoc}
+         */
+        public Principal convertPrincipal(Principal principal) {
             return principal;
         }
     }
diff --git a/opt/tomcat/tomcat-7/pom.xml b/opt/tomcat/tomcat-7/pom.xml
index db57338..aad2d46 100644
--- a/opt/tomcat/tomcat-7/pom.xml
+++ b/opt/tomcat/tomcat-7/pom.xml
@@ -16,30 +16,31 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>flex-messaging-opt-tomcat</artifactId>
-    <version>4.7.3</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>flex-messaging-opt-tomcat</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-opt-tomcat-7</artifactId>
+    <artifactId>flex-messaging-opt-tomcat-7</artifactId>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.tomcat</groupId>
-      <artifactId>tomcat-catalina</artifactId>
-      <version>7.0.8</version>
-      <scope>provided</scope>
-    </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-catalina</artifactId>
+            <version>7.0.107</version>
+            <scope>provided</scope>
+        </dependency>
 
-    <dependency>
-      <groupId>org.apache.flex.blazeds</groupId>
-      <artifactId>flex-messaging-opt-tomcat-base</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-  </dependencies>
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-opt-tomcat-base</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
 
 </project>
diff --git a/opt/tomcat/tomcat-7/src/main/java/flex/messaging/security/Tomcat7Valve.java b/opt/tomcat/tomcat-7/src/main/java/flex/messaging/security/Tomcat7Valve.java
index 19eeec8..bbd7866 100755
--- a/opt/tomcat/tomcat-7/src/main/java/flex/messaging/security/Tomcat7Valve.java
+++ b/opt/tomcat/tomcat-7/src/main/java/flex/messaging/security/Tomcat7Valve.java
@@ -47,31 +47,28 @@
 import org.apache.catalina.realm.GenericPrincipal;
 import org.apache.catalina.users.AbstractUser;
 import org.apache.catalina.valves.ValveBase;
-import org.apache.catalina .Wrapper;
+import org.apache.catalina.Wrapper;
 
 /**
- *
- * A Tomcat valve for allowing programmatic login.  This valve saves the container, 
- * something not available normally to a servlet, and allows login to the current realm. 
+ * A Tomcat valve for allowing programmatic login.  This valve saves the container,
+ * something not available normally to a servlet, and allows login to the current realm.
  * The pieces interacting with Tomcat are taken from org.apache.catalina.authenticator.AuthenticatorBase.
- * It would be nice if we could just extend that class or call some of its methods, 
+ * It would be nice if we could just extend that class or call some of its methods,
  * but things aren't set up in that class in such a way that this is possible
- *
+ * <p>
  * FIXME: Doesn't support Tomcat's SingleSignOn which is a way to write custom valves that associate
  * the principal to different web apps or locations. See AuthenticatorBase for details
  */
-public class Tomcat7Valve extends ValveBase implements Lifecycle
-{
+public class Tomcat7Valve extends ValveBase implements Lifecycle {
     private static final String AUTH_TYPE = "flexmessaging"; // was "flashgateway"
     private static final String AMF_MATCH = "/amfgateway";
     private static final String GATEWAY_MATCH = "/flashgateway";
-    private static final String MESSAGEBROKER_MATCH = "/messagebroker"; 
+    private static final String MESSAGEBROKER_MATCH = "/messagebroker";
     private static String CUSTOM_MATCH = System.getProperty("flex.tomcatValveMatch");
-    
-    public Tomcat7Valve()
-    {
+
+    public Tomcat7Valve() {
         super();
-        
+
         // RTMP may not go through invoke so we need to put at least one TomcatLoginImpl in the holder.
         TomcatLogin login = new TomcatLoginImpl(this, null);
         TomcatLoginHolder.setLogin(login);
@@ -80,8 +77,7 @@
         TomcatLoginHolder.setNioBasedLogin(login);
     }
 
-    public void invoke(Request request, Response response) throws IOException, ServletException
-    {
+    public void invoke(Request request, Response response) throws IOException, ServletException {
         invokeServletRequest(request);
 
         Valve next = getNext();
@@ -89,21 +85,19 @@
             next.invoke(request, response);
     }
 
-    private void invokeServletRequest(Request request)
-    {
+    private void invokeServletRequest(Request request) {
         ServletRequest servRequest = request.getRequest();
         if (!(servRequest instanceof HttpServletRequest))
             return;
 
         // We only set the TomcatLoginImpl for gateway paths
-        HttpServletRequest hrequest = (HttpServletRequest)servRequest;
+        HttpServletRequest hrequest = (HttpServletRequest) servRequest;
         boolean match = checkIfPathMatches(hrequest.getServletPath(), hrequest.getRequestURI());
         if (match)
             handleMatch(request, hrequest.getUserPrincipal());
     }
 
-    private void handleMatch(Request request, Principal principal)
-    {
+    private void handleMatch(Request request, Principal principal) {
         TomcatLoginHolder.setLogin(new TomcatLoginImpl(this, request));
 
         // Copy over user principal and auth type values, just like in AuthenticatorBase.invoke()
@@ -115,26 +109,21 @@
             return;
 
         principal = session.getPrincipal();
-        if (principal != null) 
-        {
+        if (principal != null) {
             request.setAuthType(session.getAuthType());
             request.setUserPrincipal(principal);
         }
     }
 
-    private boolean checkIfPathMatches(String path, String uri)
-    {
-        if (path == null)
-        {
+    private boolean checkIfPathMatches(String path, String uri) {
+        if (path == null) {
             // We need to use a slighly-weaker uri match for 4.1
             return (uri != null &&
                     (uri.indexOf(MESSAGEBROKER_MATCH) != -1 ||
                             uri.indexOf(AMF_MATCH) != -1 ||
                             uri.indexOf(GATEWAY_MATCH) != -1 ||
                             (CUSTOM_MATCH != null && uri.indexOf(CUSTOM_MATCH) != -1)));
-        }
-        else
-        {
+        } else {
             return (path.startsWith(MESSAGEBROKER_MATCH) ||
                     path.startsWith(AMF_MATCH) ||
                     path.startsWith(GATEWAY_MATCH) ||
@@ -142,26 +131,22 @@
         }
     }
 
-    public void addLifecycleListener(LifecycleListener listener)
-    {
+    public void addLifecycleListener(LifecycleListener listener) {
         // No-op.
     }
 
-    public LifecycleListener[] findLifecycleListeners()
-    {
+    public LifecycleListener[] findLifecycleListeners() {
         return null;
     }
 
-    public void removeLifecycleListener(LifecycleListener listener)
-    {
+    public void removeLifecycleListener(LifecycleListener listener) {
         // No-op.
     }
 
     // from AuthenticatorBase.getSession()
-    static Session getSession(Request request, boolean create) 
-    {
+    static Session getSession(Request request, boolean create) {
 
-        HttpServletRequest hreq = (HttpServletRequest)request.getRequest();
+        HttpServletRequest hreq = (HttpServletRequest) request.getRequest();
         HttpSession hses = hreq.getSession(create);
 
         if (hses == null)
@@ -171,32 +156,26 @@
         if (manager == null)
             return null;
 
-        try 
-        {
+        try {
             return manager.findSession(hses.getId());
-        }
-        catch (IOException e) 
-        {
+        } catch (IOException e) {
             Log.getLogger(LogCategories.SECURITY).error("Error in TomcatValve getting session id " + hses.getId() + " : " + ExceptionUtil.toString(e));
             return null;
         }
     }
 
-    class TomcatLoginImpl implements TomcatLogin
-    {
+    class TomcatLoginImpl implements TomcatLogin {
         private ValveBase valve;
         private Request request;
 
-        TomcatLoginImpl(ValveBase valve, Request request)
-        {
+        TomcatLoginImpl(ValveBase valve, Request request) {
             this.valve = valve;
             this.request = request;
         }
 
         // Authenticate the user and associate with the current session.
         // This is taken from AuthenticatorBase.register()
-        public Principal login(String username, String password, HttpServletRequest servletRequest)
-        {
+        public Principal login(String username, String password, HttpServletRequest servletRequest) {
             Realm realm = valve.getContainer().getRealm();
             if (realm == null)
                 return null;
@@ -205,16 +184,14 @@
             if (principal == null)
                 return null;
 
-            if (servletRequestMatches(servletRequest))
-            {
+            if (servletRequestMatches(servletRequest)) {
                 request.setAuthType(AUTH_TYPE);
                 request.setUserPrincipal(principal);
 
                 Session session = getSession(request, true);
 
                 // Cache the authentication information in our session.
-                if (session != null) 
-                {
+                if (session != null) {
                     session.setAuthType(AUTH_TYPE);
                     session.setPrincipal(principal);
 
@@ -233,18 +210,15 @@
             return principal;
         }
 
-        public boolean authorize(Principal principal, List roles)
-        {
+        public boolean authorize(Principal principal, List roles) {
             Realm realm = valve.getContainer().getRealm();
             Iterator iter = roles.iterator();
-            while (iter.hasNext())
-            {
-                String role = (String)iter.next();
+            while (iter.hasNext()) {
+                String role = (String) iter.next();
                 // For Tomcat 7, we need to get the wrapper from the request to support role mapping in the web.xml.
                 // This is only supported for servlet endpoints. For NIO endpoints, the wrapper will be null.
                 Wrapper wrapper = null;
-                if (request != null)
-                {
+                if (request != null) {
                     // in the servlet case get the wrapper
                     wrapper = request.getWrapper();
                 }
@@ -255,13 +229,10 @@
             return false;
         }
 
-        public boolean logout(HttpServletRequest servletRequest)
-        {
-            if (servletRequestMatches(servletRequest))
-            {
+        public boolean logout(HttpServletRequest servletRequest) {
+            if (servletRequestMatches(servletRequest)) {
                 Session session = getSession(request, false);
-                if (session != null)
-                {
+                if (session != null) {
                     session.setPrincipal(null);
                     session.setAuthType(null);
                     session.removeNote(Constants.SESS_USERNAME_NOTE);
@@ -272,37 +243,31 @@
             return false;
         }
 
-        private boolean servletRequestMatches(HttpServletRequest servletRequest)
-        {
+        private boolean servletRequestMatches(HttpServletRequest servletRequest) {
             return request != null && request.getRequest() == servletRequest;
         }
-        /** {@inheritDoc} */
-        public Principal convertPrincipal(Principal principal)
-        {
-            if (principal instanceof GenericPrincipal)
-            {
+
+        /**
+         * {@inheritDoc}
+         */
+        public Principal convertPrincipal(Principal principal) {
+            if (principal instanceof GenericPrincipal) {
                 return principal;
-            }
-            else
-            {
+            } else {
                 // We need to do the converting
-                if (principal instanceof AbstractUser)
-                {
+                if (principal instanceof AbstractUser) {
                     AbstractUser abstractUser = (AbstractUser) principal;
-                    List<String> roles = new ArrayList<String> ();
+                    List<String> roles = new ArrayList<String>();
                     Iterator roleIterator = abstractUser.getRoles();
-                    while (roleIterator.hasNext())
-                    {
+                    while (roleIterator.hasNext()) {
                         Role role = (Role) roleIterator.next();
                         roles.add(role.getName());
                     }
                     String userName = abstractUser.getUsername();
                     String password = abstractUser.getPassword();
                     return new GenericPrincipal(userName, password, roles);
-                    
-                }
-                else
-                {
+
+                } else {
                     // no
                     return principal;
                 }
diff --git a/opt/tomcat/tomcat-7/src/main/resources/flex/messaging/security/tomcat-descriptor.xml b/opt/tomcat/tomcat-7/src/main/resources/flex/messaging/security/tomcat-descriptor.xml
index 8aef29f..9361423 100755
--- a/opt/tomcat/tomcat-7/src/main/resources/flex/messaging/security/tomcat-descriptor.xml
+++ b/opt/tomcat/tomcat-7/src/main/resources/flex/messaging/security/tomcat-descriptor.xml
@@ -18,8 +18,8 @@
 
 -->
 <!DOCTYPE mbeans-descriptors PUBLIC
- "-//Apache Software Foundation//DTD Model MBeans Configuration File"
- "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">
+        "-//Apache Software Foundation//DTD Model MBeans Configuration File"
+        "http://jakarta.apache.org/commons/dtds/mbeans-descriptors.dtd">
 
 <!--
      Descriptions of JMX MBeans for Catalina
@@ -27,41 +27,41 @@
 
 <mbeans-descriptors>
 
-  <mbean         name="TomcatValve4150"
-            className="org.apache.catalina.mbeans.ClassNameMBean"
-          description="Valve that allows Flex to programmatically log in"
-               domain="Catalina"
-                group="Valve"
-                 type="flex.messaging.security.TomcatValve4150">
+    <mbean name="TomcatValve4150"
+           className="org.apache.catalina.mbeans.ClassNameMBean"
+           description="Valve that allows Flex to programmatically log in"
+           domain="Catalina"
+           group="Valve"
+           type="flex.messaging.security.TomcatValve4150">
 
-    <attribute   name="className"
-          description="Fully qualified class name of the managed object"
-                 type="java.lang.String"
-            writeable="false"/>
+        <attribute name="className"
+                   description="Fully qualified class name of the managed object"
+                   type="java.lang.String"
+                   writeable="false"/>
 
-    <attribute   name="debug"
-          description="The debugging detail level for this component"
-                 type="int"/>
+        <attribute name="debug"
+                   description="The debugging detail level for this component"
+                   type="int"/>
 
 
-  </mbean>
-  
-  <mbean         name="TomcatValve"
-            className="org.apache.catalina.mbeans.ClassNameMBean"
-          description="Valve that allows Flex to programmatically log in"
-               domain="Catalina"
-                group="Valve"
-                 type="flex.messaging.security.TomcatValve">
+    </mbean>
 
-    <attribute   name="className"
-          description="Fully qualified class name of the managed object"
-                 type="java.lang.String"
-            writeable="false"/>
+    <mbean name="TomcatValve"
+           className="org.apache.catalina.mbeans.ClassNameMBean"
+           description="Valve that allows Flex to programmatically log in"
+           domain="Catalina"
+           group="Valve"
+           type="flex.messaging.security.TomcatValve">
 
-    <attribute   name="debug"
-          description="The debugging detail level for this component"
-                 type="int"/>
+        <attribute name="className"
+                   description="Fully qualified class name of the managed object"
+                   type="java.lang.String"
+                   writeable="false"/>
+
+        <attribute name="debug"
+                   description="The debugging detail level for this component"
+                   type="int"/>
 
 
-  </mbean>
+    </mbean>
 </mbeans-descriptors>
diff --git a/opt/tomcat/tomcat-base/pom.xml b/opt/tomcat/tomcat-base/pom.xml
index ddbad8b..41bff7f 100644
--- a/opt/tomcat/tomcat-base/pom.xml
+++ b/opt/tomcat/tomcat-base/pom.xml
@@ -16,15 +16,16 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>flex-messaging-opt-tomcat</artifactId>
-    <version>4.7.3</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>flex-messaging-opt-tomcat</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-opt-tomcat-base</artifactId>
+    <artifactId>flex-messaging-opt-tomcat-base</artifactId>
 
 </project>
diff --git a/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLogin.java b/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLogin.java
index e681461..27f430a 100755
--- a/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLogin.java
+++ b/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLogin.java
@@ -23,19 +23,18 @@
 
 /**
  * Interface to code in the Tomcat valve. This is needed because Tomcat has a classloader system
- * where code in a valve does not appear in the classloader that is used for servlets. 
+ * where code in a valve does not appear in the classloader that is used for servlets.
  * There is a commons area that both valves and servlets share and this interface
- * needs to be placed there. 
+ * needs to be placed there.
  */
-public interface TomcatLogin
-{
+public interface TomcatLogin {
     /**
-     * Attempt to login user with the specified credentials.  Return a generated 
+     * Attempt to login user with the specified credentials.  Return a generated
      * Principal object if login were successful
-     * 
+     *
      * @param username username.
      * @param password credentials.
-     * @param request request via which this login attempt was made
+     * @param request  request via which this login attempt was made
      * @return Principal generated for user if login were successful
      */
     Principal login(String username, String password, HttpServletRequest request);
@@ -49,22 +48,22 @@
      * </p>
      *
      * @param principal The principal being checked for authorization
-     * @param roles    A List of role names to check, all members should be strings
+     * @param roles     A List of role names to check, all members should be strings
      * @return true if the principal is authorized given the list of roles
      */
     boolean authorize(Principal principal, List roles);
 
     /**
      * Logs out the user associated with the passed-in request.
-     * 
+     *
      * @param request whose associated user is to be loged-out
      * @return true if logout were successful
      */
     boolean logout(HttpServletRequest request);
-    
+
     /**
      * Classes that implement the flex.messaging.security.PrinciplaConverter interface, to convert a J2EE Principal to a
-     * Flex Principal impl. A Flex Principal impl is specific to different Application Servers and will be used by Flex to 
+     * Flex Principal impl. A Flex Principal impl is specific to different Application Servers and will be used by Flex to
      * do security authorization check, which calls security framework API specific to Application Servers.
      */
     Principal convertPrincipal(Principal principal);
diff --git a/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLoginCommand.java b/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLoginCommand.java
index 9624a48..641567b 100755
--- a/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLoginCommand.java
+++ b/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLoginCommand.java
@@ -28,52 +28,47 @@
 /**
  * A Tomcat specific implementation of LoginCommand.
  */
-public class TomcatLoginCommand extends AppServerLoginCommand implements PrincipalConverter
-{
+public class TomcatLoginCommand extends AppServerLoginCommand implements PrincipalConverter {
     private static final int NO_VALVE = 20000;
 
-    /** {@inheritDoc} */
-    public Principal doAuthentication(String username, Object credentials) throws SecurityException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Principal doAuthentication(String username, Object credentials) throws SecurityException {
         TomcatLogin login = TomcatLoginHolder.getLogin();
-        if (login == null)
-        {
+        if (login == null) {
             SecurityException se = new SecurityException(new PropertyStringResourceLoader(PropertyStringResourceLoader.VENDORS_BUNDLE));
             se.setMessage(NO_VALVE);
             throw se;
         }
 
         String password = extractPassword(credentials);
-        if (password != null)
-        {
-            HttpServletRequest request = (HttpServletRequest)FlexContext.getHttpRequest();
+        if (password != null) {
+            HttpServletRequest request = (HttpServletRequest) FlexContext.getHttpRequest();
             return login.login(username, password, request);
         }
 
         return null;
     }
 
-    /** {@inheritDoc} */
-    public boolean doAuthorization(Principal principal, List roles) throws SecurityException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean doAuthorization(Principal principal, List roles) throws SecurityException {
         boolean authorized = false;
 
         HttpServletRequest request = FlexContext.getHttpRequest();
         // Response is null for NIO endpoints.
         HttpServletResponse response = FlexContext.getHttpResponse();
 
-        if (responseAndRequestNotNull(response, request) 
-                && principalMatchesWithRequest(principal, request))
-        {
+        if (responseAndRequestNotNull(response, request)
+                && principalMatchesWithRequest(principal, request)) {
             authorized = doAuthorization(principal, roles, request);
-        }
-        else
-        {
+        } else {
             TomcatLogin login = TomcatLoginHolder.getLogin();
-            if (login == null)
-            {
+            if (login == null) {
                 SecurityException se =
-                    new SecurityException(new PropertyStringResourceLoader(PropertyStringResourceLoader.VENDORS_BUNDLE));
+                        new SecurityException(new PropertyStringResourceLoader(PropertyStringResourceLoader.VENDORS_BUNDLE));
                 se.setMessage(NO_VALVE);
                 throw se;
             }
@@ -83,21 +78,18 @@
         return authorized;
     }
 
-    /** {@inheritDoc} */
-    public boolean logout(Principal principal) throws SecurityException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean logout(Principal principal) throws SecurityException {
         HttpServletRequest request = FlexContext.getHttpRequest();
         // Response is null for NIO endpoints.
         HttpServletResponse response = FlexContext.getHttpResponse();
-        if (responseAndRequestNotNull(response, request))
-        {
+        if (responseAndRequestNotNull(response, request)) {
             TomcatLogin login = TomcatLoginHolder.getLogin();
-            if (login != null)
-            {
+            if (login != null) {
                 return login.logout(request);
-            }
-            else
-            {
+            } else {
                 //TODO should we do this?
                 //request.getSession(false).invalidate();
             }
@@ -105,19 +97,18 @@
         return true;
     }
 
-    private boolean principalMatchesWithRequest(Principal principal, HttpServletRequest request)
-    {
+    private boolean principalMatchesWithRequest(Principal principal, HttpServletRequest request) {
         return principal != null && principal.equals(request.getUserPrincipal());
     }
 
-    private boolean responseAndRequestNotNull(HttpServletResponse response, HttpServletRequest request)
-    {
+    private boolean responseAndRequestNotNull(HttpServletResponse response, HttpServletRequest request) {
         return response != null && request != null;
     }
-    
-    /** {@inheritDoc} */
-    public Principal convertPrincipal(Principal principal)
-    {
+
+    /**
+     * {@inheritDoc}
+     */
+    public Principal convertPrincipal(Principal principal) {
         TomcatLogin login = TomcatLoginHolder.getLogin();
         return login.convertPrincipal(principal);
     }
diff --git a/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLoginHolder.java b/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLoginHolder.java
index d3a0449..d9d848f 100755
--- a/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLoginHolder.java
+++ b/opt/tomcat/tomcat-base/src/main/java/flex/messaging/security/TomcatLoginHolder.java
@@ -19,45 +19,40 @@
 /**
  * Contains the last good TomcatLogin for use by the TomcatLoginCommand.
  */
-public class TomcatLoginHolder
-{
+public class TomcatLoginHolder {
     private static ThreadLocal logins = new ThreadLocal();
-    
+
     // We should really make this one as a singleton instead of resetting it every time we call setLogin()
     private static TomcatLogin nioBasedLogin;
 
-    private TomcatLoginHolder()
-    {
+    private TomcatLoginHolder() {
         // No-op.
     }
 
     /**
      * Saves the last valid login.
-     * 
+     *
      * @param login last valid login
      */
-    public static void setLogin(TomcatLogin login)
-    {
+    public static void setLogin(TomcatLogin login) {
         logins.set(login);
     }
 
     /**
      * Retrieves the last valid login.
-     * 
+     *
      * @return last valid login.
      */
-    public static TomcatLogin getLogin()
-    {
-        return logins.get() != null? (TomcatLogin)logins.get() : nioBasedLogin;
+    public static TomcatLogin getLogin() {
+        return logins.get() != null ? (TomcatLogin) logins.get() : nioBasedLogin;
     }
-    
+
     /**
      * Saves the nio based login.
-     * 
+     *
      * @param login the valid login that nio based endpoints should use
      */
-    public static void setNioBasedLogin(TomcatLogin login)
-    {
+    public static void setNioBasedLogin(TomcatLogin login) {
         nioBasedLogin = login;
     }
 }
diff --git a/opt/weblogic/pom.xml b/opt/weblogic/pom.xml
index 31e679b..c56c2a7 100644
--- a/opt/weblogic/pom.xml
+++ b/opt/weblogic/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.flex.blazeds</groupId>
         <artifactId>flex-messaging-opt</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>flex-messaging-opt-weblogic</artifactId>
diff --git a/opt/weblogic/src/main/java/flex/messaging/security/WeblogicLoginCommand.java b/opt/weblogic/src/main/java/flex/messaging/security/WeblogicLoginCommand.java
index 0f698c8..e138942 100755
--- a/opt/weblogic/src/main/java/flex/messaging/security/WeblogicLoginCommand.java
+++ b/opt/weblogic/src/main/java/flex/messaging/security/WeblogicLoginCommand.java
@@ -36,50 +36,41 @@
  * Authenticates against WebLogic and if using an HttpServlet will store
  * the authenticated user in the request.
  */
-public class WeblogicLoginCommand extends AppServerLoginCommand implements PrincipalConverter
-{
-    /** {@inheritDoc} */
-    public Principal doAuthentication(String username, Object credentials)
-    {
+public class WeblogicLoginCommand extends AppServerLoginCommand implements PrincipalConverter {
+    /**
+     * {@inheritDoc}
+     */
+    public Principal doAuthentication(String username, Object credentials) {
         Principal principal = null;
 
         String password = extractPassword(credentials);
 
-        if (password != null)
-        {
+        if (password != null) {
             // Test for the presence of a response here (rather than request) because NIO 
             // endpoints require the alternate code path and they don't populate the response
             // in FlexContext.
             HttpServletResponse response = FlexContext.getHttpResponse();
-            if (response != null)
-            {
+            if (response != null) {
                 HttpServletRequest request = FlexContext.getHttpRequest();
                 int result = ServletAuthentication.FAILED_AUTHENTICATION;
-                try
-                {
+                try {
                     result = ServletAuthentication.login(username, password,
                             request);
-                }
-                catch (LoginException e)
-                {
-                }
-                catch (NoSuchMethodError noSuchMethodError)
-                {
+                } catch (LoginException e) {
+                } catch (NoSuchMethodError noSuchMethodError) {
                     //even though we're not supporting WebLogic 7 anymore...
                     // Weblogic 7.0.4 didn't have login(), so try weak().
                     result = ServletAuthentication.weak(username, password,
                             request);
                 }
 
-                if (result != ServletAuthentication.FAILED_AUTHENTICATION)
-                {
+                if (result != ServletAuthentication.FAILED_AUTHENTICATION) {
                     // To authorize against the Groups defined via the WL console, we need
                     // to have a SubjectPrincipal.  Because we do not need a principal to authorize
                     // against web.xml / weblogic.xml, always save the SubjectPrincipal
                     principal = getSubjectPrincipal(username, password);
                 }
-            }
-            else // Code path for NIO endpoints.
+            } else // Code path for NIO endpoints.
             {
                 principal = getSubjectPrincipal(username, password);
             }
@@ -90,21 +81,18 @@
 
     /**
      * Get a SubjectPrincipal for the current user.
+     *
      * @return the generated SubjectPrincipal
      */
-    private Principal getSubjectPrincipal(String username, String password)
-    {
-        Principal principal=null;
+    private Principal getSubjectPrincipal(String username, String password) {
+        Principal principal = null;
 
         SimpleCallbackHandler handler =
-            new SimpleCallbackHandler(username, password);
-        try
-        {
+                new SimpleCallbackHandler(username, password);
+        try {
             Subject subject = Authentication.login(handler);
             principal = new SubjectPrincipal(subject);
-        }
-        catch (LoginException e)
-        {
+        } catch (LoginException e) {
             // let authentication fail if this fails
         }
 
@@ -113,33 +101,27 @@
 
     /**
      * Authorize a user against the Groups defined in the WL console.
+     *
      * @param principal - Current user principal
-     * @param roles - Set of roles that allow a succesfull authorization
+     * @param roles     - Set of roles that allow a succesfull authorization
      * @return true if the authorization were succesfull
      */
-    private boolean doSubjectGroupAuthorization(Principal principal, List roles)
-    {
+    private boolean doSubjectGroupAuthorization(Principal principal, List roles) {
         boolean authorized = false;
 
         Subject subject = null;
-        if (principal instanceof SubjectPrincipal)
-        {
-            subject = ((SubjectPrincipal)principal).getSubject();
-        }
-        else
-        {
+        if (principal instanceof SubjectPrincipal) {
+            subject = ((SubjectPrincipal) principal).getSubject();
+        } else {
             subject = Security.getCurrentSubject();
         }
-        if (subject == null)
-        {
+        if (subject == null) {
             return false;
         }
         Iterator iter = roles.iterator();
-        while (iter.hasNext())
-        {
-            String role = (String)iter.next();
-            if (SubjectUtils.isUserInGroup(subject, role))
-            {
+        while (iter.hasNext()) {
+            String role = (String) iter.next();
+            if (SubjectUtils.isUserInGroup(subject, role)) {
                 authorized = true;
                 break;
             }
@@ -148,12 +130,13 @@
         return authorized;
     }
 
-    /** {@inheritDoc} */
-    public boolean doAuthorization(Principal principal, List roles)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean doAuthorization(Principal principal, List roles) {
         if (principal == null)
             return false; // Avoid NPEs.
-        
+
         //NOTE: I believe that both HttpServletRequest.isUserInRole and
         //SubjectUtils.isUserInGroup returns if the user is in a Weblogic Group,
         //not necessarily the Weblogic role construct
@@ -164,73 +147,64 @@
         // endpoints require the alternate code path and they don't populate the response
         // in FlexContext.
         HttpServletResponse response = FlexContext.getHttpResponse();
-        if (response != null)
-        {
+        if (response != null) {
             HttpServletRequest request = FlexContext.getHttpRequest();
-            
+
             // This will attempt to authorize the user against roles configured
             // in web.xml and weblogic.xml.
             authorized = doAuthorization(principal, roles, request);
 
             // We also want to support roles defined via the WL console
             // attempt this authorization here
-            if (!authorized)
-            {
+            if (!authorized) {
                 authorized = doSubjectGroupAuthorization(principal, roles);
             }
-        }
-        else // Code path for NIO endpoints.
-        {            
+        } else // Code path for NIO endpoints.
+        {
             authorized = doSubjectGroupAuthorization(principal, roles);
         }
 
         return authorized;
     }
 
-    /** {@inheritDoc} */
-    public boolean logout(Principal principal)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean logout(Principal principal) {
         HttpServletResponse response = FlexContext.getHttpResponse();
-        if (response != null)
-        {
+        if (response != null) {
             // Destroy the Principal maintained by the app server.
             HttpServletRequest request = FlexContext.getHttpRequest();
             ServletAuthentication.logout(request);
         }
         // else, current non-servlet session will be automatically invalidated, destroying any active Principal.
-        
+
         return true;
     }
 
-    private class SubjectPrincipal implements Principal
-    {
+    private class SubjectPrincipal implements Principal {
         private Subject subject;
 
-        public SubjectPrincipal(Subject subject)
-        {
+        public SubjectPrincipal(Subject subject) {
             this.subject = subject;
         }
 
-        public String getName()
-        {
+        public String getName() {
             return SubjectUtils.getUserPrincipal(subject).getName();
         }
 
-        public Subject getSubject()
-        {
+        public Subject getSubject() {
             return subject;
         }
     }
-    
-    /** {@inheritDoc} */
-    public Principal convertPrincipal(Principal principal)
-    {
-        if (principal instanceof SubjectPrincipal)
-        {
+
+    /**
+     * {@inheritDoc}
+     */
+    public Principal convertPrincipal(Principal principal) {
+        if (principal instanceof SubjectPrincipal) {
             return principal;
-        }
-        else
-        {
+        } else {
             // We need to do the converting
             Subject subject = Security.getCurrentSubject();
             return new SubjectPrincipal(subject);
diff --git a/opt/websphere/pom.xml b/opt/websphere/pom.xml
index dcf7d48..01c7bea 100644
--- a/opt/websphere/pom.xml
+++ b/opt/websphere/pom.xml
@@ -23,7 +23,7 @@
     <parent>
         <groupId>org.apache.flex.blazeds</groupId>
         <artifactId>flex-messaging-opt</artifactId>
-        <version>4.7.0-SNAPSHOT</version>
+        <version>4.8.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>flex-messaging-opt-webpshere</artifactId>
diff --git a/opt/websphere/src/main/java/flex/management/WebSphereMBeanServerLocator.java b/opt/websphere/src/main/java/flex/management/WebSphereMBeanServerLocator.java
index 533f258..297ca42 100755
--- a/opt/websphere/src/main/java/flex/management/WebSphereMBeanServerLocator.java
+++ b/opt/websphere/src/main/java/flex/management/WebSphereMBeanServerLocator.java
@@ -28,25 +28,24 @@
  * Custom MBeanServerLocator for use with WebSphere.
  * This class locates a MBean server instance via WebSphere's administration APIs.
  */
-public class WebSphereMBeanServerLocator implements MBeanServerLocator
-{
+public class WebSphereMBeanServerLocator implements MBeanServerLocator {
     //--------------------------------------------------------------------------
     //
     // Private Static Variables
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Localized error constant.
      */
     private static final int FAILED_TO_LOCATE_MBEAN_SERVER = 10427;
-    
+
     //--------------------------------------------------------------------------
     //
     // Private Variables
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Reference to MBeanServer this locator found.
      */
@@ -57,24 +56,21 @@
     // Public Methods
     //
     //--------------------------------------------------------------------------
-    
-    /** {@inheritDoc} */
-    public synchronized MBeanServer getMBeanServer()
-    {
-        if (server == null)
-        {
+
+    /**
+     * {@inheritDoc}
+     */
+    public synchronized MBeanServer getMBeanServer() {
+        if (server == null) {
             Class adminServiceClass = ClassUtil.createClass("com.ibm.websphere.management.AdminServiceFactory");
-            try
-            {
+            try {
                 Method getMBeanFactoryMethod = adminServiceClass.getMethod("getMBeanFactory", new Class[0]);
                 Object mbeanFactory = getMBeanFactoryMethod.invoke(null, new Object[0]);
                 Method getMBeanServerMethod = mbeanFactory.getClass().getMethod("getMBeanServer", new Class[0]);
-                server = (MBeanServer)getMBeanServerMethod.invoke(mbeanFactory, new Object[0]); 
-            }
-            catch (Exception e)
-            {
+                server = (MBeanServer) getMBeanServerMethod.invoke(mbeanFactory, new Object[0]);
+            } catch (Exception e) {
                 ManagementException me = new ManagementException();
-                me.setMessage(FAILED_TO_LOCATE_MBEAN_SERVER, new Object[] {getClass().getName()});
+                me.setMessage(FAILED_TO_LOCATE_MBEAN_SERVER, new Object[]{getClass().getName()});
                 me.setRootCause(e);
                 throw me;
             }
diff --git a/opt/websphere/src/main/java/flex/messaging/security/WebSphereLoginCommand.java b/opt/websphere/src/main/java/flex/messaging/security/WebSphereLoginCommand.java
index cf02d26..f5442b4 100755
--- a/opt/websphere/src/main/java/flex/messaging/security/WebSphereLoginCommand.java
+++ b/opt/websphere/src/main/java/flex/messaging/security/WebSphereLoginCommand.java
@@ -88,27 +88,24 @@
  * user in the HttpServletRequest for http attempts due to the container
  * not providing a mechanism for access.
  */
-public class WebSphereLoginCommand extends AppServerLoginCommand implements PrincipalConverter
-{
+public class WebSphereLoginCommand extends AppServerLoginCommand implements PrincipalConverter {
 
-    /** {@inheritDoc} */
-    public Principal doAuthentication(String username, Object credentials)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Principal doAuthentication(String username, Object credentials) {
         Principal principal = null;
-        try
-        {
+        try {
             String password = extractPassword(credentials);
 
-            if (password != null)
-            {
+            if (password != null) {
                 ContextManager contextManager = ContextManagerFactory.getInstance();
 
                 Subject subject =
-                    contextManager.login(contextManager.getDefaultRealm(),
-                            username, password);
+                        contextManager.login(contextManager.getDefaultRealm(),
+                                username, password);
 
-                if (subject != null)
-                {
+                if (subject != null) {
                     //setting the caller subject really doesn't apply for long
                     //it appears to be removed later as each call to
                     //ContextManagerFactory.getInstance()
@@ -122,76 +119,65 @@
                     principal = new WSLCPrincipal(username, contextManager, subject);
                 }
             }
-        }
-        catch (WSLoginFailedException wsLoginFailedException)
-        {
-            if (Log.isDebug())
-            {
-                Log.getLogger(LogCategories.SECURITY).debug("WebSphereLoginCommand#doAuthentication() failed: " + wsLoginFailedException.toString(), wsLoginFailedException); 
+        } catch (WSLoginFailedException wsLoginFailedException) {
+            if (Log.isDebug()) {
+                Log.getLogger(LogCategories.SECURITY).debug("WebSphereLoginCommand#doAuthentication() failed: " + wsLoginFailedException.toString(), wsLoginFailedException);
             }
-        }
-        catch (WSSecurityException wsSecurityException)
-        {
-            if (Log.isDebug())
-            {
-                Log.getLogger(LogCategories.SECURITY).debug("WebSphereLoginCommand#doAuthentication() failed: " + wsSecurityException.toString(), wsSecurityException); 
+        } catch (WSSecurityException wsSecurityException) {
+            if (Log.isDebug()) {
+                Log.getLogger(LogCategories.SECURITY).debug("WebSphereLoginCommand#doAuthentication() failed: " + wsSecurityException.toString(), wsSecurityException);
             }
         }
 
-        if (Log.isDebug()  && principal != null)
-        {
+        if (Log.isDebug() && principal != null) {
             Log.getLogger(LogCategories.SECURITY).debug("WebSphereLoginCommand#doAuthentication(). Principal: " + principal + ", Principal class: " + principal.getClass().getName()
                     + ", Principal identity: " + System.identityHashCode(principal));
         }
-        
+
         return principal;
     }
 
-    /** {@inheritDoc} */
-    public boolean doAuthorization(Principal principal, List roles)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean doAuthorization(Principal principal, List roles) {
         //unfortunately we cannot seem to get the user stored
         //in the context so the request will never have the information
         //that we've assigned, therefore we have to do this
         //every time
-        
+
         if (principal == null)
             return false;
-        
+
         if (Log.isDebug())
             Log.getLogger(LogCategories.SECURITY).debug("WebSphereLoginCommand#doAuthorization(). Principal: " + principal + ", Principal class: " + principal.getClass().getName()
                     + ", Principal identity: " + System.identityHashCode(principal));
-        
+
         if (principal instanceof WSLCPrincipal) // This code path is hit if this login command handled authentication.
         {
-            ContextManager contextManager = ((WSLCPrincipal)principal).getContextManager();
+            ContextManager contextManager = ((WSLCPrincipal) principal).getContextManager();
             UserRegistry registry = contextManager.getRegistry(contextManager.getDefaultRealm());
-            
-            try
-            {
+
+            try {
                 List groups = new ArrayList(registry.getGroupsForUser(principal.getName()));
 
                 groups.retainAll(roles);
-               
+
                 // if authorization succeeds, set the user's Subject on this invocation context
                 // so that the rest of the Thread is executed in the context of the appropriate Subject
                 if (groups.size() > 0)
-                    ContextManagerFactory.getInstance().setCallerSubject(((WSLCPrincipal)principal).getSubject());
+                    ContextManagerFactory.getInstance().setCallerSubject(((WSLCPrincipal) principal).getSubject());
 
                 return groups.size() > 0;
+            } catch (Exception e) {
             }
-            catch (Exception e)
-            {
-            }            
-        }
-        else // This code path is hit if this login command didn't handle authentication.
+        } else // This code path is hit if this login command didn't handle authentication.
         {
             // The Principal was not null, meaning we have a WAS Principal in the current HttpServletRequest.
             // Use that for the authorization check.
             HttpServletRequest request = FlexContext.getHttpRequest();
-            for (Iterator iter = roles.iterator(); iter.hasNext(); )
-            {
-                if (request.isUserInRole((String)iter.next()))
+            for (Iterator iter = roles.iterator(); iter.hasNext(); ) {
+                if (request.isUserInRole((String) iter.next()))
                     return true;
             }
         }
@@ -199,75 +185,64 @@
         return false;
     }
 
-    /** {@inheritDoc} */
-    public boolean logout(Principal principal)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean logout(Principal principal) {
         //as long as credentials are nulled since we can't store
         //the authenticated user there's nothing to do
         return true;
     }
 
-    private class WSLCPrincipal implements Principal
-    {
+    private class WSLCPrincipal implements Principal {
         private String username;
         private ContextManager contextManager;
         private Subject subject;
 
-        public WSLCPrincipal(String username, ContextManager contextManager, Subject subject)
-        {
+        public WSLCPrincipal(String username, ContextManager contextManager, Subject subject) {
             this.username = username;
             this.contextManager = contextManager;
             this.subject = subject;
         }
 
-        public String getName()
-        {
+        public String getName() {
             return username;
         }
 
-        public ContextManager getContextManager()
-        {
+        public ContextManager getContextManager() {
             return contextManager;
         }
-        
-        public Subject getSubject()
-        {
+
+        public Subject getSubject() {
             return subject;
         }
     }
-    
-    /** {@inheritDoc} */
-    public Principal convertPrincipal(Principal principal)
-    {
-        if (principal instanceof WSLCPrincipal)
-        {
+
+    /**
+     * {@inheritDoc}
+     */
+    public Principal convertPrincipal(Principal principal) {
+        if (principal instanceof WSLCPrincipal) {
             // We are good
             return principal;
-        }
-        else
-        {
+        } else {
             // we need the converting
 
             ContextManager contextManager = ContextManagerFactory.getInstance();
 
             Subject subject = null;
-            try
-            {
+            try {
                 subject = contextManager.getCallerSubject();
+            } catch (WSSecurityException e) {
+
             }
-            catch (WSSecurityException e)
-            {
-                
-            }
-            
-            if (subject != null)
-            {
+
+            if (subject != null) {
                 return new WSLCPrincipal(principal.getName(), contextManager, subject);
-            }
-            else
+            } else
                 // Just return the old one
                 return principal;
-            
+
         }
     }
 }
diff --git a/opt/websphere/src/main/java/flex/messaging/util/concurrent/AsynchBeansWorkManagerExecutor.java b/opt/websphere/src/main/java/flex/messaging/util/concurrent/AsynchBeansWorkManagerExecutor.java
index a35c0e9..73858c2 100755
--- a/opt/websphere/src/main/java/flex/messaging/util/concurrent/AsynchBeansWorkManagerExecutor.java
+++ b/opt/websphere/src/main/java/flex/messaging/util/concurrent/AsynchBeansWorkManagerExecutor.java
@@ -31,170 +31,155 @@
 
 /**
  * Implements {@link Executor} by delegating command execution to a WAS asynchbeans <code>WorkManager</code>.
- * For more information on the asynchbeans API, refer to the WAS Javadoc for 
+ * For more information on the asynchbeans API, refer to the WAS Javadoc for
  * <a href="http://publib.boulder.ibm.com/infocenter/wasinfo/v5r0/index.jsp?topic=/com.ibm.wasee.doc/info/ee/javadoc/ee/com/ibm/websphere/asynchbeans/WorkManager.html">WorkManager</a>.
- *
- *
  */
-public class AsynchBeansWorkManagerExecutor implements Executor
-{
+public class AsynchBeansWorkManagerExecutor implements Executor {
     //--------------------------------------------------------------------------
     //
     // Constructor
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Constructs an <code>AsynchBeansWorkManagerExecutor</code> that will delegate command execution
      * to the specified <code>WorkManager</code> instance that is registered in JNDI.
-     * 
+     *
      * @param workManagerJNDIName The JNDI resource ref name for the <code>WorkManager</code>.
      * @see com.ibm.websphere.asynchbeans.WorkManager
-     */    
-    public AsynchBeansWorkManagerExecutor(String workManagerJNDIName)
-    {
-        try
-        {
+     */
+    public AsynchBeansWorkManagerExecutor(String workManagerJNDIName) {
+        try {
             InitialContext ic = new InitialContext();
-            workManager = (WorkManager)ic.lookup(workManagerJNDIName);
-        }
-        catch(NamingException ne)
-        {
+            workManager = (WorkManager) ic.lookup(workManagerJNDIName);
+        } catch (NamingException ne) {
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(13600, new Object[] {workManagerJNDIName});
+            ce.setMessage(13600, new Object[]{workManagerJNDIName});
             ce.setRootCause(ne);
             throw ce;
         }
-        
+
         workListener = new WorkListener() {
-            public void workAccepted(WorkEvent event) 
-            { 
-                /* No-op */                 
+            public void workAccepted(WorkEvent event) {
+                /* No-op */
             }
-            public void workCompleted(WorkEvent event) 
-            {
+
+            public void workCompleted(WorkEvent event) {
                 // This only needs to be handled if execution of the Runnable failed.
                 WorkException e = event.getException();
-                if (e != null)
-                {
+                if (e != null) {
                     if (Log.isDebug())
                         Log.getLogger(LogCategories.EXECUTOR).error("AsynchBeansWorkManager's WorkListener.workCompleted() callback invoked for failed execution.", e);
-                    
-                    handleFailedExecution(((WorkCommandWrapper)event.getWork()).command, e);
+
+                    handleFailedExecution(((WorkCommandWrapper) event.getWork()).command, e);
                 }
             }
-            public void workRejected(WorkEvent event) 
-            {
+
+            public void workRejected(WorkEvent event) {
                 WorkException e = event.getException();
                 if (Log.isDebug())
                     Log.getLogger(LogCategories.EXECUTOR).error("AsynchBeansWorkManager's WorkListener.workRejected() callback invoked. WorkException? " + e);
-                
-                handleFailedExecution(((WorkCommandWrapper)event.getWork()).command, e);
+
+                handleFailedExecution(((WorkCommandWrapper) event.getWork()).command, e);
             }
-            public void workStarted(WorkEvent event) 
-            { 
-                /* No-op */ 
+
+            public void workStarted(WorkEvent event) {
+                /* No-op */
             }
         };
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Variables
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Instance level lock for thread-safe state changes.
      */
     private final Object lock = new Object();
-    
+
     /**
      * Reference to the WorkManager instance configured in WAS that this executor instance delegates to.
      */
     private final WorkManager workManager;
-    
+
     /**
      * Listener that monitors scheduled work for errors and notifies the FailedExecutionHandler if one has been set.
      */
     private final WorkListener workListener;
-    
+
     //--------------------------------------------------------------------------
     //
     // Properties
     //
     //--------------------------------------------------------------------------
-    
+
     //----------------------------------
     //  failedExecutionHandler
     //----------------------------------
-    
+
     private FailedExecutionHandler failedExecutionHandler;
-    
-    /** {@inheritDoc} */
-    public FailedExecutionHandler getFailedExecutionHandler()
-    {
-        synchronized (lock)
-        {
-            return failedExecutionHandler;            
+
+    /**
+     * {@inheritDoc}
+     */
+    public FailedExecutionHandler getFailedExecutionHandler() {
+        synchronized (lock) {
+            return failedExecutionHandler;
         }
     }
-    
-    /** {@inheritDoc} */
-    public void setFailedExecutionHandler(FailedExecutionHandler value)
-    {
-        synchronized (lock)
-        {
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setFailedExecutionHandler(FailedExecutionHandler value) {
+        synchronized (lock) {
             failedExecutionHandler = value;
         }
-    }    
-    
+    }
+
     //--------------------------------------------------------------------------
     //
     // Public Methods
     //
     //--------------------------------------------------------------------------
-    
-    /** {@inheritDoc} */
-    public void execute(Runnable command)
-    {
-        try
-        {
+
+    /**
+     * {@inheritDoc}
+     */
+    public void execute(Runnable command) {
+        try {
             // Register our listener to monitor each scheduled work, and set the start timeout for the work to indefinite (no queue timeout).
             workManager.startWork(new WorkCommandWrapper(command), WorkManager.INDEFINITE, workListener);
-        }
-        catch (WorkException e)
-        {
+        } catch (WorkException e) {
             handleFailedExecution(command, e);
         }
-    } 
-    
+    }
+
     //--------------------------------------------------------------------------
     //
     // Private Methods
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Handles command execution problems by notifying the FailedExecutionHandler if one has been set
      * and otherwise logging the failure.
-     * 
+     *
      * @param command The command that failed to execute successfully.
-     * @param e The exception generated by the failed command.
+     * @param e       The exception generated by the failed command.
      */
-    private void handleFailedExecution(Runnable command, Exception e)
-    {
+    private void handleFailedExecution(Runnable command, Exception e) {
         FailedExecutionHandler handler = getFailedExecutionHandler();
-        if (handler != null)
-        {
+        if (handler != null) {
             handler.failedExecution(command, this, e);
-        }   
-        else if (Log.isError())
-        {
+        } else if (Log.isError()) {
             Log.getLogger(LogCategories.EXECUTOR).error("AsynchBeansWorkManager hit an Exception but no FailedExecutionHandler is registered to handle the error.", e);
         }
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Inner Classes
@@ -204,27 +189,23 @@
     /**
      * Helper class that wraps Runnable commands in the WAS Work interface.
      */
-    class WorkCommandWrapper implements Work
-    {
-        public WorkCommandWrapper(Runnable command)
-        {
+    class WorkCommandWrapper implements Work {
+        public WorkCommandWrapper(Runnable command) {
             this.command = command;
         }
-        
+
         private final Runnable command;
-        
-        public void run()
-        {
+
+        public void run() {
             command.run();
         }
-        
+
         /**
          * This is invoked by WAS when the server is shutting down to signal long-running daemon threads spawned by the WorkManager
-         * to exit from their run() method. Our works are all short lived so this is a no-op; in this case  WAS will force any 
+         * to exit from their run() method. Our works are all short lived so this is a no-op; in this case  WAS will force any
          * works that are executing at server shutdown to terminate.
          */
-        public void release()
-        {
+        public void release() {
             // No-op.
         }
     }
diff --git a/pom.xml b/pom.xml
index e294043..57fdcce 100755
--- a/pom.xml
+++ b/pom.xml
@@ -17,346 +17,395 @@
   limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
-  <modelVersion>4.0.0</modelVersion>
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache</groupId>
-    <artifactId>apache</artifactId>
-    <version>18</version>
-  </parent>
+    <parent>
+        <groupId>org.apache</groupId>
+        <artifactId>apache</artifactId>
+        <version>26</version>
+    </parent>
 
-  <groupId>org.apache.flex.blazeds</groupId>
-  <artifactId>blazeds</artifactId>
-  <version>4.7.3</version>
-  <packaging>pom</packaging>
+    <groupId>org.apache.flex.blazeds</groupId>
+    <artifactId>blazeds</artifactId>
+    <version>4.8.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
 
-  <name>Apache Flex - BlazeDS</name>
+    <name>Apache Flex - BlazeDS</name>
 
-  <properties>
-    <!-- URL of the ASF SonarQube server -->
-    <sonar.host.url>https://builds.apache.org/analysis</sonar.host.url>
-    <!-- Tell sonar where the coverage reports are located -->
-    <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco-ut.exec</sonar.jacoco.reportPath>
-    <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec</sonar.jacoco.itReportPath>
-    <!-- Exclude all generated code -->
-    <sonar.exclusions>file:**/generated-sources/**</sonar.exclusions>
-  </properties>
+    <properties>
+        <!-- URL of the ASF SonarQube server -->
+        <sonar.host.url>https://builds.apache.org/analysis</sonar.host.url>
+        <!-- Tell sonar where the coverage reports are located -->
+        <sonar.jacoco.reportPath>${project.build.directory}/coverage-reports/jacoco-ut.exec</sonar.jacoco.reportPath>
+        <sonar.jacoco.itReportPath>${project.build.directory}/coverage-reports/jacoco-it.exec
+        </sonar.jacoco.itReportPath>
+        <!-- Exclude all generated code -->
+        <sonar.exclusions>file:**/generated-sources/**</sonar.exclusions>
+    </properties>
 
-  <mailingLists>
-    <mailingList>
-      <name>Apache Flex Dev List</name>
-      <subscribe>dev-subscribe@flex.apache.org</subscribe>
-      <unsubscribe>dev-unsubscribe@flex.apache.org</unsubscribe>
-      <post>dev@flex.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/flex-dev/</archive>
-    </mailingList>
-    <mailingList>
-      <name>Apache Flex User List</name>
-      <subscribe>users-subscribe@flex.apache.org</subscribe>
-      <unsubscribe>users-unsubscribe@flex.apache.org</unsubscribe>
-      <post>users@flex.apache.org</post>
-      <archive>http://mail-archives.apache.org/mod_mbox/flex-users/</archive>
-    </mailingList>
-  </mailingLists>
+    <mailingLists>
+        <mailingList>
+            <name>Apache Flex Dev List</name>
+            <subscribe>dev-subscribe@flex.apache.org</subscribe>
+            <unsubscribe>dev-unsubscribe@flex.apache.org</unsubscribe>
+            <post>dev@flex.apache.org</post>
+            <archive>https://mail-archives.apache.org/mod_mbox/flex-dev/</archive>
+        </mailingList>
+        <mailingList>
+            <name>Apache Flex User List</name>
+            <subscribe>users-subscribe@flex.apache.org</subscribe>
+            <unsubscribe>users-unsubscribe@flex.apache.org</unsubscribe>
+            <post>users@flex.apache.org</post>
+            <archive>https://mail-archives.apache.org/mod_mbox/flex-users/</archive>
+        </mailingList>
+    </mailingLists>
 
-  <scm>
-    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/flex-blazeds.git</connection>
-    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/flex-blazeds.git</developerConnection>
-    <url>https://git-wip-us.apache.org/repos/asf/flex-blazeds.git</url>
-    <tag>blazeds-4.7.3</tag>
-  </scm>
+    <scm>
+        <connection>scm:git:https://git-wip-us.apache.org/repos/asf/flex-blazeds.git</connection>
+        <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/flex-blazeds.git</developerConnection>
+        <url>https://git-wip-us.apache.org/repos/asf/flex-blazeds.git</url>
+    </scm>
 
-  <modules>
-    <module>archetypes</module>
-    <module>common</module>
-    <module>core</module>
-    <module>proxy</module>
-    <module>remoting</module>
-    <module>opt</module>
-  </modules>
+    <modules>
+        <module>archetypes</module>
+        <module>common</module>
+        <module>core</module>
+        <module>proxy</module>
+        <module>remoting</module>
+        <module>opt</module>
+    </modules>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.jacoco</groupId>
-        <artifactId>jacoco-maven-plugin</artifactId>
-        <version>0.7.6.201602180812</version>
-        <executions>
-          <!--
-              Prepares the property pointing to the JaCoCo runtime agent which
-              is passed as VM argument when Maven the Surefire plugin is executed.
-          -->
-          <execution>
-            <id>pre-unit-test</id>
-            <goals>
-              <goal>prepare-agent</goal>
-            </goals>
-            <configuration>
-              <!-- Sets the path to the file which contains the execution data. -->
-              <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
-              <!--
-                  Sets the name of the property containing the settings
-                  for JaCoCo runtime agent.
-              -->
-              <propertyName>surefireArgLine</propertyName>
-            </configuration>
-          </execution>
-          <!--
-              Ensures that the code coverage report for unit tests is created after
-              unit tests have been run.
-          -->
-          <execution>
-            <id>post-unit-test</id>
-            <phase>test</phase>
-            <goals>
-              <goal>report</goal>
-            </goals>
-            <configuration>
-              <!-- Sets the path to the file which contains the execution data. -->
-              <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
-              <!-- Sets the output directory for the code coverage report. -->
-              <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
-            </configuration>
-          </execution>
-          <!--
-              Prepares the property pointing to the JaCoCo runtime agent which
-              is passed as VM argument when Maven the Failsafe plugin is executed.
-          -->
-          <execution>
-            <id>pre-integration-test</id>
-            <phase>pre-integration-test</phase>
-            <goals>
-              <goal>prepare-agent</goal>
-            </goals>
-            <configuration>
-              <!-- Sets the path to the file which contains the execution data. -->
-              <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
-              <!--
-                  Sets the name of the property containing the settings
-                  for JaCoCo runtime agent.
-              -->
-              <propertyName>failsafeArgLine</propertyName>
-            </configuration>
-          </execution>
-          <!--
-              Ensures that the code coverage report for integration tests after
-              integration tests have been run.
-          -->
-          <execution>
-            <id>post-integration-test</id>
-            <phase>post-integration-test</phase>
-            <goals>
-              <goal>report</goal>
-            </goals>
-            <configuration>
-              <!-- Sets the path to the file which contains the execution data. -->
-              <dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
-              <!-- Sets the output directory for the code coverage report. -->
-              <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <includes>
-            <include>**/*Tests.java</include>
-            <include>**/*Test.java</include>
-          </includes>
-        </configuration>
-      </plugin>
-
-      <!-- Disabled the Integration Tests as these seem to hang on the CI server -->
-      <!--plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>integration-test</goal>
-              <goal>verify</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin-->
-
-      <!-- Turned off till the JavaDoc tags are all correctly set -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-
-      <!-- Plugin to detect problems with JDK incompatabilities -->
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>animal-sniffer-maven-plugin</artifactId>
-        <version>1.15</version>
-        <executions>
-          <execution>
-            <id>check-jdk-1.6</id>
-            <phase>test</phase>
-            <goals>
-              <goal>check</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <signature>
-            <groupId>org.codehaus.mojo.signature</groupId>
-            <artifactId>java16</artifactId>
-            <version>1.1</version>
-          </signature>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.sonarsource.scanner.maven</groupId>
-        <artifactId>sonar-maven-plugin</artifactId>
-        <version>3.0.2</version>
-      </plugin>
-    </plugins>
-  </build>
-
-  <reporting>
-    <plugins>
-
-      <!-- Generates a changelog report from GIT commits -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-changelog-plugin</artifactId>
-        <version>2.3</version>
-        <configuration>
-          <!-- Automatically link Jira issues -->
-          <issueLinkUrl>https://issues.apache.org/jira/browse/%ISSUE%</issueLinkUrl>
-        </configuration>
-      </plugin>
-
-      <!-- Generates a report with the details of the unit- and integrationtests -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-report-plugin</artifactId>
-        <version>2.19.1</version>
-      </plugin>
-
-      <!-- Generates a report with the test coverages -->
-      <plugin>
-        <groupId>org.jacoco</groupId>
-        <artifactId>jacoco-maven-plugin</artifactId>
-        <version>0.7.6.201602180812</version>
-      </plugin>
-
-      <!-- Generates a report with the SonarQube analysis reports -->
-      <plugin>
-        <groupId>org.codehaus.sonar-plugins</groupId>
-        <artifactId>maven-report</artifactId>
-        <version>0.1</version>
-      </plugin>
-
-      <!-- Generate the JavaDoc API documentation -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.10.4</version>
-      </plugin>
-    </plugins>
-  </reporting>
-
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>xalan</groupId>
-        <artifactId>xalan</artifactId>
-        <version>2.6.0</version>
-      </dependency>
-
-      <dependency>
-        <groupId>commons-httpclient</groupId>
-        <artifactId>commons-httpclient</artifactId>
-        <version>3.0.1</version>
-      </dependency>
-
-      <!-- Optionals -->
-
-      <dependency>
-        <groupId>org.apache.activemq</groupId>
-        <artifactId>activemq-core</artifactId>
-        <version>5.7.0</version>
-      </dependency>
-
-      <dependency>
-        <groupId>jgroups</groupId>
-        <artifactId>jgroups</artifactId>
-        <version>2.9.0.GA</version>
-      </dependency>
-
-      <dependency>
-        <groupId>javax.servlet</groupId>
-        <artifactId>servlet-api</artifactId>
-        <version>2.5</version>
-      </dependency>
-
-      <dependency>
-        <groupId>javax.jms</groupId>
-        <artifactId>javax.jms-api</artifactId>
-        <version>2.0.1</version>
-      </dependency>
-
-      <!-- Testing -->
-
-      <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <version>4.12</version>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
-  <!-- When building on the apache ci server, we want to get some source-release archives -->
-  <profiles>
-    <profile>
-      <id>flex-ci-build</id>
-
-      <build>
+    <build>
         <plugins>
-          <plugin>
-            <artifactId>maven-assembly-plugin</artifactId>
-            <version>2.5.1</version>
-            <executions>
-              <execution>
-                <id>assemble-sources-releases</id>
-                <phase>package</phase>
-                <goals>
-                  <goal>single</goal>
-                </goals>
-              </execution>
-            </executions>
-            <configuration>
-              <descriptors>
-                <descriptor>src/assembly/assemble-zip.xml</descriptor>
-                <descriptor>src/assembly/assemble-gz.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </plugin>
+            <!--
+              Check the referenced dependencies for known vulnerabilities
+              and fail the build if there are critical ones in our classpath
+            -->
+            <plugin>
+                <groupId>org.owasp</groupId>
+                <artifactId>dependency-check-maven</artifactId>
+                <version>7.1.0</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <!-- Fail the build on any CVE, which is not considered minor -->
+                    <failBuildOnCVSS>4</failBuildOnCVSS>
+                    <excludes>
+                        <!-- CVE-2015-1773 Affects Apache Flex < 4.10, but BlazeDS has nothing to do with the libraries of the Flex SDK -->
+                        <exclude>org.apache.flex.blazeds:flex-messaging-common</exclude>
+                        <exclude>org.apache.flex.blazeds:flex-messaging-core</exclude>
+                        <exclude>org.apache.flex.blazeds:flex-messaging-proxy</exclude>
+                        <exclude>org.apache.flex.blazeds:flex-messaging-remoting</exclude>
+                        <exclude>org.apache.flex.blazeds:blazeds-spring-boot-starter</exclude>
+                        <exclude>org.apache.flex.blazeds:flex-messaging-opt-tomcat-base</exclude>
+                        <!-- TODO: Excluding this dependency, for which there's CVEs reported as it requires refactoring quite a bit. However this should be addressed before the next release -->
+                        <exclude>commons-httpclient:commons-httpclient</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <version>0.14</version>
+                <executions>
+                    <execution>
+                        <id>license-check</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <useMavenDefaultExcludes>true</useMavenDefaultExcludes>
+                    <excludes>
+                        <!-- Ignore IntelliJ IDEA project files -->
+                        <exclude>**/*.iml</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>0.8.8</version>
+                <executions>
+                    <!--
+                        Prepares the property pointing to the JaCoCo runtime agent which
+                        is passed as VM argument when Maven the Surefire plugin is executed.
+                    -->
+                    <execution>
+                        <id>pre-unit-test</id>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                        <configuration>
+                            <!-- Sets the path to the file which contains the execution data. -->
+                            <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
+                            <!--
+                                Sets the name of the property containing the settings
+                                for JaCoCo runtime agent.
+                            -->
+                            <propertyName>surefireArgLine</propertyName>
+                        </configuration>
+                    </execution>
+                    <!--
+                        Ensures that the code coverage report for unit tests is created after
+                        unit tests have been run.
+                    -->
+                    <execution>
+                        <id>post-unit-test</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                        <configuration>
+                            <!-- Sets the path to the file which contains the execution data. -->
+                            <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
+                            <!-- Sets the output directory for the code coverage report. -->
+                            <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+                        </configuration>
+                    </execution>
+                    <!--
+                        Prepares the property pointing to the JaCoCo runtime agent which
+                        is passed as VM argument when Maven the Failsafe plugin is executed.
+                    -->
+                    <execution>
+                        <id>pre-integration-test</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>prepare-agent</goal>
+                        </goals>
+                        <configuration>
+                            <!-- Sets the path to the file which contains the execution data. -->
+                            <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
+                            <!--
+                                Sets the name of the property containing the settings
+                                for JaCoCo runtime agent.
+                            -->
+                            <propertyName>failsafeArgLine</propertyName>
+                        </configuration>
+                    </execution>
+                    <!--
+                        Ensures that the code coverage report for integration tests after
+                        integration tests have been run.
+                    -->
+                    <execution>
+                        <id>post-integration-test</id>
+                        <phase>post-integration-test</phase>
+                        <goals>
+                            <goal>report</goal>
+                        </goals>
+                        <configuration>
+                            <!-- Sets the path to the file which contains the execution data. -->
+                            <dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
+                            <!-- Sets the output directory for the code coverage report. -->
+                            <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <includes>
+                        <include>**/*Tests.java</include>
+                        <include>**/*Test.java</include>
+                    </includes>
+                </configuration>
+            </plugin>
+
+            <!-- Disabled the Integration Tests as these seem to hang on the CI server -->
+            <!--plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-failsafe-plugin</artifactId>
+              <executions>
+                <execution>
+                  <goals>
+                    <goal>integration-test</goal>
+                    <goal>verify</goal>
+                  </goals>
+                </execution>
+              </executions>
+            </plugin-->
+
+            <!-- Turned off till the JavaDoc tags are all correctly set -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+
+            <!-- Plugin to detect problems with JDK incompatibilities -->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>animal-sniffer-maven-plugin</artifactId>
+                <version>1.21</version>
+                <executions>
+                    <execution>
+                        <id>check-jdk-1.8</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <signature>
+                        <groupId>org.codehaus.mojo.signature</groupId>
+                        <artifactId>java18</artifactId>
+                        <version>1.0</version>
+                    </signature>
+                </configuration>
+            </plugin>
         </plugins>
-      </build>
-    </profile>
-  </profiles>
+    </build>
+
+    <reporting>
+        <plugins>
+
+            <!-- Generates a changelog report from GIT commits -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-changelog-plugin</artifactId>
+                <version>2.3</version>
+                <configuration>
+                    <!-- Automatically link Jira issues -->
+                    <issueLinkUrl>https://issues.apache.org/jira/browse/%ISSUE%</issueLinkUrl>
+                </configuration>
+            </plugin>
+
+            <!-- Generates a report with the details of the unit- and integrationtests -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-report-plugin</artifactId>
+                <version>2.22.2</version>
+            </plugin>
+
+            <!-- Generates a report with the test coverages -->
+            <plugin>
+                <groupId>org.jacoco</groupId>
+                <artifactId>jacoco-maven-plugin</artifactId>
+                <version>0.8.8</version>
+            </plugin>
+
+            <!-- Generate the JavaDoc API documentation -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>3.4.0</version>
+            </plugin>
+        </plugins>
+    </reporting>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>xalan</groupId>
+                <artifactId>xalan</artifactId>
+                <version>2.7.2</version>
+            </dependency>
+
+            <!-- TODO: This is the latest version of commons-httpclient, however there are CVEs reported for this, the replacement is org.apache.httpcomponents:httpclient however changing to this requires quite some refactoring of the code -->
+            <dependency>
+                <groupId>commons-httpclient</groupId>
+                <artifactId>commons-httpclient</artifactId>
+                <version>3.1</version>
+            </dependency>
+            <!--dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpclient</artifactId>
+                <version>4.5.13</version>
+            </dependency-->
+
+            <dependency>
+                <groupId>commons-codec</groupId>
+                <artifactId>commons-codec</artifactId>
+                <version>1.15</version>
+            </dependency>
+
+            <!-- Optionals -->
+
+            <dependency>
+                <groupId>org.jgroups</groupId>
+                <artifactId>jgroups</artifactId>
+                <version>4.2.21.Final</version>
+            </dependency>
+
+            <dependency>
+                <groupId>javax.servlet</groupId>
+                <artifactId>servlet-api</artifactId>
+                <version>2.5</version>
+            </dependency>
+
+            <dependency>
+                <groupId>javax.jms</groupId>
+                <artifactId>javax.jms-api</artifactId>
+                <version>2.0.1</version>
+            </dependency>
+
+            <!-- Testing -->
+
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>4.13.1</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <!-- When building on the apache ci server, we want to get some source-release archives -->
+    <profiles>
+        <profile>
+            <id>flex-ci-build</id>
+
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <version>3.3.0</version>
+                        <executions>
+                            <execution>
+                                <id>assemble-sources-releases</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/assembly/assemble-zip.xml</descriptor>
+                                <descriptor>src/assembly/assemble-gz.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 
 </project>
diff --git a/proxy/build.xml b/proxy/build.xml
index 633c24c..a31ecb9 100755
--- a/proxy/build.xml
+++ b/proxy/build.xml
@@ -34,7 +34,8 @@
         <fileset dir="${lib.dir}" erroronmissingdir="false" includes="flex-messaging-common.jar"/>
         <fileset dir="${lib.dir}" erroronmissingdir="false" includes="flex-messaging-core.jar"/>
         <fileset dir="${servlet.dir}" erroronmissingdir="false" includes="servlet-api-${servlet.version}.jar"/>
-        <fileset dir="${httpclient.dir}" erroronmissingdir="false" includes="commons-httpclient-${httpclient.version}.jar"/>
+        <fileset dir="${httpclient.dir}" erroronmissingdir="false"
+                 includes="commons-httpclient-${httpclient.version}.jar"/>
     </path>
 
     <target name="main" depends="clean,prepare,run-depend,jar" description="cleans and runs the full build"/>
@@ -47,8 +48,8 @@
     <target name="run-depend" if="src.depend">
         <echo message="Removing class files that changed and dependent class files."/>
         <depend cache="${module.classes}" srcdir="${module.src}" destdir="${module.classes}"/>
-    </target>   
-                
+    </target>
+
     <target name="clean" description="clean">
         <delete file="${module.jar}" failonerror="false"/>
         <delete failonerror="false" includeEmptyDirs="true">
@@ -58,13 +59,13 @@
                 <exclude name=".dependency-info/**"/>
             </fileset>
         </delete>
-        <delete quiet="true" dir="${module.classes}" />
+        <delete quiet="true" dir="${module.classes}"/>
         <echo>modules/proxy clean</echo>
     </target>
 
     <target name="compile" depends="prepare" description="compile">
         <javac debug="${src.debug}" destdir="${module.classes}" srcdir="${module.src}"
-            includes="**/*.java" classpathref="classpath"/>
+               includes="**/*.java" classpathref="classpath"/>
         <echo file="${module.classes}/flex/messaging/version.properties" append="false">build=${build.number}</echo>
         <copy todir="${module.classes}/flex/messaging" overwrite="true">
             <fileset dir="${module.src}/flex/messaging" includes="*.properties"/>
@@ -79,8 +80,9 @@
             <exclude name=".dependency-info/**"/>
             <manifest>
                 <attribute name="Sealed" value="${manifest.sealed}"/>
-                <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Community Edition - Proxy Module"/>
-                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/> 
+                <attribute name="Implementation-Title"
+                           value="${manifest.Implementation-Title} - Community Edition - Proxy Module"/>
+                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
                 <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
             </manifest>
         </jar>
diff --git a/proxy/pom.xml b/proxy/pom.xml
index 3359571..a145748 100755
--- a/proxy/pom.xml
+++ b/proxy/pom.xml
@@ -16,40 +16,42 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>blazeds</artifactId>
-    <version>4.7.3</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>blazeds</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-proxy</artifactId>
+    <artifactId>flex-messaging-proxy</artifactId>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.flex.blazeds</groupId>
-      <artifactId>flex-messaging-core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
 
-    <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-    </dependency>
+        <!-- TODO: This should be updated to org.apache.httpcomponents:httpclient -->
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+        </dependency>
 
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
 
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
 </project>
diff --git a/proxy/src/main/java/flex/management/runtime/messaging/services/HTTPProxyServiceControl.java b/proxy/src/main/java/flex/management/runtime/messaging/services/HTTPProxyServiceControl.java
index a9ae977..6a08170 100755
--- a/proxy/src/main/java/flex/management/runtime/messaging/services/HTTPProxyServiceControl.java
+++ b/proxy/src/main/java/flex/management/runtime/messaging/services/HTTPProxyServiceControl.java
@@ -20,13 +20,11 @@
 import flex.messaging.services.HTTPProxyService;
 
 /**
- *
  * The <code>HTTPProxyServiceControl</code> class is the MBean implementation
  * for monitoring and managing a <code>HTTPProxyService</code> at runtime.
  */
 public class HTTPProxyServiceControl extends ServiceControl implements
-        HTTPProxyServiceControlMBean
-{
+        HTTPProxyServiceControlMBean {
     private static final String TYPE = "HTTPProxyService";
 
     /**
@@ -34,21 +32,19 @@
      * HTTP proxy service and parent MBean.
      *
      * @param service The <code>HTTPProxyService</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent  The parent MBean in the management hierarchy.
      */
-    public HTTPProxyServiceControl(HTTPProxyService service, BaseControl parent)
-    {
+    public HTTPProxyServiceControl(HTTPProxyService service, BaseControl parent) {
         super(service, parent);
     }
 
 
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getType()
      */
-    public String getType()
-    {
+    public String getType() {
         return TYPE;
     }
 }
diff --git a/proxy/src/main/java/flex/management/runtime/messaging/services/HTTPProxyServiceControlMBean.java b/proxy/src/main/java/flex/management/runtime/messaging/services/HTTPProxyServiceControlMBean.java
index 503ea13..351c7b2 100755
--- a/proxy/src/main/java/flex/management/runtime/messaging/services/HTTPProxyServiceControlMBean.java
+++ b/proxy/src/main/java/flex/management/runtime/messaging/services/HTTPProxyServiceControlMBean.java
@@ -19,7 +19,6 @@
 /**
  * Defines the runtime monitoring and management interface for managed HTTP proxy services.
  */
-public interface HTTPProxyServiceControlMBean extends ServiceControlMBean
-{
+public interface HTTPProxyServiceControlMBean extends ServiceControlMBean {
     // Empty
 }
\ No newline at end of file
diff --git a/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyAdapterControl.java b/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyAdapterControl.java
index c03b64c..f65d37b 100755
--- a/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyAdapterControl.java
+++ b/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyAdapterControl.java
@@ -21,35 +21,30 @@
 import flex.messaging.services.http.HTTPProxyAdapter;
 
 /**
- *
  * The <code>HTTPProxyAdapterControl</code> class is the MBean implemenation
  * for monitoring and managing <code>HTTPProxyAdapter</code>s at runtime.
  */
 public class HTTPProxyAdapterControl extends ServiceAdapterControl implements
-        HTTPProxyAdapterControlMBean
-{
+        HTTPProxyAdapterControlMBean {
     private static final String TYPE = "HTTPProxyAdapter";
-    
+
     /**
      * Constructs a <code>HTTPProxyAdapterControl</code>, assigning its id, managed
      * <code>HTTPProxyAdapter</code> and parent MBean.
-     * 
+     *
      * @param serviceAdapter The <code>HTTPProxyAdapter</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent         The parent MBean in the management hierarchy.
      */
-    public HTTPProxyAdapterControl(HTTPProxyAdapter serviceAdapter, BaseControl parent)
-    {
+    public HTTPProxyAdapterControl(HTTPProxyAdapter serviceAdapter, BaseControl parent) {
         super(serviceAdapter, parent);
     }
 
     /**
+     * (non-Javadoc)
      *
-     *
-     *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getType()
      */
-    public String getType()
-    {
+    public String getType() {
         return TYPE;
     }
 }
diff --git a/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyAdapterControlMBean.java b/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyAdapterControlMBean.java
index 7c59cc2..6d42688 100755
--- a/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyAdapterControlMBean.java
+++ b/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyAdapterControlMBean.java
@@ -23,7 +23,6 @@
  * proxy adapters.
  */
 public interface HTTPProxyAdapterControlMBean extends
-        ServiceAdapterControlMBean
-{
+        ServiceAdapterControlMBean {
     // Empty for now.
 }
diff --git a/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyDestinationControl.java b/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyDestinationControl.java
index 88b2baf..5f41d89 100755
--- a/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyDestinationControl.java
+++ b/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyDestinationControl.java
@@ -24,180 +24,161 @@
 import flex.messaging.services.http.HTTPProxyDestination;
 
 /**
- *
  * The <code>HTTPProxyDestinationControl</code> class is the MBean implementation for
  * monitoring and managing a <code>HTTPProxyDestination</code> at runtime.
  */
 public class HTTPProxyDestinationControl extends DestinationControl
-    implements HTTPProxyDestinationControlMBean
-{
+        implements HTTPProxyDestinationControlMBean {
     private static final String TYPE = "HTTPProxyDestination";
-    
+
     private int invokeSOAPCount = 0;
     private Date lastInvokeSOAPTimestamp;
     private long invokeSOAPStart;
     private int invokeHTTPCount = 0;
     private Date lastInvokeHTTPTimestamp;
     private long invokeHTTPStart;
-    
+
     /**
      * Constructs a new <code>HTTPProxyDestinationControl</code> instance.
-     * 
+     *
      * @param destination The <code>HTTPProxyDestination</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent      The parent MBean in the management hierarchy.
      */
-    public HTTPProxyDestinationControl(HTTPProxyDestination destination, BaseControl parent)
-    {
+    public HTTPProxyDestinationControl(HTTPProxyDestination destination, BaseControl parent) {
         super(destination, parent);
         invokeSOAPStart = System.currentTimeMillis();
         invokeHTTPStart = invokeSOAPStart;
     }
-    
-    /** {@inheritDoc} */
-    protected void onRegistrationComplete()
-    {
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void onRegistrationComplete() {
         super.onRegistrationComplete();
-        
+
         String name = this.getObjectName().getCanonicalName();
-        
-        String[] pollablePerInterval = { "InvokeHTTPCount", "InvokeSOAPCount" };
-        String[] pollableGeneral = { "InvokeHTTPFrequency", "InvokeSOAPFrequency" };
-        String[] destinationGeneral = { "LastInvokeHTTPTimestamp", "LastInvokeSOAPTimestamp" };
-        
+
+        String[] pollablePerInterval = {"InvokeHTTPCount", "InvokeSOAPCount"};
+        String[] pollableGeneral = {"InvokeHTTPFrequency", "InvokeSOAPFrequency"};
+        String[] destinationGeneral = {"LastInvokeHTTPTimestamp", "LastInvokeSOAPTimestamp"};
+
         getRegistrar().registerObjects(
-                new int[] {AdminConsoleTypes.DESTINATION_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL},
+                new int[]{AdminConsoleTypes.DESTINATION_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL},
                 name, pollablePerInterval);
         getRegistrar().registerObjects(AdminConsoleTypes.DESTINATION_POLLABLE, name,
                 pollableGeneral);
         getRegistrar().registerObjects(AdminConsoleTypes.DESTINATION_GENERAL, name,
                 destinationGeneral);
     }
-    
+
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.runtime.HTTPProxyServiceControlMBean#getInvokeSOAPCount()
      */
-    public Integer getInvokeSOAPCount()
-    {
+    public Integer getInvokeSOAPCount() {
         return new Integer(invokeSOAPCount);
     }
-    
+
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.runtime.HTTPProxyServiceControlMBean#resetInvokeSOAPCount()
      */
-    public void resetInvokeSOAPCount()
-    {
+    public void resetInvokeSOAPCount() {
         invokeSOAPStart = System.currentTimeMillis();
         invokeSOAPCount = 0;
         lastInvokeSOAPTimestamp = null;
     }
-    
+
     /**
      * Increments the count of Soap invocations.
      */
-    public void incrementInvokeSOAPCount()
-    {
+    public void incrementInvokeSOAPCount() {
         ++invokeSOAPCount;
         lastInvokeSOAPTimestamp = new Date();
     }
-    
+
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.runtime.HTTPProxyServiceControlMBean#getLastInvokeSOAPTimestamp()
      */
-    public Date getLastInvokeSOAPTimestamp()
-    {
+    public Date getLastInvokeSOAPTimestamp() {
         return lastInvokeSOAPTimestamp;
     }
-    
+
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.runtime.HTTPProxyServiceControlMBean#getInvokeSOAPFrequency()
      */
-    public Double getInvokeSOAPFrequency()
-    {
-        if (invokeSOAPCount > 0)
-        {
+    public Double getInvokeSOAPFrequency() {
+        if (invokeSOAPCount > 0) {
             double runtime = differenceInMinutes(invokeSOAPStart, System.currentTimeMillis());
-            return new Double(invokeSOAPCount/runtime);
-        }
-        else
-        {
+            return new Double(invokeSOAPCount / runtime);
+        } else {
             return new Double(0);
         }
     }
-    
+
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.runtime.HTTPProxyServiceControlMBean#getInvokeHTTPCount()
      */
-    public Integer getInvokeHTTPCount()
-    {
+    public Integer getInvokeHTTPCount() {
         return new Integer(invokeHTTPCount);
     }
-    
+
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.runtime.HTTPProxyServiceControlMBean#resetInvokeHTTPCount()
      */
-    public void resetInvokeHTTPCount()
-    {
+    public void resetInvokeHTTPCount() {
         invokeHTTPStart = System.currentTimeMillis();
         invokeHTTPCount = 0;
         lastInvokeHTTPTimestamp = null;
     }
-    
+
     /**
      * Increments the count of HTTP invocations.
      */
-    public void incrementInvokeHTTPCount()
-    {
+    public void incrementInvokeHTTPCount() {
         ++invokeHTTPCount;
         lastInvokeHTTPTimestamp = new Date();
     }
-    
+
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.runtime.HTTPProxyServiceControlMBean#getLastInvokeHTTPTimestamp()
      */
-    public Date getLastInvokeHTTPTimestamp()
-    {
+    public Date getLastInvokeHTTPTimestamp() {
         return lastInvokeHTTPTimestamp;
     }
 
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.runtime.HTTPProxyServiceControlMBean#getInvokeHTTPFrequency()
      */
-    public Double getInvokeHTTPFrequency()
-    {
-        if (invokeHTTPCount > 0)
-        {
+    public Double getInvokeHTTPFrequency() {
+        if (invokeHTTPCount > 0) {
             double runtime = differenceInMinutes(invokeHTTPStart, System.currentTimeMillis());
-            return new Double(invokeHTTPCount/runtime);
-        }
-        else
-        {
+            return new Double(invokeHTTPCount / runtime);
+        } else {
             return new Double(0);
         }
     }
-    
+
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getType()
      */
-    public String getType()
-    {
+    public String getType() {
         return TYPE;
     }
 }
diff --git a/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyDestinationControlMBean.java b/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyDestinationControlMBean.java
index fb94e23..0de0595 100755
--- a/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyDestinationControlMBean.java
+++ b/proxy/src/main/java/flex/management/runtime/messaging/services/http/HTTPProxyDestinationControlMBean.java
@@ -22,37 +22,35 @@
 import flex.management.runtime.messaging.DestinationControlMBean;
 
 /**
- *
  * Defines the runtime monitoring and management interface for managed
  * <code>HTTPProxyDestination</code>s.
  */
 public interface HTTPProxyDestinationControlMBean extends
-        DestinationControlMBean
-{
+        DestinationControlMBean {
     /**
      * Returns the number of SOAP invocations the HTTP proxy service has processed.
-     * 
+     *
      * @return The number of SOAP invocations the HTTP proxy service has processed.
      * @throws IOException Throws IOException.
      */
     Integer getInvokeSOAPCount() throws IOException;
-    
+
     /**
      * Resets the count of SOAP invocations.
      *
      * @throws IOException Throws IOException.
      */
     void resetInvokeSOAPCount() throws IOException;
-    
+
     /**
      * Returns the timestamp of the most recent SOAP invocation processed by the
      * HTTP proxy service.
-     * 
+     *
      * @return The timestamp for the most recent SOAP invocation.
      * @throws IOException Throws IOException.
      */
     Date getLastInvokeSOAPTimestamp() throws IOException;
-    
+
     /**
      * Returns the number of SOAP invocations per minute.
      *
@@ -60,31 +58,31 @@
      * @throws IOException Throws IOException.
      */
     Double getInvokeSOAPFrequency() throws IOException;
-    
+
     /**
      * Returns the number of HTTP invocations the HTTP proxy service has processed.
-     * 
+     *
      * @return The number of HTTP invocations the HTTP proxy service has processed.
      * @throws IOException Throws IOException.
      */
     Integer getInvokeHTTPCount() throws IOException;
-    
+
     /**
      * Resets the count of HTTP invocations.
      *
      * @throws IOException Throws IOException.
      */
     void resetInvokeHTTPCount() throws IOException;
-    
+
     /**
      * Returns the timestamp of the most recent HTTP invocation processed by the
      * HTTP proxy service.
-     * 
+     *
      * @return The timestamp for the most recent HTTP invocation.
      * @throws IOException Throws IOException.
      */
     Date getLastInvokeHTTPTimestamp() throws IOException;
-    
+
     /**
      * Returns the number of HTTP invocations per minute.
      *
diff --git a/proxy/src/main/java/flex/management/runtime/messaging/services/http/SOAPProxyAdapterControl.java b/proxy/src/main/java/flex/management/runtime/messaging/services/http/SOAPProxyAdapterControl.java
index f9f1f34..3535d7a 100755
--- a/proxy/src/main/java/flex/management/runtime/messaging/services/http/SOAPProxyAdapterControl.java
+++ b/proxy/src/main/java/flex/management/runtime/messaging/services/http/SOAPProxyAdapterControl.java
@@ -20,34 +20,30 @@
 import flex.messaging.services.http.SOAPProxyAdapter;
 
 /**
- *
  * The <code>SOAPProxyAdapterControl</code> class is the MBean implementation
  * for monitoring and managing <code>SOAPProxyAdapter</code>s at runtime.
  */
 public class SOAPProxyAdapterControl extends HTTPProxyAdapterControl implements
-        SOAPProxyAdapterControlMBean
-{
+        SOAPProxyAdapterControlMBean {
     private static final String TYPE = "SOAPProxyAdapter";
-    
+
     /**
      * Constructs a <code>SOAPProxyAdapterControl</code>, assigning its id, managed
      * <code>SOAPProxyAdapter</code> and parent MBean.
-     * 
+     *
      * @param serviceAdapter The <code>SOAPProxyAdapter</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent         The parent MBean in the management hierarchy.
      */
-    public SOAPProxyAdapterControl(SOAPProxyAdapter serviceAdapter, BaseControl parent)
-    {
+    public SOAPProxyAdapterControl(SOAPProxyAdapter serviceAdapter, BaseControl parent) {
         super(serviceAdapter, parent);
     }
 
     /**
+     * (non-Javadoc)
      *
-     *  (non-Javadoc)
      * @see flex.management.BaseControlMBean#getType()
      */
-    public String getType()
-    {
+    public String getType() {
         return TYPE;
     }
 }
diff --git a/proxy/src/main/java/flex/management/runtime/messaging/services/http/SOAPProxyAdapterControlMBean.java b/proxy/src/main/java/flex/management/runtime/messaging/services/http/SOAPProxyAdapterControlMBean.java
index e5eb985..da0152b 100755
--- a/proxy/src/main/java/flex/management/runtime/messaging/services/http/SOAPProxyAdapterControlMBean.java
+++ b/proxy/src/main/java/flex/management/runtime/messaging/services/http/SOAPProxyAdapterControlMBean.java
@@ -22,7 +22,6 @@
  * proxy adapters.
  */
 public interface SOAPProxyAdapterControlMBean extends
-        HTTPProxyAdapterControlMBean
-{
+        HTTPProxyAdapterControlMBean {
     // Empty for now.
 }
diff --git a/proxy/src/main/java/flex/messaging/services/HTTPProxyService.java b/proxy/src/main/java/flex/messaging/services/HTTPProxyService.java
index 249ab93..31d1e21 100755
--- a/proxy/src/main/java/flex/messaging/services/HTTPProxyService.java
+++ b/proxy/src/main/java/flex/messaging/services/HTTPProxyService.java
@@ -44,9 +44,10 @@
  *
  * @see flex.messaging.messages.HTTPMessage
  */
-public class HTTPProxyService extends AbstractService
-{
-    /** Log category for <code>HTTPProxyService</code>. */
+public class HTTPProxyService extends AbstractService {
+    /**
+     * Log category for <code>HTTPProxyService</code>.
+     */
     public static final String LOG_CATEGORY = LogCategories.SERVICE_HTTP;
 
     // Errors
@@ -65,8 +66,7 @@
     /**
      * Constructs an unmanaged <code>HTTPProxyService</code>.
      */
-    public HTTPProxyService()
-    {
+    public HTTPProxyService() {
         this(false);
     }
 
@@ -74,10 +74,9 @@
      * Constructs a <code>HTTPProxyService</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>HTTPProxyService</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public HTTPProxyService(boolean enableManagement)
-    {
+    public HTTPProxyService(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -97,8 +96,7 @@
      * @return The <code>Destination</code> instanced created.
      */
     @Override
-    public Destination createDestination(String id)
-    {
+    public Destination createDestination(String id) {
         HTTPProxyDestination destination = new HTTPProxyDestination();
         destination.setId(id);
         destination.setManaged(isManaged());
@@ -114,9 +112,8 @@
      * @param destination The <code>Destination</code> instance to be added.
      */
     @Override
-    public void addDestination(Destination destination)
-    {
-        HTTPProxyDestination proxyDestination = (HTTPProxyDestination)destination;
+    public void addDestination(Destination destination) {
+        HTTPProxyDestination proxyDestination = (HTTPProxyDestination) destination;
         super.addDestination(proxyDestination);
     }
 
@@ -134,31 +131,26 @@
      * @return The result of the service.
      */
     @Override
-    public Object serviceMessage(Message msg)
-    {
-        if (!(msg instanceof HTTPMessage))
-        {
+    public Object serviceMessage(Message msg) {
+        if (!(msg instanceof HTTPMessage)) {
             // The 'HTTPProxy' Service can only process messages of type 'HTTPMessage'.
             ServiceException e = new ServiceException();
             e.setMessage(UNKNOWN_MESSAGE_TYPE, new Object[]{"HTTPProxy", "HTTPMessage"});
             throw e;
         }
 
-        HTTPMessage message = (HTTPMessage)msg;
+        HTTPMessage message = (HTTPMessage) msg;
 
         String destination = message.getDestination();
-        HTTPProxyDestination dest = (HTTPProxyDestination)destinations.get(destination);
+        HTTPProxyDestination dest = (HTTPProxyDestination) destinations.get(destination);
 
         //use the remote settings if the message didn't specify them
         FlexRemoteCredentials remoteCredentials =
-            FlexContext.getFlexSession().getRemoteCredentials(getId(), destination);
-        if (remoteCredentials != null)
-        {
+                FlexContext.getFlexSession().getRemoteCredentials(getId(), destination);
+        if (remoteCredentials != null) {
             message.setRemoteUsername(remoteCredentials.getUsername());
-            message.setRemotePassword((String)remoteCredentials.getCredentials());
-        }
-        else if (dest.getRemoteUsername() != null && dest.getRemotePassword() != null)
-        {
+            message.setRemotePassword((String) remoteCredentials.getCredentials());
+        } else if (dest.getRemoteUsername() != null && dest.getRemotePassword() != null) {
             message.setRemoteUsername(dest.getRemoteUsername());
             message.setRemotePassword(dest.getRemotePassword());
         }
@@ -167,24 +159,20 @@
 
         Object result;
 
-        if (message instanceof SOAPMessage)
-        {
-            result = invokeSoap(adapter, (SOAPMessage)message, dest);
-        }
-        else
-        {
+        if (message instanceof SOAPMessage) {
+            result = invokeSoap(adapter, (SOAPMessage) message, dest);
+        } else {
             result = invokeHttp(adapter, message, dest);
         }
 
-        if (Log.isDebug())
-        {
+        if (Log.isDebug()) {
             String debugResult =
-                StringUtils.prettifyString(String.valueOf(result));
+                    StringUtils.prettifyString(String.valueOf(result));
             Log.getLogger(getLogCategory()).debug
-            ("HTTP request: " +
-                    message + StringUtils.NEWLINE +
-                    "  response: " + StringUtils.NEWLINE +
-                    debugResult + StringUtils.NEWLINE);
+                    ("HTTP request: " +
+                            message + StringUtils.NEWLINE +
+                            "  response: " + StringUtils.NEWLINE +
+                            debugResult + StringUtils.NEWLINE);
         }
 
         return result;
@@ -196,11 +184,9 @@
     //
     //--------------------------------------------------------------------------
 
-    protected Object invokeSoap(ServiceAdapter adapter, SOAPMessage message, HTTPProxyDestination destination)
-    {
-        if (isManaged())
-        {
-            HTTPProxyDestinationControl destinationControl = (HTTPProxyDestinationControl)destination.getControl();
+    protected Object invokeSoap(ServiceAdapter adapter, SOAPMessage message, HTTPProxyDestination destination) {
+        if (isManaged()) {
+            HTTPProxyDestinationControl destinationControl = (HTTPProxyDestinationControl) destination.getControl();
             if (destinationControl != null)
                 destinationControl.incrementInvokeSOAPCount();
         }
@@ -212,24 +198,19 @@
         String serverPort = null;
         String protocol = null;
         HttpServletRequest req = FlexContext.getHttpRequest();
-        if (req != null)
-        {
+        if (req != null) {
             contextPath = req.getContextPath();
             protocol = req.getScheme();
             serverName = req.getServerName();
             int port = req.getServerPort();
-            if (port != 0)
-            {
+            if (port != 0) {
                 serverPort = Integer.valueOf(req.getServerPort()).toString();
             }
         }
 
-        if (dynamicUrl != null && dynamicUrl.length() > 0)
-        {
+        if (dynamicUrl != null && dynamicUrl.length() > 0) {
             checkUrl(dynamicUrl, contextPath, destination, serverName, serverPort, protocol, message.getRemoteUsername() != null);
-        }
-        else
-        {
+        } else {
             //TODO: QUESTION: Pete Support default soap endpoints?
             //String url = settings.getParsedDefaultUrl(contextPath);
             //message.setUrl(url);
@@ -242,8 +223,7 @@
     }
 
     protected void checkUrl(String url, String contextPath, HTTPProxyDestination destination, String serverName,
-            String serverPort, String serverProtocol, boolean authSupplied)
-    {
+                            String serverPort, String serverProtocol, boolean authSupplied) {
         String originalUrl = url;
 
         String defaultUrl = destination.getParsedDefaultUrl(contextPath, serverName, serverPort, serverProtocol);
@@ -253,10 +233,8 @@
         //trying to trick us.  Ask them to do it another way if so.
 
         int i = url.indexOf("/..");
-        while (i != -1)
-        {
-            if (i == (url.length() - 3) || url.charAt(i + 3) == '/')
-            {
+        while (i != -1) {
+            if (i == (url.length() - 3) || url.charAt(i + 3) == '/') {
                 throw new ProxyException(DOT_DOT_NOT_ALLOWED);
             }
             i = url.indexOf("/..", i + 1);
@@ -274,13 +252,11 @@
         char[] urlChars = url.toCharArray();
 
         // Next, check that the URL matches a dynamic URL pattern
-        for (i = 0; i < dynamicUrls.size(); i++)
-        {
-            char[] pattern = (char[])dynamicUrls.get(i);
+        for (i = 0; i < dynamicUrls.size(); i++) {
+            char[] pattern = (char[]) dynamicUrls.get(i);
             boolean matches = StringUtils.findMatchWithWildcard(urlChars, pattern);
 
-            if (matches)
-            {
+            if (matches) {
                 if (!authSupplied || destination.allowsDynamicAuthentication())
                     return;
                 throw new ProxyException(MULTIPLE_DOMAIN_PORT);
@@ -289,7 +265,7 @@
 
         ProxyException exception = new ProxyException();
         exception.setMessage
-        (DYNAMIC_NOT_CONFIGURED, new Object[] {originalUrl, destination.getId()});
+                (DYNAMIC_NOT_CONFIGURED, new Object[]{originalUrl, destination.getId()});
         throw exception;
     }
 
@@ -299,16 +275,13 @@
      * @return The log category of the component.
      */
     @Override
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
-    protected Object invokeHttp(ServiceAdapter adapter, HTTPMessage message, HTTPProxyDestination destination)
-    {
-        if (isManaged())
-        {
-            HTTPProxyDestinationControl destinationControl = (HTTPProxyDestinationControl)destination.getControl();
+    protected Object invokeHttp(ServiceAdapter adapter, HTTPMessage message, HTTPProxyDestination destination) {
+        if (isManaged()) {
+            HTTPProxyDestinationControl destinationControl = (HTTPProxyDestinationControl) destination.getControl();
             if (destinationControl != null)
                 destinationControl.incrementInvokeHTTPCount();
         }
@@ -321,24 +294,19 @@
         String protocol = null;
         HttpServletRequest req = FlexContext.getHttpRequest();
 
-        if (req != null)
-        {
+        if (req != null) {
             contextPath = req.getContextPath();
             protocol = req.getScheme();
             serverName = req.getServerName();
             int port = req.getServerPort();
-            if (port != 0)
-            {
+            if (port != 0) {
                 serverPort = Integer.toString(req.getServerPort());
             }
         }
 
-        if (dynamicUrl != null && !"".equals(dynamicUrl))
-        {
+        if (dynamicUrl != null && !"".equals(dynamicUrl)) {
             checkUrl(dynamicUrl, contextPath, destination, serverName, serverPort, protocol, message.getRemoteUsername() != null);
-        }
-        else
-        {
+        } else {
             String url = destination.getParsedDefaultUrl(contextPath, serverName, serverPort, protocol);
             message.setUrl(url);
         }
@@ -353,8 +321,7 @@
      * @param broker The <code>MessageBroker</code> to pass to the <code>HTTPProxyServiceControl</code> constructor.
      */
     @Override
-    protected void setupServiceControl(MessageBroker broker)
-    {
+    protected void setupServiceControl(MessageBroker broker) {
         controller = new HTTPProxyServiceControl(this, broker.getControl());
         controller.register();
         setControl(controller);
diff --git a/proxy/src/main/java/flex/messaging/services/http/ExternalProxySettings.java b/proxy/src/main/java/flex/messaging/services/http/ExternalProxySettings.java
index 0d30fdf..ce6a852 100755
--- a/proxy/src/main/java/flex/messaging/services/http/ExternalProxySettings.java
+++ b/proxy/src/main/java/flex/messaging/services/http/ExternalProxySettings.java
@@ -19,8 +19,7 @@
 /**
  * External Proxy Settings for a proxy service.
  */
-public class ExternalProxySettings
-{
+public class ExternalProxySettings {
 
     public static final int DEFAULT_PROXY_PORT = 80;
 
@@ -34,7 +33,7 @@
 
     public static final String USERNAME = "username";
 
-    public static final String PASSWORD = "password";    
+    public static final String PASSWORD = "password";
     private static final String HTTP = "http://";
 
     private String proxyServer;
@@ -46,29 +45,25 @@
     /**
      * Creates a default <code>ExternalProxySettings</code> instance.
      */
-    public ExternalProxySettings()
-    {
+    public ExternalProxySettings() {
     }
 
     /**
      * Returns the <code>server</code> property.
-     * 
+     *
      * @return the property as a string
      */
-    public String getProxyServer()
-    {
+    public String getProxyServer() {
         return proxyServer;
     }
 
     /**
      * Sets the <code>server</code> property.
-     * 
+     *
      * @param s The IP or server name of the proxy server.
      */
-    public void setProxyServer(String s)
-    {
-        if (s != null)
-        {
+    public void setProxyServer(String s) {
+        if (s != null) {
             if (s.endsWith("/"))
                 s = s.substring(0, s.length() - 1);
 
@@ -76,8 +71,7 @@
             if (!hasProtocol && isDotNet())
                 s = HTTP + s;
 
-            if (!isDotNet() && hasProtocol)
-            {
+            if (!isDotNet() && hasProtocol) {
                 if (s.startsWith(HTTP))
                     s = s.substring(HTTP.length());
                 else
@@ -91,92 +85,82 @@
 
     /**
      * Returns the <code>port</code> property.
-     * 
+     *
      * @return the <code>port</code>
      */
-    public int getProxyPort()
-    {
+    public int getProxyPort() {
         return proxyPort;
     }
 
     /**
      * Sets the <code>port</code> property. Default is 80.
-     * 
+     *
      * @param p The port number.
      */
-    public void setProxyPort(int p)
-    {
-        if (p > 0)
-        {
+    public void setProxyPort(int p) {
+        if (p > 0) {
             proxyPort = p;
         }
     }
 
     /**
      * Returns the <code>username</code> property.
-     * 
+     *
      * @return the <code>username</code>
      */
-    public String getUsername()
-    {
+    public String getUsername() {
         return username;
     }
 
     /**
-     * Sets the <code>username</code> property. 
-     * 
+     * Sets the <code>username</code> property.
+     *
      * @param username The user name for logging into the proxy server.
      */
-    public void setUsername(String username)
-    {
+    public void setUsername(String username) {
         this.username = username;
     }
 
     /**
      * Returns the <code>password</code> property.
-     * 
+     *
      * @return the <code>password</code>
      */
-    public String getPassword()
-    {
+    public String getPassword() {
         return password;
     }
 
     /**
      * Sets the <code>password</code> property.
-     * 
+     *
      * @param password The password for loggin into the proxy server.
      */
-    public void setPassword(String password)
-    {
+    public void setPassword(String password) {
         this.password = password;
     }
 
     /**
      * Returns the <code>nt-domain</code> property.
-     * 
+     *
      * @return a string containing the <code>nt-domain</code>
      */
-    public String getNTDomain()
-    {
+    public String getNTDomain() {
         return ntDomain;
     }
 
     /**
      * Sets the <code>nt-domain</code> property.
-     * 
+     *
      * @param ntDomain The NT domain for the proxy server.
      */
-    public void setNTDomain(String ntDomain)
-    {
+    public void setNTDomain(String ntDomain) {
         this.ntDomain = ntDomain;
     }
 
     /**
      *
      */
-    public static boolean isDotNet()
-    {
+    public static boolean isDotNet() {
         return System.getProperty("flex.platform.CLR") != null;
     }
 }
diff --git a/proxy/src/main/java/flex/messaging/services/http/HTTPConnectionManagerSettings.java b/proxy/src/main/java/flex/messaging/services/http/HTTPConnectionManagerSettings.java
index 007f2e7..7149da9 100755
--- a/proxy/src/main/java/flex/messaging/services/http/HTTPConnectionManagerSettings.java
+++ b/proxy/src/main/java/flex/messaging/services/http/HTTPConnectionManagerSettings.java
@@ -24,48 +24,51 @@
  * Establishes the settings used to construct an Apache Commons HTTPClient
  * HttpConnectionManager for the Proxy Service.
  */
-public class HTTPConnectionManagerSettings 
-{    
+public class HTTPConnectionManagerSettings {
 
     public static final String COOKIE_POLICY = "cookie-policy";
 
 
     public static final String CONNECTION_MANAGER = "connection-manager";
-    
+
 
     public static final String CONNECTION_TIMEOUT = "connection-timeout";
-    
+
 
     public static final String DEFAULT_MAX_CONNECTIONS_PER_HOST = "default-max-connections-per-host";
-    
 
-    public static final String LINGER = "linger";    
-    
 
-    public static final String MAX_PER_HOST = "max-per-host";    
-    
+    public static final String LINGER = "linger";
+
+
+    public static final String MAX_PER_HOST = "max-per-host";
+
 
     public static final String MAX_TOTAL_CONNECTIONS = "max-total-connections";
-    
+
 
     public static final String RECEIVE_BUFFER_SIZE = "receive-buffer-size";
-    
+
 
     public static final String SEND_BUFFER_SIZE = "send-buffer-size";
-    
+
 
     public static final String SOCKET_TIMEOUT = "socket-timeout";
-    
+
 
     public static final String STALE_CHECKING_ENABLED = "stale-checking-enabled";
-    
+
 
     public static final String TCP_NO_DELAY = "tcp-no-delay";
 
-    /** The default maximum number of connections allowed per host. */
+    /**
+     * The default maximum number of connections allowed per host.
+     */
     public static final int DEFAULT_MAX_CONNECTIONS_HOST = 2;   // Per RFC 2616 sec 8.1.4
- 
-    /** The default maximum number of connections allowed overall. */
+
+    /**
+     * The default maximum number of connections allowed overall.
+     */
     public static final int DEFAULT_MAX_TOTAL_CONNECTIONS = 20;
 
     private String cookiePolicy;
@@ -83,8 +86,7 @@
     /**
      * Creates a default <code>HTTPConnectionManagerSettings</code> instance.
      */
-    public HTTPConnectionManagerSettings()
-    {
+    public HTTPConnectionManagerSettings() {
         cookiePolicy = CookiePolicy.DEFAULT;
         defaultMaxConnectionsPerHost = DEFAULT_MAX_CONNECTIONS_HOST;
         maxTotalConnections = DEFAULT_MAX_TOTAL_CONNECTIONS;
@@ -95,21 +97,19 @@
 
     /**
      * Returns the cookie policy.
-     * 
+     *
      * @return The cookie policy.
      */
-    public String getCookiePolicy()
-    {
+    public String getCookiePolicy() {
         return cookiePolicy;
     }
 
     /**
      * Sets the cookie policy.
-     * 
+     *
      * @param cookiePolicy The cookie policy.
      */
-    public void setCookiePolicy(String cookiePolicy)
-    {
+    public void setCookiePolicy(String cookiePolicy) {
         this.cookiePolicy = cookiePolicy;
     }
 
@@ -118,21 +118,19 @@
      * timeout.
      *
      * @return The number of milliseconds to wait until a connection is
-     * established. The default value is 0 which means a timeout is not used. 
+     * established. The default value is 0 which means a timeout is not used.
      */
-    public int getConnectionTimeout()
-    {
+    public int getConnectionTimeout() {
         return connectionTimeout;
     }
 
     /**
      * Sets the number of milliseconds to wait before a connection will
      * timeout.
-     * 
+     *
      * @param value - timeout in milliseconds
      */
-    public void setConnectionTimeout(int value)
-    {
+    public void setConnectionTimeout(int value) {
         connectionTimeout = value;
     }
 
@@ -142,62 +140,59 @@
      * @return The default maximum number of connections allowed per host.
      * The default is 2 as per RFC 2616 section 8.1.4.
      */
-    public int getDefaultMaxConnectionsPerHost()
-    {
+    public int getDefaultMaxConnectionsPerHost() {
         return defaultMaxConnectionsPerHost;
     }
 
     /**
      * Sets the default maximum number of connections allowed per host.
+     *
      * @param value - the maximum number of connections
      */
-    public void setDefaultMaxConnectionsPerHost(int value)
-    {
+    public void setDefaultMaxConnectionsPerHost(int value) {
         defaultMaxConnectionsPerHost = value;
     }
 
     /**
      * Returns linger-on-close timeout in seconds.
+     *
      * @return int - A value of <code>0</code> implies that the option is
      * disabled. A value of <code>-1</code> implies that the JRE default is
      * used.
      */
-    public int getLinger()
-    {
+    public int getLinger() {
         return linger;
     }
 
     /**
      * Sets the linger-on-close timeout (in seconds).
+     *
      * @param linger An int. Use <code>0</code> to disable. Use <code>-1</code>
-     * to rely on the JRE default. 
+     *               to rely on the JRE default.
      */
-    public void setLinger(int linger)
-    {
+    public void setLinger(int linger) {
         this.linger = linger;
     }
 
     /**
      * Returns a collection of HostConfigurationSettings which specify
      * connection options on a host-by-host basis.
-     * 
+     *
      * @return A List of HostConfigurationSettings.
      * @see flex.messaging.services.http.HostConfigurationSettings
      */
-    public List getMaxConnectionsPerHost()
-    {
+    public List getMaxConnectionsPerHost() {
         return maxConnectionsPerHost;
     }
 
     /**
      * Sets the list of HostConfigurationSettings specifying connection
      * options on a host-by-host basis.
-     * 
+     *
      * @param value The list of HostConfigurationSettings.
      * @see flex.messaging.services.http.HostConfigurationSettings
      */
-    public void setMaxConnectionsPerHost(List value)
-    {
+    public void setMaxConnectionsPerHost(List value) {
         maxConnectionsPerHost = value;
     }
 
@@ -206,17 +201,16 @@
      *
      * @return The maximum number of connections allowed.
      */
-    public int getMaxTotalConnections()
-    {
+    public int getMaxTotalConnections() {
         return maxTotalConnections;
     }
 
     /**
      * Sets the maximum number of connections allowed.
+     *
      * @param value - the maximum number of connections
      */
-    public void setMaxTotalConnections(int value)
-    {
+    public void setMaxTotalConnections(int value) {
         maxTotalConnections = value;
     }
 
@@ -226,18 +220,17 @@
      * @return The hint given to the kernel about the size of the underlying
      * buffers used by the platform for incoming network I/O.
      */
-    public int getReceiveBufferSize()
-    {
+    public int getReceiveBufferSize() {
         return receiveBufferSize;
     }
 
     /**
      * Sets a suggestion for kernel from the application about the size of
      * buffers to use for the data to be received over the socket.
+     *
      * @param value - the suggested receive buffer size
      */
-    public void setReceiveBufferSize(int value)
-    {
+    public void setReceiveBufferSize(int value) {
         receiveBufferSize = value;
     }
 
@@ -247,18 +240,17 @@
      * @return The hint given to the kernel about the size of the underlying
      * buffers used by the platform for outgoing network I/O.
      */
-    public int getSendBufferSize()
-    {
+    public int getSendBufferSize() {
         return sendBufferSize;
     }
 
     /**
      * Sets a suggestion for kernel from the application about the size of
      * buffers to use for the data to be sent over the socket.
+     *
      * @param sendBufferSize the suggested send buffer size
      */
-    public void setSendBufferSize(int sendBufferSize)
-    {
+    public void setSendBufferSize(int sendBufferSize) {
         this.sendBufferSize = sendBufferSize;
     }
 
@@ -268,17 +260,16 @@
      * @return The default socket timeout in milliseconds for waiting for data.
      * The default is 0 which is interpreted as an infinite timeout.
      */
-    public int getSocketTimeout()
-    {
+    public int getSocketTimeout() {
         return socketTimeout;
     }
 
     /**
      * Sets the socket timeout in milliseconds for waiting for data.
+     *
      * @param value - the timeout in milliseconds
      */
-    public void setSocketTimeout(int value)
-    {
+    public void setSocketTimeout(int value) {
         socketTimeout = value;
     }
 
@@ -288,8 +279,7 @@
      * @return Whether a check for stale connections is to be performed.
      * The default is true.
      */
-    public boolean isStaleCheckingEnabled()
-    {
+    public boolean isStaleCheckingEnabled() {
         return staleCheckingEnabled;
     }
 
@@ -298,11 +288,10 @@
      * Disabling the check may result in a slight performance improvement at
      * the risk of getting an I/O error when executing a request over a
      * connection that has been closed at the server side.
-
+     *
      * @param value - whether stale connection checking should be performed
      */
-    public void setStaleCheckingEnabled(boolean value)
-    {
+    public void setStaleCheckingEnabled(boolean value) {
         staleCheckingEnabled = value;
     }
 
@@ -311,22 +300,20 @@
      *
      * @return Determines whether Nagle's algorithm is to be used with this
      * connection. The default is true and Nagle's algorithm is NOT to be used
-     * (i.e. TCP_NODELAY is enabled).  
+     * (i.e. TCP_NODELAY is enabled).
      */
-    public boolean isTcpNoDelay()
-    {
+    public boolean isTcpNoDelay() {
         return tcpNoDelay;
     }
 
     /**
-     * Sets whether Nagle's algorithm should be used for this connection. If 
+     * Sets whether Nagle's algorithm should be used for this connection. If
      * set to true, Nagle's algorithm is to NOT be used (i.e. TCP_NODELAY
      * is enabled).
-     * 
+     *
      * @param value - whether Nagle's algorithm should be used
      */
-    public void setTcpNoDelay(boolean value)
-    {
+    public void setTcpNoDelay(boolean value) {
         tcpNoDelay = value;
     }
 }
diff --git a/proxy/src/main/java/flex/messaging/services/http/HTTPProxyAdapter.java b/proxy/src/main/java/flex/messaging/services/http/HTTPProxyAdapter.java
index d2a1b93..990cee0 100755
--- a/proxy/src/main/java/flex/messaging/services/http/HTTPProxyAdapter.java
+++ b/proxy/src/main/java/flex/messaging/services/http/HTTPProxyAdapter.java
@@ -57,8 +57,7 @@
 /**
  * Adapter class for proxy services.
  */
-public class HTTPProxyAdapter extends ServiceAdapter
-{
+public class HTTPProxyAdapter extends ServiceAdapter {
     // NOTE: any changes to this class should also be made to the corresponding version in the .NET.
     // The corresponding class is at src/dotNet/libs/FlexASPlib/Aspx/Proxy/ServiceProxyModule.cs
 
@@ -102,8 +101,7 @@
     /**
      * Constructs an unmanaged <code>HTTPProxyAdapter</code> instance.
      */
-    public HTTPProxyAdapter()
-    {
+    public HTTPProxyAdapter() {
         this(false);
     }
 
@@ -113,8 +111,7 @@
      * @param enableManagement <code>true</code> if the <code>HTTPProxyAdapter</code> has a
      *                         corresponding MBean control for management; otherwise <code>false</code>.
      */
-    public HTTPProxyAdapter(boolean enableManagement)
-    {
+    public HTTPProxyAdapter(boolean enableManagement) {
         super(enableManagement);
 
         createFilterChain();
@@ -174,8 +171,7 @@
      * @param id         The id of the destination.
      * @param properties Properties for the <code>Destination</code>.
      */
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
         if (properties == null || properties.size() == 0)
@@ -183,18 +179,15 @@
 
         // Connection Manager
         ConfigMap conn = properties.getPropertyAsMap(HTTPConnectionManagerSettings.CONNECTION_MANAGER, null);
-        if (conn != null)
-        {
+        if (conn != null) {
             // Cookie policy.
-            if (conn.getProperty(HTTPConnectionManagerSettings.COOKIE_POLICY) != null)
-            {
-                connectionManagerSettings.setCookiePolicy(conn.getPropertyAsString(HTTPConnectionManagerSettings.COOKIE_POLICY, 
+            if (conn.getProperty(HTTPConnectionManagerSettings.COOKIE_POLICY) != null) {
+                connectionManagerSettings.setCookiePolicy(conn.getPropertyAsString(HTTPConnectionManagerSettings.COOKIE_POLICY,
                         CookiePolicy.DEFAULT));
             }
 
             // Max Connections Total
-            if (conn.getProperty(HTTPConnectionManagerSettings.MAX_TOTAL_CONNECTIONS) != null)
-            {
+            if (conn.getProperty(HTTPConnectionManagerSettings.MAX_TOTAL_CONNECTIONS) != null) {
                 int maxTotal = conn.getPropertyAsInt(HTTPConnectionManagerSettings.MAX_TOTAL_CONNECTIONS,
                         MultiThreadedHttpConnectionManager.DEFAULT_MAX_TOTAL_CONNECTIONS);
                 connectionManagerSettings.setMaxTotalConnections(maxTotal);
@@ -202,113 +195,97 @@
 
             // Default Max Connections Per Host
             int defaultMaxConnsPerHost = MultiThreadedHttpConnectionManager.DEFAULT_MAX_HOST_CONNECTIONS;
-            if (conn.getProperty(HTTPConnectionManagerSettings.DEFAULT_MAX_CONNECTIONS_PER_HOST) != null)
-            {
+            if (conn.getProperty(HTTPConnectionManagerSettings.DEFAULT_MAX_CONNECTIONS_PER_HOST) != null) {
                 defaultMaxConnsPerHost = conn.getPropertyAsInt(HTTPConnectionManagerSettings.DEFAULT_MAX_CONNECTIONS_PER_HOST,
                         MultiThreadedHttpConnectionManager.DEFAULT_MAX_HOST_CONNECTIONS);
                 connectionManagerSettings.setDefaultMaxConnectionsPerHost(defaultMaxConnsPerHost);
             }
 
             // Connection Timeout
-            if (conn.getProperty(HTTPConnectionManagerSettings.CONNECTION_TIMEOUT) != null)
-            {
+            if (conn.getProperty(HTTPConnectionManagerSettings.CONNECTION_TIMEOUT) != null) {
                 int timeout = conn.getPropertyAsInt(HTTPConnectionManagerSettings.CONNECTION_TIMEOUT, 0);
                 if (timeout >= 0)
                     connectionManagerSettings.setConnectionTimeout(timeout);
             }
 
             // Socket Timeout
-            if (conn.getProperty(HTTPConnectionManagerSettings.SOCKET_TIMEOUT) != null)
-            {
+            if (conn.getProperty(HTTPConnectionManagerSettings.SOCKET_TIMEOUT) != null) {
                 int timeout = conn.getPropertyAsInt(HTTPConnectionManagerSettings.SOCKET_TIMEOUT, 0);
                 if (timeout >= 0)
                     connectionManagerSettings.setSocketTimeout(timeout);
             }
 
             // Stale Checking
-            if (conn.getProperty(HTTPConnectionManagerSettings.STALE_CHECKING_ENABLED) != null)
-            {
+            if (conn.getProperty(HTTPConnectionManagerSettings.STALE_CHECKING_ENABLED) != null) {
                 boolean staleCheck = conn.getPropertyAsBoolean(HTTPConnectionManagerSettings.STALE_CHECKING_ENABLED, true);
                 connectionManagerSettings.setStaleCheckingEnabled(staleCheck);
             }
 
             // Send Buffer Size
-            if (conn.getProperty(HTTPConnectionManagerSettings.SEND_BUFFER_SIZE) != null)
-            {
+            if (conn.getProperty(HTTPConnectionManagerSettings.SEND_BUFFER_SIZE) != null) {
                 int bufferSize = conn.getPropertyAsInt(HTTPConnectionManagerSettings.SEND_BUFFER_SIZE, 0);
                 if (bufferSize > 0)
                     connectionManagerSettings.setSendBufferSize(bufferSize);
             }
 
             // Send Receive Size
-            if (conn.getProperty(HTTPConnectionManagerSettings.RECEIVE_BUFFER_SIZE) != null)
-            {
+            if (conn.getProperty(HTTPConnectionManagerSettings.RECEIVE_BUFFER_SIZE) != null) {
                 int bufferSize = conn.getPropertyAsInt(HTTPConnectionManagerSettings.RECEIVE_BUFFER_SIZE, 0);
                 if (bufferSize > 0)
                     connectionManagerSettings.setReceiveBufferSize(bufferSize);
             }
 
             // TCP No Delay (Nagel's Algorithm)
-            if (conn.getProperty(HTTPConnectionManagerSettings.TCP_NO_DELAY) != null)
-            {
+            if (conn.getProperty(HTTPConnectionManagerSettings.TCP_NO_DELAY) != null) {
                 boolean noNagel = conn.getPropertyAsBoolean(HTTPConnectionManagerSettings.TCP_NO_DELAY, true);
                 connectionManagerSettings.setTcpNoDelay(noNagel);
             }
 
             // Linger
-            if (conn.getProperty(HTTPConnectionManagerSettings.LINGER) != null)
-            {
+            if (conn.getProperty(HTTPConnectionManagerSettings.LINGER) != null) {
                 int linger = conn.getPropertyAsInt(HTTPConnectionManagerSettings.LINGER, -1);
                 connectionManagerSettings.setLinger(linger);
             }
 
             // Max Connections Per Host
             List hosts = conn.getPropertyAsList(HTTPConnectionManagerSettings.MAX_PER_HOST, null);
-            if (hosts != null)
-            {
+            if (hosts != null) {
                 List hostSettings = new ArrayList();
                 Iterator it = hosts.iterator();
-                while (it.hasNext())
-                {
+                while (it.hasNext()) {
                     ConfigMap maxPerHost = (ConfigMap) it.next();
                     HostConfigurationSettings hostConfig = new HostConfigurationSettings();
 
                     // max-connections
-                    if (maxPerHost.getProperty(HostConfigurationSettings.MAX_CONNECTIONS) != null)
-                    {
+                    if (maxPerHost.getProperty(HostConfigurationSettings.MAX_CONNECTIONS) != null) {
                         int maxConn = maxPerHost.getPropertyAsInt(HostConfigurationSettings.MAX_CONNECTIONS,
                                 defaultMaxConnsPerHost);
                         hostConfig.setMaximumConnections(maxConn);
                     }
 
                     // host
-                    if (maxPerHost.getProperty(HostConfigurationSettings.HOST) != null)
-                    {
+                    if (maxPerHost.getProperty(HostConfigurationSettings.HOST) != null) {
                         String host = maxPerHost.getPropertyAsString(HostConfigurationSettings.HOST, null);
                         hostConfig.setHost(host);
-                        if (host != null)
-                        {
+                        if (host != null) {
                             // port
                             int port = maxPerHost.getPropertyAsInt(HostConfigurationSettings.PORT, 0);
                             hostConfig.setPort(port);
 
                             // protocol-factory
                             ConfigMap factoryMap = maxPerHost.getPropertyAsMap(HostConfigurationSettings.PROTOCOL_FACFORY, null);
-                            if (factoryMap != null)
-                            {
+                            if (factoryMap != null) {
                                 String className = factoryMap.getPropertyAsString(CLASS, null);
-                                if (className != null)
-                                {
+                                if (className != null) {
                                     Class factoryClass = ClassUtil.createClass(className);
-                                    ProtocolFactory protocolFactory = (ProtocolFactory)ClassUtil.createDefaultInstance(factoryClass, ProtocolFactory.class);
+                                    ProtocolFactory protocolFactory = (ProtocolFactory) ClassUtil.createDefaultInstance(factoryClass, ProtocolFactory.class);
                                     String factoryId = factoryMap.getPropertyAsString(ID, host + "_protocol_factory");
                                     ConfigMap protocolProperties = factoryMap.getPropertyAsMap(PROPERTIES, null);
                                     protocolFactory.initialize(factoryId, protocolProperties);
                                 }
                             }
                             // protocol
-                            else
-                            {
+                            else {
                                 String protocol = maxPerHost.getPropertyAsString(HostConfigurationSettings.PROTOCOL, null);
                                 hostConfig.setProtocol(protocol);
                             }
@@ -317,13 +294,11 @@
 
                     // proxy
                     ConfigMap proxy = maxPerHost.getPropertyAsMap(HostConfigurationSettings.PROXY, null);
-                    if (proxy != null)
-                    {
+                    if (proxy != null) {
                         // host
                         String proxyHost = proxy.getPropertyAsString(HostConfigurationSettings.HOST, null);
                         hostConfig.setProxyHost(proxyHost);
-                        if (proxyHost != null)
-                        {
+                        if (proxyHost != null) {
                             // port
                             int port = proxy.getPropertyAsInt(HostConfigurationSettings.PORT, 0);
                             hostConfig.setProxyPort(port);
@@ -331,15 +306,13 @@
                     }
 
                     // local-address
-                    if (maxPerHost.getProperty(HostConfigurationSettings.LOCAL_ADDRESS) != null)
-                    {
+                    if (maxPerHost.getProperty(HostConfigurationSettings.LOCAL_ADDRESS) != null) {
                         String localAddress = maxPerHost.getPropertyAsString(HostConfigurationSettings.LOCAL_ADDRESS, null);
                         hostConfig.setLocalAddress(localAddress);
                     }
 
                     // virtual-host
-                    if (maxPerHost.getProperty(HostConfigurationSettings.VIRTUAL_HOST) != null)
-                    {
+                    if (maxPerHost.getProperty(HostConfigurationSettings.VIRTUAL_HOST) != null) {
                         String virtualHost = maxPerHost.getPropertyAsString(HostConfigurationSettings.VIRTUAL_HOST, null);
                         hostConfig.setVirtualHost(virtualHost);
                     }
@@ -353,30 +326,26 @@
         }
 
         // Cookie Limit
-        if (properties.getProperty(COOKIE_LIMIT) != null)
-        {
+        if (properties.getProperty(COOKIE_LIMIT) != null) {
             int cl = properties.getPropertyAsInt(COOKIE_LIMIT, DEFAULT_COOKIE_LIMIT);
             setCookieLimit(cl);
         }
 
         // Allow Lax SSL
-        if (properties.getProperty(ALLOW_LAX_SSL) != null)
-        {
+        if (properties.getProperty(ALLOW_LAX_SSL) != null) {
             boolean lax = properties.getPropertyAsBoolean(ALLOW_LAX_SSL, false);
             setAllowLaxSSL(lax);
         }
 
         // Content Chunked
-        if (properties.getProperty(CONTENT_CHUNKED) != null)
-        {
+        if (properties.getProperty(CONTENT_CHUNKED) != null) {
             boolean ch = properties.getPropertyAsBoolean(CONTENT_CHUNKED, false);
             setContentChunked(ch);
         }
 
         // External Proxy
         ConfigMap extern = properties.getPropertyAsMap(ExternalProxySettings.EXTERNAL_PROXY, null);
-        if (extern != null)
-        {
+        if (extern != null) {
             ExternalProxySettings proxy = new ExternalProxySettings();
 
             String proxyServer = extern.getPropertyAsString(ExternalProxySettings.SERVER, null);
@@ -404,10 +373,9 @@
      * Returns <code>allow-lax-ssl</code> property.
      *
      * @return <code>true</code> if <code>allow-lax-ssl</code> property is
-     *         <code>true</code>; otherwise <code>false</code>.
+     * <code>true</code>; otherwise <code>false</code>.
      */
-    public boolean isAllowLaxSSL()
-    {
+    public boolean isAllowLaxSSL() {
         return allowLaxSSL;
     }
 
@@ -418,8 +386,7 @@
      *
      * @param allowLaxSSL Whether lax SSL should be allowed.
      */
-    public void setAllowLaxSSL(boolean allowLaxSSL)
-    {
+    public void setAllowLaxSSL(boolean allowLaxSSL) {
         this.allowLaxSSL = allowLaxSSL;
     }
 
@@ -427,10 +394,9 @@
      * Returns the <code>content-chunked</code> property.
      *
      * @return <code>true</code> if <code>content-chunked</code> property is
-     *         <code>true</code>; otherwise <code>false</code>.
+     * <code>true</code>; otherwise <code>false</code>.
      */
-    public boolean isContentChunked()
-    {
+    public boolean isContentChunked() {
         return contentChunked;
     }
 
@@ -439,8 +405,7 @@
      *
      * @param contentChunked The <code>content-chunked</code> property.
      */
-    public void setContentChunked(boolean contentChunked)
-    {
+    public void setContentChunked(boolean contentChunked) {
         this.contentChunked = contentChunked;
     }
 
@@ -449,8 +414,7 @@
      *
      * @return The <code>cookie-limit</code> property.
      */
-    public int getCookieLimit()
-    {
+    public int getCookieLimit() {
         return cookieLimit;
     }
 
@@ -459,18 +423,17 @@
      *
      * @param cookieLimit The cookie limit for the proxy.
      */
-    public void setCookieLimit(int cookieLimit)
-    {
+    public void setCookieLimit(int cookieLimit) {
         this.cookieLimit = cookieLimit;
     }
 
     /**
      * Casts the <code>Destination</code> into <code>HTTPProxyDestination</code>
      * and calls super.setDestination.
+     *
      * @param destination The HTTP proxy destination.
      */
-    public void setDestination(Destination destination)
-    {
+    public void setDestination(Destination destination) {
         Destination dest = (HTTPProxyDestination) destination;
         super.setDestination(dest);
     }
@@ -480,8 +443,7 @@
      *
      * @return the <code>ExternalProxySettings</code>
      */
-    public ExternalProxySettings getExternalProxySettings()
-    {
+    public ExternalProxySettings getExternalProxySettings() {
         return externalProxy;
     }
 
@@ -490,8 +452,7 @@
      *
      * @param externalProxy The external proxy settings.
      */
-    public void setExternalProxySettings(ExternalProxySettings externalProxy)
-    {
+    public void setExternalProxySettings(ExternalProxySettings externalProxy) {
         this.externalProxy = externalProxy;
         initExternalProxy(externalProxy);
     }
@@ -501,8 +462,7 @@
      *
      * @return the <code>HTTPConnectionManagerSettings</code>
      */
-    public HTTPConnectionManagerSettings getConnectionManagerSettings()
-    {
+    public HTTPConnectionManagerSettings getConnectionManagerSettings() {
         return connectionManagerSettings;
     }
 
@@ -511,8 +471,7 @@
      *
      * @param connectionManagerSettings The connection manager settings.
      */
-    public void setConnectionManagerSettings(HTTPConnectionManagerSettings connectionManagerSettings)
-    {
+    public void setConnectionManagerSettings(HTTPConnectionManagerSettings connectionManagerSettings) {
         this.connectionManagerSettings = connectionManagerSettings;
         initHttpConnectionManagerParams(connectionManagerSettings);
         connectionManager = new MultiThreadedHttpConnectionManager();
@@ -525,9 +484,10 @@
     //
     //--------------------------------------------------------------------------
 
-    /** {@inheritDoc} */
-    public Object invoke(Message msg)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Object invoke(Message msg) {
         HTTPMessage message = (HTTPMessage) msg;
 
         ProxyContext context = new ProxyContext();
@@ -542,8 +502,7 @@
 
         setupContext(context, message);
 
-        try
-        {
+        try {
             filterChain.invoke(context);
 
             //TODO: Do we want a return type that encapsulates the response data?
@@ -553,20 +512,15 @@
             ack.setBody(context.getResponse());
             ack.setHeader(Message.STATUS_CODE_HEADER, context.getStatusCode());
 
-            if (context.getRecordHeaders())
-            {
+            if (context.getRecordHeaders()) {
                 ack.setHeader(REQUEST_HEADERS, context.getRequestHeaders());
                 ack.setHeader(RESPONSE_HEADERS, context.getResponseHeaders());
             }
 
             return ack;
-        }
-        catch (MessageException ex)
-        {
+        } catch (MessageException ex) {
             throw ex;
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             // this should never happen- ErrorFilter should catch everything
             t.printStackTrace();
             throw new MessageException(t.toString());
@@ -579,8 +533,7 @@
     //
     //--------------------------------------------------------------------------
 
-    protected void setupContext(ProxyContext context, HTTPMessage message)
-    {
+    protected void setupContext(ProxyContext context, HTTPMessage message) {
         Target target = new Target();
         context.setTarget(target);
 
@@ -614,11 +567,10 @@
         target.setRemoteUsername(message.getRemoteUsername());
         target.setRemotePassword(message.getRemotePassword());
 
-        HTTPProxyDestination destination = (HTTPProxyDestination)getDestination();
+        HTTPProxyDestination destination = (HTTPProxyDestination) getDestination();
         target.setUseCustomAuthentication(destination.isUseCustomAuthentication());
 
-        if (destination.getProtocolFactory() != null)
-        {
+        if (destination.getProtocolFactory() != null) {
             ProtocolFactory protocolFactory = destination.getProtocolFactory();
             context.setProtocol(protocolFactory.getProtocol());
         }
@@ -630,8 +582,7 @@
      *
      * @param destination The <code>Destination</code> that manages this <code>HTTPProxyAdapter</code>.
      */
-    protected void setupAdapterControl(Destination destination)
-    {
+    protected void setupAdapterControl(Destination destination) {
         controller = new HTTPProxyAdapterControl(this, destination.getControl());
         controller.register();
         setControl(controller);
@@ -640,10 +591,8 @@
     /**
      * Create default filter chain or return current one if already present.
      */
-    private ProxyFilter createFilterChain()
-    {
-        if (filterChain == null)
-        {
+    private ProxyFilter createFilterChain() {
+        if (filterChain == null) {
             // catch-all error filter
             ErrorFilter errorFilter = new ErrorFilter();
             // check proxy access
@@ -668,40 +617,32 @@
         return filterChain;
     }
 
-    private void initExternalProxy(ExternalProxySettings ep)
-    {
-        if (externalProxy != null)
-        {
+    private void initExternalProxy(ExternalProxySettings ep) {
+        if (externalProxy != null) {
 
             String proxyServer = externalProxy.getProxyServer();
             String proxyUsername = externalProxy.getUsername();
 
-            if (proxyUsername != null)
-            {
+            if (proxyUsername != null) {
                 String proxyPassword = externalProxy.getPassword();
                 String proxyDomain = externalProxy.getNTDomain();
-                if (proxyDomain != null)
-                {
+                if (proxyDomain != null) {
                     proxyCredentials = new NTCredentials(proxyUsername, proxyPassword, proxyServer, proxyDomain);
-                }
-                else
-                {
+                } else {
                     proxyCredentials = new UsernamePasswordCredentials(proxyUsername, proxyPassword);
                 }
             }
         }
     }
 
-    private void initHttpConnectionManagerParams(HTTPConnectionManagerSettings settings)
-    {
+    private void initHttpConnectionManagerParams(HTTPConnectionManagerSettings settings) {
         connectionParams = new HttpConnectionManagerParams();
         connectionParams.setMaxTotalConnections(settings.getMaxTotalConnections());
         connectionParams.setDefaultMaxConnectionsPerHost(settings.getDefaultMaxConnectionsPerHost());
 
-        if (!settings.getCookiePolicy().equals(CookiePolicy.DEFAULT))
-        {
+        if (!settings.getCookiePolicy().equals(CookiePolicy.DEFAULT)) {
             HttpClientParams httpClientParams = (HttpClientParams) connectionParams.getDefaults();
-            httpClientParams.setCookiePolicy(settings.getCookiePolicy()); 
+            httpClientParams.setCookiePolicy(settings.getCookiePolicy());
         }
 
         if (settings.getConnectionTimeout() >= 0)
@@ -721,54 +662,42 @@
         connectionParams.setTcpNoDelay(settings.isTcpNoDelay());
         connectionParams.setLinger(settings.getLinger());
 
-        if (settings.getMaxConnectionsPerHost() != null)
-        {
+        if (settings.getMaxConnectionsPerHost() != null) {
             Iterator it = settings.getMaxConnectionsPerHost().iterator();
-            while (it.hasNext())
-            {
-                HostConfigurationSettings hcs = (HostConfigurationSettings)it.next();
+            while (it.hasNext()) {
+                HostConfigurationSettings hcs = (HostConfigurationSettings) it.next();
                 HostConfiguration hostConfig = new HostConfiguration();
 
-                if (hcs.getProtocol() != null)
-                {
+                if (hcs.getProtocol() != null) {
                     Protocol protocol = Protocol.getProtocol(hcs.getProtocol());
                     hostConfig.setHost(hcs.getHost(), hcs.getPort(), protocol);
-                }
-                else if (hcs.getProtocolFactory() != null)
-                {
+                } else if (hcs.getProtocolFactory() != null) {
                     Protocol protocol = hcs.getProtocolFactory().getProtocol();
                     if (hcs.getPort() > 0)
                         hostConfig.setHost(hcs.getHost(), hcs.getPort(), protocol);
                     else
                         hostConfig.setHost(hcs.getHost(), protocol.getDefaultPort(), protocol);
-                }
-                else
-                {
+                } else {
                     if (hcs.getPort() > 0)
                         hostConfig.setHost(hcs.getHost(), hcs.getPort());
                     else
                         hostConfig.setHost(hcs.getHost());
                 }
 
-                if (hcs.getVirtualHost() != null)
-                {
+                if (hcs.getVirtualHost() != null) {
                     HostParams params = hostConfig.getParams();
                     if (params != null)
                         params.setVirtualHost(hcs.getVirtualHost());
                 }
 
-                if (hcs.getProxyHost() != null)
-                {
+                if (hcs.getProxyHost() != null) {
                     hostConfig.setProxy(hcs.getProxyHost(), hcs.getProxyPort());
                 }
 
-                try
-                {
+                try {
                     InetAddress addr = InetAddress.getByName(hcs.getLocalAddress());
                     hostConfig.setLocalAddress(addr);
-                }
-                catch (UnknownHostException ex)
-                {
+                } catch (UnknownHostException ex) {
                 }
                 connectionParams.setMaxConnectionsPerHost(hostConfig, hcs.getMaximumConnections());
             }
diff --git a/proxy/src/main/java/flex/messaging/services/http/HTTPProxyDestination.java b/proxy/src/main/java/flex/messaging/services/http/HTTPProxyDestination.java
index 388d48e..103279d 100755
--- a/proxy/src/main/java/flex/messaging/services/http/HTTPProxyDestination.java
+++ b/proxy/src/main/java/flex/messaging/services/http/HTTPProxyDestination.java
@@ -35,11 +35,12 @@
 /**
  * Subclass of Destination which provides HTTP Proxy-specific destination functionality.
  */
-public class HTTPProxyDestination extends Destination
-{
+public class HTTPProxyDestination extends Destination {
     static final long serialVersionUID = -5749492520894791206L;
 
-    /** Log category for <code>HTTPProxyDestination</code>. **/
+    /**
+     * Log category for <code>HTTPProxyDestination</code>.
+     **/
     public static final String LOG_CATEGORY = LogCategories.SERVICE_HTTP;
 
     // ConfigMap keys from XML based services configuration.
@@ -79,8 +80,7 @@
     /**
      * Constructs an unmanaged <code>HTTPProxyDestination</code> instance.
      */
-    public HTTPProxyDestination()
-    {
+    public HTTPProxyDestination() {
         this(false);
     }
 
@@ -88,10 +88,9 @@
      * Constructs a <code>HTTPProxyDestination</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>HTTPProxyDestination</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public HTTPProxyDestination(boolean enableManagement)
-    {
+    public HTTPProxyDestination(boolean enableManagement) {
         super(enableManagement);
 
         dynamicUrls = new ArrayList();
@@ -124,11 +123,10 @@
      * &lt;/protocol-factory&gt;
      * </pre>
      *
-     * @param id The id of the destination.
+     * @param id         The id of the destination.
      * @param properties Properties for the <code>HTTPProxyDestination</code>.
      */
-    public void initialize(String id, ConfigMap properties)
-    {
+    public void initialize(String id, ConfigMap properties) {
         super.initialize(id, properties);
 
         if (properties == null || properties.size() == 0)
@@ -136,13 +134,11 @@
 
         // Custom protocol-factory
         ConfigMap factoryMap = properties.getPropertyAsMap(HostConfigurationSettings.PROTOCOL_FACFORY, null);
-        if (factoryMap != null)
-        {
+        if (factoryMap != null) {
             String className = factoryMap.getPropertyAsString(CLASS, null);
-            if (className != null)
-            {
+            if (className != null) {
                 Class factoryClass = ClassUtil.createClass(className);
-                protocolFactory = (ProtocolFactory)ClassUtil.createDefaultInstance(factoryClass, ProtocolFactory.class);
+                protocolFactory = (ProtocolFactory) ClassUtil.createDefaultInstance(factoryClass, ProtocolFactory.class);
                 String factoryId = factoryMap.getPropertyAsString(ID, getId() + "_protocol_factory");
                 ConfigMap protocolProperties = factoryMap.getPropertyAsMap(PROPERTIES, null);
                 protocolFactory.initialize(factoryId, protocolProperties);
@@ -152,25 +148,20 @@
         // Default URL or WSDL
         defaultUrl = properties.getPropertyAsString(URL, null);
 
-        if (defaultUrl == null)
-        {
+        if (defaultUrl == null) {
             defaultUrl = properties.getPropertyAsString(WSDL, null);
-        }
-        else
-        {
+        } else {
             properties.allowProperty(WSDL);
         }
 
         // Dynamic URL or SOAP Endpoint patterns
         List dynUrls = properties.getPropertyAsList(DYNAMIC_URL, null);
-        if (dynUrls != null)
-        {
+        if (dynUrls != null) {
             dynamicUrls.addAll(dynUrls);
         }
 
         List soapUrls = properties.getPropertyAsList(SOAP, new ArrayList());
-        if (soapUrls != null)
-        {
+        if (soapUrls != null) {
             dynamicUrls.addAll(soapUrls);
         }
 
@@ -191,8 +182,7 @@
      *
      * @return The <code>url</code> or <code>wsdl</code> property.
      */
-    public String getDefaultUrl()
-    {
+    public String getDefaultUrl() {
         return defaultUrl;
     }
 
@@ -201,8 +191,7 @@
      *
      * @param defaultUrl The <code>url</code> or <code>wsdl</code> property.
      */
-    public void setDefaultUrl(String defaultUrl)
-    {
+    public void setDefaultUrl(String defaultUrl) {
         this.defaultUrl = defaultUrl;
     }
 
@@ -213,8 +202,7 @@
      * @return The list of <code>dynamic-url</code> or <code>soap</code>
      * properties.
      */
-    public List getDynamicUrls()
-    {
+    public List getDynamicUrls() {
         return dynamicUrls;
     }
 
@@ -228,10 +216,8 @@
      *
      * @param dynamicUrl - A wildcard pattern used to match dynamic URLs
      */
-    public void addDynamicUrl(String dynamicUrl)
-    {
-        if (dynamicUrl != null)
-        {
+    public void addDynamicUrl(String dynamicUrl) {
+        if (dynamicUrl != null) {
             dynamicUrls.add(dynamicUrl);
             dynamicParsed = false;
 
@@ -257,10 +243,9 @@
      * to the existing list.
      *
      * @param dynamicUrls A list of <code>dynamic-url</code> or <code>soap</code>
-     * properties.
+     *                    properties.
      */
-    public void addDynamicUrls(List dynamicUrls)
-    {
+    public void addDynamicUrls(List dynamicUrls) {
         this.dynamicUrls.addAll(dynamicUrls);
         dynamicParsed = false;
     }
@@ -272,8 +257,7 @@
      *
      * @return The <code>protocol-factory</code> property.
      */
-    public ProtocolFactory getProtocolFactory()
-    {
+    public ProtocolFactory getProtocolFactory() {
         return protocolFactory;
     }
 
@@ -282,8 +266,7 @@
      *
      * @param protocolFactory The <code>protocol-factory</code> property.
      */
-    public void setProtocolFactory(ProtocolFactory protocolFactory)
-    {
+    public void setProtocolFactory(ProtocolFactory protocolFactory) {
         this.protocolFactory = protocolFactory;
     }
 
@@ -292,8 +275,7 @@
      *
      * @return The <code>remote-password</code> property.
      */
-    public String getRemotePassword()
-    {
+    public String getRemotePassword() {
         return remotePassword;
     }
 
@@ -302,8 +284,7 @@
      *
      * @param remotePassword The <code>remote-password</code> property.
      */
-    public void setRemotePassword(String remotePassword)
-    {
+    public void setRemotePassword(String remotePassword) {
         this.remotePassword = remotePassword;
     }
 
@@ -312,8 +293,7 @@
      *
      * @return The <code>remote-username</code> property.
      */
-    public String getRemoteUsername()
-    {
+    public String getRemoteUsername() {
         return remoteUsername;
     }
 
@@ -322,8 +302,7 @@
      *
      * @param remoteUsername The <code>remote-username</code> property.
      */
-    public void setRemoteUsername(String remoteUsername)
-    {
+    public void setRemoteUsername(String remoteUsername) {
         this.remoteUsername = remoteUsername;
     }
 
@@ -331,11 +310,10 @@
      * Casts the <code>Service</code> into <code>HTTPProxyService</code>
      * and calls super.setService.
      *
-     * @param service  The HTTP proxy service.
+     * @param service The HTTP proxy service.
      */
-    public void setService(Service service)
-    {
-        HTTPProxyService proxyService = (HTTPProxyService)service;
+    public void setService(Service service) {
+        HTTPProxyService proxyService = (HTTPProxyService) service;
         super.setService(proxyService);
     }
 
@@ -345,8 +323,7 @@
      * @return <code>true</code> if use-custom-auth is enabled;
      * otherwise <code>false</code>.
      */
-    public boolean isUseCustomAuthentication()
-    {
+    public boolean isUseCustomAuthentication() {
         return useCustomAuthentication;
     }
 
@@ -355,8 +332,7 @@
      *
      * @param useCustomAuthentication The <code>use-custom-auth</code> property.
      */
-    public void setUseCustomAuthentication(boolean useCustomAuthentication)
-    {
+    public void setUseCustomAuthentication(boolean useCustomAuthentication) {
         this.useCustomAuthentication = useCustomAuthentication;
     }
 
@@ -370,16 +346,14 @@
      * This method replaces the dynamic tokens of the default url with the specified
      * values and returns the resulting url.
      *
-     * @param contextPath The context path to be used in dynamic url replacement.
-     * @param serverName The server name to be used in dynamic url replacement.
-     * @param serverPort The server port to be used in dynamic url replacement.
+     * @param contextPath    The context path to be used in dynamic url replacement.
+     * @param serverName     The server name to be used in dynamic url replacement.
+     * @param serverPort     The server port to be used in dynamic url replacement.
      * @param serverProtocol The server protocol to be used in dynamic url replacement.
      * @return The fully parsed url where the dynamic tokens have been replaced.
      */
-    public String getParsedDefaultUrl(String contextPath, String serverName, String serverPort, String serverProtocol)
-    {
-        if (defaultUrl != null)
-        {
+    public String getParsedDefaultUrl(String contextPath, String serverName, String serverPort, String serverProtocol) {
+        if (defaultUrl != null) {
             parsedDefaultUrl = SettingsReplaceUtil.replaceAllTokensGivenServerName(defaultUrl, contextPath, serverName, serverPort, serverProtocol);
         }
 
@@ -393,18 +367,15 @@
      * @param contextPath The context path to be used in dynamic url replacement.
      * @return List List of fully parsed urls where the dynamic tokens have been replaced.
      */
-    public List getParsedDynamicUrls(String contextPath)
-    {
-        if (!dynamicParsed || parsedDynamicUrls == null)
-        {
+    public List getParsedDynamicUrls(String contextPath) {
+        if (!dynamicParsed || parsedDynamicUrls == null) {
             parseDynamicUrls(this, contextPath);
         }
 
         return parsedDynamicUrls;
     }
 
-    private static void parseDynamicUrls(HTTPProxyDestination dest, String contextPath)
-    {
+    private static void parseDynamicUrls(HTTPProxyDestination dest, String contextPath) {
         List dynamicUrls = dest.getDynamicUrls();
 
         dest.parsedDynamicUrls = new ArrayList();
@@ -414,37 +385,28 @@
         boolean computeAuth = true;
 
         Set parsedUrls = SettingsReplaceUtil.replaceAllTokensCalculateServerName(dynamicUrls, contextPath);
-        for (Iterator iter = parsedUrls.iterator(); iter.hasNext();)
-        {
-            String url = (String)iter.next();
+        for (Iterator iter = parsedUrls.iterator(); iter.hasNext(); ) {
+            String url = (String) iter.next();
             dest.parsedDynamicUrls.add(url.toCharArray());
-            if (computeAuth)
-            {
+            if (computeAuth) {
                 boolean fail = false;
-                try
-                {
+                try {
                     URL urlObj = new URL(url);
                     String host = urlObj.getHost();
-                    if (host.indexOf('*') > -1)
-                    {
+                    if (host.indexOf('*') > -1) {
                         fail = true;
-                    }
-                    else
-                    {
+                    } else {
                         String domainAndPort = host + ":" + urlObj.getPort();
                         if (lastDomainAndPort != null && !lastDomainAndPort.equalsIgnoreCase(domainAndPort))
                             fail = true;
                         lastDomainAndPort = domainAndPort;
                     }
-                }
-                catch (MalformedURLException e)
-                {
+                } catch (MalformedURLException e) {
                     //probably due to the port being *
                     fail = true;
                 }
 
-                if (fail)
-                {
+                if (fail) {
                     computeAuth = false;
                     dest.allowsDynamicAuthentication = false;
                 }
@@ -459,10 +421,8 @@
      *
      * @return Whether dynamic authentication is allowed.
      */
-    public boolean allowsDynamicAuthentication()
-    {
-        if (!dynamicParsed)
-        {
+    public boolean allowsDynamicAuthentication() {
+        if (!dynamicParsed) {
             //not using proxy exception because this is really a coding issue
             throw new RuntimeException("Cannot compute authentication if dynamic urls aren't parsed");
         }
@@ -480,8 +440,7 @@
      *
      * @return The log category of the component.
      */
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -491,8 +450,7 @@
      *
      * @param service The <code>Service</code> that manages this <code>HTTPProxyDestination</code>.
      */
-    protected void setupDestinationControl(Service service)
-    {
+    protected void setupDestinationControl(Service service) {
         controller = new HTTPProxyDestinationControl(this, service.getControl());
         controller.register();
         setControl(controller);
diff --git a/proxy/src/main/java/flex/messaging/services/http/HostConfigurationSettings.java b/proxy/src/main/java/flex/messaging/services/http/HostConfigurationSettings.java
index 15f12ef..2b6c14e 100755
--- a/proxy/src/main/java/flex/messaging/services/http/HostConfigurationSettings.java
+++ b/proxy/src/main/java/flex/messaging/services/http/HostConfigurationSettings.java
@@ -17,41 +17,39 @@
 package flex.messaging.services.http;
 
 /**
- *
  * Collects the properties needed to create an Apache Commons HTTPClient
  * HostConfiguration. Holds all of the variables needed to describe an HTTP
  * connection to a host: remote host, port and protocol, proxy host and port,
  * local address, and virtual host.
- *  
+ *
  * @see org.apache.commons.httpclient.HostConfiguration
  */
-public class HostConfigurationSettings
-{
+public class HostConfigurationSettings {
 
     public static final String HOST = "host";
-    
+
 
     public static final String PORT = "port";
-    
+
 
     public static final String PROTOCOL = "protocol";
-    
+
 
     public static final String PROTOCOL_FACFORY = "protocol-factory";
-    
+
 
     public static final String LOCAL_ADDRESS = "local-address";
-    
+
 
     public static final String MAX_CONNECTIONS = "max-connections";
-    
+
 
     public static final String PROXY = "proxy";
-    
+
 
     public static final String VIRTUAL_HOST = "virtual-host";
 
-    private String host;    
+    private String host;
     private int port;
     private String protocol;
     private ProtocolFactory protocolFactory;
@@ -64,8 +62,7 @@
     /**
      * Creates a default <code>HostConfigurationSettings</code> instance.
      */
-    public HostConfigurationSettings()
-    {
+    public HostConfigurationSettings() {
         maximumConnections = HTTPConnectionManagerSettings.DEFAULT_MAX_CONNECTIONS_HOST;
     }
 
@@ -74,8 +71,7 @@
      *
      * @return The host name for the connection.
      */
-    public String getHost()
-    {
+    public String getHost() {
         return host;
     }
 
@@ -84,18 +80,16 @@
      *
      * @param host The host name for the connection.
      */
-    public void setHost(String host)
-    {
+    public void setHost(String host) {
         this.host = host;
     }
 
     /**
-     * Returns the <code>local-address</code> property.     
+     * Returns the <code>local-address</code> property.
      *
      * @return The local address for the connection.
      */
-    public String getLocalAddress()
-    {
+    public String getLocalAddress() {
         return localAddress;
     }
 
@@ -104,8 +98,7 @@
      *
      * @param localAddress The local address for the connection.
      */
-    public void setLocalAddress(String localAddress)
-    {
+    public void setLocalAddress(String localAddress) {
         this.localAddress = localAddress;
     }
 
@@ -114,8 +107,7 @@
      *
      * @return The maximum connections.
      */
-    public int getMaximumConnections()
-    {
+    public int getMaximumConnections() {
         return maximumConnections;
     }
 
@@ -124,8 +116,7 @@
      *
      * @param maximumConnections The maximum connections.
      */
-    public void setMaximumConnections(int maximumConnections)
-    {
+    public void setMaximumConnections(int maximumConnections) {
         this.maximumConnections = maximumConnections;
     }
 
@@ -134,8 +125,7 @@
      *
      * @return The port for the connection.
      */
-    public int getPort()
-    {
+    public int getPort() {
         return port;
     }
 
@@ -144,8 +134,7 @@
      *
      * @param port The port for the connection.
      */
-    public void setPort(int port)
-    {
+    public void setPort(int port) {
         this.port = port;
     }
 
@@ -154,8 +143,7 @@
      *
      * @return The protocol for the connection.
      */
-    public String getProtocol()
-    {
+    public String getProtocol() {
         return protocol;
     }
 
@@ -164,8 +152,7 @@
      *
      * @param protocol The protocol for the connection.
      */
-    public void setProtocol(String protocol)
-    {
+    public void setProtocol(String protocol) {
         this.protocol = protocol;
     }
 
@@ -174,8 +161,7 @@
      *
      * @return The protocol factory for the connection.
      */
-    public ProtocolFactory getProtocolFactory()
-    {
+    public ProtocolFactory getProtocolFactory() {
         return protocolFactory;
     }
 
@@ -184,8 +170,7 @@
      *
      * @param protocolFactory The protocol factory for the connection.
      */
-    public void setProtocolFactory(ProtocolFactory protocolFactory)
-    {
+    public void setProtocolFactory(ProtocolFactory protocolFactory) {
         this.protocolFactory = protocolFactory;
     }
 
@@ -194,8 +179,7 @@
      *
      * @return The proxy host name for the connection.
      */
-    public String getProxyHost()
-    {
+    public String getProxyHost() {
         return proxyHost;
     }
 
@@ -203,19 +187,17 @@
      * Sets the proxy host name for the connection.
      *
      * @param proxyHost The proxy host name for the connection.
-     */     
-    public void setProxyHost(String proxyHost)
-    {
+     */
+    public void setProxyHost(String proxyHost) {
         this.proxyHost = proxyHost;
     }
 
     /**
      * Returns the proxy port for the connection.
      *
-     * @return The proxy port for the connection. 
+     * @return The proxy port for the connection.
      */
-    public int getProxyPort()
-    {
+    public int getProxyPort() {
         return proxyPort;
     }
 
@@ -224,8 +206,7 @@
      *
      * @param proxyPort The proxy port for the connection.
      */
-    public void setProxyPort(int proxyPort)
-    {
+    public void setProxyPort(int proxyPort) {
         this.proxyPort = proxyPort;
     }
 
@@ -234,8 +215,7 @@
      *
      * @return The virtual host for the connection.
      */
-    public String getVirtualHost()
-    {
+    public String getVirtualHost() {
         return virtualHost;
     }
 
@@ -244,8 +224,7 @@
      *
      * @param virtualHost The virtual host for the connection.
      */
-    public void setVirtualHost(String virtualHost)
-    {
+    public void setVirtualHost(String virtualHost) {
         this.virtualHost = virtualHost;
     }
 }
diff --git a/proxy/src/main/java/flex/messaging/services/http/ProtocolFactory.java b/proxy/src/main/java/flex/messaging/services/http/ProtocolFactory.java
index 3c27495..9da70b5 100755
--- a/proxy/src/main/java/flex/messaging/services/http/ProtocolFactory.java
+++ b/proxy/src/main/java/flex/messaging/services/http/ProtocolFactory.java
@@ -34,12 +34,11 @@
  * constructor.
  * </p>
  */
-public interface ProtocolFactory extends FlexConfigurable
-{
+public interface ProtocolFactory extends FlexConfigurable {
     /**
      * Returns a custom implementation of Apache Commons
      * HTTPClient's Protocol interface.
-     * 
+     *
      * @return An implementation of org.apache.commons.httpclient.protocol.Protocol.
      */
     Protocol getProtocol();
diff --git a/proxy/src/main/java/flex/messaging/services/http/SOAPProxyAdapter.java b/proxy/src/main/java/flex/messaging/services/http/SOAPProxyAdapter.java
index c4d5859..22b4cb6 100755
--- a/proxy/src/main/java/flex/messaging/services/http/SOAPProxyAdapter.java
+++ b/proxy/src/main/java/flex/messaging/services/http/SOAPProxyAdapter.java
@@ -28,86 +28,77 @@
  * A Soap specific subclass of HttpProxyAdapter to
  * allow for future web services features.
  */
-public class SOAPProxyAdapter extends HTTPProxyAdapter
-{
+public class SOAPProxyAdapter extends HTTPProxyAdapter {
     private SOAPProxyAdapterControl controller;
-    
+
     //--------------------------------------------------------------------------
     //
     // Constructor
     //
     //--------------------------------------------------------------------------
-    
+
     /**
      * Constructs an unmanaged <code>SOAPProxyAdapter</code> instance.
      */
-    public SOAPProxyAdapter()
-    {
+    public SOAPProxyAdapter() {
         this(false);
     }
-    
+
     /**
      * Constructs a <code>SOAPProxyAdapter</code> instance.
-     * 
+     *
      * @param enableManagement <code>true</code> if the <code>SOAPProxyAdapter</code> has a
-     * corresponding MBean control for management; otherwise <code>false</code>.
+     *                         corresponding MBean control for management; otherwise <code>false</code>.
      */
-    public SOAPProxyAdapter(boolean enableManagement)
-    {
+    public SOAPProxyAdapter(boolean enableManagement) {
         super(enableManagement);
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Other Public APIs
     //                 
     //-------------------------------------------------------------------------- 
 
-    /** {@inheritDoc} */    
-    public Object invoke(Message msg)
-    {
-        HTTPMessage message = (HTTPMessage)msg;
+    /**
+     * {@inheritDoc}
+     */
+    public Object invoke(Message msg) {
+        HTTPMessage message = (HTTPMessage) msg;
         ProxyContext context = new ProxyContext();
 
-        if (message instanceof SOAPMessage)
-        {
+        if (message instanceof SOAPMessage) {
             context.setSoapRequest(true);
         }
 
         setupContext(context, message);
 
-        try
-        {
+        try {
             filterChain.invoke(context);
             return context.getResponse();
-        }
-        catch (MessageException ex)
-        {
+        } catch (MessageException ex) {
             throw ex;
-        }
-        catch (Throwable t)
-        {
+        } catch (Throwable t) {
             // this should never happen- ErrorFilter should catch everything
             t.printStackTrace();
             throw new MessageException(t.toString());
         }
     }
-    
+
     //--------------------------------------------------------------------------
     //
     // Protected/private APIs
     //             
     //--------------------------------------------------------------------------
-    
+
     /**
      * Invoked automatically to allow the <code>SOAPProxyAdapter</code> to setup its corresponding
      * MBean control.
-     * 
+     *
      * @param broker The <code>Destination</code> that manages this <code>SOAPProxyAdapter</code>.
      */
-    protected void setupAdapterControl(Destination destination)
-    {
-        controller = new SOAPProxyAdapterControl(this, destination.getControl());        
+    protected void setupAdapterControl(Destination destination) {
+        controller = new SOAPProxyAdapterControl(this, destination.getControl());
         controller.register();
         setControl(controller);
     }
diff --git a/proxy/src/main/java/flex/messaging/services/http/httpclient/EasySSLProtocolSocketFactory.java b/proxy/src/main/java/flex/messaging/services/http/httpclient/EasySSLProtocolSocketFactory.java
index 4985ff0..6970a66 100755
--- a/proxy/src/main/java/flex/messaging/services/http/httpclient/EasySSLProtocolSocketFactory.java
+++ b/proxy/src/main/java/flex/messaging/services/http/httpclient/EasySSLProtocolSocketFactory.java
@@ -37,6 +37,7 @@
 
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManager;
+
 import org.apache.commons.httpclient.ConnectTimeoutException;
 import org.apache.commons.httpclient.HttpClientError;
 import org.apache.commons.httpclient.params.HttpConnectionParams;
@@ -51,7 +52,6 @@
 import flex.messaging.util.Trace;
 
 /**
- *
  * <p>
  * EasySSLProtocolSocketFactory can be used to creats SSL {@link Socket}s
  * that accept self-signed certificates.
@@ -95,48 +95,41 @@
  * for use without additional customization.
  * </p>
  */
-public class EasySSLProtocolSocketFactory implements SecureProtocolSocketFactory
-{
+public class EasySSLProtocolSocketFactory implements SecureProtocolSocketFactory {
     private SSLContext sslcontext = null;
 
     /**
      * Constructor for EasySSLProtocolSocketFactory.
      */
-    public EasySSLProtocolSocketFactory()
-    {
+    public EasySSLProtocolSocketFactory() {
         super();
     }
 
-    private static SSLContext createEasySSLContext()
-    {
-        try
-        {
+    private static SSLContext createEasySSLContext() {
+        try {
             SSLContext context = SSLContext.getInstance("SSL");
             context.init(null,
                     new TrustManager[]{new EasyX509TrustManager(null)},
                     null);
             return context;
-        }
-        catch (Exception e)
-        {
-            if (Trace.ssl)
-            {
+        } catch (Exception e) {
+            if (Trace.ssl) {
                 Trace.trace(e.getMessage());
             }
             throw new HttpClientError(e.toString());
         }
     }
 
-    private SSLContext getSSLContext()
-    {
-        if (this.sslcontext == null)
-        {
+    private SSLContext getSSLContext() {
+        if (this.sslcontext == null) {
             this.sslcontext = createEasySSLContext();
         }
         return this.sslcontext;
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     public Socket createSocket(String host,
                                int port,
                                InetAddress clientHost,
@@ -173,30 +166,30 @@
                                final InetAddress localAddress,
                                final int localPort,
                                final HttpConnectionParams params) throws IOException {
-        if (params == null)
-        {
+        if (params == null) {
             throw new IllegalArgumentException("Parameters may not be null");
         }
         int timeout = params.getConnectionTimeout();
-        if (timeout == 0)
-        {
+        if (timeout == 0) {
             return createSocket(host, port, localAddress, localPort);
-        }
-        else
-        {
+        } else {
             // To be eventually deprecated when migrated to Java 1.4 or above
             return ControllerThreadSocketFactory.createSocket(this, host, port, localAddress, localPort, timeout);
         }
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     public Socket createSocket(String host, int port)
             throws IOException {
         return getSSLContext().getSocketFactory().createSocket(host,
                 port);
     }
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     public Socket createSocket(Socket socket,
                                String host,
                                int port,
@@ -208,18 +201,19 @@
                 autoClose);
     }
 
-    /** {@inheritDoc} */
-    public boolean equals(Object obj)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public boolean equals(Object obj) {
         return ((obj != null) && obj.getClass().equals(EasySSLProtocolSocketFactory.class));
     }
 
     /**
      * Return hash code of this object.
+     *
      * @return int hash code of this object
      */
-    public int hashCode()
-    {
+    public int hashCode() {
         return EasySSLProtocolSocketFactory.class.hashCode();
     }
 
diff --git a/proxy/src/main/java/flex/messaging/services/http/httpclient/EasyX509TrustManager.java b/proxy/src/main/java/flex/messaging/services/http/httpclient/EasyX509TrustManager.java
index aebd594..88803e1 100755
--- a/proxy/src/main/java/flex/messaging/services/http/httpclient/EasyX509TrustManager.java
+++ b/proxy/src/main/java/flex/messaging/services/http/httpclient/EasyX509TrustManager.java
@@ -30,7 +30,7 @@
  * BLZ-269 - Add support to proxy service for IBM X509
  * checkstyle warnings
  */
- 
+
 package flex.messaging.services.http.httpclient;
 
 import javax.net.ssl.TrustManager;
@@ -46,7 +46,6 @@
 import flex.messaging.util.Trace;
 
 /**
- *
  * <p>
  * EasyX509TrustManager unlike default {@link javax.net.ssl.X509TrustManager} accepts
  * self-signed certificates.
@@ -58,56 +57,48 @@
  * self-signed certificates
  * </p>
  *
- *  <p>
+ * <p>
  * DISCLAIMER: HttpClient developers DO NOT actively support this component.
  * The component is provided as a reference material, which may be inappropriate
  * use without additional customization.
  * </p>
  */
-public class EasyX509TrustManager implements X509TrustManager
-{
+public class EasyX509TrustManager implements X509TrustManager {
     private X509TrustManager standardTrustManager = null;
 
     private boolean trustStore;
 
     /**
      * Constructor for EasyX509TrustManager.
+     *
      * @param keystore the KeyStore to use
      * @throws NoSuchAlgorithmException, KeyStoreException if the construction process failed
      */
-    public EasyX509TrustManager(KeyStore keystore) throws NoSuchAlgorithmException, KeyStoreException
-    {
+    public EasyX509TrustManager(KeyStore keystore) throws NoSuchAlgorithmException, KeyStoreException {
         super();
         TrustManagerFactory factory = null;
-        try
-        {
+        try {
             factory = TrustManagerFactory.getInstance("SunX509");
-        }
-        catch (NoSuchAlgorithmException nsae)
-        {
+        } catch (NoSuchAlgorithmException nsae) {
             // Fallback attempt - try for an IbmX509 factory in case we're running in WAS with no Sun providers registered.
-            try
-            {
+            try {
                 factory = TrustManagerFactory.getInstance("IbmX509");
-            }
-            catch (NoSuchAlgorithmException nsae2)
-            {
+            } catch (NoSuchAlgorithmException nsae2) {
                 throw new NoSuchAlgorithmException("Neither SunX509 nor IbmX509 trust manager supported.");
             }
         }
         factory.init(keystore);
         TrustManager[] trustmanagers = factory.getTrustManagers();
-        if (trustmanagers.length == 0)
-        {
-            
+        if (trustmanagers.length == 0) {
+
             factory.init(keystore);
             trustmanagers = factory.getTrustManagers();
-            
+
             // If we still have no trust managers, throw.
             if (trustmanagers.length == 0)
                 throw new NoSuchAlgorithmException("Neither SunX509 nor IbmX509 trust manager supported.");
         }
-        this.standardTrustManager = (X509TrustManager)trustmanagers[0];
+        this.standardTrustManager = (X509TrustManager) trustmanagers[0];
 
         // very lax settings must be used if flex.trustStore is being used
         trustStore = (System.getProperty("flex.trustStore") != null);
@@ -117,10 +108,8 @@
      *  (non-Javadoc)
      * @see javax.net.ssl.X509TrustManager#checkClientTrusted(X509Certificate[] x509Certificates, String authType)
      */
-    public void checkClientTrusted(X509Certificate[] certificates, String authType) throws CertificateException
-    {
-        if (trustStore)
-        {
+    public void checkClientTrusted(X509Certificate[] certificates, String authType) throws CertificateException {
+        if (trustStore) {
             return;
         }
         standardTrustManager.checkServerTrusted(certificates, authType);
@@ -130,41 +119,29 @@
      *  (non-Javadoc)
      * @see com.sun.net.ssl.X509TrustManager#isServerTrusted(X509Certificate[])
      */
-    public void checkServerTrusted(X509Certificate[] certificates, String authType) throws CertificateException
-    {
-        if (trustStore)
-        {
+    public void checkServerTrusted(X509Certificate[] certificates, String authType) throws CertificateException {
+        if (trustStore) {
             return;
         }
-        if (certificates != null)
-        {
-            if (Trace.ssl)
-            {
+        if (certificates != null) {
+            if (Trace.ssl) {
                 Trace.trace("Server certificate chain:");
-                for (int i = 0; i < certificates.length; i++)
-                {
+                for (int i = 0; i < certificates.length; i++) {
                     Trace.trace("X509Certificate[" + i + "]=" + certificates[i]);
                 }
             }
         }
-        if ((certificates != null) && (certificates.length == 1))
-        {
+        if ((certificates != null) && (certificates.length == 1)) {
             X509Certificate certificate = certificates[0];
-            try
-            {
+            try {
                 certificate.checkValidity();
-            }
-            catch (CertificateException e)
-            {
-                if (Trace.ssl)
-                {
+            } catch (CertificateException e) {
+                if (Trace.ssl) {
                     Trace.trace(e.toString());
                 }
                 throw e;
             }
-        }
-        else
-        {
+        } else {
             standardTrustManager.checkServerTrusted(certificates, authType);
         }
     }
@@ -173,8 +150,7 @@
      *  (non-Javadoc)
      * @see com.sun.net.ssl.X509TrustManager#getAcceptedIssuers()
      */
-    public X509Certificate[] getAcceptedIssuers()
-    {
+    public X509Certificate[] getAcceptedIssuers() {
         return this.standardTrustManager.getAcceptedIssuers();
     }
 }
diff --git a/proxy/src/main/java/flex/messaging/services/http/httpclient/FlexGetMethod.java b/proxy/src/main/java/flex/messaging/services/http/httpclient/FlexGetMethod.java
index a9bc808..e2b0fe6 100755
--- a/proxy/src/main/java/flex/messaging/services/http/httpclient/FlexGetMethod.java
+++ b/proxy/src/main/java/flex/messaging/services/http/httpclient/FlexGetMethod.java
@@ -22,38 +22,29 @@
 import org.apache.commons.httpclient.methods.GetMethod;
 
 /**
- *
  * Simple wrapper around PostMethod that exposes one method for ProxyServlet.
  */
-public class FlexGetMethod extends GetMethod
-{
-    public FlexGetMethod(String str)
-    {
+public class FlexGetMethod extends GetMethod {
+    public FlexGetMethod(String str) {
         super(str);
     }
 
-    public void setConnectionForced(boolean bool)
-    {
+    public void setConnectionForced(boolean bool) {
         setConnectionCloseForced(bool);
     }
 
-    protected String getContentCharSet(Header contentheader)
-    {
+    protected String getContentCharSet(Header contentheader) {
         String charset = null;
-        if (contentheader != null)
-        {
+        if (contentheader != null) {
             HeaderElement values[] = contentheader.getElements();
-            if (values.length == 1)
-            {
+            if (values.length == 1) {
                 NameValuePair param = values[0].getParameterByName("charset");
-                if (param != null)
-                {
+                if (param != null) {
                     charset = param.getValue();
                 }
             }
         }
-        if (charset == null)
-        {
+        if (charset == null) {
             charset = "UTF-8";
         }
         return charset;
diff --git a/proxy/src/main/java/flex/messaging/services/http/httpclient/FlexPostMethod.java b/proxy/src/main/java/flex/messaging/services/http/httpclient/FlexPostMethod.java
index c08aa63..688784d 100755
--- a/proxy/src/main/java/flex/messaging/services/http/httpclient/FlexPostMethod.java
+++ b/proxy/src/main/java/flex/messaging/services/http/httpclient/FlexPostMethod.java
@@ -22,38 +22,29 @@
 import org.apache.commons.httpclient.methods.PostMethod;
 
 /**
- *
  * Simple wrapper around PostMethod that exposes one method for ProxyServlet.
  */
-public class FlexPostMethod extends PostMethod
-{
-    public FlexPostMethod(String str)
-    {
+public class FlexPostMethod extends PostMethod {
+    public FlexPostMethod(String str) {
         super(str);
     }
 
-    public void setConnectionForced(boolean bool)
-    {
+    public void setConnectionForced(boolean bool) {
         setConnectionCloseForced(bool);
     }
 
-    protected String getContentCharSet(Header contentheader)
-    {
+    protected String getContentCharSet(Header contentheader) {
         String charset = null;
-        if (contentheader != null)
-        {
+        if (contentheader != null) {
             HeaderElement values[] = contentheader.getElements();
-            if (values.length == 1)
-            {
+            if (values.length == 1) {
                 NameValuePair param = values[0].getParameterByName("charset");
-                if (param != null)
-                {
+                if (param != null) {
                     charset = param.getValue();
                 }
             }
         }
-        if (charset == null)
-        {
+        if (charset == null) {
             charset = "UTF-8";
         }
         return charset;
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/AccessFilter.java b/proxy/src/main/java/flex/messaging/services/http/proxy/AccessFilter.java
index dd30481..e3a0715 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/AccessFilter.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/AccessFilter.java
@@ -21,38 +21,32 @@
 import javax.servlet.http.HttpServletRequest;
 
 /**
- *
  * Determines whether overall access to the proxy is allowed for a request.
  */
-public class AccessFilter extends ProxyFilter
-{
+public class AccessFilter extends ProxyFilter {
     private static final int TOO_MANY_COOKIES = 10703;
 
     /**
      * Invokes the filter with the context.
-     * 
+     *
      * @param context The proxy context.
      */
-    public void invoke(ProxyContext context)
-    {
+    public void invoke(ProxyContext context) {
         HttpServletRequest clientRequest = FlexContext.getHttpRequest();
 
         // as requested by @stake, limit the number of cookies that can be sent from the endpoint to prevent
         // as denial of service attack.  It seems our processing of Flex-mangled cookies bogs down the server.
         // We set the cookie limit to 200, but it can be changed via -Dflex.cookieLimit
-        if (clientRequest != null)
-        {
+        if (clientRequest != null) {
             javax.servlet.http.Cookie[] cookies = clientRequest.getCookies();
-            if (cookies != null && cookies.length > context.getCookieLimit())
-            {
+            if (cookies != null && cookies.length > context.getCookieLimit()) {
                 ProxyException e = new ProxyException();
-                e.setMessage(TOO_MANY_COOKIES, new Object[] { "" + cookies.length });
+                e.setMessage(TOO_MANY_COOKIES, new Object[]{"" + cookies.length});
                 throw e;
             }
         }
 
-        if (next != null)
-        {
+        if (next != null) {
             next.invoke(context);
         }
     }
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/CookieInfo.java b/proxy/src/main/java/flex/messaging/services/http/proxy/CookieInfo.java
index 632f3b6..6097859 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/CookieInfo.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/CookieInfo.java
@@ -19,8 +19,7 @@
 /**
  *
  */
-public class CookieInfo
-{
+public class CookieInfo {
     public String clientName;
     public String domain;
     public String name;
@@ -33,8 +32,7 @@
     public boolean secure;
 
     public CookieInfo(String clientName, String domain, String name, String value, String path,
-                      int maxAge, Object maxAgeObj, boolean secure)
-    {
+                      int maxAge, Object maxAgeObj, boolean secure) {
         this.clientName = clientName;
         this.domain = domain;
         this.name = name;
@@ -45,8 +43,7 @@
         this.secure = secure;
     }
 
-    public String toString()
-    {
+    public String toString() {
         return "domain = '" + domain +
                 "', path = '" + path +
                 "', client name = '" + clientName +
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/ErrorFilter.java b/proxy/src/main/java/flex/messaging/services/http/proxy/ErrorFilter.java
index 3912a74..e196fd9 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/ErrorFilter.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/ErrorFilter.java
@@ -23,61 +23,40 @@
 import flex.messaging.MessageException;
 
 /**
- *
  * Wraps filters with exception handling.
  */
-public class ErrorFilter extends ProxyFilter
-{
+public class ErrorFilter extends ProxyFilter {
     /**
      * Invokes the filter with the context.
-     * 
+     *
      * @param context The proxy context.
      */
-    public void invoke(ProxyContext context)
-    {
-        try
-        {
-            if (next != null)
-            {
+    public void invoke(ProxyContext context) {
+        try {
+            if (next != null) {
                 next.invoke(context);
             }
-        }
-        catch (MessageException ex)
-        {
+        } catch (MessageException ex) {
             throw ex;
-        }
-        catch (Throwable ex)
-        {
+        } catch (Throwable ex) {
             throw new MessageException(ex);
-        }
-        finally
-        {
-            try
-            {
-                if (context.getHttpMethod() != null)
-                {
+        } finally {
+            try {
+                if (context.getHttpMethod() != null) {
 
                     // we don't want to keep the connection open if authentication info was sent
-                    if (context.hasAuthorization())
-                    {
-                        if (context.getHttpMethod() instanceof FlexGetMethod)
-                        {
-                            ((FlexGetMethod)context.getHttpMethod()).setConnectionForced(true);
-                        }
-                        else if (context.getHttpMethod() instanceof FlexPostMethod)
-                        {
-                            ((FlexPostMethod)context.getHttpMethod()).setConnectionForced(true);
-                        }
-                        else
-                        {
+                    if (context.hasAuthorization()) {
+                        if (context.getHttpMethod() instanceof FlexGetMethod) {
+                            ((FlexGetMethod) context.getHttpMethod()).setConnectionForced(true);
+                        } else if (context.getHttpMethod() instanceof FlexPostMethod) {
+                            ((FlexPostMethod) context.getHttpMethod()).setConnectionForced(true);
+                        } else {
                             Assert.testAssertion(false, "Should have custom Flex method: " + context.getHttpMethod().getClass());
                         }
                     }
                     context.getHttpMethod().releaseConnection();
                 }
-            }
-            catch (Exception e)
-            {
+            } catch (Exception e) {
                 if (Trace.error)
                     e.printStackTrace();
             }
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyConstants.java b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyConstants.java
index dceac50..655b42f 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyConstants.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyConstants.java
@@ -17,11 +17,9 @@
 package flex.messaging.services.http.proxy;
 
 /**
- *
  * Contants related to the proxy (shared with .NET).
  */
-public class ProxyConstants
-{
+public class ProxyConstants {
     public static final String METHOD_GET = "GET";
     public static final String METHOD_HEAD = "HEAD";
     public static final String METHOD_OPTIONS = "OPTIONS";
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyContext.java b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyContext.java
index dc821f5..d0f1eb3 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyContext.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyContext.java
@@ -31,11 +31,9 @@
 import org.apache.commons.httpclient.Cookie;
 
 /**
- *
  * Store all the information needed for a proxy request.
  */
-public class ProxyContext extends SharedProxyContext
-{
+public class ProxyContext extends SharedProxyContext {
     private HttpMethodBase httpMethod;
     private HttpClient httpClient;
 
@@ -51,7 +49,7 @@
     private boolean contentChunked;
 
     private String credentialsHeader;
-    
+
     // set up by ProxtContextFilter
     private UsernamePasswordCredentials proxyCredentials;
     private HttpConnectionManager connectionManager;
@@ -66,245 +64,200 @@
     private Map requestHeaders;
     private Map responseHeaders;
     private Object response;
-    
+
     // We need to record the request cookies
-    
+
     private Set requestCookies;
 
 
     /*          PROXY COMMUNICATION           */
 
-    public HttpConnectionManager getConnectionManager()
-    {
+    public HttpConnectionManager getConnectionManager() {
         return connectionManager;
     }
 
-    public void setConnectionManager(HttpConnectionManager connectionManager)
-    {
+    public void setConnectionManager(HttpConnectionManager connectionManager) {
         this.connectionManager = connectionManager;
     }
 
-    public HttpMethodBase getHttpMethod()
-    {
+    public HttpMethodBase getHttpMethod() {
         return httpMethod;
     }
 
-    public void setHttpMethod(HttpMethodBase httpMethod)
-    {
+    public void setHttpMethod(HttpMethodBase httpMethod) {
         this.httpMethod = httpMethod;
     }
 
-    public HttpClient getHttpClient()
-    {
+    public HttpClient getHttpClient() {
         return httpClient;
     }
 
-    public void setHttpClient(HttpClient httpClient)
-    {
+    public void setHttpClient(HttpClient httpClient) {
         this.httpClient = httpClient;
     }
 
 
     /*          INPUT           */
 
-    public Map getHeaders()
-    {
+    public Map getHeaders() {
         return headers;
     }
 
-    public void setHeaders(Map headers)
-    {
+    public void setHeaders(Map headers) {
         this.headers = headers;
     }
 
-    public String getContentType()
-    {
+    public String getContentType() {
         return contentType;
     }
 
-    public void setContentType(String type)
-    {
+    public void setContentType(String type) {
         contentType = type;
     }
 
-    public String getUrl()
-    {
+    public String getUrl() {
         return url;
     }
 
-    public void setUrl(String s)
-    {
+    public void setUrl(String s) {
         url = s;
     }
 
-    public Target getTarget()
-    {
+    public Target getTarget() {
         return target;
     }
 
-    public void setTarget(Target target)
-    {
+    public void setTarget(Target target) {
         this.target = target;
     }
 
-    public Protocol getProtocol()
-    {
+    public Protocol getProtocol() {
         return protocol;
     }
 
-    public void setProtocol(Protocol protocol)
-    {
+    public void setProtocol(Protocol protocol) {
         this.protocol = protocol;
     }
 
-    public Object getBody()
-    {
+    public Object getBody() {
         return body;
     }
 
-    public void setBody(Object body)
-    {
+    public void setBody(Object body) {
         this.body = body;
     }
 
-    public String getCredentialsHeader()
-    {
+    public String getCredentialsHeader() {
         return credentialsHeader;
     }
 
-    public void setCredentialsHeader(String credentialsHeader)
-    {
+    public void setCredentialsHeader(String credentialsHeader) {
         this.credentialsHeader = credentialsHeader;
     }
 
-    public UsernamePasswordCredentials getProxyCredentials()
-    {
+    public UsernamePasswordCredentials getProxyCredentials() {
         return proxyCredentials;
     }
 
-    public void setProxyCredentials(UsernamePasswordCredentials proxyCredentials)
-    {
+    public void setProxyCredentials(UsernamePasswordCredentials proxyCredentials) {
         this.proxyCredentials = proxyCredentials;
     }
 
-    public int getCookieLimit()
-    {
+    public int getCookieLimit() {
         return cookieLimit;
     }
 
-    public void setCookieLimit(int cookieLimit)
-    {
+    public void setCookieLimit(int cookieLimit) {
         this.cookieLimit = cookieLimit;
     }
 
-    public boolean allowLaxSSL()
-    {
+    public boolean allowLaxSSL() {
         return allowLaxSSL;
     }
 
-    public void setAllowLaxSSL(boolean allowLaxSSL)
-    {
+    public void setAllowLaxSSL(boolean allowLaxSSL) {
         this.allowLaxSSL = allowLaxSSL;
     }
 
-    public ExternalProxySettings getExternalProxySettings()
-    {
+    public ExternalProxySettings getExternalProxySettings() {
         return externalProxySettings;
     }
 
-    public void setExternalProxySettings(ExternalProxySettings externalProxySettings)
-    {
+    public void setExternalProxySettings(ExternalProxySettings externalProxySettings) {
         this.externalProxySettings = externalProxySettings;
     }
 
-    public boolean getRecordHeaders()
-    {
+    public boolean getRecordHeaders() {
         return recordHeaders;
     }
 
-    public void setRecordHeaders(boolean recordHeaders)
-    {
+    public void setRecordHeaders(boolean recordHeaders) {
         this.recordHeaders = recordHeaders;
     }
 
-    public boolean getContentChunked()
-    {
+    public boolean getContentChunked() {
         return contentChunked;
     }
-    
-    public void setContentChunked(boolean value)
-    {
+
+    public void setContentChunked(boolean value) {
         contentChunked = value;
     }
 
 
     /*          OUTPUT           */
 
-    public int getStatusCode()
-    {
+    public int getStatusCode() {
         return statusCode;
     }
 
-    public void setStatusCode(int originalStatusCode)
-    {
+    public void setStatusCode(int originalStatusCode) {
         this.statusCode = originalStatusCode;
     }
 
-    public Object getResponse()
-    {
+    public Object getResponse() {
         return response;
     }
 
-    public void setResponse(Object r)
-    {
+    public void setResponse(Object r) {
         response = r;
     }
 
-    public boolean streamResponseToClient()
-    {
+    public boolean streamResponseToClient() {
         return streamResponseToClient;
     }
 
-    public void setStreamResponseToClient(boolean s)
-    {
+    public void setStreamResponseToClient(boolean s) {
         this.streamResponseToClient = s;
     }
-    
-    public Map getRequestHeaders()
-    {
+
+    public Map getRequestHeaders() {
         return requestHeaders;
     }
 
-    public void setRequestHeaders(Map requestHeaders)
-    {
+    public void setRequestHeaders(Map requestHeaders) {
         this.requestHeaders = requestHeaders;
     }
 
-    public Map getResponseHeaders()
-    {
+    public Map getResponseHeaders() {
         return responseHeaders;
     }
 
-    public void setResponseHeaders(Map responseHeaders)
-    {
+    public void setResponseHeaders(Map responseHeaders) {
         this.responseHeaders = responseHeaders;
     }
-    
-    public void clearRequestCookies()
-    {
+
+    public void clearRequestCookies() {
         requestCookies = null;
     }
-    
-    public void addRequestCookie(Cookie cookie)
-    {
+
+    public void addRequestCookie(Cookie cookie) {
         if (requestCookies == null)
             requestCookies = new HashSet();
         requestCookies.add(cookie);
     }
-    
-    public Set getRequestCookies()
-    {
+
+    public Set getRequestCookies() {
         return requestCookies;
     }
-    
+
 }
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyContextFilter.java b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyContextFilter.java
index aba76a6..b31c3b2 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyContextFilter.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyContextFilter.java
@@ -35,40 +35,34 @@
 import java.net.UnknownHostException;
 
 /**
- *
  * Fills in ProxyContext data for use by ProxyFilters within HttpProxyAdapter.
  */
-public class ProxyContextFilter extends ProxyFilter
-{
+public class ProxyContextFilter extends ProxyFilter {
     private static final int RELATIVE_NOT_SUPPORTED = 10704;
     private static final int INVALID_TARGET = 10705;
 
     private static final String STRING_LOCALHOST = "localhost";
 
-    private Protocol myhttps = new Protocol("https", (ProtocolSocketFactory)(new EasySSLProtocolSocketFactory()), 443);
+    private Protocol myhttps = new Protocol("https", (ProtocolSocketFactory) (new EasySSLProtocolSocketFactory()), 443);
 
     /**
      * Invokes the filter with the context.
      *
      * @param context The proxy context.
      */
-    public void invoke(ProxyContext context)
-    {
+    public void invoke(ProxyContext context) {
         setupInitialProperties(context);
         setupTarget(context);
         logInfo(context);
 
-        if (next != null)
-        {
+        if (next != null) {
             next.invoke(context);
         }
     }
 
-    protected void setupInitialProperties(ProxyContext context)
-    {
+    protected void setupInitialProperties(ProxyContext context) {
         HttpServletRequest clientRequest = FlexContext.getHttpRequest();
-        if (clientRequest != null)
-        {
+        if (clientRequest != null) {
             String reqURL = clientRequest.getRequestURL().toString();
             int idx = reqURL.indexOf(':');
             String reqProto = reqURL.substring(0, idx);
@@ -80,54 +74,42 @@
         }
     }
 
-    protected void setupTarget(ProxyContext context)
-    {
+    protected void setupTarget(ProxyContext context) {
         Target target = context.getTarget();
         String source = context.getUrl();
         HttpServletRequest clientRequest = FlexContext.getHttpRequest();
 
-        try
-        {
+        try {
             target.setUrl(new URL(source));
-        }
-        catch (MalformedURLException e)
-        {
-            try
-            {
+        } catch (MalformedURLException e) {
+            try {
                 //[Pete] Enhancement Req. 80172 - relative URLs from webroot (not
                 //       webapp context root)
-                if (clientRequest != null)
-                {
+                if (clientRequest != null) {
                     String baseurl = "http" + (clientRequest.isSecure() ? "s" : "") + "://"
                             + clientRequest.getServerName() + ":" + clientRequest.getServerPort();
 
                     target.setUrl(new URL(baseurl + source));
-                }
-                else
-                {
+                } else {
                     ProxyException pe = new ProxyException();
-                    pe.setMessage(RELATIVE_NOT_SUPPORTED, new Object[] { source });
+                    pe.setMessage(RELATIVE_NOT_SUPPORTED, new Object[]{source});
                     throw pe;
                 }
-            }
-            catch (MalformedURLException ex)
-            {
+            } catch (MalformedURLException ex) {
                 target.setUrl(null);
             }
         }
 
-        if (target.getUrl() == null)
-        {
+        if (target.getUrl() == null) {
             ProxyException pe = new ProxyException();
-            pe.setMessage(INVALID_TARGET, new Object[] { source });
+            pe.setMessage(INVALID_TARGET, new Object[]{source});
             throw pe;
         }
 
         target.setHTTPS(target.getUrl().getProtocol().equalsIgnoreCase("https"));
         target.setEncodedPath(target.getUrl().getPath());
         String queryStr = target.getUrl().getQuery();
-        if (queryStr != null)
-        {
+        if (queryStr != null) {
             target.setEncodedPath(target.getEncodedPath() + ("?" + queryStr));
         }
         try {
@@ -143,39 +125,29 @@
 
         // Check for a custom protocol
         Protocol customProtocol = context.getProtocol();
-        if (customProtocol != null)
-        {
+        if (customProtocol != null) {
             target.getHostConfig().setHost(targetHost, targetPort, customProtocol);
-        }
-        else if (target.isHTTPS() && context.allowLaxSSL())
-        {
+        } else if (target.isHTTPS() && context.allowLaxSSL()) {
             target.getHostConfig().setHost(targetHost, targetPort, myhttps);
-        }
-        else
-        {
+        } else {
             String targetProtocol = target.getUrl().getProtocol();
             target.getHostConfig().setHost(targetHost, targetPort, targetProtocol);
         }
 
-        if (context.getConnectionManager() != null)
-        {
+        if (context.getConnectionManager() != null) {
             context.setHttpClient(new HttpClient(context.getConnectionManager()));
-        }
-        else
-        {
+        } else {
             context.setHttpClient(new HttpClient());
         }
 
         // Determine if target domain matches this proxy's domain and port
         boolean localDomain = false;
         boolean localPort = false;
-        if (clientRequest != null)
-        {
-            String proxyDomain = clientRequest.getServerName().contains(STRING_LOCALHOST)?
+        if (clientRequest != null) {
+            String proxyDomain = clientRequest.getServerName().contains(STRING_LOCALHOST) ?
                     getResolvedLocalhost() : clientRequest.getServerName();
-            String resolvedTargetHost = targetHost.contains(STRING_LOCALHOST)? getResolvedLocalhost() : targetHost;
-            if (proxyDomain.equalsIgnoreCase(resolvedTargetHost))
-            {
+            String resolvedTargetHost = targetHost.contains(STRING_LOCALHOST) ? getResolvedLocalhost() : targetHost;
+            if (proxyDomain.equalsIgnoreCase(resolvedTargetHost)) {
                 localDomain = true;
                 int proxyPort = clientRequest.getServerPort();
                 localPort = proxyPort == targetPort;
@@ -185,10 +157,8 @@
         context.setLocalPort(localPort);
     }
 
-    protected void logInfo(ProxyContext context)
-    {
-        if (Log.isInfo())
-        {
+    protected void logInfo(ProxyContext context) {
+        if (Log.isInfo()) {
             Target target = context.getTarget();
             String prefix = "-- " + context.getMethod() + " : ";
             int targetPort = target.getUrl().getPort();
@@ -204,14 +174,10 @@
      *
      * @return The IP of the localhost.
      */
-    private String getResolvedLocalhost()
-    {
-        try
-        {
+    private String getResolvedLocalhost() {
+        try {
             return InetAddress.getLocalHost().getHostAddress();
-        }
-        catch (UnknownHostException e)
-        {
+        } catch (UnknownHostException e) {
             // NOWARN
         }
         return null;
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyException.java b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyException.java
index 59ec1ed..16bd111 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyException.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyException.java
@@ -19,11 +19,9 @@
 import flex.messaging.MessageException;
 
 /**
- *
  * Simple exception used to get back to ErrorFilter from other filters.
  */
-public class ProxyException extends MessageException
-{
+public class ProxyException extends MessageException {
     static final long serialVersionUID = -6516172702871227717L;
 
     public static final String CODE_SERVER_PROXY_REQUEST_FAILED = "Server.Proxy.Request.Failed";
@@ -37,8 +35,7 @@
     /**
      * Default constructor.
      */
-    public ProxyException()
-    {
+    public ProxyException() {
         super();
         super.setCode(CODE_SERVER_PROXY_REQUEST_FAILED);
     }
@@ -48,8 +45,7 @@
      *
      * @param message The detailed message for the exception.
      */
-    public ProxyException(int message)
-    {
+    public ProxyException(int message) {
         this();
         setMessage(message);
     }
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyFilter.java b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyFilter.java
index 0b5417c..015edf7 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyFilter.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyFilter.java
@@ -18,25 +18,20 @@
 
 
 /**
- *
  * Base filter definition that defines the filter contract.
  * Filters perform pre- and post-processing duties on the ProxyContext
  */
-public abstract class ProxyFilter
-{
+public abstract class ProxyFilter {
     protected ProxyFilter next;
 
-    public ProxyFilter()
-    {
+    public ProxyFilter() {
     }
 
-    public ProxyFilter getNext()
-    {
+    public ProxyFilter getNext() {
         return next;
     }
 
-    public void setNext(ProxyFilter next)
-    {
+    public void setNext(ProxyFilter next) {
         this.next = next;
     }
 
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyUtil.java b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyUtil.java
index 1bd30c9..872b435 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyUtil.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/ProxyUtil.java
@@ -19,20 +19,17 @@
 import org.apache.commons.httpclient.auth.AuthScope;
 
 /**
- *
  * Methods used by multiple proxy classes.
  */
-public class ProxyUtil
-{
+public class ProxyUtil {
     private static AuthScope anyAuthScope = new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT);
 
     /**
      * Returns the default authScope.
-     * 
+     *
      * @return The default authScope.
      */
-    public static AuthScope getDefaultAuthScope()
-    {
+    public static AuthScope getDefaultAuthScope() {
         return anyAuthScope;
     }
 }
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/RequestFilter.java b/proxy/src/main/java/flex/messaging/services/http/proxy/RequestFilter.java
index 707ad2a..33b5ff7 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/RequestFilter.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/RequestFilter.java
@@ -57,11 +57,9 @@
 import java.util.TreeMap;
 
 /**
- *
  * Sends the request to the endpoint, including custom copying of headers and cookies.
  */
-public class RequestFilter extends ProxyFilter
-{
+public class RequestFilter extends ProxyFilter {
     private static final int CAUGHT_ERROR = 10706;
     private static final int UNKNOWN_HOST = 10707;
     private static final int INVALID_METHOD = 10719;
@@ -72,8 +70,7 @@
      *
      * @param context the context
      */
-    public void invoke(ProxyContext context)
-    {
+    public void invoke(ProxyContext context) {
         setupRequest(context);
         copyCookiesToEndpoint(context);
         copyHeadersToEndpoint(context);
@@ -81,8 +78,7 @@
         recordRequestHeaders(context);
         sendRequest(context);
 
-        if (next != null)
-        {
+        if (next != null) {
             next.invoke(context);
         }
     }
@@ -92,19 +88,15 @@
      *
      * @param context the context
      */
-    protected void setupRequest(ProxyContext context)
-    {
+    protected void setupRequest(ProxyContext context) {
         // set the proxy to send requests through
         ExternalProxySettings externalProxy = context.getExternalProxySettings();
-        if (externalProxy != null)
-        {
+        if (externalProxy != null) {
             String proxyServer = externalProxy.getProxyServer();
 
-            if (proxyServer != null)
-            {
+            if (proxyServer != null) {
                 context.getTarget().getHostConfig().setProxy(proxyServer, externalProxy.getProxyPort());
-                if (context.getProxyCredentials() != null)
-                {
+                if (context.getProxyCredentials() != null) {
                     context.getHttpClient().getState().setProxyCredentials(ProxyUtil.getDefaultAuthScope(), context.getProxyCredentials());
                 }
             }
@@ -112,95 +104,72 @@
 
         String method = context.getMethod();
         String encodedPath = context.getTarget().getEncodedPath();
-        if (MessageIOConstants.METHOD_POST.equals(method))
-        {
+        if (MessageIOConstants.METHOD_POST.equals(method)) {
             FlexPostMethod postMethod = new FlexPostMethod(encodedPath);
             context.setHttpMethod(postMethod);
-            if (context.hasAuthorization())
-            {
+            if (context.hasAuthorization()) {
                 postMethod.setConnectionForced(true);
             }
-        }
-        else if (ProxyConstants.METHOD_GET.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_GET.equals(method)) {
             FlexGetMethod getMethod = new FlexGetMethod(context.getTarget().getEncodedPath());
             context.setHttpMethod(getMethod);
-            if (context.hasAuthorization())
-            {
+            if (context.hasAuthorization()) {
                 getMethod.setConnectionForced(true);
             }
-        }
-        else if (ProxyConstants.METHOD_HEAD.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_HEAD.equals(method)) {
             HeadMethod headMethod = new HeadMethod(encodedPath);
             context.setHttpMethod(headMethod);
-        }
-        else if (ProxyConstants.METHOD_PUT.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_PUT.equals(method)) {
             PutMethod putMethod = new PutMethod(encodedPath);
             context.setHttpMethod(putMethod);
-        }
-        else if (ProxyConstants.METHOD_OPTIONS.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_OPTIONS.equals(method)) {
             OptionsMethod optionsMethod = new OptionsMethod(encodedPath);
             context.setHttpMethod(optionsMethod);
-        }
-        else if (ProxyConstants.METHOD_DELETE.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_DELETE.equals(method)) {
             DeleteMethod deleteMethod = new DeleteMethod(encodedPath);
             context.setHttpMethod(deleteMethod);
-        }
-        else if (ProxyConstants.METHOD_TRACE.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_TRACE.equals(method)) {
             TraceMethod traceMethod = new TraceMethod(encodedPath);
             context.setHttpMethod(traceMethod);
-        }
-        else
-        {
+        } else {
             ProxyException pe = new ProxyException(INVALID_METHOD);
-            pe.setDetails(INVALID_METHOD, "1", new Object[] { method });
+            pe.setDetails(INVALID_METHOD, "1", new Object[]{method});
             throw pe;
         }
 
         HttpMethodBase httpMethod = context.getHttpMethod();
-        if (httpMethod instanceof EntityEnclosingMethod)
-        {
-            ((EntityEnclosingMethod)httpMethod).setContentChunked(context.getContentChunked());
+        if (httpMethod instanceof EntityEnclosingMethod) {
+            ((EntityEnclosingMethod) httpMethod).setContentChunked(context.getContentChunked());
         }
     }
 
     /**
      * Before calling the endpoint, set up the cookies found in the request.
+     *
      * @param context the context
      */
-    public static void copyCookiesToEndpoint(ProxyContext context)
-    {
+    public static void copyCookiesToEndpoint(ProxyContext context) {
         HttpServletRequest clientRequest = FlexContext.getHttpRequest();
         context.clearRequestCookies();
-        if (clientRequest != null)
-        {
+        if (clientRequest != null) {
             javax.servlet.http.Cookie[] cookies = clientRequest.getCookies();
             HttpState initState = context.getHttpClient().getState();
 
-            if (cookies != null)
-            {
+            if (cookies != null) {
                 // Gather up the cookies keyed on the length of the path.
                 // This is done so that if we have two cookies with the same name,
                 // we pass the cookie with the longest path first to the endpoint
                 TreeMap cookieMap = new TreeMap();
-                for (javax.servlet.http.Cookie cookie : cookies)
-                {
+                for (javax.servlet.http.Cookie cookie : cookies) {
                     CookieInfo origCookie = new CookieInfo(cookie.getName(), cookie.getDomain(), cookie.getName(),
                             cookie.getValue(), cookie.getPath(), cookie.getMaxAge(), null, cookie.getSecure());
                     CookieInfo newCookie = RequestUtil.createCookie(origCookie, context, context.getTarget().getUrl().getHost(),
                             context.getTarget().getUrl().getPath());
 
-                    if (newCookie != null)
-                    {
+                    if (newCookie != null) {
                         Integer pathInt = Integer.valueOf(0 - newCookie.path.length());
                         ArrayList list = (ArrayList) cookieMap.get(pathInt);
-                        if (list == null)
-                        {
+                        if (list == null) {
                             list = new ArrayList();
                             cookieMap.put(pathInt, list);
                         }
@@ -209,14 +178,11 @@
                 }
 
                 // loop through (in order) the cookies we've gathered
-                for (Object mapValue : cookieMap.values())
-                {
+                for (Object mapValue : cookieMap.values()) {
                     ArrayList list = (ArrayList) mapValue;
-                    for (Object aList : list)
-                    {
+                    for (Object aList : list) {
                         CookieInfo cookieInfo = (CookieInfo) aList;
-                        if (Log.isInfo())
-                        {
+                        if (Log.isInfo()) {
                             String str = "-- Cookie in request: " + cookieInfo;
                             Log.getLogger(HTTPProxyService.LOG_CATEGORY).debug(str);
                         }
@@ -227,37 +193,28 @@
                         // If this is a session cookie and we're dealing with local domain, make sure the session
                         // cookie has the latest session id. This check is needed when the session was invalidated
                         // and then recreated in this request; we shouldn't be sending the old session id to the endpoint.
-                        if (context.isLocalDomain() && STRING_JSESSIONID.equalsIgnoreCase(cookieInfo.clientName))
-                        {
+                        if (context.isLocalDomain() && STRING_JSESSIONID.equalsIgnoreCase(cookieInfo.clientName)) {
                             FlexSession flexSession = FlexContext.getFlexSession();
-                            if (flexSession != null && flexSession.isValid())
-                            {
+                            if (flexSession != null && flexSession.isValid()) {
                                 String sessionId = flexSession.getId();
                                 String cookieValue = cookie.getValue();
-                                if (!cookieValue.contains(sessionId))
-                                {
+                                if (!cookieValue.contains(sessionId)) {
                                     int colonIndex = cookieValue.indexOf(':');
-                                    if (colonIndex != -1)
-                                    {
+                                    if (colonIndex != -1) {
                                         // Websphere changes jsession id to the following format:
                                         // 4 digit cacheId + jsessionId + ":" + cloneId.
                                         ServletContext servletContext = FlexContext.getServletContext();
                                         String serverInfo = servletContext != null ? servletContext.getServerInfo() : null;
                                         boolean isWebSphere = serverInfo != null && serverInfo.contains("WebSphere");
-                                        if (isWebSphere)
-                                        {
+                                        if (isWebSphere) {
                                             String cacheId = cookieValue.substring(0, 4);
                                             String cloneId = cookieValue.substring(colonIndex);
                                             String wsSessionId = cacheId + sessionId + cloneId;
                                             cookie.setValue(wsSessionId);
-                                        }
-                                        else
-                                        {
+                                        } else {
                                             cookie.setValue(sessionId);
                                         }
-                                    }
-                                    else
-                                    {
+                                    } else {
                                         cookie.setValue(sessionId);
                                     }
                                 }
@@ -274,30 +231,25 @@
 
     /**
      * Copy HTTP request headers to the endpoint.
+     *
      * @param context the context
      */
-    public static void copyHeadersToEndpoint(ProxyContext context)
-    {
+    public static void copyHeadersToEndpoint(ProxyContext context) {
         HttpServletRequest clientRequest = FlexContext.getHttpRequest();
-        if (clientRequest != null)
-        {
+        if (clientRequest != null) {
             Enumeration headerNames = clientRequest.getHeaderNames();
-            while (headerNames.hasMoreElements())
-            {
-                String headerName = (String)headerNames.nextElement();
-                if (RequestUtil.ignoreHeader(headerName, context))
-                {
+            while (headerNames.hasMoreElements()) {
+                String headerName = (String) headerNames.nextElement();
+                if (RequestUtil.ignoreHeader(headerName, context)) {
                     continue;
                 }
 
                 Enumeration headers = clientRequest.getHeaders(headerName);
-                while (headers.hasMoreElements())
-                {
-                    String value = (String)headers.nextElement();
+                while (headers.hasMoreElements()) {
+                    String value = (String) headers.nextElement();
                     context.getHttpMethod().addRequestHeader(headerName, value);
 
-                    if (Log.isInfo())
-                    {
+                    if (Log.isInfo()) {
                         Log.getLogger(HTTPProxyService.LOG_CATEGORY).debug("-- Header in request: " + headerName + " : " + value);
                     }
                 }
@@ -310,60 +262,43 @@
      *
      * @param context the context
      */
-    protected void addCustomHeaders(ProxyContext context)
-    {
+    protected void addCustomHeaders(ProxyContext context) {
         HttpMethodBase httpMethod = context.getHttpMethod();
 
         String contentType = context.getContentType();
-        if (contentType != null)
-        {
+        if (contentType != null) {
             httpMethod.setRequestHeader(ProxyConstants.HEADER_CONTENT_TYPE, contentType);
         }
 
         Map customHeaders = context.getHeaders();
-        if (customHeaders != null)
-        {
-            for (Object entry : customHeaders.entrySet())
-            {
+        if (customHeaders != null) {
+            for (Object entry : customHeaders.entrySet()) {
 
                 String name = (String) ((Map.Entry) entry).getKey();
                 Object value = ((Map.Entry) entry).getValue();
-                if (value == null)
-                {
+                if (value == null) {
                     httpMethod.setRequestHeader(name, "");
                 }
                 // Single value for the name.
-                else if (value instanceof String)
-                {
+                else if (value instanceof String) {
                     httpMethod.setRequestHeader(name, (String) value);
                 }
                 // Multiple values for the name.
-                else if (value instanceof List)
-                {
+                else if (value instanceof List) {
                     List valueList = (List) value;
-                    for (Object currentValue : valueList)
-                    {
-                        if (currentValue == null)
-                        {
+                    for (Object currentValue : valueList) {
+                        if (currentValue == null) {
                             httpMethod.addRequestHeader(name, "");
-                        }
-                        else
-                        {
+                        } else {
                             httpMethod.addRequestHeader(name, (String) currentValue);
                         }
                     }
-                }
-                else if (value.getClass().isArray())
-                {
+                } else if (value.getClass().isArray()) {
                     Object[] valueArray = (Object[]) value;
-                    for (Object currentValue : valueArray)
-                    {
-                        if (currentValue == null)
-                        {
+                    for (Object currentValue : valueArray) {
+                        if (currentValue == null) {
                             httpMethod.addRequestHeader(name, "");
-                        }
-                        else
-                        {
+                        } else {
                             httpMethod.addRequestHeader(name, (String) currentValue);
                         }
                     }
@@ -371,8 +306,7 @@
             }
         }
 
-        if (context.isSoapRequest())
-        {
+        if (context.isSoapRequest()) {
             // add the appropriate headers
             context.getHttpMethod().setRequestHeader(ProxyConstants.HEADER_CONTENT_TYPE, MessageIOConstants.CONTENT_TYPE_XML);
 
@@ -380,22 +314,18 @@
             String soapAction = null;
 
             Header header = context.getHttpMethod().getRequestHeader(MessageIOConstants.HEADER_SOAP_ACTION);
-            if (header != null)
-            {
+            if (header != null) {
                 soapAction = header.getValue();
             }
 
-            if (soapAction == null)
-            {
+            if (soapAction == null) {
                 HttpServletRequest clientRequest = FlexContext.getHttpRequest();
-                if (clientRequest != null)
-                {
+                if (clientRequest != null) {
                     soapAction = clientRequest.getHeader(MessageIOConstants.HEADER_SOAP_ACTION);
                 }
 
                 // SOAPAction has to be quoted per the SOAP 1.1 spec.
-                if (soapAction != null && !soapAction.startsWith("\"") && !soapAction.endsWith("\""))
-                {
+                if (soapAction != null && !soapAction.startsWith("\"") && !soapAction.endsWith("\"")) {
                     soapAction = "\"" + soapAction + "\"";
                 }
 
@@ -410,42 +340,34 @@
 
     /**
      * Record the request headers in the proxy context.
+     *
      * @param context the context
      */
-    protected void recordRequestHeaders(ProxyContext context)
-    {
-        if (context.getRecordHeaders())
-        {
+    protected void recordRequestHeaders(ProxyContext context) {
+        if (context.getRecordHeaders()) {
             Header[] headers = context.getHttpMethod().getRequestHeaders();
-            if (headers != null)
-            {
+            if (headers != null) {
                 HashMap recordedHeaders = new HashMap();
-                for (Header header : headers)
-                {
+                for (Header header : headers) {
                     String headerName = header.getName();
                     String headerValue = header.getValue();
                     Object existingHeaderValue = recordedHeaders.get(headerName);
                     // Value(s) already exist for the header.
-                    if (existingHeaderValue != null)
-                    {
+                    if (existingHeaderValue != null) {
                         ArrayList headerValues;
                         // Only a single value exists.
-                        if (existingHeaderValue instanceof String)
-                        {
+                        if (existingHeaderValue instanceof String) {
                             headerValues = new ArrayList();
                             headerValues.add(existingHeaderValue);
                             headerValues.add(headerValue);
                             recordedHeaders.put(headerName, headerValues);
                         }
                         // Multiple values exist.
-                        else if (existingHeaderValue instanceof ArrayList)
-                        {
+                        else if (existingHeaderValue instanceof ArrayList) {
                             headerValues = (ArrayList) existingHeaderValue;
                             headerValues.add(headerValue);
                         }
-                    }
-                    else
-                    {
+                    } else {
                         recordedHeaders.put(headerName, headerValue);
                     }
                 }
@@ -459,8 +381,7 @@
      *
      * @param context the context
      */
-    protected void sendRequest(ProxyContext context)
-    {
+    protected void sendRequest(ProxyContext context) {
         Target target = context.getTarget();
         String method = context.getMethod();
         HttpMethod httpMethod = context.getHttpMethod();
@@ -468,74 +389,56 @@
         final String END = "-- End ";
         final String REQUEST = " request --";
 
-        if (httpMethod instanceof EntityEnclosingMethod)
-        {
+        if (httpMethod instanceof EntityEnclosingMethod) {
             Object data = processBody(context);
             Class dataClass = data.getClass();
-            if (data instanceof String)
-            {
-                String requestString = (String)data;
-                if (Log.isInfo())
-                {
+            if (data instanceof String) {
+                String requestString = (String) data;
+                if (Log.isInfo()) {
                     Logger logger = Log.getLogger(HTTPProxyService.LOG_CATEGORY);
                     logger.debug(BEGIN + method + REQUEST);
                     logger.debug(StringUtils.prettifyString(requestString));
                     logger.debug(END + method + REQUEST);
                 }
 
-                try
-                {
+                try {
                     StringRequestEntity requestEntity = new StringRequestEntity(requestString, null, "UTF-8");
-                    ((EntityEnclosingMethod)httpMethod).setRequestEntity(requestEntity);
-                }
-                catch (UnsupportedEncodingException ex)
-                {
+                    ((EntityEnclosingMethod) httpMethod).setRequestEntity(requestEntity);
+                } catch (UnsupportedEncodingException ex) {
                     ProxyException pe = new ProxyException(CAUGHT_ERROR);
-                    pe.setDetails(CAUGHT_ERROR, "1", new Object[] { ex });
+                    pe.setDetails(CAUGHT_ERROR, "1", new Object[]{ex});
                     throw pe;
                 }
-            }
-            else if (dataClass.isArray() && Byte.TYPE.equals(dataClass.getComponentType()))
-            {
-                byte[] dataBytes = (byte[])data;
+            } else if (dataClass.isArray() && Byte.TYPE.equals(dataClass.getComponentType())) {
+                byte[] dataBytes = (byte[]) data;
                 ByteArrayRequestEntity requestEntity = new ByteArrayRequestEntity(dataBytes, context.getContentType());
-                ((EntityEnclosingMethod)httpMethod).setRequestEntity(requestEntity);
-            }
-            else if (data instanceof InputStream)
-            {
-                InputStreamRequestEntity requestEntity = new InputStreamRequestEntity((InputStream)data, context.getContentType());
-                ((EntityEnclosingMethod)httpMethod).setRequestEntity(requestEntity);
+                ((EntityEnclosingMethod) httpMethod).setRequestEntity(requestEntity);
+            } else if (data instanceof InputStream) {
+                InputStreamRequestEntity requestEntity = new InputStreamRequestEntity((InputStream) data, context.getContentType());
+                ((EntityEnclosingMethod) httpMethod).setRequestEntity(requestEntity);
             }
             //TODO: Support multipart post
             //else
             //{
-                //FIXME: Throw exception if unhandled data type
+            //FIXME: Throw exception if unhandled data type
             //}
-        }
-        else if (httpMethod instanceof GetMethod)
-        {
+        } else if (httpMethod instanceof GetMethod) {
             Object req = processBody(context);
 
-            if (req instanceof String)
-            {
-                String requestString = (String)req;
-                if (Log.isInfo())
-                {
+            if (req instanceof String) {
+                String requestString = (String) req;
+                if (Log.isInfo()) {
                     Logger logger = Log.getLogger(HTTPProxyService.LOG_CATEGORY);
                     logger.debug(BEGIN + method + REQUEST);
                     logger.debug(StringUtils.prettifyString(requestString));
                     logger.debug(END + method + REQUEST);
                 }
 
-                if (!"".equals(requestString))
-                {
+                if (!"".equals(requestString)) {
                     String query = context.getHttpMethod().getQueryString();
-                    if (query != null)
-                    {
+                    if (query != null) {
                         query += "&" + requestString;
-                    }
-                    else
-                    {
+                    } else {
                         query = requestString;
                     }
                     context.getHttpMethod().setQueryString(query);
@@ -545,23 +448,18 @@
 
         context.getHttpClient().setHostConfiguration(target.getHostConfig());
 
-        try
-        {
+        try {
             context.getHttpClient().executeMethod(context.getHttpMethod());
-        }
-        catch (UnknownHostException uhex)
-        {
+        } catch (UnknownHostException uhex) {
             ProxyException pe = new ProxyException();
-            pe.setMessage(UNKNOWN_HOST, new Object[] { uhex.getMessage() });
+            pe.setMessage(UNKNOWN_HOST, new Object[]{uhex.getMessage()});
             pe.setCode(ProxyException.CODE_SERVER_PROXY_REQUEST_FAILED);
             throw pe;
-        }
-        catch (Exception ex)
-        {
+        } catch (Exception ex) {
             // FIXME: JRB - could be more specific by looking for timeout and sending 504 in that case.
             // rfc2616 10.5.5 504 - could get more specific if we parse the HttpException
             ProxyException pe = new ProxyException(CAUGHT_ERROR);
-            pe.setDetails(CAUGHT_ERROR, "1", new Object[] { ex.getMessage() });
+            pe.setDetails(CAUGHT_ERROR, "1", new Object[]{ex.getMessage()});
             pe.setCode(ProxyException.CODE_SERVER_PROXY_REQUEST_FAILED);
             throw pe;
         }
@@ -573,55 +471,39 @@
      * @param context the context
      * @return the body content
      */
-    protected Object processBody(ProxyContext context)
-    {
+    protected Object processBody(ProxyContext context) {
         //FIXME: Should we also send on URL params that were used to contact the message broker servlet?
 
         Object body = context.getBody();
-        if (body == null)
-        {
+        if (body == null) {
             return "";
-        }
-        else if (body instanceof String)
-        {
+        } else if (body instanceof String) {
             return body;
-        }
-        else if (body instanceof Map)
-        {
-            Map params = (Map)body;
+        } else if (body instanceof Map) {
+            Map params = (Map) body;
 
             StringBuffer postData = new StringBuffer();
 
             boolean formValues = false;
-            for (Object entry : params.entrySet())
-            {
-                String name = (String) ((Map.Entry)entry).getKey();
-                if (!formValues)
-                {
+            for (Object entry : params.entrySet()) {
+                String name = (String) ((Map.Entry) entry).getKey();
+                if (!formValues) {
                     formValues = true;
-                }
-                else
-                {
+                } else {
                     postData.append('&');
                 }
 
-                Object vals = ((Map.Entry)entry).getValue();
+                Object vals = ((Map.Entry) entry).getValue();
 
-                if (vals == null)
-                {
+                if (vals == null) {
                     encodeParam(postData, name, "");
-                }
-                else if (vals instanceof String)
-                {
+                } else if (vals instanceof String) {
                     String val = (String) vals;
                     encodeParam(postData, name, val);
-                }
-                else if (vals instanceof List)
-                {
+                } else if (vals instanceof List) {
                     List valLists = (List) vals;
 
-                    for (int i = 0; i < valLists.size(); i++)
-                    {
+                    for (int i = 0; i < valLists.size(); i++) {
                         Object o = valLists.get(i);
                         String val = "";
                         if (o != null)
@@ -632,11 +514,8 @@
 
                         encodeParam(postData, name, val);
                     }
-                }
-                else if (vals.getClass().isArray())
-                {
-                    for (int i = 0; i < Array.getLength(vals); i++)
-                    {
+                } else if (vals.getClass().isArray()) {
+                    for (int i = 0; i < Array.getLength(vals); i++) {
                         Object o = Array.get(vals, i);
                         String val = "";
                         if (o != null)
@@ -651,17 +530,11 @@
             }
 
             return postData.toString();
-        }
-        else if (body.getClass().isArray())
-        {
+        } else if (body.getClass().isArray()) {
             return body;
-        }
-        else if (body instanceof InputStream)
-        {
+        } else if (body instanceof InputStream) {
             return body;
-        }
-        else
-        {
+        } else {
             return body.toString();
         }
     }
@@ -669,12 +542,11 @@
     /**
      * Encode name=value in to a string buffer.
      *
-     * @param buf buffer
+     * @param buf  buffer
      * @param name name
-     * @param val value
+     * @param val  value
      */
-    protected void encodeParam(StringBuffer buf, String name, String val)
-    {
+    protected void encodeParam(StringBuffer buf, String name, String val) {
         name = URLEncoder.encode(name);
         val = URLEncoder.encode(val);
 
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/RequestUtil.java b/proxy/src/main/java/flex/messaging/services/http/proxy/RequestUtil.java
index 7025e45..2025229 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/RequestUtil.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/RequestUtil.java
@@ -20,18 +20,14 @@
 import flex.messaging.services.HTTPProxyService;
 
 /**
- *
  * Request methods shared by J2EE and .NET.
  */
-public class RequestUtil
-{
+public class RequestUtil {
     public static CookieInfo createCookie(CookieInfo cookie, SharedProxyContext context, String targetHost,
-                                          String targetPath)
-    {
+                                          String targetPath) {
         String path = cookie.path;
         String name = cookie.name;
-        if (path == null)
-        {
+        if (path == null) {
             path = "/";
         }
         String domain = null, actualName = null;
@@ -39,24 +35,20 @@
         // FIXME: append domain+path to existing path instead of doing cookie hack?
 
         //Cookie name format: COOKIE_PREFIX[COOKIE_SEPARATOR]domain[COOKIE_SEPARATOR]path[COOKIE_SEPARATOR]name
-        if (name.startsWith(ProxyConstants.COOKIE_PREFIX) && name.indexOf(ProxyConstants.COOKIE_SEPARATOR) != -1)
-        {
+        if (name.startsWith(ProxyConstants.COOKIE_PREFIX) && name.indexOf(ProxyConstants.COOKIE_SEPARATOR) != -1) {
             //use indexOf and substring instead of split or string tokenizer for performance
             int domainHash;
             int pathHash;
             int startIndex = name.indexOf(ProxyConstants.COOKIE_SEPARATOR) + 1;
             int endIndex = name.indexOf(ProxyConstants.COOKIE_SEPARATOR, startIndex);
             if (endIndex == -1) return null;
-            try
-            {
+            try {
                 domainHash = Integer.parseInt(name.substring(startIndex, endIndex));
                 startIndex = endIndex + 1;
                 endIndex = name.indexOf(ProxyConstants.COOKIE_SEPARATOR, startIndex);
                 if (endIndex == -1) return null;
                 pathHash = Integer.parseInt(name.substring(startIndex, endIndex));
-            }
-            catch (NumberFormatException e)
-            {
+            } catch (NumberFormatException e) {
                 Log.getLogger(HTTPProxyService.LOG_CATEGORY).error("Could not parse cookie hash value in: " + name + " (may be beta cookie)");
                 return null;
             }
@@ -65,15 +57,11 @@
             actualName = name.substring(startIndex);
             //see if the context.target domain fuzzy matches the cookie's domain
             domain = targetHost;
-            while (domain != null && domainHash != domain.hashCode())
-            {
+            while (domain != null && domainHash != domain.hashCode()) {
                 int dotIndex = domain.indexOf(".", 1);
-                if (dotIndex != -1)
-                {
+                if (dotIndex != -1) {
                     domain = domain.substring(dotIndex);
-                }
-                else
-                {
+                } else {
                     domain = null;
                 }
             }
@@ -83,23 +71,17 @@
             //to make sure we match cases where the path might have ended with a / or not. perhaps
             //we could do it slightly more efficiently by testing /foo/ and /foo in one go but not testing /fo
             path = targetPath;
-            while (path != null && path.length() != 0 && pathHash != path.hashCode())
-            {
+            while (path != null && path.length() != 0 && pathHash != path.hashCode()) {
                 path = path.substring(0, path.length() - 1);
             }
             if (path == null || path.length() == 0) return null;
-        }
-        else if (context.isLocalDomain())
-        {
+        } else if (context.isLocalDomain()) {
             domain = cookie.domain;
-            if (domain == null)
-            {
+            if (domain == null) {
                 domain = targetHost;
             }
             actualName = cookie.name;
-        }
-        else
-        {
+        } else {
             return null;
         }
 
@@ -108,8 +90,7 @@
         return cookieInfo;
     }
 
-    public static boolean ignoreHeader(String headerName, SharedProxyContext context)
-    {
+    public static boolean ignoreHeader(String headerName, SharedProxyContext context) {
         boolean ignoreHeader = false;
 
         // FIXME: do we really want to disallow Host- what does this do?
@@ -123,8 +104,7 @@
                 "Cookie".equalsIgnoreCase(headerName) ||
                 "Connection".equalsIgnoreCase(headerName) ||
                 ProxyConstants.HEADER_CREDENTIALS.equalsIgnoreCase(headerName) ||
-                ("Authorization".equalsIgnoreCase(headerName) && (context.hasAuthorization() || !context.isLocalDomain())))
-        {
+                ("Authorization".equalsIgnoreCase(headerName) && (context.hasAuthorization() || !context.isLocalDomain()))) {
 
             ignoreHeader = true;
         }
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/ResponseFilter.java b/proxy/src/main/java/flex/messaging/services/http/proxy/ResponseFilter.java
index 66c9f04..0d43257 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/ResponseFilter.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/ResponseFilter.java
@@ -43,11 +43,9 @@
 import flex.messaging.log.Log;
 
 /**
- *
  * Send the response to the client, including custom copying of headers and cookies.
  */
-public class ResponseFilter extends ProxyFilter
-{
+public class ResponseFilter extends ProxyFilter {
     // NOTE: any changes to this class should also be made to the corresponding version in the .NET.
     // The corresponding class is in src/dotNet/libs/FlexASPlib/Aspx/Proxy
 
@@ -58,10 +56,8 @@
     private static final int CANNOT_STREAM_NOT_HTTP = 10710;
     private static final int ERROR_WRITING_RESPONSE = 10711;
 
-    public void invoke(ProxyContext context)
-    {
-        if (next != null)
-        {
+    public void invoke(ProxyContext context) {
+        if (next != null) {
             next.invoke(context);
         }
 
@@ -72,12 +68,10 @@
         setupResponse(context);
     }
 
-    protected void checkStatusCode(ProxyContext context)
-    {
+    protected void checkStatusCode(ProxyContext context) {
         int statusCode = context.getStatusCode();
         // FIXME: Why do this only for HTTP Proxy? Why not WebServices?
-        if (statusCode >= 400 && statusCode != 401 & statusCode != 403 && !context.isSoapRequest())
-        {
+        if (statusCode >= 400 && statusCode != 401 & statusCode != 403 && !context.isSoapRequest()) {
             StatusLine statusLine = context.getHttpMethod().getStatusLine();
             String reason = null;
 
@@ -88,27 +82,23 @@
                 reason = String.valueOf(statusCode);
 
             ProxyException pe = new ProxyException();
-            pe.setMessage(STATUS_ERROR, new Object[] { reason });
+            pe.setMessage(STATUS_ERROR, new Object[]{reason});
             pe.setCode(ProxyException.CODE_SERVER_PROXY_REQUEST_FAILED);
-            pe.setDetails(STATUS_ERROR, "1", new Object[] { reason });
+            pe.setDetails(STATUS_ERROR, "1", new Object[]{reason});
             pe.setStatusCode(statusCode);
             throw pe;
         }
     }
 
-    protected void copyCookiesFromEndpoint(ProxyContext context)
-    {
+    protected void copyCookiesFromEndpoint(ProxyContext context) {
         HttpServletResponse clientResponse = FlexContext.getHttpResponse();
 
-        if (clientResponse != null)
-        {
+        if (clientResponse != null) {
             Cookie[] cookies = context.getHttpClient().getState().getCookies();
             // We need to filter out the request cookies, we don't need to send back to the client
             Set requestCookies = context.getRequestCookies();
-            for (int i = 0; i < cookies.length; i++)
-            {
-                if (requestCookies != null && requestCookies.contains(cookies[i]) && cookies[i].getExpiryDate() == null)
-                {
+            for (int i = 0; i < cookies.length; i++) {
+                if (requestCookies != null && requestCookies.contains(cookies[i]) && cookies[i].getExpiryDate() == null) {
                     // It means it is a request cookie and nothing changed, we need to skip it 
                     continue;
                 }
@@ -120,8 +110,7 @@
 
                 String clientName = ResponseUtil.getCookieName(context, path, name, domain);
 
-                if (Log.isInfo())
-                {
+                if (Log.isInfo()) {
                     String str = "-- Cookie in response: domain = '" + domain + "', path = '" + path +
                             "', client name = '" + clientName + "', endpoint name = '" + name + "', value = '" + value;
                     Log.getLogger(HTTPProxyService.LOG_CATEGORY).debug(str);
@@ -130,9 +119,8 @@
                 javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie(clientName, value);
 
                 Date expiry = cookies[i].getExpiryDate();
-                if (expiry != null)
-                {
-                    int maxAge = (int)((expiry.getTime() - System.currentTimeMillis()) / 1000);
+                if (expiry != null) {
+                    int maxAge = (int) ((expiry.getTime() - System.currentTimeMillis()) / 1000);
                     cookie.setMaxAge(maxAge);
                 }
                 cookie.setSecure(cookies[i].getSecure());
@@ -143,28 +131,22 @@
         }
     }
 
-    protected void copyHeadersFromEndpoint(ProxyContext context)
-    {
+    protected void copyHeadersFromEndpoint(ProxyContext context) {
         HttpServletResponse clientResponse = FlexContext.getHttpResponse();
 
-        if (clientResponse != null)
-        {
+        if (clientResponse != null) {
             Header[] headers = context.getHttpMethod().getResponseHeaders();
-            for (int i = 0; i < headers.length; i++)
-            {
+            for (int i = 0; i < headers.length; i++) {
                 Header header = headers[i];
                 String name = header.getName();
                 String value = header.getValue();
-                if (ResponseUtil.ignoreHeader(name, context))
-                {
+                if (ResponseUtil.ignoreHeader(name, context)) {
                     continue;
                 }
 
-                if ((name != null) && (value != null))
-                {
+                if ((name != null) && (value != null)) {
                     clientResponse.addHeader(name, value);
-                    if (Log.isInfo())
-                    {
+                    if (Log.isInfo()) {
                         Log.getLogger(HTTPProxyService.LOG_CATEGORY).debug("-- Header in response: " + name + " : " + value);
                     }
                 }
@@ -174,40 +156,32 @@
         }
     }
 
-    protected void recordResponseHeaders(ProxyContext context)
-    {
+    protected void recordResponseHeaders(ProxyContext context) {
         String method = context.getMethod();
-        if (context.getRecordHeaders() || ProxyConstants.METHOD_HEAD.equals(method))
-        {
+        if (context.getRecordHeaders() || ProxyConstants.METHOD_HEAD.equals(method)) {
             Header[] headers = context.getHttpMethod().getResponseHeaders();
             HashMap responseHeaders = new HashMap();
-            for (int i = 0; i < headers.length; i++)
-            {
+            for (int i = 0; i < headers.length; i++) {
                 Header header = headers[i];
                 String headerName = header.getName();
                 String headerValue = header.getValue();
                 Object existingHeaderValue = responseHeaders.get(headerName);
                 // Value(s) already exist for the header.
-                if (existingHeaderValue != null)
-                {
+                if (existingHeaderValue != null) {
                     ArrayList headerValues;
                     // Only a single value exists.
-                    if (existingHeaderValue instanceof String)
-                    {
+                    if (existingHeaderValue instanceof String) {
                         headerValues = new ArrayList();
                         headerValues.add(existingHeaderValue);
                         headerValues.add(headerValue);
                         responseHeaders.put(headerName, headerValues);
                     }
                     // Multiple values exist.
-                    else if (existingHeaderValue instanceof ArrayList)
-                    {
-                        headerValues = (ArrayList)existingHeaderValue;
+                    else if (existingHeaderValue instanceof ArrayList) {
+                        headerValues = (ArrayList) existingHeaderValue;
                         headerValues.add(headerValue);
                     }
-                }
-                else
-                {
+                } else {
                     responseHeaders.put(headerName, headerValue);
                 }
             }
@@ -216,115 +190,84 @@
     }
 
 
-    protected void setupResponse(ProxyContext context)
-    {
+    protected void setupResponse(ProxyContext context) {
         String method = context.getMethod();
         HttpMethodBase httpMethod = context.getHttpMethod();
-        if (MessageIOConstants.METHOD_POST.equals(method))
-        {
+        if (MessageIOConstants.METHOD_POST.equals(method)) {
             writeResponse(context);
-        }
-        else if (ProxyConstants.METHOD_GET.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_GET.equals(method)) {
             writeResponse(context);
-        }
-        else if (ProxyConstants.METHOD_OPTIONS.equals(method))
-        {
-            OptionsMethod optionsMethod = (OptionsMethod)httpMethod;
+        } else if (ProxyConstants.METHOD_OPTIONS.equals(method)) {
+            OptionsMethod optionsMethod = (OptionsMethod) httpMethod;
             Enumeration options = optionsMethod.getAllowedMethods();
-            if (options != null)
-            {
+            if (options != null) {
                 List ops = new ArrayList();
-                while (options.hasMoreElements())
-                {
+                while (options.hasMoreElements()) {
                     Object option = options.nextElement();
                     ops.add(option);
                 }
                 Object[] o = ops.toArray();
                 context.setResponse(o);
             }
-        }
-        else if (ProxyConstants.METHOD_TRACE.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_TRACE.equals(method)) {
             writeResponse(context);
-        }
-        else if (ProxyConstants.METHOD_DELETE.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_DELETE.equals(method)) {
             writeResponse(context);
-        }
-        else if (ProxyConstants.METHOD_HEAD.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_HEAD.equals(method)) {
             context.setResponse(context.getResponseHeaders());
-        }
-        else if (ProxyConstants.METHOD_PUT.equals(method))
-        {
+        } else if (ProxyConstants.METHOD_PUT.equals(method)) {
             writeResponse(context);
         }
     }
 
-    protected void writeResponse(ProxyContext context)
-    {
-        try
-        {
+    protected void writeResponse(ProxyContext context) {
+        try {
             InputStream in = context.getHttpMethod().getResponseBodyAsStream();
 
-            if (in == null)
-            {
+            if (in == null) {
                 throw new ProxyException(NULL_RESPONSE_STREAM);
             }
 
-            int length = (int)context.getHttpMethod().getResponseContentLength();
+            int length = (int) context.getHttpMethod().getResponseContentLength();
 
             // Stream response directly to client
-            if (context.streamResponseToClient())
-            {
+            if (context.streamResponseToClient()) {
                 HttpServletResponse clientResponse = FlexContext.getHttpResponse();
 
-                if (clientResponse != null)
-                {
+                if (clientResponse != null) {
                     OutputStream out = clientResponse.getOutputStream();
-                    if (length != -1)
-                    {
+                    if (length != -1) {
                         clientResponse.setContentLength(length);
                     }
 
                     writeStreamedResponse(in, out, context);
-                }
-                else
-                {
+                } else {
                     throw new ProxyException(CANNOT_STREAM_NOT_HTTP);
                 }
-            }
-            else
-            {
+            } else {
                 writeResponseAsString(in, length, context);
             }
-        }
-        catch (IOException ioe)
-        {
+        } catch (IOException ioe) {
             ProxyException pe = new ProxyException();
-            pe.setMessage(ERROR_WRITING_RESPONSE, new Object[] { ioe.getMessage() });
+            pe.setMessage(ERROR_WRITING_RESPONSE, new Object[]{ioe.getMessage()});
             throw pe;
         }
     }
 
-    protected void writeStreamedResponse(InputStream inStream, OutputStream out, ProxyContext context) throws IOException
-    {
+    protected void writeStreamedResponse(InputStream inStream, OutputStream out, ProxyContext context) throws IOException {
         byte[] tmp = new byte[RESPONSE_CHUNK];
         int i = 0;
 
-        while ((i = inStream.read(tmp)) >= 0)
-        {
+        while ((i = inStream.read(tmp)) >= 0) {
             out.write(tmp, 0, i);
         }
     }
 
     protected void writeResponseAsString(InputStream inStream, int length, ProxyContext context)
-            throws IOException
-    {
+            throws IOException {
         char[] tmp = new char[RESPONSE_CHUNK];
         //int i = 0;
-        StringBuffer sb = new StringBuffer( length < 0 ? 16 : length);
+        StringBuffer sb = new StringBuffer(length < 0 ? 16 : length);
         BufferedInputStream bufferedIn = new BufferedInputStream(inStream);
         String charset = context.getHttpMethod().getResponseCharSet();
 
@@ -333,17 +276,13 @@
         // Check for BOM as InputStreamReader does not strip BOM in all cases.
         boolean hasBOM = false;
         int read = bufferedIn.read();
-        if (read > 0)
-        {
+        if (read > 0) {
             // UTF-8 BOM is EF BB BF
-            if (0xEF == (read & 0xFF))
-            {
+            if (0xEF == (read & 0xFF)) {
                 read = bufferedIn.read();
-                if (0xBB == (read & 0xFF))
-                {
+                if (0xBB == (read & 0xFF)) {
                     read = bufferedIn.read();
-                    if (0xBF == (read & 0xFF))
-                    {
+                    if (0xBF == (read & 0xFF)) {
                         hasBOM = true;
                         charset = "UTF-8";
                     }
@@ -351,57 +290,43 @@
             }
             // UTF-16 Little Endian BOM is FF FE
             // UTF-32 Little Endian BOM is FF FE 00 00
-            else if (0xFF == (read & 0xFF))
-            {
+            else if (0xFF == (read & 0xFF)) {
                 read = bufferedIn.read();
-                if (0xFE == (read & 0xFF))
-                {
+                if (0xFE == (read & 0xFF)) {
                     hasBOM = true;
                     charset = "UTF16-LE";
 
                     // Check two more bytes incase we have UTF-32
                     bufferedIn.mark(2);
                     read = bufferedIn.read();
-                    if (0x00 == (read & 0xFF))
-                    {
+                    if (0x00 == (read & 0xFF)) {
                         read = bufferedIn.read();
-                        if (0x00 == (read & 0xFF))
-                        {
+                        if (0x00 == (read & 0xFF)) {
                             charset = "UTF32-LE";
-                        }
-                        else
-                        {
+                        } else {
                             bufferedIn.reset();
                         }
-                    }
-                    else
-                    {
+                    } else {
                         bufferedIn.reset();
                     }
                 }
             }
             // UTF-16 Big Endian BOM is FE FF
-            else if (0xFE == (read & 0xFF))
-            {
+            else if (0xFE == (read & 0xFF)) {
                 read = bufferedIn.read();
-                if (0xFF == (read & 0xFF))
-                {
+                if (0xFF == (read & 0xFF)) {
                     hasBOM = true;
                     charset = "UTF16-BE";
                 }
             }
             // UTF-32 Big Endian BOM is 00 00 FE FF
-            else if (0x00 == (read & 0xFF))
-            {
+            else if (0x00 == (read & 0xFF)) {
                 read = bufferedIn.read();
-                if (0x00 == (read & 0xFF))
-                {
+                if (0x00 == (read & 0xFF)) {
                     read = bufferedIn.read();
-                    if (0xFE == (read & 0xFF))
-                    {
+                    if (0xFE == (read & 0xFF)) {
                         read = bufferedIn.read();
-                        if (0xFF == (read & 0xFF))
-                        {
+                        if (0xFF == (read & 0xFF)) {
                             hasBOM = true;
                             charset = "UTF32-BE";
                         }
@@ -416,8 +341,7 @@
 
         BufferedReader reader = new BufferedReader(new InputStreamReader(bufferedIn, charset));
         int charactersRead = -1;
-        while ((charactersRead = reader.read(tmp, 0, tmp.length)) >= 0)
-        {
+        while ((charactersRead = reader.read(tmp, 0, tmp.length)) >= 0) {
             sb.append(new String(tmp, 0, charactersRead));
         }
 
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/ResponseUtil.java b/proxy/src/main/java/flex/messaging/services/http/proxy/ResponseUtil.java
index f2f0c1b..d4f8ae6 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/ResponseUtil.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/ResponseUtil.java
@@ -17,20 +17,14 @@
 package flex.messaging.services.http.proxy;
 
 /**
- *
  * Response methods shared by J2EE and .NET.
  */
-public class ResponseUtil
-{
-    public static String getCookieName(ProxyContext context, String path, String name, String domain)
-    {
+public class ResponseUtil {
+    public static String getCookieName(ProxyContext context, String path, String name, String domain) {
         String clientName;
-        if (context.isLocalDomain() && (path == null || path.equals("/")))
-        {
+        if (context.isLocalDomain() && (path == null || path.equals("/"))) {
             clientName = name;
-        }
-        else
-        {
+        } else {
             //Cookie name format: COOKIE_PREFIX[COOKIE_SEPARATOR]domain[COOKIE_SEPARATOR]path[COOKIE_SEPARATOR]name
             StringBuffer nameBuf = new StringBuffer(40); //estimated length to usually avoid the buffer needing to grow
             nameBuf.append(ProxyConstants.COOKIE_PREFIX);
@@ -46,8 +40,7 @@
     }
 
 
-    public static boolean ignoreHeader(String name, ProxyContext context)
-    {
+    public static boolean ignoreHeader(String name, ProxyContext context) {
         boolean ignoreHeader = false;
         if ("Content-Length".equalsIgnoreCase(name) ||
                 "Set-Cookie".equalsIgnoreCase(name) ||
@@ -60,9 +53,8 @@
                 "Connection".equalsIgnoreCase(name) ||
                 // ignore caching headers if we want to stop caching on this request
                 (context.disableCaching() && ("Cache-Control".equalsIgnoreCase(name) ||
-                "Expires".equalsIgnoreCase(name) || "Pragma".equalsIgnoreCase(name)))
-        )
-        {
+                        "Expires".equalsIgnoreCase(name) || "Pragma".equalsIgnoreCase(name)))
+        ) {
             ignoreHeader = true;
         }
         return ignoreHeader;
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/SecurityFilter.java b/proxy/src/main/java/flex/messaging/services/http/proxy/SecurityFilter.java
index 3859c91..ff48bda 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/SecurityFilter.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/SecurityFilter.java
@@ -29,16 +29,14 @@
 import java.util.Enumeration;
 
 /**
- *
  * Handles whitelist/access and authentication/authorization system for requests.  Checks URL to make sure we
  * accept it.  Sets credentials if needed on the request.  After the request is made, changes response for
  * security info if needed
  */
-public class SecurityFilter extends ProxyFilter
-{
+public class SecurityFilter extends ProxyFilter {
     // NOTE: any changes to this class should also be made to the corresponding version in the .NET.
     // The corresponding class is in src/dotNet/libs/FlexASPlib/Aspx/Proxy
-    
+
     private static final int EMPTY_ERROR = 10708;
     private static final int ONLY_HTTP_HTTPS = 10712;
     private static final int NO_HTTPS_VIA_HTTP = 10713;
@@ -48,32 +46,27 @@
     private static final int LOGIN_REQUIRED = 10717;
     private static final int UNAUTHORIZED_ERROR = 10718;
 
-    public void invoke(ProxyContext context)
-    {
+    public void invoke(ProxyContext context) {
         checkURL(context);
         setCredentials(context);
 
-        if (next != null)
-        {
+        if (next != null) {
             next.invoke(context);
         }
 
         sendSecurityInfo(context);
     }
 
-    private void checkURL(ProxyContext context)
-    {
+    private void checkURL(ProxyContext context) {
         Target target = context.getTarget();
 
         // We only allow http type urls
-        if (!context.getTarget().getUrl().getProtocol().equalsIgnoreCase("http") && !target.isHTTPS())
-        {
+        if (!context.getTarget().getUrl().getProtocol().equalsIgnoreCase("http") && !target.isHTTPS()) {
             Log.getLogger(HTTPProxyService.LOG_CATEGORY).warn(ProxyConstants.PROXY_SECURITY + ProxyConstants.ONLY_HTTP_HTTPS);
             throw new ProxyException(ONLY_HTTP_HTTPS);
         }
 
-        if (target.isHTTPS() && !context.isClientHttps())
-        {
+        if (target.isHTTPS() && !context.isClientHttps()) {
             // Respond with error
             Log.getLogger(HTTPProxyService.LOG_CATEGORY).warn(ProxyConstants.PROXY_SECURITY + ProxyConstants.NO_HTTPS_VIA_HTTP);
 
@@ -81,8 +74,7 @@
         }
     }
 
-    private void setCredentials(ProxyContext context)
-    {
+    private void setCredentials(ProxyContext context) {
         String user = null, password = null;
 
         // Check for credentials in runAs
@@ -91,55 +83,43 @@
 
         String fromRequest = null;
         HttpServletRequest clientRequest = FlexContext.getHttpRequest();
-        if (clientRequest != null)
-        {
+        if (clientRequest != null) {
             // Check for credentials in parameter/header
             fromRequest = clientRequest.getHeader(ProxyConstants.HEADER_CREDENTIALS);
         }
 
         // We sometimes send the credentials as a URL parameter to work around a player/Opera issue
-        if (fromRequest == null)
-        {
+        if (fromRequest == null) {
             fromRequest = context.getCredentialsHeader();
         }
 
         // Add authentication header for credentials
-        if (fromRequest != null)
-        {
+        if (fromRequest != null) {
             Base64.Decoder decoder = new Base64.Decoder();
             decoder.decode(fromRequest);
             String decoded = new String(decoder.drain());
             int colonIdx = decoded.indexOf(":");
-            if (colonIdx != -1)
-            {
+            if (colonIdx != -1) {
                 user = decoded.substring(0, colonIdx);
             }
             password = decoded.substring(colonIdx + 1);
         }
 
         // Check for existing authentication header
-        if (clientRequest != null)
-        {
+        if (clientRequest != null) {
             Enumeration headers = clientRequest.getHeaders("Authorization");
-            if (headers != null)
-            {
-                while (headers.hasMoreElements())
-                {
-                    String value = (String)headers.nextElement();
+            if (headers != null) {
+                while (headers.hasMoreElements()) {
+                    String value = (String) headers.nextElement();
 
-                    if (value.startsWith("Basic"))
-                    {
-                        if (!context.isLocalDomainAndPort())
-                        {
-                            if (Log.isInfo())
-                            {
+                    if (value.startsWith("Basic")) {
+                        if (!context.isLocalDomainAndPort()) {
+                            if (Log.isInfo()) {
                                 Log.getLogger(HTTPProxyService.LOG_CATEGORY).debug("Not sending on Authentication header. Proxy domain:port of " +
                                         clientRequest.getServerName() + ":" + clientRequest.getServerPort() + " does not match target domain:port of " +
                                         context.getTarget().getUrl().getHost() + ":" + context.getTarget().getUrl().getPort());
                             }
-                        }
-                        else
-                        {
+                        } else {
                             // Super gross hack to work around what appears to be an commons-httpclient bug
                             // where headers are not resent after a 302.
                             Base64.Decoder decoder = new Base64.Decoder();
@@ -156,22 +136,19 @@
         }
 
         // Set up request for authentication
-        if (user != null)
-        {
+        if (user != null) {
             UsernamePasswordCredentials cred = new UsernamePasswordCredentials(user, password);
 
             context.getHttpClient().getState().setCredentials(ProxyUtil.getDefaultAuthScope(), cred);
             context.setAuthorization(true);
 
-            if (Log.isInfo())
-            {
+            if (Log.isInfo()) {
                 Log.getLogger(HTTPProxyService.LOG_CATEGORY).info("-- Authentication header being sent for " + user);
             }
         }
     }
 
-    private void sendSecurityInfo(ProxyContext context)
-    {
+    private void sendSecurityInfo(ProxyContext context) {
         Target target = context.getTarget();
         String targetHost = target.getUrl().getHost();
 
@@ -180,68 +157,51 @@
         boolean customAuth = target.useCustomAuthentication();
 
         StatusLine statusLine = context.getHttpMethod().getStatusLine();
-        if (statusLine != null)
-        {
+        if (statusLine != null) {
             statusCode = statusLine.getStatusCode();
         }
 
         context.setStatusCode(statusCode);
 
-        if (statusCode == 401 || statusCode == 403)
-        {
-            if (!customAuth)
-            {
-                if (!context.isHttpRequest())
-                {
+        if (statusCode == 401 || statusCode == 403) {
+            if (!customAuth) {
+                if (!context.isHttpRequest()) {
                     throw new ProxyException(NO_BASIC_NOT_HTTP);
-                }
-                else if (context.isSoapRequest())
-                {
+                } else if (context.isSoapRequest()) {
                     // Note: if we remove this error, must do the proxyDomain/targetHost check as done above
                     throw new ProxyException(NO_BASIC_FOR_SOAP);
-                }
-                else
-                {
+                } else {
                     // Don't allow a 401 (and 403, although this should never happen) to be sent to the client
                     // if the service is not using custom authentication and the domains do not match
 
-                    if (!context.isLocalDomainAndPort())
-                    {
+                    if (!context.isLocalDomainAndPort()) {
                         HttpServletRequest clientRequest = FlexContext.getHttpRequest();
 
                         String errorMessage = ProxyConstants.DOMAIN_ERROR + " . The proxy domain:port is " +
-                                clientRequest.getServerName() + ":" + clientRequest.getServerPort() + 
+                                clientRequest.getServerName() + ":" + clientRequest.getServerPort() +
                                 " and the target domain:port is " + targetHost + ":" + target.getUrl().getPort();
 
                         Log.getLogger(HTTPProxyService.LOG_CATEGORY).error(errorMessage);
 
                         throw new ProxyException(DOMAIN_ERROR);
-                    }
-                    else
-                    {
+                    } else {
                         //For BASIC Auth, send back the status code
                         HttpServletResponse clientResponse = FlexContext.getHttpResponse();
                         clientResponse.setStatus(statusCode);
                     }
                 }
-            }
-            else
-            {
+            } else {
                 String message = null;
                 if (statusLine != null)
                     message = statusLine.toString();
 
-                if (statusCode == 401)
-                {
+                if (statusCode == 401) {
                     ProxyException se = new ProxyException();
                     se.setCode("Client.Authentication");
-                    if (message == null)
-                    {
+                    if (message == null) {
                         se.setMessage(LOGIN_REQUIRED);
-                    }
-                    else
-                    {
-                        se.setMessage(EMPTY_ERROR, new Object[] { message });
+                    } else {
+                        se.setMessage(EMPTY_ERROR, new Object[]{message});
                     }
 
 
@@ -249,18 +209,13 @@
                     if (header != null)
                         se.setDetails(header.getValue());
                     throw se;
-                }
-                else
-                {
+                } else {
                     ProxyException se = new ProxyException();
                     se.setCode("Client.Authentication");
-                    if (message == null)
-                    {
+                    if (message == null) {
                         se.setMessage(UNAUTHORIZED_ERROR);
-                    }
-                    else
-                    {
-                        se.setMessage(EMPTY_ERROR, new Object[] { message });
+                    } else {
+                        se.setMessage(EMPTY_ERROR, new Object[]{message});
                     }
                     throw se;
                 }
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/SharedProxyContext.java b/proxy/src/main/java/flex/messaging/services/http/proxy/SharedProxyContext.java
index cc03f60..55fe615 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/SharedProxyContext.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/SharedProxyContext.java
@@ -17,11 +17,9 @@
 package flex.messaging.services.http.proxy;
 
 /**
- *
  * Store all the information needed for a proxy request that's used in flex.server.common.proxy.
  */
-public class SharedProxyContext
-{
+public class SharedProxyContext {
     // POST, GET, HEAD etc
     private String method;
 
@@ -41,98 +39,79 @@
     // whether target URL came from the client
     private boolean clientTarget;
 
-    public String getMethod()
-    {
+    public String getMethod() {
         return method;
     }
 
-    public void setMethod(String method)
-    {
+    public void setMethod(String method) {
         this.method = method;
     }
 
-    public boolean isSoapRequest()
-    {
+    public boolean isSoapRequest() {
         return isSoapRequest;
     }
 
-    public void setSoapRequest(boolean s)
-    {
+    public void setSoapRequest(boolean s) {
         isSoapRequest = s;
     }
 
-    public boolean isHttpRequest()
-    {
+    public boolean isHttpRequest() {
         return isHttpRequest;
     }
 
-    public void setHttpRequest(boolean h)
-    {
+    public void setHttpRequest(boolean h) {
         isHttpRequest = h;
     }
 
-    public boolean isClientHttps()
-    {
+    public boolean isClientHttps() {
         return isClientHttps;
     }
 
-    public void setClientHttps(boolean h)
-    {
+    public void setClientHttps(boolean h) {
         isClientHttps = h;
     }
 
-    public boolean hasAuthorization()
-    {
+    public boolean hasAuthorization() {
         return hasAuthorization;
     }
 
-    public void setAuthorization(boolean hasAuthorization)
-    {
+    public void setAuthorization(boolean hasAuthorization) {
         this.hasAuthorization = hasAuthorization;
     }
 
-    public boolean isLocalDomain()
-    {
+    public boolean isLocalDomain() {
         return localDomain;
     }
 
-    public void setLocalDomain(boolean localDomain)
-    {
+    public void setLocalDomain(boolean localDomain) {
         this.localDomain = localDomain;
     }
-    
-    public boolean isLocalPort()
-    {
+
+    public boolean isLocalPort() {
         return localPort;
     }
-  
-    public void setLocalPort(boolean localPort)
-    {
+
+    public void setLocalPort(boolean localPort) {
         this.localPort = localPort;
     }
-    
-    public boolean isLocalDomainAndPort()
-    {
+
+    public boolean isLocalDomainAndPort() {
         return localDomain && localPort;
     }
 
-    public boolean disableCaching()
-    {
+    public boolean disableCaching() {
         return disableCaching;
     }
 
-    public void setDisableCaching(boolean disableCaching)
-    {
+    public void setDisableCaching(boolean disableCaching) {
         this.disableCaching = disableCaching;
     }
 
-    public boolean isClientTarget()
-    {
+    public boolean isClientTarget() {
         return clientTarget;
     }
 
-    public void setClientTarget(boolean clientTarget)
-    {
+    public void setClientTarget(boolean clientTarget) {
         this.clientTarget = clientTarget;
     }
 }
diff --git a/proxy/src/main/java/flex/messaging/services/http/proxy/Target.java b/proxy/src/main/java/flex/messaging/services/http/proxy/Target.java
index b4b7a87..d25ca1b 100755
--- a/proxy/src/main/java/flex/messaging/services/http/proxy/Target.java
+++ b/proxy/src/main/java/flex/messaging/services/http/proxy/Target.java
@@ -21,11 +21,9 @@
 import java.net.URL;
 
 /**
- *
  * Encapsulates information about a proxy target.
  */
-public class Target
-{
+public class Target {
     // FIXME: this class turned out not to be as useful as originally thought.  Should move this information
     // directly into ProxyContext
 
@@ -37,73 +35,59 @@
     private String remotePassword;
     private HostConfiguration hostConfig;
 
-    public URL getUrl()
-    {
+    public URL getUrl() {
         return url;
     }
 
-    public void setUrl(URL url)
-    {
+    public void setUrl(URL url) {
         this.url = url;
     }
 
-    public boolean isHTTPS()
-    {
+    public boolean isHTTPS() {
         return isHTTPS;
     }
 
-    public void setHTTPS(boolean HTTPS)
-    {
+    public void setHTTPS(boolean HTTPS) {
         isHTTPS = HTTPS;
     }
 
-    public String getEncodedPath()
-    {
+    public String getEncodedPath() {
         return encodedPath;
     }
 
-    public void setEncodedPath(String encodedPath)
-    {
+    public void setEncodedPath(String encodedPath) {
         this.encodedPath = encodedPath;
     }
 
-    public HostConfiguration getHostConfig()
-    {
+    public HostConfiguration getHostConfig() {
         return hostConfig;
     }
 
-    public void setHostConfig(HostConfiguration hostConfig)
-    {
+    public void setHostConfig(HostConfiguration hostConfig) {
         this.hostConfig = hostConfig;
     }
 
-    public String getRemoteUsername()
-    {
+    public String getRemoteUsername() {
         return remoteUsername;
     }
 
-    public void setRemoteUsername(String name)
-    {
+    public void setRemoteUsername(String name) {
         remoteUsername = name;
     }
 
-    public String getRemotePassword()
-    {
+    public String getRemotePassword() {
         return remotePassword;
     }
 
-    public void setRemotePassword(String pass)
-    {
+    public void setRemotePassword(String pass) {
         remotePassword = pass;
     }
 
-    public boolean useCustomAuthentication()
-    {
+    public boolean useCustomAuthentication() {
         return useCustomAuthentication;
     }
 
-    public void setUseCustomAuthentication(boolean b)
-    {
+    public void setUseCustomAuthentication(boolean b) {
         useCustomAuthentication = b;
     }
 }
diff --git a/remoting/build.xml b/remoting/build.xml
index f68a21b..0a3c10e 100755
--- a/remoting/build.xml
+++ b/remoting/build.xml
@@ -45,8 +45,8 @@
     <target name="run-depend" if="src.depend">
         <echo message="Removing class files that changed and dependent class files."/>
         <depend cache="${module.classes}" srcdir="${module.src}" destdir="${module.classes}"/>
-    </target>   
-                
+    </target>
+
     <target name="clean" description="clean">
         <delete file="${module.jar}" failonerror="false"/>
         <delete failonerror="false" includeEmptyDirs="true">
@@ -56,13 +56,13 @@
                 <exclude name=".dependency-info/**"/>
             </fileset>
         </delete>
-        <delete quiet="true" dir="${module.classes}" />
+        <delete quiet="true" dir="${module.classes}"/>
         <echo>modules/remoting clean</echo>
     </target>
 
     <target name="compile" depends="prepare" description="compile">
         <javac debug="${src.debug}" destdir="${module.classes}" srcdir="${module.src}"
-            includes="**/*.java" classpathref="classpath"/>
+               includes="**/*.java" classpathref="classpath"/>
         <echo file="${module.classes}/flex/messaging/version.properties" append="false">build=${build.number}</echo>
     </target>
 
@@ -74,8 +74,9 @@
             <exclude name=".dependency-info/**"/>
             <manifest>
                 <attribute name="Sealed" value="${manifest.sealed}"/>
-                <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Community Edition - Remoting Module"/>
-                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/> 
+                <attribute name="Implementation-Title"
+                           value="${manifest.Implementation-Title} - Community Edition - Remoting Module"/>
+                <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
                 <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
             </manifest>
         </jar>
diff --git a/remoting/pom.xml b/remoting/pom.xml
index 24c432c..c688b63 100755
--- a/remoting/pom.xml
+++ b/remoting/pom.xml
@@ -16,44 +16,44 @@
 limitations under the License.
 
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
 
-  <parent>
-    <groupId>org.apache.flex.blazeds</groupId>
-    <artifactId>blazeds</artifactId>
-    <version>4.7.3</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
+    <parent>
+        <groupId>org.apache.flex.blazeds</groupId>
+        <artifactId>blazeds</artifactId>
+        <version>4.8.0-SNAPSHOT</version>
+    </parent>
 
-  <artifactId>flex-messaging-remoting</artifactId>
+    <artifactId>flex-messaging-remoting</artifactId>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.flex.blazeds</groupId>
-      <artifactId>flex-messaging-core</artifactId>
-      <version>${project.version}</version>
-    </dependency>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.flex.blazeds</groupId>
+            <artifactId>flex-messaging-core</artifactId>
+            <version>4.8.0-SNAPSHOT</version>
+        </dependency>
 
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-server</artifactId>
-      <version>9.1.0.v20131115</version>
-      <scope>test</scope>
-    </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-server</artifactId>
+            <version>9.3.30.v20211001</version>
+            <scope>test</scope>
+        </dependency>
 
-    <dependency>
-      <groupId>org.eclipse.jetty</groupId>
-      <artifactId>jetty-servlet</artifactId>
-      <version>9.1.0.v20131115</version>
-      <scope>test</scope>
-    </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlet</artifactId>
+            <version>9.3.30.v20211001</version>
+            <scope>test</scope>
+        </dependency>
 
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
 </project>
diff --git a/remoting/src/main/java/flex/management/runtime/messaging/services/RemotingServiceControl.java b/remoting/src/main/java/flex/management/runtime/messaging/services/RemotingServiceControl.java
index 1ab44ec..de9f84f 100755
--- a/remoting/src/main/java/flex/management/runtime/messaging/services/RemotingServiceControl.java
+++ b/remoting/src/main/java/flex/management/runtime/messaging/services/RemotingServiceControl.java
@@ -24,26 +24,25 @@
  * for monitoring and managing a <code>RemotingService</code> at runtime.
  */
 public class RemotingServiceControl extends ServiceControl implements
-        RemotingServiceControlMBean
-{
+        RemotingServiceControlMBean {
     private static final String TYPE = "RemotingService";
-    
+
     /**
      * Constructs a <code>RemotingServiceControl</code>, assigning its id, managed
      * remoting service and parent MBean.
-     * 
+     *
      * @param service The <code>RemotingService</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent  The parent MBean in the management hierarchy.
      */
-    public RemotingServiceControl(RemotingService service, BaseControl parent)
-    {
+    public RemotingServiceControl(RemotingService service, BaseControl parent) {
         super(service, parent);
     }
 
-    /** {@inheritDoc} */
-    public String getType()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String getType() {
         return TYPE;
     }
-    
+
 }
diff --git a/remoting/src/main/java/flex/management/runtime/messaging/services/RemotingServiceControlMBean.java b/remoting/src/main/java/flex/management/runtime/messaging/services/RemotingServiceControlMBean.java
index e6ed24a..6a7c24f 100755
--- a/remoting/src/main/java/flex/management/runtime/messaging/services/RemotingServiceControlMBean.java
+++ b/remoting/src/main/java/flex/management/runtime/messaging/services/RemotingServiceControlMBean.java
@@ -20,7 +20,6 @@
 /**
  * Defines the runtime monitoring and management interface for managed remoting services.
  */
-public interface RemotingServiceControlMBean extends ServiceControlMBean
-{
+public interface RemotingServiceControlMBean extends ServiceControlMBean {
     // Empty for now.
 }
diff --git a/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/RemotingDestinationControl.java b/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/RemotingDestinationControl.java
index 09ac218..812fec9 100755
--- a/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/RemotingDestinationControl.java
+++ b/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/RemotingDestinationControl.java
@@ -26,23 +26,21 @@
 /**
  * The <code>RemotingDestinationControl</code> class is the MBean implementation for
  * monitoring and managing a <code>RemotingDestination</code> at runtime.
- *
+ * <p>
  * This class performs no internal synchronization, so the statistics it tracks may differ slightly from
  * the true values but they don't warrant the cost full synchronization.
  */
 public class RemotingDestinationControl extends DestinationControl implements
-        RemotingDestinationControlMBean
-{
+        RemotingDestinationControlMBean {
     private static final String TYPE = "RemotingDestination";
 
     /**
      * Constructs a new <code>RemotingDestinationControl</code> instance.
      *
      * @param destination The <code>RemotingDestination</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent      The parent MBean in the management hierarchy.
      */
-    public RemotingDestinationControl(RemotingDestination destination, BaseControl parent)
-    {
+    public RemotingDestinationControl(RemotingDestination destination, BaseControl parent) {
         super(destination, parent);
     }
 
@@ -51,16 +49,18 @@
     private int totalProcessingTimeMillis = 0;
     private int averageProcessingTimeMillis = 0;
 
-    /** {@inheritDoc} */
+    /**
+     * {@inheritDoc}
+     */
     @Override
-    public String getType()
-    {
+    public String getType() {
         return TYPE;
     }
 
-    /** {@inheritDoc} */
-    public Integer getInvocationSuccessCount() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Integer getInvocationSuccessCount() throws IOException {
         return Integer.valueOf(invocationSuccessCount);
     }
 
@@ -69,23 +69,20 @@
      *
      * @param processingTimeMillis The processing duration of the invocation success.
      */
-    public void incrementInvocationSuccessCount(int processingTimeMillis)
-    {
-        try
-        {
+    public void incrementInvocationSuccessCount(int processingTimeMillis) {
+        try {
             invocationSuccessCount++;
             totalProcessingTimeMillis += processingTimeMillis;
             averageProcessingTimeMillis = totalProcessingTimeMillis / (invocationSuccessCount + invocationFaultCount);
-        }
-        catch (Exception needsReset)
-        {
+        } catch (Exception needsReset) {
             reset();
         }
     }
 
-    /** {@inheritDoc} */
-    public Integer getInvocationFaultCount() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Integer getInvocationFaultCount() throws IOException {
         return Integer.valueOf(invocationFaultCount);
     }
 
@@ -94,23 +91,20 @@
      *
      * @param processingTimeMillis The processing duration of the invocation fault.
      */
-    public void incrementInvocationFaultCount(int processingTimeMillis)
-    {
-        try
-        {
+    public void incrementInvocationFaultCount(int processingTimeMillis) {
+        try {
             invocationFaultCount++;
             totalProcessingTimeMillis += processingTimeMillis;
             averageProcessingTimeMillis = totalProcessingTimeMillis / (invocationSuccessCount + invocationFaultCount);
-        }
-        catch (Exception needsReset)
-        {
+        } catch (Exception needsReset) {
             reset();
         }
     }
 
-    /** {@inheritDoc} */
-    public Integer getAverageInvocationProcessingTimeMillis() throws IOException
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public Integer getAverageInvocationProcessingTimeMillis() throws IOException {
         return Integer.valueOf(averageProcessingTimeMillis);
     }
 
@@ -118,23 +112,21 @@
      * Callback used to register properties for display in the admin application.
      */
     @Override
-    protected void onRegistrationComplete()
-    {
+    protected void onRegistrationComplete() {
         String name = this.getObjectName().getCanonicalName();
 
-        String[] pollablePerInterval = { "InvocationSuccessCount", "InvocationFaultCount",
-                "AverageInvocationProcessingTimeMillis" };
+        String[] pollablePerInterval = {"InvocationSuccessCount", "InvocationFaultCount",
+                "AverageInvocationProcessingTimeMillis"};
 
         getRegistrar().registerObjects(
-                new int[] {AdminConsoleTypes.DESTINATION_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL},
+                new int[]{AdminConsoleTypes.DESTINATION_POLLABLE, AdminConsoleTypes.GRAPH_BY_POLL_INTERVAL},
                 name, pollablePerInterval);
     }
 
     /**
      * Helper method to reset state in the case of errors updating statistics.
      */
-    private void reset()
-    {
+    private void reset() {
         invocationSuccessCount = 0;
         invocationFaultCount = 0;
         totalProcessingTimeMillis = 0;
diff --git a/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/RemotingDestinationControlMBean.java b/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/RemotingDestinationControlMBean.java
index a0516a0..c4ff594 100755
--- a/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/RemotingDestinationControlMBean.java
+++ b/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/RemotingDestinationControlMBean.java
@@ -25,8 +25,7 @@
  * <code>RemotingDestination</code>s.
  */
 public interface RemotingDestinationControlMBean extends
-        DestinationControlMBean
-{
+        DestinationControlMBean {
     /**
      * Returns the count of successful invocations for the destination.
      *
diff --git a/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/adapters/JavaAdapterControl.java b/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/adapters/JavaAdapterControl.java
index f025d9a..2b26e4a 100755
--- a/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/adapters/JavaAdapterControl.java
+++ b/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/adapters/JavaAdapterControl.java
@@ -25,25 +25,24 @@
  * for monitoring and managing Java service adapters at runtime.
  */
 public class JavaAdapterControl extends ServiceAdapterControl implements
-        JavaAdapterControlMBean
-{
+        JavaAdapterControlMBean {
     private static final String TYPE = "JavaAdapter";
-    
+
     /**
      * Constructs a <code>JavaAdapterControl</code>, assigning its id, managed
      * Java service adapter and parent MBean.
-     * 
+     *
      * @param serviceAdapter The <code>JavaAdapter</code> managed by this MBean.
-     * @param parent The parent MBean in the management hierarchy.
+     * @param parent         The parent MBean in the management hierarchy.
      */
-    public JavaAdapterControl(JavaAdapter serviceAdapter, BaseControl parent)
-    {
+    public JavaAdapterControl(JavaAdapter serviceAdapter, BaseControl parent) {
         super(serviceAdapter, parent);
     }
 
-    /** {@inheritDoc} */
-    public String getType()
-    {
+    /**
+     * {@inheritDoc}
+     */
+    public String getType() {
         return TYPE;
     }
 }
diff --git a/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/adapters/JavaAdapterControlMBean.java b/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/adapters/JavaAdapterControlMBean.java
index 0918298..54c2ad8 100755
--- a/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/adapters/JavaAdapterControlMBean.java
+++ b/remoting/src/main/java/flex/management/runtime/messaging/services/remoting/adapters/JavaAdapterControlMBean.java
@@ -22,7 +22,6 @@
  * Defines the runtime monitoring and management interface for managed Java
  * service adapters.
  */
-public interface JavaAdapterControlMBean extends ServiceAdapterControlMBean
-{
+public interface JavaAdapterControlMBean extends ServiceAdapterControlMBean {
     // Empty for now.
 }
diff --git a/remoting/src/main/java/flex/messaging/services/RemotingService.java b/remoting/src/main/java/flex/messaging/services/RemotingService.java
index b817c45..64a82e5 100755
--- a/remoting/src/main/java/flex/messaging/services/RemotingService.java
+++ b/remoting/src/main/java/flex/messaging/services/RemotingService.java
@@ -45,8 +45,7 @@
  * adapter before invocation.
  * </p>
  */
-public class RemotingService extends AbstractService
-{
+public class RemotingService extends AbstractService {
     /**
      * Log category for <code>RemotingService</code>.
      */
@@ -69,8 +68,7 @@
     /**
      * Constructs an unmanaged <code>RemotingService</code>.
      */
-    public RemotingService()
-    {
+    public RemotingService() {
         this(false);
     }
 
@@ -78,10 +76,9 @@
      * Constructs a <code>RemotingService</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>RemotingService</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public RemotingService(boolean enableManagement)
-    {
+    public RemotingService(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -100,8 +97,7 @@
      * @param id The id of the <code>RemotingDestination</code>.
      * @return The <code>Destination</code> instanced created.
      */
-    public Destination createDestination(String id)
-    {
+    public Destination createDestination(String id) {
         RemotingDestination destination = new RemotingDestination();
         destination.setId(id);
         destination.setManaged(isManaged());
@@ -116,9 +112,8 @@
      *
      * @param destination The <code>Destination</code> instance to be added.
      */
-    public void addDestination(Destination destination)
-    {
-        RemotingDestination remotingDest = (RemotingDestination)destination;
+    public void addDestination(Destination destination) {
+        RemotingDestination remotingDest = (RemotingDestination) destination;
         super.addDestination(remotingDest);
     }
 
@@ -127,11 +122,11 @@
     // Other Public APIs
     //
     //--------------------------------------------------------------------------
+
     /**
      *
      */
-    public MethodMatcher getMethodMatcher()
-    {
+    public MethodMatcher getMethodMatcher() {
         if (methodMatcher == null)
             methodMatcher = new MethodMatcher();
 
@@ -147,11 +142,11 @@
      * practice for the &quot;<code>MessageBroker</code> to <code>Service</code>&quot;
      * contract.
      * </p>
+     *
      * @param msg the <code>RemotingMessage</code> to process
      * @return Object the result of the service message invocation.
      */
-    public Object serviceMessage(Message msg)
-    {
+    public Object serviceMessage(Message msg) {
         // TODO: fix by adding this method to the MBean.
         /*
         if (isManaged())
@@ -160,13 +155,11 @@
         }
         */
 
-        if (msg instanceof RemotingMessage)
-        {
-            RemotingMessage message = (RemotingMessage)msg;
-            RemotingDestination destination = (RemotingDestination)getDestination(msg);
+        if (msg instanceof RemotingMessage) {
+            RemotingMessage message = (RemotingMessage) msg;
+            RemotingDestination destination = (RemotingDestination) getDestination(msg);
 
-            if (destination != null)
-            {
+            if (destination != null) {
                 RemotingDestinationControl destinationControl = (destination.isManaged()) ?
                         (RemotingDestinationControl) destination.getControl() : null;
 
@@ -174,64 +167,51 @@
                 long startTime = 0;
                 if (destinationControl != null)
                     startTime = System.currentTimeMillis();
-                try
-                {
+                try {
                     MessagePerformanceUtils.markServerPreAdapterTime(message);
                     Object result = adapter.invoke(message);
                     MessagePerformanceUtils.markServerPostAdapterTime(message);
 
-                    if (Log.isDebug())
-                    {
+                    if (Log.isDebug()) {
                         Log.getLogger(LOG_CATEGORY).debug("Adapter '{0}' called '{1}.{2}({3})'",
-                                new Object[] {adapter.getId(),
-                                              message.getSource(),
-                                              message.getOperation(),
-                                              message.getParameters()});
-                        Log.getLogger(LOG_CATEGORY).debug("Result: '{0}'", new Object[] {result});
+                                new Object[]{adapter.getId(),
+                                        message.getSource(),
+                                        message.getOperation(),
+                                        message.getParameters()});
+                        Log.getLogger(LOG_CATEGORY).debug("Result: '{0}'", new Object[]{result});
                     }
 
-                    if (destinationControl != null)
-                    {
+                    if (destinationControl != null) {
                         // Record a successful invocation and its processing duration.
                         // Cast to an int is safe because no remoting invocation will have a longer duration in millis than Integer.MAX_VALUE.
-                        destinationControl.incrementInvocationSuccessCount((int)(System.currentTimeMillis() - startTime));
+                        destinationControl.incrementInvocationSuccessCount((int) (System.currentTimeMillis() - startTime));
                     }
 
                     return result;
-                }
-                catch (MessageException ex)
-                {
-                    if (destinationControl != null)
-                    {
+                } catch (MessageException ex) {
+                    if (destinationControl != null) {
                         // Record a faulted invocation and its processing duration.
                         // Cast to an int is safe because no remoting invocation will have a longer duration in millis than Integer.MAX_VALUE.
-                        destinationControl.incrementInvocationFaultCount((int)(System.currentTimeMillis() - startTime));
+                        destinationControl.incrementInvocationFaultCount((int) (System.currentTimeMillis() - startTime));
                     }
 
                     throw ex;
-                }
-                catch (Throwable t)
-                {
-                    if (destinationControl != null)
-                    {
+                } catch (Throwable t) {
+                    if (destinationControl != null) {
                         // Record a faulted invocation and its processing duration.
                         // Cast to an int is safe because no remoting invocation will have a longer duration in millis than Integer.MAX_VALUE.
-                        destinationControl.incrementInvocationFaultCount((int)(System.currentTimeMillis() - startTime));
+                        destinationControl.incrementInvocationFaultCount((int) (System.currentTimeMillis() - startTime));
                     }
 
                     throw new MessageException(t);
                 }
-            }
-            else
-            {
+            } else {
                 // Destination '{id}' is not registered on the Remoting Service.
                 ServiceException e = new ServiceException();
-                e.setMessage(UNKNOWN_DESTINATION, new Object[] {msg.getDestination()});
+                e.setMessage(UNKNOWN_DESTINATION, new Object[]{msg.getDestination()});
                 throw e;
             }
-        }
-        else
-        {
+        } else {
             // The 'Remoting' Service can only process messages of type 'RemotingMessage'.
             ServiceException e = new ServiceException();
             e.setMessage(UNKNOWN_MESSAGE_TYPE, new Object[]{"Remoting", "RemotingMessage"});
@@ -250,8 +230,7 @@
      *
      * @return The log category of the component.
      */
-    protected String getLogCategory()
-    {
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -261,8 +240,7 @@
      *
      * @param broker The <code>MessageBroker</code> that manages this <code>RemotingService</code>.
      */
-    protected void setupServiceControl(MessageBroker broker)
-    {
+    protected void setupServiceControl(MessageBroker broker) {
         controller = new RemotingServiceControl(this, broker.getControl());
         controller.register();
         setControl(controller);
diff --git a/remoting/src/main/java/flex/messaging/services/remoting/PageableRowSetCache.java b/remoting/src/main/java/flex/messaging/services/remoting/PageableRowSetCache.java
index 4348fa4..09debe7 100755
--- a/remoting/src/main/java/flex/messaging/services/remoting/PageableRowSetCache.java
+++ b/remoting/src/main/java/flex/messaging/services/remoting/PageableRowSetCache.java
@@ -29,42 +29,38 @@
 
 /**
  * A special RemotingService destination that caches a PageableRowSet
- * in the current FlexSession to provide legacy paging functionality for 
+ * in the current FlexSession to provide legacy paging functionality for
  * the deprecated client RecordSet API.
- * 
+ * <p>
  * To create a PageableRowSet, a javax.sql.RowSet must be provided instead
- * of a java.sql.ResultSet because the data has to be disconnected and 
+ * of a java.sql.ResultSet because the data has to be disconnected and
  * cacheable.
- * 
+ * <p>
  * The RemotingService's JavaAdapter is expected to manage this instance.
  *
  * @see flex.messaging.io.PageableRowSet
  */
-public class PageableRowSetCache
-{
+public class PageableRowSetCache {
     private static final int DEFAULT_PAGE_SIZE = 25;
-    
+
     /**
      * A default constructor is required for a RemotingService source.
      */
-    public PageableRowSetCache()
-    {
+    public PageableRowSetCache() {
     }
 
     /**
      * Converts a RowSet into a PageableRowSet, stores the PageableRowSet
      * result in the cache and then returns the PageableRowSet. A unique
      * id will be created for the PagedRowSet.
-     * 
-     * @param rowset RowSet to be cached for paged access.
-     * @param pageSize Size of the first page to be sent to the client. Default 
-     * is 25 if pageSize is set to 0 or less. If all records should be sent at once
-     * consider not caching the RowSet or specify Integer.MAX_VALUE.
-     * 
-     * @return resulting <tt>PageableRowSet</tt> of the <tt>RowSet</tt> conversion 
+     *
+     * @param rowset   RowSet to be cached for paged access.
+     * @param pageSize Size of the first page to be sent to the client. Default
+     *                 is 25 if pageSize is set to 0 or less. If all records should be sent at once
+     *                 consider not caching the RowSet or specify Integer.MAX_VALUE.
+     * @return resulting <tt>PageableRowSet</tt> of the <tt>RowSet</tt> conversion
      */
-    public static PageableRowSet cacheRowSet(RowSet rowset, int pageSize)
-    {
+    public static PageableRowSet cacheRowSet(RowSet rowset, int pageSize) {
         if (pageSize <= 0)
             pageSize = DEFAULT_PAGE_SIZE;
 
@@ -76,13 +72,11 @@
     /**
      * Stores the PageableRowSet result in the session to act as a cache
      * for the legacy client RecordSet paging feature.
-     * 
+     *
      * @param rowset PageableRowSet to be cached for paged access.
      */
-    public static void cachePageableRowSet(PageableRowSet rowset)
-    {
-        if (rowset != null)
-        {
+    public static void cachePageableRowSet(PageableRowSet rowset) {
+        if (rowset != null) {
             FlexSession session = FlexContext.getFlexSession();
             session.setAttribute(rowset.getID(), rowset);
         }
@@ -91,25 +85,21 @@
     /**
      * Get a subset of records that are cached for the given PageableRowSet id.
      *
-     * @param id    The PageableRowSet's id, used to locate it in the current session.
-     * @param startIndex    The absolute position for the record set cursor.
-     * @param count    The size of the page of results to return.
+     * @param id         The PageableRowSet's id, used to locate it in the current session.
+     * @param startIndex The absolute position for the record set cursor.
+     * @param count      The size of the page of results to return.
      * @return Map    The resulting sub-set of data or 'page' requested.
-     * @see PageableRowSet#getRecords(int, int)
-     * 
      * @throws SQLException if an exception occurs while reading the <tt>RowSet</tt>
+     * @see PageableRowSet#getRecords(int, int)
      */
-    public Map getRecords(String id, int startIndex, int count) throws SQLException
-    {
+    public Map getRecords(String id, int startIndex, int count) throws SQLException {
         Map page = null;
         FlexSession session = FlexContext.getFlexSession();
 
-        if (session != null)
-        {
+        if (session != null) {
             Object o = session.getAttribute(id);
 
-            if (o != null && o instanceof PageableRowSet)
-            {
+            if (o != null && o instanceof PageableRowSet) {
                 PageableRowSet rs = (PageableRowSet) o;
                 page = rs.getRecords(startIndex, count);
             }
@@ -123,12 +113,10 @@
      *
      * @param id The id of the PageableRowSet to remove from the current session.
      */
-    public void release(String id)
-    {
+    public void release(String id) {
         FlexSession session = FlexContext.getFlexSession();
 
-        if (session != null)
-        {
+        if (session != null) {
             session.removeAttribute(id);
         }
     }
diff --git a/remoting/src/main/java/flex/messaging/services/remoting/RemotingDestination.java b/remoting/src/main/java/flex/messaging/services/remoting/RemotingDestination.java
index a98ebec..7d65d37 100755
--- a/remoting/src/main/java/flex/messaging/services/remoting/RemotingDestination.java
+++ b/remoting/src/main/java/flex/messaging/services/remoting/RemotingDestination.java
@@ -28,10 +28,11 @@
 /**
  * A logical reference to a RemotingDestination.
  */
-public class RemotingDestination extends FactoryDestination
-{
+public class RemotingDestination extends FactoryDestination {
     static final long serialVersionUID = -8454338922948146048L;
-    /** Log category for <code>RemotingDestination</code>. */
+    /**
+     * Log category for <code>RemotingDestination</code>.
+     */
     public static final String LOG_CATEGORY = LogCategories.SERVICE_REMOTING;
 
     private static final String REMOTING_SERVICE_CLASS = "flex.messaging.services.RemotingService";
@@ -54,8 +55,7 @@
     /**
      * Constructs an unmanaged <code>RemotingDestination</code> instance.
      */
-    public RemotingDestination()
-    {
+    public RemotingDestination() {
         this(false);
     }
 
@@ -63,10 +63,9 @@
      * Constructs a <code>RemotingDestination</code> with the indicated management.
      *
      * @param enableManagement <code>true</code> if the <code>RemotingDestination</code>
-     * is manageable; otherwise <code>false</code>.
+     *                         is manageable; otherwise <code>false</code>.
      */
-    public RemotingDestination(boolean enableManagement)
-    {
+    public RemotingDestination(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -76,29 +75,25 @@
      * version of this method to retrieve a DataDestination if you are not in the
      * context of processing a current message when you need the RemotingDestination.
      *
-     * @param serverId the id of the server containing the remoting destination to be retrieved.
+     * @param serverId        the id of the server containing the remoting destination to be retrieved.
      * @param destinationName the name of the remoting destination to be retrieved.
-     *
      * @return remoting destination corresponding to the supplied server id and destination name
      */
-    public static RemotingDestination getRemotingDestination(String serverId, String destinationName)
-    {
+    public static RemotingDestination getRemotingDestination(String serverId, String destinationName) {
         MessageBroker broker = MessageBroker.getMessageBroker(serverId);
 
-        if (broker == null)
-        {
+        if (broker == null) {
             // Unable to locate a MessageBroker initialized with server id ''{0}''
             MessageException me = new MessageException();
-            me.setMessage(NO_MESSAGE_BROKER, new Object[] { serverId });
+            me.setMessage(NO_MESSAGE_BROKER, new Object[]{serverId});
             throw me;
         }
 
         RemotingService rs = (RemotingService) broker.getServiceByType(REMOTING_SERVICE_CLASS);
-        if (rs == null)
-        {
+        if (rs == null) {
             // MessageBroker with server id ''{0}'' does not contain a service with class flex.messaging.remoting.RemotingService
             MessageException me = new MessageException();
-            me.setMessage(NO_REMOTING_SERVICE, new Object[] { serverId });
+            me.setMessage(NO_REMOTING_SERVICE, new Object[]{serverId});
             throw me;
         }
 
@@ -117,8 +112,7 @@
      *
      * @return The log category of the component.
      */
-    public String getLogCategory()
-    {
+    public String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -128,9 +122,8 @@
      *
      * @param service the <code>RemotingService</code> to associate with this destination.
      */
-    public void setService(Service service)
-    {
-        RemotingService remotingService = (RemotingService)service;
+    public void setService(Service service) {
+        RemotingService remotingService = (RemotingService) service;
         super.setService(remotingService);
         setMethodMatcher(remotingService.getMethodMatcher());
     }
@@ -140,19 +133,18 @@
     // Other public APIs
     //
     //--------------------------------------------------------------------------
+
     /**
      *
      */
-    public MethodMatcher getMethodMatcher()
-    {
+    public MethodMatcher getMethodMatcher() {
         return methodMatcher;
     }
 
     /**
      *
      */
-    public void setMethodMatcher(MethodMatcher matcher)
-    {
+    public void setMethodMatcher(MethodMatcher matcher) {
         methodMatcher = matcher;
     }
 
@@ -168,8 +160,7 @@
      *
      * @param service The <code>Service</code> that manages this <code>RemotingDestination</code>.
      */
-    protected void setupDestinationControl(Service service)
-    {
+    protected void setupDestinationControl(Service service) {
         controller = new RemotingDestinationControl(this, service.getControl());
         controller.register();
         setControl(controller);
diff --git a/remoting/src/main/java/flex/messaging/services/remoting/adapters/JavaAdapter.java b/remoting/src/main/java/flex/messaging/services/remoting/adapters/JavaAdapter.java
index 0b69c98..4bbd3c4 100755
--- a/remoting/src/main/java/flex/messaging/services/remoting/adapters/JavaAdapter.java
+++ b/remoting/src/main/java/flex/messaging/services/remoting/adapters/JavaAdapter.java
@@ -48,13 +48,12 @@
 import java.util.List;
 import java.util.Map;
 
-public class JavaAdapter extends ServiceAdapter
-{
+public class JavaAdapter extends ServiceAdapter {
     static final String LOG_CATEGORY = LogCategories.MESSAGE_REMOTING;
 
     public static final String[] PROTECTED_PACKAGES = new String[]{"jrun", "jrunx", "macromedia",
-                                                                   "flex", "flex2", "coldfusion",
-                                                                   "allaire", "com.allaire", "com.macromedia"};
+            "flex", "flex2", "coldfusion",
+            "allaire", "com.allaire", "com.macromedia"};
 
     private static final int REMOTING_METHOD_NULL_NAME_ERRMSG = 10658;
     private static final int REMOTING_METHOD_REFS_UNDEFINED_CONSTRAINT_ERRMSG = 10659;
@@ -74,8 +73,7 @@
     /**
      * Constructs an unmanaged <code>JavaAdapter</code> instance.
      */
-    public JavaAdapter()
-    {
+    public JavaAdapter() {
         this(false);
     }
 
@@ -83,10 +81,9 @@
      * Constructs a <code>JavaAdapter</code> instance.
      *
      * @param enableManagement <code>true</code> if the <code>JavaAdapter</code> has a
-     * corresponding MBean control for management; otherwise <code>false</code>.
+     *                         corresponding MBean control for management; otherwise <code>false</code>.
      */
-    public JavaAdapter(boolean enableManagement)
-    {
+    public JavaAdapter(boolean enableManagement) {
         super(enableManagement);
     }
 
@@ -117,9 +114,9 @@
      *
      * @param destination remoting destination to associate with this adapter
      */
-    @Override public void setDestination(Destination destination)
-    {
-        Destination dest = (RemotingDestination)destination;
+    @Override
+    public void setDestination(Destination destination) {
+        Destination dest = (RemotingDestination) destination;
         super.setDestination(dest);
     }
 
@@ -134,9 +131,8 @@
      *
      * @return an <tt>Iterator</tt> over the currently registered exclude methods
      */
-    public Iterator getExcludeMethodIterator()
-    {
-        return excludeMethods == null? Collections.EMPTY_LIST.iterator() : excludeMethods.values().iterator();
+    public Iterator getExcludeMethodIterator() {
+        return excludeMethods == null ? Collections.EMPTY_LIST.iterator() : excludeMethods.values().iterator();
     }
 
     /**
@@ -145,31 +141,25 @@
      *
      * @param value method to exclude
      */
-    public void addExcludeMethod(RemotingMethod value)
-    {
+    public void addExcludeMethod(RemotingMethod value) {
         String name = value.getName();
-        if (name == null)
-        {
+        if (name == null) {
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(REMOTING_METHOD_NULL_NAME_ERRMSG, new Object[] {getDestination().getId()});
+            ce.setMessage(REMOTING_METHOD_NULL_NAME_ERRMSG, new Object[]{getDestination().getId()});
             throw ce;
         }
 
         // Validate that a method with this name is defined on the source class.
-        if (!isMethodDefinedBySource(name))
-        {
+        if (!isMethodDefinedBySource(name)) {
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(REMOTING_METHOD_NOT_DEFINED_ERRMSG, new Object[] {name, getDestination().getId()});
+            ce.setMessage(REMOTING_METHOD_NOT_DEFINED_ERRMSG, new Object[]{name, getDestination().getId()});
             throw ce;
         }
 
-        if (excludeMethods == null)
-        {
+        if (excludeMethods == null) {
             excludeMethods = new HashMap();
             excludeMethods.put(name, value);
-        }
-        else if (!excludeMethods.containsKey(name))
-        {
+        } else if (!excludeMethods.containsKey(name)) {
             excludeMethods.put(name, value);
         }
     }
@@ -179,8 +169,7 @@
      *
      * @param value method to remove from exlcuded methods list
      */
-    public void removeExcludeMethod(RemotingMethod value)
-    {
+    public void removeExcludeMethod(RemotingMethod value) {
         excludeMethods.remove(value.getName());
     }
 
@@ -195,9 +184,8 @@
      *
      * @return an <tt>Iterator</tt> over the currently registered include methods
      */
-    public Iterator getIncludeMethodIterator()
-    {
-        return includeMethods == null? Collections.EMPTY_LIST.iterator() : includeMethods.values().iterator();
+    public Iterator getIncludeMethodIterator() {
+        return includeMethods == null ? Collections.EMPTY_LIST.iterator() : includeMethods.values().iterator();
     }
 
     /**
@@ -206,31 +194,25 @@
      *
      * @param value method to include
      */
-    public void addIncludeMethod(RemotingMethod value)
-    {
+    public void addIncludeMethod(RemotingMethod value) {
         String name = value.getName();
-        if (name == null)
-        {
+        if (name == null) {
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(REMOTING_METHOD_NULL_NAME_ERRMSG, new Object[] {getDestination().getId()});
+            ce.setMessage(REMOTING_METHOD_NULL_NAME_ERRMSG, new Object[]{getDestination().getId()});
             throw ce;
         }
 
         // Validate that a method with this name is defined on the source class.
-        if (!isMethodDefinedBySource(name))
-        {
+        if (!isMethodDefinedBySource(name)) {
             ConfigurationException ce = new ConfigurationException();
-            ce.setMessage(REMOTING_METHOD_NOT_DEFINED_ERRMSG, new Object[] {name, getDestination().getId()});
+            ce.setMessage(REMOTING_METHOD_NOT_DEFINED_ERRMSG, new Object[]{name, getDestination().getId()});
             throw ce;
         }
 
-        if (includeMethods == null)
-        {
+        if (includeMethods == null) {
             includeMethods = new HashMap();
             includeMethods.put(name, value);
-        }
-        else if (!includeMethods.containsKey(name))
-        {
+        } else if (!includeMethods.containsKey(name)) {
             includeMethods.put(name, value);
         }
     }
@@ -240,8 +222,7 @@
      *
      * @param value method to remove from the included methods list
      */
-    public void removeIncludeMethod(RemotingMethod value)
-    {
+    public void removeIncludeMethod(RemotingMethod value) {
         includeMethods.remove(value.getName());
     }
 
@@ -251,35 +232,30 @@
     //
     //--------------------------------------------------------------------------
 
-    /** {@inheritDoc} */
-    @Override public void initialize(String id, ConfigMap properties)
-    {
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void initialize(String id, ConfigMap properties) {
         ConfigMap methodsToInclude = properties.getPropertyAsMap(PROPERTY_INCLUDE_METHODS, null);
-        if (methodsToInclude != null)
-        {
+        if (methodsToInclude != null) {
             List methods = methodsToInclude.getPropertyAsList(METHOD_ELEMENT, null);
-            if ((methods != null) && !methods.isEmpty())
-            {
+            if ((methods != null) && !methods.isEmpty()) {
                 int n = methods.size();
-                for (int i = 0; i < n; i++)
-                {
-                    ConfigMap methodSettings = (ConfigMap)methods.get(i);
+                for (int i = 0; i < n; i++) {
+                    ConfigMap methodSettings = (ConfigMap) methods.get(i);
                     String name = methodSettings.getPropertyAsString(NAME_ELEMENT, null);
                     RemotingMethod method = new RemotingMethod();
                     method.setName(name);
                     // Check for security constraint.
                     String constraintRef = methodSettings.getPropertyAsString(ConfigurationConstants.SECURITY_CONSTRAINT_ELEMENT, null);
-                    if (constraintRef != null)
-                    {
-                        try
-                        {
+                    if (constraintRef != null) {
+                        try {
                             method.setSecurityConstraint(getDestination().getService().getMessageBroker().getSecurityConstraint(constraintRef));
-                        }
-                        catch (SecurityException se)
-                        {
+                        } catch (SecurityException se) {
                             // Rethrow with a more descriptive message.
                             ConfigurationException ce = new ConfigurationException();
-                            ce.setMessage(REMOTING_METHOD_REFS_UNDEFINED_CONSTRAINT_ERRMSG, new Object[] {name, getDestination().getId(), constraintRef});
+                            ce.setMessage(REMOTING_METHOD_REFS_UNDEFINED_CONSTRAINT_ERRMSG, new Object[]{name, getDestination().getId(), constraintRef});
                             throw ce;
                         }
                     }
@@ -288,34 +264,28 @@
             }
         }
         ConfigMap methodsToExclude = properties.getPropertyAsMap(PROPERTY_EXCLUDE_METHODS, null);
-        if (methodsToExclude != null)
-        {
+        if (methodsToExclude != null) {
             // Warn that <exclude-properties> will be ignored.
-            if (includeMethods != null)
-            {
-                RemotingDestination dest = (RemotingDestination)getDestination();
+            if (includeMethods != null) {
+                RemotingDestination dest = (RemotingDestination) getDestination();
                 if (Log.isWarn())
                     Log.getLogger(LogCategories.CONFIGURATION).warn("The remoting destination '" + dest.getId() + "' contains both <include-methods/> and <exclude-methods/> configuration. The <exclude-methods/> block will be ignored.");
             }
             // Excludes must be processed regardless of whether we add them or not to avoid 'Unused tags in <properties>' exceptions.
             List methods = methodsToExclude.getPropertyAsList(METHOD_ELEMENT, null);
-            if ((methods != null) && !methods.isEmpty())
-            {
+            if ((methods != null) && !methods.isEmpty()) {
                 int n = methods.size();
-                for (int i = 0; i < n; i++)
-                {
-                    ConfigMap methodSettings = (ConfigMap)methods.get(i);
+                for (int i = 0; i < n; i++) {
+                    ConfigMap methodSettings = (ConfigMap) methods.get(i);
                     String name = methodSettings.getPropertyAsString(NAME_ELEMENT, null);
                     RemotingMethod method = new RemotingMethod();
                     method.setName(name);
                     // Check for security constraint.
                     String constraintRef = methodSettings.getPropertyAsString(ConfigurationConstants.SECURITY_CONSTRAINT_ELEMENT, null);
                     // Conditionally add, only if include methods are not defined.
-                    if (includeMethods == null)
-                    {
-                        if (constraintRef != null)
-                        {
-                            RemotingDestination dest = (RemotingDestination)getDestination();
+                    if (includeMethods == null) {
+                        if (constraintRef != null) {
+                            RemotingDestination dest = (RemotingDestination) getDestination();
                             if (Log.isWarn())
                                 Log.getLogger(LogCategories.CONFIGURATION).warn("The method '" + name + "' for remoting destination '" + dest.getId() + "' is configured to use a security constraint, but security constraints are not applicable for excluded methods.");
                         }
@@ -326,19 +296,19 @@
         }
     }
 
-    /** {@inheritDoc} */
-    @Override public void start()
-    {
-        if (isStarted())
-        {
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void start() {
+        if (isStarted()) {
             return;
         }
         super.start();
         validateInstanceSettings();
 
         RemotingDestination remotingDestination = (RemotingDestination) getDestination();
-        if (FlexFactory.SCOPE_APPLICATION.equals(remotingDestination.getScope()))
-        {
+        if (FlexFactory.SCOPE_APPLICATION.equals(remotingDestination.getScope())) {
             FactoryInstance factoryInstance = remotingDestination.getFactoryInstance();
             createInstance(factoryInstance.getInstanceClass());
         }
@@ -350,11 +320,13 @@
     //
     //--------------------------------------------------------------------------
 
-    /** {@inheritDoc} */
-    @Override public Object invoke(Message message)
-    {
-        RemotingDestination remotingDestination = (RemotingDestination)getDestination();
-        RemotingMessage remotingMessage = (RemotingMessage)message;
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Object invoke(Message message) {
+        RemotingDestination remotingDestination = (RemotingDestination) getDestination();
+        RemotingMessage remotingMessage = (RemotingMessage) message;
         FactoryInstance factoryInstance = remotingDestination.getFactoryInstance();
 
         // We don't allow the client to specify the source for
@@ -366,15 +338,13 @@
         List parameters = remotingMessage.getParameters();
         Object result = null;
 
-        try
-        {
+        try {
             // Test that the target method may be invoked based upon include/exclude method settings.
             validateAgainstMethodFilters(methodName);
 
             // Lookup and invoke.
             Object instance = createInstance(factoryInstance.getInstanceClass());
-            if (instance == null)
-            {
+            if (instance == null) {
                 MessageException me = new MessageException("Null instance returned from: " + factoryInstance);
                 me.setCode("Server.Processing");
                 throw me;
@@ -386,43 +356,33 @@
             result = method.invoke(instance, parameters.toArray());
 
             saveInstance(instance);
-        }
-        catch (InvocationTargetException ex)
-        {
+        } catch (InvocationTargetException ex) {
             /*
              * If the invocation exception wraps a message exception, unwrap it and
              * rethrow the nested message exception. Otherwise, build and throw a new
              * message exception.
              */
             Throwable cause = ex.getCause();
-            if ((cause != null) && (cause instanceof MessageException))
-            {
+            if ((cause != null) && (cause instanceof MessageException)) {
                 throw (MessageException) cause;
-            }
-            else if (cause != null)
-            {
+            } else if (cause != null) {
                 // Log a warning for this client's selector and continue
-                if (Log.isError())
-                {
+                if (Log.isError()) {
                     Log.getLogger(LOG_CATEGORY).error("Error processing remote invocation: " +
-                         cause.toString() + StringUtils.NEWLINE +
-                         "  incomingMessage: " + message + StringUtils.NEWLINE +
-                         ExceptionUtil.toString(cause));
+                            cause.toString() + StringUtils.NEWLINE +
+                            "  incomingMessage: " + message + StringUtils.NEWLINE +
+                            ExceptionUtil.toString(cause));
                 }
                 MessageException me = new MessageException(cause.getClass().getName() + " : " + cause.getMessage());
                 me.setCode("Server.Processing");
                 me.setRootCause(cause);
                 throw me;
-            }
-            else
-            {
+            } else {
                 MessageException me = new MessageException(ex.getMessage());
                 me.setCode("Server.Processing");
                 throw me;
             }
-        }
-        catch (IllegalAccessException ex)
-        {
+        } catch (IllegalAccessException ex) {
             MessageException me = new MessageException(ex.getMessage());
             me.setCode("Server.Processing");
             throw me;
@@ -444,11 +404,9 @@
      *
      * @throw MessageException if method is not allowed.
      */
-    protected void validateAgainstMethodFilters(String methodName)
-    {
-        if (includeMethods != null)
-        {
-            RemotingMethod method = (RemotingMethod)includeMethods.get(methodName);
+    protected void validateAgainstMethodFilters(String methodName) {
+        if (includeMethods != null) {
+            RemotingMethod method = (RemotingMethod) includeMethods.get(methodName);
             if (method == null)
                 MethodMatcher.methodNotFound(methodName, null, new Match(null));
 
@@ -456,8 +414,7 @@
             SecurityConstraint constraint = method.getSecurityConstraint();
             if (constraint != null)
                 getDestination().getService().getMessageBroker().getLoginManager().checkConstraint(constraint);
-        }
-        else if ((excludeMethods != null) && excludeMethods.containsKey(methodName))
+        } else if ((excludeMethods != null) && excludeMethods.containsKey(methodName))
             MethodMatcher.methodNotFound(methodName, null, new Match(null));
     }
 
@@ -469,8 +426,7 @@
      *
      * @see flex.messaging.FlexFactory
      */
-    protected Object createInstance(Class cl)
-    {
+    protected Object createInstance(Class cl) {
         RemotingDestination remotingDestination = (RemotingDestination) getDestination();
         // Note: this breaks the admin console right now as we use this to call
         // mbean methods.  Might have performance impact as well?
@@ -478,9 +434,8 @@
         FactoryInstance factoryInstance = remotingDestination.getFactoryInstance();
         Object instance = factoryInstance.lookup();
         if (isStarted() && instance instanceof FlexComponent
-                && !((FlexComponent)instance).isStarted())
-        {
-            ((FlexComponent)instance).start();
+                && !((FlexComponent) instance).isStarted()) {
+            ((FlexComponent) instance).start();
         }
         return instance;
     }
@@ -492,34 +447,26 @@
      * this sets the attribute in the FlexSession to trigger sesison replication
      * for this attribute.
      */
-    protected void saveInstance(Object instance)
-    {
+    protected void saveInstance(Object instance) {
         RemotingDestination remotingDestination = (RemotingDestination) getDestination();
         FactoryInstance factoryInstance = remotingDestination.getFactoryInstance();
         factoryInstance.operationComplete(instance);
     }
 
-    protected void assertAccess(String serviceClass)
-    {
+    protected void assertAccess(String serviceClass) {
         SecurityManager sm = System.getSecurityManager();
-        if (sm != null)
-        {
+        if (sm != null) {
             // if there is a SecurityManager, check for specific access privileges on this class
-            if (serviceClass.indexOf('.') != -1)
-            {
+            if (serviceClass.indexOf('.') != -1) {
                 StringBuffer permissionData = new StringBuffer("accessClassInPackage.");
                 permissionData.append(serviceClass.substring(0, serviceClass.lastIndexOf('.')));
                 RuntimePermission perm = new RuntimePermission(permissionData.toString());
                 AccessController.checkPermission(perm);
             }
-        }
-        else
-        {
+        } else {
             // even without a SecurityManager, protect server packages
-            for (int i = 0; i < PROTECTED_PACKAGES.length; i++)
-            {
-                if (serviceClass.startsWith(PROTECTED_PACKAGES[i]))
-                {
+            for (int i = 0; i < PROTECTED_PACKAGES.length; i++) {
+                if (serviceClass.startsWith(PROTECTED_PACKAGES[i])) {
                     StringBuffer permissionData = new StringBuffer("accessClassInPackage.");
                     permissionData.append(PROTECTED_PACKAGES[i].substring(0, PROTECTED_PACKAGES[i].length()));
                     RuntimePermission perm = new RuntimePermission(permissionData.toString());
@@ -529,8 +476,7 @@
         }
     }
 
-    protected void validateInstanceSettings()
-    {
+    protected void validateInstanceSettings() {
         RemotingDestination remotingDestination = (RemotingDestination) getDestination();
         // This will validate that we have a valid factory instance and accesses
         // any constructor properties needed for our factory so they do not give
@@ -543,8 +489,8 @@
      *
      * @return The log category.
      */
-    @Override protected String getLogCategory()
-    {
+    @Override
+    protected String getLogCategory() {
         return LOG_CATEGORY;
     }
 
@@ -554,8 +500,8 @@
      *
      * @param broker The <code>Destination</code> that manages this <code>JavaAdapter</code>.
      */
-    @Override protected void setupAdapterControl(Destination destination)
-    {
+    @Override
+    protected void setupAdapterControl(Destination destination) {
         controller = new JavaAdapterControl(this, destination.getControl());
         controller.register();
         setControl(controller);
@@ -567,17 +513,15 @@
      * @param methodName The method name.
      * @return <code>true</code> if the method is defined; otherwise <code>false</code>.
      */
-    private boolean isMethodDefinedBySource(String methodName)
-    {
-        RemotingDestination remotingDestination = (RemotingDestination)getDestination();
+    private boolean isMethodDefinedBySource(String methodName) {
+        RemotingDestination remotingDestination = (RemotingDestination) getDestination();
         FactoryInstance factoryInstance = remotingDestination.getFactoryInstance();
         Class c = factoryInstance.getInstanceClass();
         if (c == null)
             return true; // No source class; ignore validation and generate an error at runtime.
         Method[] methods = c.getMethods();
         int n = methods.length;
-        for (int i = 0; i < n; i++)
-        {
+        for (int i = 0; i < n; i++) {
             if (methods[i].getName().equals(methodName))
                 return true;
         }
diff --git a/remoting/src/main/java/flex/messaging/services/remoting/adapters/NoSuchMethodException.java b/remoting/src/main/java/flex/messaging/services/remoting/adapters/NoSuchMethodException.java
index f4d39c2..6e9cff7 100755
--- a/remoting/src/main/java/flex/messaging/services/remoting/adapters/NoSuchMethodException.java
+++ b/remoting/src/main/java/flex/messaging/services/remoting/adapters/NoSuchMethodException.java
@@ -21,17 +21,15 @@
 /**
  *
  */
-public class NoSuchMethodException extends MessageException
-{
+public class NoSuchMethodException extends MessageException {
     static final long serialVersionUID = -3383405805642648507L;
-        
+
     /**
      * Constructor.
-     * 
+     *
      * @param message message describing this exception
      */
-    public NoSuchMethodException(String s)
-    {
+    public NoSuchMethodException(String s) {
         setMessage(s);
         setCode("Server.ResourceUnavailable"); //MessagingException.SERVER_RESOURCE_UNAVAILABLE
     }
diff --git a/remoting/src/main/java/flex/messaging/services/remoting/adapters/NoSuchServiceException.java b/remoting/src/main/java/flex/messaging/services/remoting/adapters/NoSuchServiceException.java
index bb54fe8..35ed138 100755
--- a/remoting/src/main/java/flex/messaging/services/remoting/adapters/NoSuchServiceException.java
+++ b/remoting/src/main/java/flex/messaging/services/remoting/adapters/NoSuchServiceException.java
@@ -21,17 +21,15 @@
 /**
  *
  */
-public class NoSuchServiceException extends MessageException
-{
+public class NoSuchServiceException extends MessageException {
     static final long serialVersionUID = -8758088739688377326L;
 
     /**
      * Constructor.
-     * 
+     *
      * @param message message describing this exception
-     */    
-    public NoSuchServiceException(String s)
-    {
+     */
+    public NoSuchServiceException(String s) {
         super(s);
         setCode("Server.ResourceNotFound"); //MessagingException.SERVER_RESOURCE_NOTFOUND
     }
diff --git a/remoting/src/main/java/flex/messaging/services/remoting/adapters/RemotingMethod.java b/remoting/src/main/java/flex/messaging/services/remoting/adapters/RemotingMethod.java
index bb21946..4f86711 100755
--- a/remoting/src/main/java/flex/messaging/services/remoting/adapters/RemotingMethod.java
+++ b/remoting/src/main/java/flex/messaging/services/remoting/adapters/RemotingMethod.java
@@ -23,8 +23,7 @@
  * for a remoting destination.
  * This class performs no internal synchronization.
  */
-public class RemotingMethod
-{
+public class RemotingMethod {
     //--------------------------------------------------------------------------
     //
     // Properties
@@ -36,60 +35,56 @@
     //----------------------------------
 
     private String name;
-    
+
     /**
      * Returns the method name.
-     * Because mapping ActionScript data types to Java data types is indeterminate 
-     * in some cases, explicit overloaded methods are not currently supported so no 
+     * Because mapping ActionScript data types to Java data types is indeterminate
+     * in some cases, explicit overloaded methods are not currently supported so no
      * parameter signature property is defined.
-     * 
+     *
      * @return method name
      */
-    public String getName()
-    {
+    public String getName() {
         return name;
     }
-    
+
     /**
      * Sets the method name.
-     * Because mapping ActionScript data types to Java data types is indeterminate 
-     * in some cases, explicit overloaded methods are not currently supported so no 
+     * Because mapping ActionScript data types to Java data types is indeterminate
+     * in some cases, explicit overloaded methods are not currently supported so no
      * parameter signature property is defined.
-     * 
+     *
      * @param value method name
      */
-    public void setName(String value)
-    {
+    public void setName(String value) {
         name = value;
     }
-    
+
     //----------------------------------
     //  securityConstraint
     //----------------------------------
-    
+
     private SecurityConstraint constraint;
-    
+
     /**
      * Returns the <tt>SecurityConstraint</tt> that will be applied to invocations
      * of the remoting method.
-     * 
+     *
      * @return <tt>SecurityConstraint</tt> that will be applied to invocations
      * of the remoting method.
      */
-    public SecurityConstraint getSecurityConstraint()
-    {
+    public SecurityConstraint getSecurityConstraint() {
         return constraint;
     }
-    
+
     /**
      * Sets the <tt>SecurityConstraint</tt> that will be applied to invocations of
      * the remoting method.
-     * 
+     *
      * @param value the <tt>SecurityConstraint</tt> that will be applied to invocations of
-     * the remoting method.
+     *              the remoting method.
      */
-    public void setSecurityConstraint(SecurityConstraint value)
-    {
+    public void setSecurityConstraint(SecurityConstraint value) {
         constraint = value;
     }
 }
\ No newline at end of file
diff --git a/remoting/src/test/java/flex/messaging/io/amf/client/AMFDataTypeIT.java b/remoting/src/test/java/flex/messaging/io/amf/client/AMFDataTypeIT.java
index 21064fa..b2d3dc7 100644
--- a/remoting/src/test/java/flex/messaging/io/amf/client/AMFDataTypeIT.java
+++ b/remoting/src/test/java/flex/messaging/io/amf/client/AMFDataTypeIT.java
@@ -61,7 +61,7 @@
 
         customValidationServerWrapper = new TestServerWrapper();
         customValidationServerPort = customValidationServerWrapper.startServer("classpath:/WEB-INF/flex/services-config-customized-validation.xml");
-        if(customValidationServerPort == -1) {
+        if (customValidationServerPort == -1) {
             Assert.fail("Couldn't start server (custom validation) process");
         }
 
diff --git a/remoting/src/test/java/flex/messaging/util/TestServer.java b/remoting/src/test/java/flex/messaging/util/TestServer.java
index df21561..4ae8390 100644
--- a/remoting/src/test/java/flex/messaging/util/TestServer.java
+++ b/remoting/src/test/java/flex/messaging/util/TestServer.java
@@ -30,7 +30,7 @@
 public class TestServer {
 
     public static void main(String args[]) throws Exception {
-        if(args.length != 1) {
+        if (args.length != 1) {
             throw new Exception("Need exactly two argument containing th path to the configuration " +
                     "followed by the port number the server should use");
         }
@@ -48,7 +48,7 @@
         server.setDumpAfterStart(true);
         try {
             server.start();
-        } catch(Exception e) {
+        } catch (Exception e) {
             e.printStackTrace();
         }
 
diff --git a/remoting/src/test/java/flex/messaging/util/TestServerWrapper.java b/remoting/src/test/java/flex/messaging/util/TestServerWrapper.java
index 5f9d954..108adef 100644
--- a/remoting/src/test/java/flex/messaging/util/TestServerWrapper.java
+++ b/remoting/src/test/java/flex/messaging/util/TestServerWrapper.java
@@ -33,7 +33,7 @@
 
     public int startServer(String configPath) {
         // We can only start one server per instance of TestServer.
-        if(serverProcess != null) {
+        if (serverProcess != null) {
             return -1;
         }
 
@@ -58,8 +58,8 @@
             BufferedReader in = new BufferedReader(new InputStreamReader(serverProcess.getInputStream()));
 
             String line;
-            while((line = in.readLine()) != null) {
-                if(line.startsWith("Port:")) {
+            while ((line = in.readLine()) != null) {
+                if (line.startsWith("Port:")) {
                     // Read the process output and extract the port
                     // number the server started on.
                     int port = Integer.parseInt(line.substring(5));
@@ -76,7 +76,7 @@
     }
 
     public void stopServer() {
-        if(serverProcess != null) {
+        if (serverProcess != null) {
             System.out.print("Stopping test-server ... ");
             // Send a signal to the server process to make itself shut down.
             serverProcess.destroy();
diff --git a/remoting/src/test/java/remoting/amfclient/AMFConnectionTestService.java b/remoting/src/test/java/remoting/amfclient/AMFConnectionTestService.java
index 9671628..2c9b50b 100644
--- a/remoting/src/test/java/remoting/amfclient/AMFConnectionTestService.java
+++ b/remoting/src/test/java/remoting/amfclient/AMFConnectionTestService.java
@@ -20,93 +20,78 @@
 /**
  * A class used as a remoting destination source for AMF connection JUnit tests.
  */
- import java.util.Date;
- 
-public class AMFConnectionTestService
-{
 
-    public String echoString(String text)
-    {
+import java.util.Date;
+
+public class AMFConnectionTestService {
+
+    public String echoString(String text) {
         return text;
     }
 
-    public int echoInt(int value)
-    {
+    public int echoInt(int value) {
         return value;
     }
 
-    public boolean echoBoolean(boolean value)
-    {
+    public boolean echoBoolean(boolean value) {
         return value;
     }
 
-    public Date echoDate(Date value)
-    {
+    public Date echoDate(Date value) {
         return value;
     }
 
-    public short echoShort(short value)
-    {
+    public short echoShort(short value) {
         return value;
     }
 
-    public double echoDouble(double value)
-    {
+    public double echoDouble(double value) {
         return value;
     }
 
     // Object argument, Object return.
-    public Object echoObject1(Object customType)
-    {
+    public Object echoObject1(Object customType) {
         return customType;
     }
-    
+
     // Object argument, CustomType return.
-    public ServerCustomType echoObject2(Object customType)
-    {
-        return (ServerCustomType)customType;
+    public ServerCustomType echoObject2(Object customType) {
+        return (ServerCustomType) customType;
     }
-    
+
     // CustomType argument, Object return
-    public Object echoObject3(ServerCustomType customType)
-    {
+    public Object echoObject3(ServerCustomType customType) {
         return customType;
     }
 
     // CustomType argument, CustomType return
-    public ServerCustomType echoObject4(ServerCustomType customType)
-    {
+    public ServerCustomType echoObject4(ServerCustomType customType) {
         return customType;
     }
 
     // Object argument, Object return.
-    public Object[] echoObject5(Object[] customType)
-    {
+    public Object[] echoObject5(Object[] customType) {
         return customType;
     }
 
     // No argument, Object return
-    public Object getObject1()
-    {
+    public Object getObject1() {
         ServerCustomType ct = new ServerCustomType();
         ct.setId(1);
         return ct;
     }
 
     // No argument, CustomType return.
-    public ServerCustomType getObject2()
-    {
+    public ServerCustomType getObject2() {
         ServerCustomType ct = new ServerCustomType();
         ct.setId(1);
         return ct;
     }
-    
+
     // No argument, an Array of Objects.
-    public Object[] getObjectArray1()
-    {
+    public Object[] getObjectArray1() {
         Object[] customTypes = new Object[10];
-        for (int i = 0; i < customTypes.length; i++)
-        {
+        for (int i = 0; i < customTypes.length; i++) {
             ServerCustomType sct = new ServerCustomType();
             sct.setId(i);
             customTypes[i] = sct;
diff --git a/remoting/src/test/java/remoting/amfclient/ClientCustomType.java b/remoting/src/test/java/remoting/amfclient/ClientCustomType.java
index 2023bdf..00e76ce 100644
--- a/remoting/src/test/java/remoting/amfclient/ClientCustomType.java
+++ b/remoting/src/test/java/remoting/amfclient/ClientCustomType.java
@@ -20,26 +20,21 @@
  * The client side object used by the AMFConnectionIT. There is a corresponding
  * server side object.
  */
-public class ClientCustomType
-{
+public class ClientCustomType {
     private int id;
 
-    public ClientCustomType()
-    {
+    public ClientCustomType() {
     }
 
-    public int getId()
-    {
+    public int getId() {
         return id;
     }
 
-    public void setId(int id)
-    {
+    public void setId(int id) {
         this.id = id;
     }
 
-    public String toString()
-    {
+    public String toString() {
         return "ClientCustomType: " + id;
     }
 }
diff --git a/remoting/src/test/java/remoting/amfclient/ServerCustomType.java b/remoting/src/test/java/remoting/amfclient/ServerCustomType.java
index ea376cc..8eeb64c 100644
--- a/remoting/src/test/java/remoting/amfclient/ServerCustomType.java
+++ b/remoting/src/test/java/remoting/amfclient/ServerCustomType.java
@@ -17,29 +17,24 @@
 package remoting.amfclient;
 
 /**
- * The server side object used by AMFConnectionTestService. There is a 
+ * The server side object used by AMFConnectionTestService. There is a
  * corresponding client side object.
  */
-public class ServerCustomType
-{
+public class ServerCustomType {
     private int id;
 
-    public ServerCustomType()
-    {
+    public ServerCustomType() {
     }
 
-    public int getId()
-    {
+    public int getId() {
         return id;
     }
 
-    public void setId(int id)
-    {
+    public void setId(int id) {
         this.id = id;
     }
 
-    public String toString()
-    {
+    public String toString() {
         return "ServerCustomType: " + id;
     }
 }
diff --git a/remoting/src/test/resources/WEB-INF/flex/services-config-customized-validation.xml b/remoting/src/test/resources/WEB-INF/flex/services-config-customized-validation.xml
index 9832eff..0128eef 100644
--- a/remoting/src/test/resources/WEB-INF/flex/services-config-customized-validation.xml
+++ b/remoting/src/test/resources/WEB-INF/flex/services-config-customized-validation.xml
@@ -31,12 +31,13 @@
     </validators>
 
     <services>
-        <service-include file-path="remoting-config.xml" />
+        <service-include file-path="remoting-config.xml"/>
     </services>
 
     <channels>
         <channel-definition id="amf" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
+                      class="flex.messaging.endpoints.AMFEndpoint"/>
             <properties>
                 <serialization>
                     <allow-xml>true</allow-xml>
@@ -48,7 +49,7 @@
     <logging>
         <target class="flex.messaging.log.ConsoleTarget" level="Error">
             <properties>
-                <prefix>[BlazeDS] </prefix>
+                <prefix>[BlazeDS]</prefix>
                 <includeDate>false</includeDate>
                 <includeTime>false</includeTime>
                 <includeLevel>false</includeLevel>
diff --git a/remoting/src/test/resources/WEB-INF/flex/services-config.xml b/remoting/src/test/resources/WEB-INF/flex/services-config.xml
index 2bbf7d7..42194e5 100644
--- a/remoting/src/test/resources/WEB-INF/flex/services-config.xml
+++ b/remoting/src/test/resources/WEB-INF/flex/services-config.xml
@@ -20,12 +20,13 @@
 <services-config>
 
     <services>
-        <service-include file-path="remoting-config.xml" />
+        <service-include file-path="remoting-config.xml"/>
     </services>
 
     <channels>
         <channel-definition id="amf" class="mx.messaging.channels.AMFChannel">
-            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
+            <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
+                      class="flex.messaging.endpoints.AMFEndpoint"/>
             <properties>
                 <serialization>
                     <allow-xml>true</allow-xml>
@@ -37,7 +38,7 @@
     <logging>
         <target class="flex.messaging.log.ConsoleTarget" level="Error">
             <properties>
-                <prefix>[BlazeDS] </prefix>
+                <prefix>[BlazeDS]</prefix>
                 <includeDate>false</includeDate>
                 <includeTime>false</includeTime>
                 <includeLevel>false</includeLevel>
diff --git a/sdk/build.xml b/sdk/build.xml
index 96f6c52..b877a50 100755
--- a/sdk/build.xml
+++ b/sdk/build.xml
@@ -100,7 +100,7 @@
         <condition property="isFlex3" value="true">
             <equals arg1="${sdk.version}" arg2="3"/>
         </condition>
-        <antcall target="copy.flex3.dmv" />
+        <antcall target="copy.flex3.dmv"/>
 
         <!-- 
              Override with any custom "local" swcs. These swcs are written over the
@@ -109,7 +109,7 @@
         <condition property="using.local.swcs" value="true">
             <istrue value="${use.local.swcs}"/>
         </condition>
-        <antcall target="copy.local.swcs" />
+        <antcall target="copy.local.swcs"/>
 
         <!-- set swcs read only -->
         <!-- attrib only works on windows -->
@@ -145,11 +145,11 @@
         <!-- When the build is instrumented, command line compilation fails
               if clover.jar is not in the classpath 
         -->
-        <antcall target="instrumented.build" />
+        <antcall target="instrumented.build"/>
 
     </target>
 
-    <target name="copy.flex3.dmv" if="isFlex3" >
+    <target name="copy.flex3.dmv" if="isFlex3">
         <copy todir="${basedir}/frameworks/libs">
             <fileset dir="${sdk.zip.dir}/dmv/">
                 <include name="datavisualization.swc"/>
@@ -161,7 +161,7 @@
             </fileset>
         </copy>
     </target>
-    
+
     <target name="copy.local.swcs" if="using.local.swcs">
         <echo message="Processing local swc overrides..."/>
         <copy todir="${basedir}/frameworks/libs">
@@ -175,21 +175,21 @@
     <target name="instrumented.build" if="build.is.instrumented">
         <echo message="adding clover.jar to bin/jvm.config's classpath...."/>
         <replace file="${basedir}/bin/jvm.config" token="java.class.path="
-        value="java.class.path=c:/depot/flex/enterprise/lib/clover.jar"/>
-        
+                 value="java.class.path=c:/depot/flex/enterprise/lib/clover.jar"/>
+
         <echo message="Updating mxmlc.jar's manifest to include clover.jar"/>
         <copy file="${basedir}/lib/mxmlc.jar" tofile="${basedir}/lib/mxmlc.jar.orig"/>
-        
+
         <unjar src="${basedir}/lib/mxmlc.jar" dest="${basedir}/lib/ccTemp"/>
-        
+
         <replace file="${basedir}/lib/ccTemp/META-INF/MANIFEST.MF">
             <replacefilter token="Class-Path:" value="Class-Path: clover.jar"/>
         </replace>
-        
+
         <jar basedir="${basedir}/lib/ccTemp" destfile="${basedir}/lib/mxmlc.jar"
-        manifest="${basedir}/lib/ccTemp/META-INF/MANIFEST.MF"/>
+             manifest="${basedir}/lib/ccTemp/META-INF/MANIFEST.MF"/>
     </target>
-    
+
     <target name="clean" description="clean">
         <delete failonerror="true" includeEmptyDirs="true" verbose="true">
             <fileset dir="${lib.dir}" erroronmissingdir="false">
diff --git a/src/assembly/assemble-gz.xml b/src/assembly/assemble-gz.xml
index 7ebfacd..8f72219 100644
--- a/src/assembly/assemble-gz.xml
+++ b/src/assembly/assemble-gz.xml
@@ -18,21 +18,21 @@
  
  -->
 <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-  <id>source-release</id>
-  <formats>
-    <format>tar.gz</format>
-  </formats>
-  <fileSets>
-	<fileSet>
-        <directory>${basedir}</directory>
-        <outputDirectory>/</outputDirectory>
-		<useDefaultExcludes>false</useDefaultExcludes>
-      <excludes>
-        <exclude>**/target/**</exclude>
-        <exclude>**/*.iml</exclude>
-      </excludes>
-    </fileSet>
-  </fileSets>
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>source-release</id>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+    <fileSets>
+        <fileSet>
+            <directory>${basedir}</directory>
+            <outputDirectory>/</outputDirectory>
+            <useDefaultExcludes>false</useDefaultExcludes>
+            <excludes>
+                <exclude>**/target/**</exclude>
+                <exclude>**/*.iml</exclude>
+            </excludes>
+        </fileSet>
+    </fileSets>
 </assembly>
\ No newline at end of file
diff --git a/src/assembly/assemble-zip.xml b/src/assembly/assemble-zip.xml
index d3891af..b800b67 100644
--- a/src/assembly/assemble-zip.xml
+++ b/src/assembly/assemble-zip.xml
@@ -18,21 +18,21 @@
  
  -->
 <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-  <id>source-release</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <fileSets>
-	<fileSet>
-        <directory>${basedir}</directory>
-        <outputDirectory>/</outputDirectory>
-		<useDefaultExcludes>false</useDefaultExcludes>
-      <excludes>
-        <exclude>**/target/**</exclude>
-        <exclude>**/*.iml</exclude>
-      </excludes>
-    </fileSet>
-  </fileSets>
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>source-release</id>
+    <formats>
+        <format>zip</format>
+    </formats>
+    <fileSets>
+        <fileSet>
+            <directory>${basedir}</directory>
+            <outputDirectory>/</outputDirectory>
+            <useDefaultExcludes>false</useDefaultExcludes>
+            <excludes>
+                <exclude>**/target/**</exclude>
+                <exclude>**/*.iml</exclude>
+            </excludes>
+        </fileSet>
+    </fileSets>
 </assembly>
\ No newline at end of file