Trimming trailing spaces, removing tabs by a script
- using tab width of 4 spaces
- trailing space in property files is converted to unicode, so it is
visible in sources
- bat files use CRLF
- all other text files use just LF
diff --git a/appserver/tests/appserv-tests/devtests/persistence/util/ServletUtil.java b/appserver/tests/appserv-tests/devtests/persistence/util/ServletUtil.java
index 0dcab18..febf489 100755
--- a/appserver/tests/appserv-tests/devtests/persistence/util/ServletUtil.java
+++ b/appserver/tests/appserv-tests/devtests/persistence/util/ServletUtil.java
@@ -30,8 +30,8 @@
import java.lang.reflect.Type;
/** ServletUtil.java
- * This program is generic servlet which process the
- * HTTP request and invoke the
+ * This program is generic servlet which process the
+ * HTTP request and invoke the
* proper methods based on the request parameters.
*
* @author Sarada Kommalapati
@@ -42,27 +42,27 @@
public String tc;
- protected void doGet(HttpServletRequest request,
- HttpServletResponse response)
+ protected void doGet(HttpServletRequest request,
+ HttpServletResponse response)
throws ServletException, IOException {
processAction(request, response);
}
-
- protected void doPost(HttpServletRequest request,
- HttpServletResponse response)
+
+ protected void doPost(HttpServletRequest request,
+ HttpServletResponse response)
throws ServletException, IOException {
processAction(request, response);
}
-
+
public boolean processParams(HttpServletRequest request) {
try {
if (request.getParameter("case") != null) {
tc = request.getParameter("case");
- }
- return true;
+ }
+ return true;
} catch(Exception ex) {
System.err.println("Exception when processing the request params");
- ex.printStackTrace();
+ ex.printStackTrace();
return false;
}
@@ -70,18 +70,18 @@
public void processAction(HttpServletRequest request,
- HttpServletResponse response)
+ HttpServletResponse response)
throws IOException{
-
+
System.out.println("processing test driver request ... ");
-
- processParams(request);
+
+ processParams(request);
boolean status = false;
System.out.println("tc:"+tc);
response.setContentType("text/plain");
ServletOutputStream out = response.getOutputStream();
- out.println("TestCase: "+tc);
+ out.println("TestCase: "+tc);
if (tc != null) {
@@ -95,34 +95,34 @@
if ( !mname.equals(tc.trim() ) ) {
continue;
}
-
+
System.out.println("Invoking : " + mname );
try {
m.setAccessible( true);
Object o = m.invoke( t );
System.out.println("Returned => " + (Boolean)o );
- status = new Boolean((Boolean)o).booleanValue();
+ status = new Boolean((Boolean)o).booleanValue();
//Handle any methods thrown by method to be invoked
} catch ( InvocationTargetException x ) {
Throwable cause = x.getCause();
-
+
System.err.format("invocation of %s failed: %s%n", mname, cause.getMessage() );
} catch ( IllegalAccessException x ) {
x.printStackTrace();
}
-
+
}
- } catch ( Exception ex ) {
- ex.printStackTrace();
+ } catch ( Exception ex ) {
+ ex.printStackTrace();
}
- if (status) {
- out.println(tc+":pass");
- } else {
- out.println(tc+":fail");
- }
+ if (status) {
+ out.println(tc+":pass");
+ } else {
+ out.println(tc+":fail");
+ }
}
}
-
+
}
diff --git a/appserver/tests/appserv-tests/devtests/persistence/util/WebTestUtil.java b/appserver/tests/appserv-tests/devtests/persistence/util/WebTestUtil.java
index 11ca650..831c4cf 100755
--- a/appserver/tests/appserv-tests/devtests/persistence/util/WebTestUtil.java
+++ b/appserver/tests/appserv-tests/devtests/persistence/util/WebTestUtil.java
@@ -23,7 +23,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
/** WebTestUtil.java
- * This program opens HttpURLconnection,sends the request to the
+ * This program opens HttpURLconnection,sends the request to the
* servlet , & receives the response from the servlet.
* Using commandline args the user can specify for WebTestUtil
* 1. test suite name
@@ -57,7 +57,7 @@
this.urlPattern = urlPattern;
this.stat = stat;
}
-
+
public void test( String c) throws Exception {
this.test( c, "");
@@ -84,21 +84,21 @@
} else {
InputStream is = conn.getInputStream();
BufferedReader input = new BufferedReader(new InputStreamReader(is));
- String line = null;
- while ((line = input.readLine()) != null) {
+ String line = null;
+ while ((line = input.readLine()) != null) {
// System.out.println("line="+line);
- if (line.contains(EXPECTED_RESPONSE)) {
- stat.addStatus(TEST_CASE, stat.PASS);
- break;
- }
- }
-
- if (line == null) {
- System.out.println("Unable to find " + EXPECTED_RESPONSE +
- " in the response");
- }
- stat.addStatus(TEST_CASE, stat.FAIL);
- }
+ if (line.contains(EXPECTED_RESPONSE)) {
+ stat.addStatus(TEST_CASE, stat.PASS);
+ break;
+ }
+ }
+
+ if (line == null) {
+ System.out.println("Unable to find " + EXPECTED_RESPONSE +
+ " in the response");
+ }
+ stat.addStatus(TEST_CASE, stat.FAIL);
+ }
}
}