harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r436754 - in /incubator/harmony/enhanced/classlib/trunk/modules/rmi/src: main/java/java/rmi/server/LogStream.java test/api/java/org/apache/harmony/rmi/server/ test/api/java/org/apache/harmony/rmi/server/LogStreamTest.java
Date Fri, 25 Aug 2006 11:08:18 GMT
Author: hindessm
Date: Fri Aug 25 04:08:17 2006
New Revision: 436754

URL: http://svn.apache.org/viewvc?rev=436754&view=rev
Log:
Applying fix for "[#HARMONY-994] [classlib][rmi] unexpected StackOverflowError
for java.rmi.server.LogStream.write()".
Added one line for regression test for HARMONY-1271.

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/LogStreamTest.java
  (with props)
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/LogStream.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/LogStream.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/LogStream.java?rev=436754&r1=436753&r2=436754&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/LogStream.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/main/java/java/rmi/server/LogStream.java
Fri Aug 25 04:08:17 2006
@@ -101,8 +101,8 @@
                 isFirstByte = true;
             } else {
                 if (isFirstByte) {
-                    print(toString() + ":");
                     isFirstByte = false;
+                    print(toString() + ":");
                 }
                 super.write(b);
             }

Added: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/LogStreamTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/LogStreamTest.java?rev=436754&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/LogStreamTest.java
(added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/LogStreamTest.java
Fri Aug 25 04:08:17 2006
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed 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 org.apache.harmony.rmi.server;
+
+import java.rmi.server.LogStream;
+import junit.framework.TestCase;
+
+public class LogStreamTest extends TestCase {
+    /**
+     * Test for java.rmi.server.LogStream.write(int b)
+     */
+    public void testWriteI() throws Exception {
+        //regression test for HARMONY-1271
+        LogStream.log("tst").write((int)'\n');
+
+        //regression test for HARMONY-994
+        LogStream.log("tst").write(0);
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/LogStreamTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message