svn commit: r1165188 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DecompositionSolver.java

2011-09-05 Thread celestin
Author: celestin
Date: Mon Sep  5 07:07:55 2011
New Revision: 1165188

URL: http://svn.apache.org/viewvc?rev=1165188view=rev
Log:
Removed sole(double[]) from the DecompositionSolver interface (see JIRA 
MATH-653).

Modified:

commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DecompositionSolver.java

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DecompositionSolver.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DecompositionSolver.java?rev=1165188r1=1165187r2=1165188view=diff
==
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DecompositionSolver.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/DecompositionSolver.java
 Mon Sep  5 07:07:55 2011
@@ -45,18 +45,6 @@ public interface DecompositionSolver {
  * @throws SingularMatrixException
  * if the decomposed matrix is singular.
  */
-double[] solve(final double[] b);
-
-/** Solve the linear equation A times; X = B for matrices A.
- * pThe A matrix is implicit, it is provided by the underlying
- * decomposition algorithm./p
- * @param b right-hand side of the equation A times; X = B
- * @return a vector X that minimizes the two norm of A times; X - B
- * @throws org.apache.commons.math.exception.DimensionMismatchException
- * if the matrices dimensions do not match.
- * @throws SingularMatrixException
- * if the decomposed matrix is singular.
- */
 RealVector solve(final RealVector b);
 
 /** Solve the linear equation A times; X = B for matrices A.




svn commit: r1165189 - in /commons/sandbox/runtime/trunk: ./ src/main/java/org/apache/commons/runtime/net/ src/main/native/ src/main/native/os/unix/ src/main/native/os/win32/ src/main/test/org/apache/

2011-09-05 Thread mturk
Author: mturk
Date: Mon Sep  5 07:08:56 2011
New Revision: 1165189

URL: http://svn.apache.org/viewvc?rev=1165189view=rev
Log:
Add send socket api for sending the sockets between processes

Added:
commons/sandbox/runtime/trunk/src/main/native/os/unix/sendfd.c   (with 
props)

commons/sandbox/runtime/trunk/src/main/test/org/apache/commons/runtime/TestSendSocket.java
   (with props)
Modified:
commons/sandbox/runtime/trunk/build.xml

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Utils.java
commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in
commons/sandbox/runtime/trunk/src/main/native/os/unix/arch_defs.h
commons/sandbox/runtime/trunk/src/main/native/os/unix/arch_opts.h
commons/sandbox/runtime/trunk/src/main/native/os/unix/util.c
commons/sandbox/runtime/trunk/src/main/native/os/win32/arch_defs.h

Modified: commons/sandbox/runtime/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/build.xml?rev=1165189r1=1165188r2=1165189view=diff
==
--- commons/sandbox/runtime/trunk/build.xml (original)
+++ commons/sandbox/runtime/trunk/build.xml Mon Sep  5 07:08:56 2011
@@ -408,6 +408,17 @@ The Apache Software Foundation (http://w
 /sequential
 /parallel
 /target
+target name=testsendsockets depends=tests
+parallel
+sequential
+runtest groups=init,sendsd.parent name=sendsd.parent/
+/sequential
+sequential
+sleep milliseconds=100 /
+runtest groups=init,sendsd.child name=sendsd.child/
+/sequential
+/parallel
+/target
 target name=testmutex depends=tests
 parallel
 sequential

Modified: 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Utils.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Utils.java?rev=1165189r1=1165188r2=1165189view=diff
==
--- 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Utils.java
 (original)
+++ 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Utils.java
 Mon Sep  5 07:08:56 2011
@@ -19,12 +19,50 @@
 package org.apache.commons.runtime.net;
 
 import java.io.IOException;
+import org.apache.commons.runtime.Status;
 
 public final class Utils
 {
+
+private static native int   sendfd0(String name, long[] fds,
+int off, int len);
+private static native long[]recvfd0(String name)
+throws NetworkException;
+
 private Utils()
 {
 // No instance.
 }
 
+/**
+ * Gets the name for the ipc socket used to send files
+ * between processes.
+ *
+ * @param pid id of the child process.
+ * @return name for the ipc socket
+ */
+public static native String sendSocketName(int childPid)
+throws NetworkException;
+
+public static void sendSockets(String ipcName, long[] fds, int off, int 
len)
+throws NetworkException
+{
+
+if (ipcName == null)
+throw new NullPointerException();
+int rc = sendfd0(ipcName, fds, off, len);
+if (rc != 0) {
+throw new NetworkException(Status.describe(rc));
+}
+}
+
+
+public static long[] recvSockets(String ipcName)
+throws NetworkException
+{
+if (ipcName == null)
+throw new NullPointerException();
+return recvfd0(ipcName);
+}
+
 }

Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in?rev=1165189r1=1165188r2=1165189view=diff
==
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in (original)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in Mon Sep  5 
07:08:56 2011
@@ -75,6 +75,7 @@ UNIX_SOURCES=\
$(TOPDIR)/os/unix/shmem.c \
$(TOPDIR)/os/unix/selectset.c \
$(TOPDIR)/os/unix/semaphore.c \
+   $(TOPDIR)/os/unix/sendfd.c \
$(TOPDIR)/os/unix/sendfile.c \
$(TOPDIR)/os/unix/sockopts.c \
$(TOPDIR)/os/unix/sockstream.c \

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/arch_defs.h
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/arch_defs.h?rev=1165189r1=1165188r2=1165189view=diff
==
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/arch_defs.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/arch_defs.h Mon Sep  
5 07:08:56 2011
@@ -156,4 +156,11 @@ 

svn commit: r1165190 - in /commons/sandbox/runtime/trunk: build.xml lib/testng-6.0.jar lib/testng-6.2.jar

2011-09-05 Thread mturk
Author: mturk
Date: Mon Sep  5 07:19:27 2011
New Revision: 1165190

URL: http://svn.apache.org/viewvc?rev=1165190view=rev
Log:
Update testng to ver 6.2

Added:
commons/sandbox/runtime/trunk/lib/testng-6.2.jar   (with props)
Modified:
commons/sandbox/runtime/trunk/build.xml
commons/sandbox/runtime/trunk/lib/testng-6.0.jar

Modified: commons/sandbox/runtime/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/build.xml?rev=1165190r1=1165189r2=1165190view=diff
==
--- commons/sandbox/runtime/trunk/build.xml (original)
+++ commons/sandbox/runtime/trunk/build.xml Mon Sep  5 07:19:27 2011
@@ -43,7 +43,7 @@
 property name=examples.dir value=${build.dest}/examples/
 property name=example value=Unknown/
 property name=testng.home value=${basedir}/lib/
-property name=testng.jar value=${testng.home}/testng-6.0.jar/
+property name=testng.jar value=${testng.home}/testng-6.2.jar/
 property name=runtime.libname value=libacr/
 property name=runtime.library.path value=${src.native}/.libs/
 

Added: commons/sandbox/runtime/trunk/lib/testng-6.2.jar
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/lib/testng-6.2.jar?rev=1165190view=auto
==
Binary file - no diff available.

Propchange: commons/sandbox/runtime/trunk/lib/testng-6.2.jar
--
svn:mime-type = application/octet-stream




svn commit: r1165229 - /commons/proper/codec/trunk/pom.xml

2011-09-05 Thread ggregory
Author: ggregory
Date: Mon Sep  5 10:18:10 2011
New Revision: 1165229

URL: http://svn.apache.org/viewvc?rev=1165229view=rev
Log:
Update junit to 4.9 from 4.8.2.

Modified:
commons/proper/codec/trunk/pom.xml

Modified: commons/proper/codec/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/codec/trunk/pom.xml?rev=1165229r1=1165228r2=1165229view=diff
==
--- commons/proper/codec/trunk/pom.xml (original)
+++ commons/proper/codec/trunk/pom.xml Mon Sep  5 10:18:10 2011
@@ -193,7 +193,7 @@ limitations under the License.
 dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
-  version4.8.2/version
+  version4.9/version
   scopetest/scope
 /dependency
   /dependencies




svn commit: r1165287 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java

2011-09-05 Thread erans
Author: erans
Date: Mon Sep  5 14:04:16 2011
New Revision: 1165287

URL: http://svn.apache.org/viewvc?rev=1165287view=rev
Log:
Separating test cases.

Modified:

commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java

Modified: 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java?rev=1165287r1=1165286r2=1165287view=diff
==
--- 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java
 (original)
+++ 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java
 Mon Sep  5 14:04:16 2011
@@ -229,6 +229,14 @@ public class ComplexTest {
 public void testDivideZero() {
 Complex x = new Complex(3.0, 4.0);
 Complex z = x.divide(Complex.ZERO);
+// Assert.assertEquals(z, Complex.INF); // See MATH-657
+Assert.assertEquals(z, Complex.NaN);
+}
+
+@Test
+public void testDivideZeroZero() {
+Complex x = new Complex(0.0, 0.0);
+Complex z = x.divide(Complex.ZERO);
 Assert.assertEquals(z, Complex.NaN);
 }
 
@@ -349,13 +357,13 @@ public class ComplexTest {
 
 @Test
 public void testScalarMultiplyInf() {
-Complex x = new Complex(1,1);
+Complex x = new Complex(1, 1);
 double yDouble = Double.POSITIVE_INFINITY;
 Complex yComplex = new Complex(yDouble);
 Assert.assertEquals(x.multiply(yComplex), x.multiply(yDouble));
 
 yDouble = Double.NEGATIVE_INFINITY;
- yComplex = new Complex(yDouble);
+yComplex = new Complex(yDouble);
 Assert.assertEquals(x.multiply(yComplex), x.multiply(yDouble));
 }
 
@@ -565,9 +573,13 @@ public class ComplexTest {
 }
 
 @Test
+public void testAtanI() {
+Assert.assertTrue(Complex.I.atan().isNaN());
+}
+
+@Test
 public void testAtanNaN() {
 Assert.assertTrue(Complex.NaN.atan().isNaN());
-Assert.assertTrue(Complex.I.atan().isNaN());
 }
 
 @Test




svn commit: r1165296 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java

2011-09-05 Thread erans
Author: erans
Date: Mon Sep  5 14:20:16 2011
New Revision: 1165296

URL: http://svn.apache.org/viewvc?rev=1165296view=rev
Log:
Added a test.

Modified:

commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java

Modified: 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java?rev=1165296r1=1165295r2=1165296view=diff
==
--- 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java
 (original)
+++ 
commons/proper/math/trunk/src/test/java/org/apache/commons/math/complex/ComplexTest.java
 Mon Sep  5 14:20:16 2011
@@ -316,6 +316,12 @@ public class ComplexTest {
 }
 
 @Test
+public void testMultiplyInInf() {
+// Assert.assertTrue(infInf.multiply(infInf).isNaN()); // MATH-620
+Assert.assertTrue(infInf.multiply(infInf).isInfinite());
+}
+
+@Test
 public void testMultiplyNaNInf() {
 Complex z = new Complex(1,1);
 Complex w = z.multiply(infOne);




svn commit: r1165328 - in /commons/sandbox/runtime/trunk/src/main: java/org/apache/commons/runtime/ native/ native/include/acr/ native/os/unix/ native/shared/ test/org/apache/commons/runtime/

2011-09-05 Thread mturk
Author: mturk
Date: Mon Sep  5 15:15:59 2011
New Revision: 1165328

URL: http://svn.apache.org/viewvc?rev=1165328view=rev
Log:
Add User class

Added:

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java
   (with props)

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/UserIterator.java
   (with props)

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/UserIteratorImpl.java
   (with props)
commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c   (with props)

commons/sandbox/runtime/trunk/src/main/test/org/apache/commons/runtime/TestUser.java
   (with props)
Modified:

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/LocalStrings.properties
commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in
commons/sandbox/runtime/trunk/src/main/native/include/acr/misc.h
commons/sandbox/runtime/trunk/src/main/native/shared/array.c
commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c

Modified: 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/LocalStrings.properties?rev=1165328r1=1165327r2=1165328view=diff
==
--- 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/LocalStrings.properties
 (original)
+++ 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/LocalStrings.properties
 Mon Sep  5 15:15:59 2011
@@ -20,3 +20,6 @@ mutex.ENOTIMPL=Apache Commons Runtime do
 sharedmem.ENOTIMPL=Apache Commons Runtime does not support shared memory on 
this platform
 semaphore.ENOTIMPL=Apache Commons Runtime does not support semaphores on this 
platform
 execmem.ENOTIMPL=Apache Commons Runtime does not support executable memory on 
this platform
+user.ENOTFOUND=User '{0}' not found
+user.ENOCURRENT=Current user not found
+group.ENOTFOUND=Group '{0}' not found

Added: 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java?rev=1165328view=auto
==
--- 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java
 (added)
+++ 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java
 Mon Sep  5 15:15:59 2011
@@ -0,0 +1,260 @@
+/* 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 org.apache.commons.runtime;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * User Information.
+ *
+ */
+public final class User
+{
+
+private byte[]  bb;
+private static final int BSIZE;
+// Singleton access to users database
+private static Object lock;
+static {
+BSIZE = init0();
+lock  = new Object();
+}
+
+private User()
+{
+bb = null;
+Id = 0L;
+}
+
+private User(long id, byte[] b)
+{
+bb = b;
+Id = id;
+}
+private static native int init0();
+private static native Userget0(String name, byte[] buff)
+throws SystemException, SecurityException;
+private static native Userget1(byte[] buff)
+throws SystemException, SecurityException;
+private static native Userget2(byte[] buff)
+throws SystemException, SecurityException;
+private static native boolean equals0(long a, long b);
+private static native voidenum0(ArrayListString uset)
+throws SystemException, SecurityException;
+private static native voidenum1(ArrayListString uset)
+throws SystemException, SecurityException;
+
+/**
+ * Create the {@code User} object from the {@code name}.
+ *
+ * @return {@code User} obect.
+ * @throws SecurityException if access to an internal user database
+ * is forbidden.
+ * @throws SystemException in case of error.
+ * @throws NoSuchObjectException if the user {@code name} doesn't exist.
+ */
+

svn commit: r1165359 - in /commons/sandbox/runtime/trunk/src/main: java/org/apache/commons/runtime/User.java java/org/apache/commons/runtime/UserIteratorImpl.java native/os/unix/user.c

2011-09-05 Thread mturk
Author: mturk
Date: Mon Sep  5 16:52:03 2011
New Revision: 1165359

URL: http://svn.apache.org/viewvc?rev=1165359view=rev
Log:
Use HashSet instead ArrayList for logged users enum

Modified:

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/UserIteratorImpl.java
commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c

Modified: 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java?rev=1165359r1=1165358r2=1165359view=diff
==
--- 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java
 (original)
+++ 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java
 Mon Sep  5 16:52:03 2011
@@ -17,7 +17,8 @@
 package org.apache.commons.runtime;
 
 import java.util.ArrayList;
-import java.util.List;
+import java.util.HashSet;
+import java.util.Iterator;
 
 /**
  * User Information.
@@ -56,7 +57,7 @@ public final class User
 private static native boolean equals0(long a, long b);
 private static native voidenum0(ArrayListString uset)
 throws SystemException, SecurityException;
-private static native voidenum1(ArrayListString uset)
+private static native voidenum1(HashSetString uset)
 throws SystemException, SecurityException;
 
 /**
@@ -134,7 +135,7 @@ public final class User
 synchronized(lock) {
 ArrayListString users = new ArrayListString();
 enum0(users);
-iter = new UserIteratorImpl(users);
+iter = new UserIteratorImpl(users.iterator());
 }
 return iter;
 }
@@ -153,9 +154,9 @@ public final class User
 {
 UserIterator iter;
 synchronized(lock) {
-ArrayListString users = new ArrayListString();
+HashSetString users = new HashSetString();
 enum1(users);
-iter = new UserIteratorImpl(users);
+iter = new UserIteratorImpl(users.iterator());
 }
 return iter;
 }

Modified: 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/UserIteratorImpl.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/UserIteratorImpl.java?rev=1165359r1=1165358r2=1165359view=diff
==
--- 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/UserIteratorImpl.java
 (original)
+++ 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/UserIteratorImpl.java
 Mon Sep  5 16:52:03 2011
@@ -17,8 +17,7 @@
 package org.apache.commons.runtime;
 
 import java.util.NoSuchElementException;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Iterator;
 
 /**
  * User Iterator implementation
@@ -29,28 +28,24 @@ import java.util.List;
 class UserIteratorImpl extends UserIterator
 {
 
-private ArrayListString users;
+private IteratorString users;
 private int pos = 0;
 
-protected UserIteratorImpl(ArrayListString users)
+protected UserIteratorImpl(IteratorString users)
 {
 this.users = users;
 }
 
 public boolean hasNext()
 {
-if (pos  users.size()) {
-return true;
-}
-else
-return false;
+return users.hasNext();
 }
 
 public User next()
 throws NoSuchElementException
 {
-if (hasNext())
-return User.get(users.get(pos++));
+if (users.hasNext())
+return User.get(users.next());
 else
 throw new NoSuchElementException();
 }

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c?rev=1165359r1=1165358r2=1165359view=diff
==
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c Mon Sep  5 
16:52:03 2011
@@ -337,7 +337,7 @@ ACR_JNI_EXPORT(void, User, enum0)(JNI_ST
 endpwent();
 }
 
-ACR_JNI_EXPORT(void, User, enum1)(JNI_STDARGS, jobject ua)
+ACR_JNI_EXPORT(void, User, enum1)(JNI_STDARGS, jobject us)
 {
 struct utmpx *ut;
 int n = 0;
@@ -363,13 +363,11 @@ ACR_JNI_EXPORT(void, User, enum1)(JNI_ST
 s = AcrNewJavaStringA(env, ut-ut_user);
 if (s == 0)
 break;
-if (AcrArrayListContains(env, ua, s) == 0) {
-AcrArrayListAdd(env, ua, s);
-n++;
-}
+AcrHashSetAdd(env, us, s);

svn commit: r1165370 - in /commons/sandbox/runtime/trunk/src/main: java/org/apache/commons/runtime/ native/ native/os/unix/ native/shared/ test/org/apache/commons/runtime/

2011-09-05 Thread mturk
Author: mturk
Date: Mon Sep  5 17:41:02 2011
New Revision: 1165370

URL: http://svn.apache.org/viewvc?rev=1165370view=rev
Log:
Add posix Group implementation

Added:

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Group.java
   (with props)

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/GroupIterator.java
   (with props)

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/GroupIteratorImpl.java
   (with props)
commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c   (with props)
Modified:

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/LocalStrings.properties

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/User.java

commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/UserIteratorImpl.java
commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in
commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c
commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c

commons/sandbox/runtime/trunk/src/main/test/org/apache/commons/runtime/TestUser.java

Added: 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Group.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Group.java?rev=1165370view=auto
==
--- 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Group.java
 (added)
+++ 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Group.java
 Mon Sep  5 17:41:02 2011
@@ -0,0 +1,264 @@
+/* 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 org.apache.commons.runtime;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+
+/**
+ * Group Information.
+ */
+public final class Group
+{
+
+private byte[]  bb;
+private static final int BSIZE;
+// Serialize access to group database
+private static Object lock;
+static {
+BSIZE = init0();
+lock  = new Object();
+}
+
+private Group()
+{
+bb = null;
+Id = 0L;
+}
+
+private Group(long id, byte[] b)
+{
+bb = b;
+Id = id;
+}
+
+private static native int init0();
+private static native Group   get0(String name, byte[] buff)
+throws SystemException, SecurityException;
+private static native Group   get1(byte[] buff)
+throws SystemException, SecurityException;
+private static native Group   get2(byte[] buff)
+throws SystemException, SecurityException;
+private static native boolean equals0(long a, long b);
+private static native voidenum0(ArrayListString gset)
+throws SystemException, SecurityException;
+private static native voidenum1(ArrayListString gset)
+throws SystemException, SecurityException;
+private static native voidenum2(ArrayListString uset, long gid)
+throws SystemException, SecurityException;
+
+/**
+ * Create the {@code Group} object from the {@code name}.
+ *
+ * @return {@code Group} obect.
+ * @throws SecurityException if access to an internal group database
+ * is forbidden.
+ * @throws OperatingSystemException in case of error.
+ * @throws NoSuchObjectException if the group {@code name} doesn't exist.
+ */
+public static Group get(String name)
+throws SystemException, SecurityException, NoSuchObjectException
+{
+byte[] b = new byte[BSIZE];
+Group g = get0(name, b);
+if (g == null)
+throw new NoSuchObjectException(Local.sm.get(group.ENOTFOUND, 
name));
+return g;
+}
+
+/**
+ * Get the current users primary {@code Group}.
+ *
+ * @return Current users primary {@code Group} obect.
+ * @throws SecurityException if access to an internal group database
+ * is forbidden.
+ * @throws OperatingSystemException in case of error.
+ * @throws NoSuchObjectException if the primary group doesn't exist.
+ */
+public static Group get()
+throws 

svn commit: r1165371 - in /commons/sandbox/runtime/trunk/src/main/native/os/unix: group.c user.c

2011-09-05 Thread mturk
Author: mturk
Date: Mon Sep  5 17:46:02 2011
New Revision: 1165371

URL: http://svn.apache.org/viewvc?rev=1165371view=rev
Log:
Add native equals methods

Modified:
commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c
commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c?rev=1165371r1=1165370r2=1165371view=diff
==
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/group.c Mon Sep  5 
17:46:02 2011
@@ -257,6 +257,14 @@ ACR_JNI_EXPORT(int, Group, init0)(JNI_ST
 return 4;
 }
 
+ACR_JNI_EXPORT(jboolean, Group, equals0)(JNI_STDARGS, jlong a, jlong b)
+{
+if (a == 0)
+return b == 0 ? JNI_TRUE : JNI_FALSE;
+else
+return a == b ? JNI_TRUE : JNI_FALSE;
+}
+
 ACR_JNI_EXPORT(jobject, Group, get0)(JNI_STDARGS, jstring name,
 jbyteArray buf)
 {

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c?rev=1165371r1=1165370r2=1165371view=diff
==
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/user.c Mon Sep  5 
17:46:02 2011
@@ -292,6 +292,14 @@ ACR_JNI_EXPORT(int, User, init0)(JNI_STD
 return 4;
 }
 
+ACR_JNI_EXPORT(jboolean, User, equals0)(JNI_STDARGS, jlong a, jlong b)
+{
+if (a == 0)
+return b == 0 ? JNI_TRUE : JNI_FALSE;
+else
+return a == b ? JNI_TRUE : JNI_FALSE;
+}
+
 ACR_JNI_EXPORT(jobject, User, get0)(JNI_STDARGS, jstring name,
 jbyteArray buf)
 {




svn commit: r1165392 - /commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/CatalogBase.java

2011-09-05 Thread simonetripodi
Author: simonetripodi
Date: Mon Sep  5 19:03:45 2011
New Revision: 1165392

URL: http://svn.apache.org/viewvc?rev=1165392view=rev
Log:
added missing @since tag in getCommands() method javadoc

Modified:

commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/CatalogBase.java

Modified: 
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/CatalogBase.java
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/CatalogBase.java?rev=1165392r1=1165391r2=1165392view=diff
==
--- 
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/CatalogBase.java
 (original)
+++ 
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/CatalogBase.java
 Mon Sep  5 19:03:45 2011
@@ -108,6 +108,7 @@ public class CatalogBase implements Cata
  * Returns the map of named {@link Command}s, keyed by name.
  *
  * @return The map of named {@link Command}s, keyed by name.
+ * @since 3.0
  */
 public MapString, Command? extends Context getCommands() {
 return unmodifiableMap(commands);




svn commit: r1165395 - /commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java

2011-09-05 Thread simonetripodi
Author: simonetripodi
Date: Mon Sep  5 19:07:51 2011
New Revision: 1165395

URL: http://svn.apache.org/viewvc?rev=1165395view=rev
Log:
added missing @since tag in isFrozen() method javadoc

Modified:

commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java

Modified: 
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java?rev=1165395r1=1165394r2=1165395view=diff
==
--- 
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
 (original)
+++ 
commons/proper/chain/branches/version-2.0-work/src/main/java/org/apache/commons/chain/impl/ChainBase.java
 Mon Sep  5 19:07:51 2011
@@ -234,6 +234,7 @@ public class ChainBaseC extends Context
  * @return true, if the configuration of our commands list
  * has been frozen by a call to the codeexecute()/code method,
  * false otherwise.
+ * @since 3.0
  */
 public boolean isFrozen() {
 return frozen;




svn commit: r1165408 - /commons/proper/email/trunk/src/test/org/apache/commons/mail/MultiPartEmailTest.java

2011-09-05 Thread sgoeschl
Author: sgoeschl
Date: Mon Sep  5 20:17:52 2011
New Revision: 1165408

URL: http://svn.apache.org/viewvc?rev=1165408view=rev
Log:
Fixing typo in comment

Modified:

commons/proper/email/trunk/src/test/org/apache/commons/mail/MultiPartEmailTest.java

Modified: 
commons/proper/email/trunk/src/test/org/apache/commons/mail/MultiPartEmailTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/org/apache/commons/mail/MultiPartEmailTest.java?rev=1165408r1=1165407r2=1165408view=diff
==
--- 
commons/proper/email/trunk/src/test/org/apache/commons/mail/MultiPartEmailTest.java
 (original)
+++ 
commons/proper/email/trunk/src/test/org/apache/commons/mail/MultiPartEmailTest.java
 Mon Sep  5 20:17:52 2011
@@ -40,7 +40,7 @@ public class MultiPartEmailTest extends 
 {
 /** */
 private MockMultiPartEmailConcrete email;
-/** File to used to test file attachmetns (Must be valid) */
+/** File to used to test file attachments (Must be valid) */
 private File testFile;
 
 /**




svn commit: r1165409 - in /commons/proper/email/trunk/src: java/org/apache/commons/mail/util/ test/eml/ test/org/apache/commons/mail/util/

2011-09-05 Thread sgoeschl
Author: sgoeschl
Date: Mon Sep  5 20:22:09 2011
New Revision: 1165409

URL: http://svn.apache.org/viewvc?rev=1165409view=rev
Log:
Added more tests for MimeMessageParser since real-world usage was cruel to my 
code

Added:
commons/proper/email/trunk/src/test/eml/attachment-only.eml
commons/proper/email/trunk/src/test/eml/multipart-report.eml
commons/proper/email/trunk/src/test/eml/simple-reply.eml
Modified:

commons/proper/email/trunk/src/java/org/apache/commons/mail/util/MimeMessageParser.java

commons/proper/email/trunk/src/test/org/apache/commons/mail/util/MimeMessageParserTest.java

Modified: 
commons/proper/email/trunk/src/java/org/apache/commons/mail/util/MimeMessageParser.java
URL: 
http://svn.apache.org/viewvc/commons/proper/email/trunk/src/java/org/apache/commons/mail/util/MimeMessageParser.java?rev=1165409r1=1165408r2=1165409view=diff
==
--- 
commons/proper/email/trunk/src/java/org/apache/commons/mail/util/MimeMessageParser.java
 (original)
+++ 
commons/proper/email/trunk/src/java/org/apache/commons/mail/util/MimeMessageParser.java
 Mon Sep  5 20:22:09 2011
@@ -21,6 +21,7 @@ import javax.activation.DataSource;
 import javax.mail.Message;
 import javax.mail.MessagingException;
 import javax.mail.Multipart;
+import javax.mail.Part;
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeBodyPart;
 import javax.mail.internet.MimeMessage;
@@ -32,9 +33,9 @@ import java.io.BufferedOutputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.List;
 
 /**
@@ -88,7 +89,7 @@ public class MimeMessageParser
  * @return the 'to' recipents of the message
  * @throws Exception determining the recipients failed
  */
-public Collection getTo() throws Exception
+public List getTo() throws Exception
 {
 javax.mail.Address[] recipients = 
this.mimeMessage.getRecipients(Message.RecipientType.TO);
 return recipients != null ? Arrays.asList(recipients) : new 
ArrayList();
@@ -98,7 +99,7 @@ public class MimeMessageParser
  * @return the 'cc' recipents of the message
  * @throws Exception determining the recipients failed
  */
-public Collection getCc() throws Exception
+public List getCc() throws Exception
 {
 javax.mail.Address[] recipients = 
this.mimeMessage.getRecipients(Message.RecipientType.CC);
 return recipients != null ? Arrays.asList(recipients) : new 
ArrayList();
@@ -108,7 +109,7 @@ public class MimeMessageParser
  * @return the 'bcc' recipents of the message
  * @throws Exception determining the recipients failed
  */
-public Collection getBcc() throws Exception
+public List getBcc() throws Exception
 {
 javax.mail.Address[] recipients = 
this.mimeMessage.getRecipients(Message.RecipientType.BCC);
 return recipients != null ? Arrays.asList(recipients) : new 
ArrayList();
@@ -204,8 +205,8 @@ public class MimeMessageParser
 /**
  * Parses the MimePart to create a DataSource.
  *
- * @param parent the parent MultiPart
- * @param part   the part to be processed
+ * @param parent the parent multi-part
+ * @param part   the current part to be processed
  * @return the DataSource
  * @throws MessagingException creating the DataSource failed
  * @throws IOExceptioncreating the DataSource failed
@@ -218,7 +219,7 @@ public class MimeMessageParser
 String contentType = getBaseMimeType(dataSource.getContentType());
 byte[] content = this.getContent(dataSource.getInputStream());
 ByteArrayDataSource result = new ByteArrayDataSource(content, 
contentType);
-String dataSourceName = MimeUtility.decodeText(dataSource.getName());
+String dataSourceName = getDataSourceName(part, dataSource);
 
 result.setName(dataSourceName);
 return result;
@@ -295,6 +296,37 @@ public class MimeMessageParser
 }
 
 /**
+ * Determines the name of the data source if it is not already set.
+ *
+ * @param part the mail part
+ * @param dataSource the data source
+ * @return the name of the data source or bnull/b if no name can be 
determined
+ * @throws MessagingException accessing the part failed
+ * @throws UnsupportedEncodingException decoding the text failed
+ */
+protected String getDataSourceName(Part part, DataSource dataSource)
+throws MessagingException, UnsupportedEncodingException
+{
+String result = dataSource.getName();
+
+if(result == null || result.length() == 0)
+{
+result = part.getFileName();
+}
+
+if(result != null  result.length()  0)
+{
+result = MimeUtility.decodeText( 

svn commit: r1165410 - /commons/proper/email/trunk/

2011-09-05 Thread sgoeschl
Author: sgoeschl
Date: Mon Sep  5 20:25:09 2011
New Revision: 1165410

URL: http://svn.apache.org/viewvc?rev=1165410view=rev
Log:
Ignoring IntelliJ project files

Modified:
commons/proper/email/trunk/   (props changed)

Propchange: commons/proper/email/trunk/
--
--- svn:ignore (original)
+++ svn:ignore Mon Sep  5 20:25:09 2011
@@ -16,3 +16,6 @@ junit*.properties
 dist
 cobertura.ser
 .settings
+commons-email.iml
+commons-email.ipr
+commons-email.iws




svn commit: r1165416 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java

2011-09-05 Thread erans
Author: erans
Date: Mon Sep  5 21:22:46 2011
New Revision: 1165416

URL: http://svn.apache.org/viewvc?rev=1165416view=rev
Log:
Wrote 1e-11 instead of 10E-12 (which was probably a typo).

Modified:

commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java?rev=1165416r1=1165415r2=1165416view=diff
==
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/LUDecompositionImpl.java
 Mon Sep  5 21:22:46 2011
@@ -33,8 +33,8 @@ import org.apache.commons.math.util.Fast
  * @since 2.0
  */
 public class LUDecompositionImpl implements LUDecomposition {
-/** Default bound to determine effective singularity in LU decomposition */
-private static final double DEFAULT_TOO_SMALL = 10E-12;
+/** Default bound to determine effective singularity in LU decomposition. 
*/
+private static final double DEFAULT_TOO_SMALL = 1e-11;
 /** Entries of LU decomposition. */
 private double lu[][];
 /** Pivot permutation associated with LU decomposition */
@@ -52,6 +52,9 @@ public class LUDecompositionImpl impleme
 
 /**
  * Calculates the LU-decomposition of the given matrix.
+ * This constructor uses 1e-11 as default value for the singularity
+ * threshold.
+ *
  * @param matrix Matrix to decompose.
  * @throws NonSquareMatrixException if matrix is not square.
  */




svn commit: r1165436 - /commons/proper/lang/trunk/pom.xml

2011-09-05 Thread ggregory
Author: ggregory
Date: Mon Sep  5 22:15:18 2011
New Revision: 1165436

URL: http://svn.apache.org/viewvc?rev=1165436view=rev
Log:
Use 2 spaces per indent instead of 4 for formatting and remove trailing spaces.

Modified:
commons/proper/lang/trunk/pom.xml

Modified: commons/proper/lang/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/pom.xml?rev=1165436r1=1165435r2=1165436view=diff
==
--- commons/proper/lang/trunk/pom.xml (original)
+++ commons/proper/lang/trunk/pom.xml Mon Sep  5 22:15:18 2011
@@ -15,10 +15,10 @@
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/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;
   parent
 groupIdorg.apache.commons/groupId
 artifactIdcommons-parent/artifactId
@@ -31,7 +31,7 @@
   nameCommons Lang/name
 
   inceptionYear2001/inceptionYear
-description
+  description
 Commons Lang, a package of Java utility classes for the
 classes that are in java.lang's hierarchy, or are considered to be so
 standard as to justify existence in java.lang.
@@ -50,388 +50,388 @@
 urlhttp://svn.apache.org/viewvc/commons/proper/lang/trunk/url
   /scm
 
-   developers
-developer
-nameDaniel Rall/name
-iddlr/id
-emaild...@finemaltcoding.com/email
-organizationCollabNet, Inc./organization
-roles
-roleJava Developer/role
-/roles
-/developer
-developer
-nameStephen Colebourne/name
-idscolebourne/id
-emailscolebou...@joda.org/email
-organizationSITA ATS Ltd/organization
-timezone0/timezone
-roles
-roleJava Developer/role
-/roles
-/developer
-developer
-nameHenri Yandell/name
-idbayard/id
-emailbay...@apache.org/email
-organization/
-roles
-roleJava Developer/role
-/roles
-/developer
-developer
-nameSteven Caswell/name
-idscaswell/id
-emailstevencasw...@apache.org/email
-organization/
-roles
-roleJava Developer/role
-/roles
-timezone-5/timezone
-/developer
-developer
-nameRobert Burrell Donkin/name
-idrdonkin/id
-emailrdon...@apache.org/email
-organization/
-roles
-roleJava Developer/role
-/roles
-/developer
-developer
-nameGary D. Gregory/name
-idggregory/id
-emailggreg...@seagullsw.com/email
-organizationSeagull Software/organization
-timezone-8/timezone
-roles
-roleJava Developer/role
-/roles
-/developer
-developer
-namePhil Steitz/name
-idpsteitz/id
-organization/
-roles
-roleJava Developer/role
-/roles
-/developer
-developer
-nameFredrik Westermarck/name
-idfredrik/id
-email/
-organization/
-roles
-roleJava Developer/role
-/roles
-/developer
-developer
-nameJames Carman/name
-idjcarman/id
-emailjcar...@apache.org/email
-organizationCarman Consulting, Inc./organization
-roles
-roleJava Developer/role
-/roles
-/developer
-developer
-nameNiall Pemberton/name
-idniallp/id
-roles
-roleJava Developer/role
-/roles
-/developer
-developer
-nameMatt Benson/name
-idmbenson/id
-roles
-roleJava Developer/role
-/roles
-/developer
-developer
-nameJoerg Schaible/name
-idjoehni/id
-emailjoerg.schai...@gmx.de/email
-roles
-roleJava Developer/role
-/roles
-timezone+1/timezone
-/developer
-developer
-  nameOliver Heger/name
-  idoheger/id
-  emailohe...@apache.org/email
-  timezone+1/timezone
-  roles
-roleJava Developer/role
-  /roles
-/developer
-developer
-   

svn commit: r1165437 - /commons/proper/lang/trunk/pom.xml

2011-09-05 Thread ggregory
Author: ggregory
Date: Mon Sep  5 22:20:44 2011
New Revision: 1165437

URL: http://svn.apache.org/viewvc?rev=1165437view=rev
Log:
Running lang under a security manager and LANG-744.

Modified:
commons/proper/lang/trunk/pom.xml

Modified: commons/proper/lang/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/lang/trunk/pom.xml?rev=1165437r1=1165436r2=1165437view=diff
==
--- commons/proper/lang/trunk/pom.xml (original)
+++ commons/proper/lang/trunk/pom.xml Mon Sep  5 22:20:44 2011
@@ -15,7 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
 --
-project
+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;
@@ -32,10 +32,10 @@ project
 
   inceptionYear2001/inceptionYear
   description
-Commons Lang, a package of Java utility classes for the
-classes that are in java.lang's hierarchy, or are considered to be so
-standard as to justify existence in java.lang.
-/description
+  Commons Lang, a package of Java utility classes for the
+  classes that are in java.lang's hierarchy, or are considered to be so
+  standard as to justify existence in java.lang.
+/description
 
   urlhttp://commons.apache.org/lang//url
 
@@ -475,13 +475,27 @@ project
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-surefire-plugin/artifactId
-configuration
-  includes
-include**/*Test.java/include
-  /includes
-  !-- Test [LANG-744] StringUtils throws 
java.security.AccessControlException on Google App Engine. --
-  !-- argLine-Djava.security.manager 
-Djava.security.policy=${basedir}/src/test/resources/java.policy/argLine --
-/configuration
+executions
+  execution
+idplain/id
+configuration
+  includes
+include**/*Test.java/include
+  /includes
+/configuration
+  /execution
+  !-- 
+  execution
+idsecurity-manager/id
+configuration
+  includes
+include**/*Test.java/include
+  /includes  
+  argLine-Djava.security.manager 
-Djava.security.policy=${basedir}/src/test/resources/java.policy/argLine
+/configuration
+  /execution
+  --
+/executions
   /plugin
   plugin
 artifactIdmaven-assembly-plugin/artifactId




svn commit: r1165453 - in /commons/proper/io/trunk/src: main/java/org/apache/commons/io/input/ReaderInputStream.java main/java/org/apache/commons/io/output/WriterOutputStream.java test/java/org/apache

2011-09-05 Thread niallp
Author: niallp
Date: Mon Sep  5 23:34:43 2011
New Revision: 1165453

URL: http://svn.apache.org/viewvc?rev=1165453view=rev
Log:
IO-277 ReaderInputStream enters infinite loop when it encounters an unmappable 
character - thanks to Mike Thomas

Modified:

commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java

commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/WriterOutputStream.java

commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java

Modified: 
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java
URL: 
http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java?rev=1165453r1=1165452r2=1165453view=diff
==
--- 
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java
 (original)
+++ 
commons/proper/io/trunk/src/main/java/org/apache/commons/io/input/ReaderInputStream.java
 Mon Sep  5 23:34:43 2011
@@ -24,6 +24,7 @@ import java.nio.CharBuffer;
 import java.nio.charset.Charset;
 import java.nio.charset.CharsetEncoder;
 import java.nio.charset.CoderResult;
+import java.nio.charset.CodingErrorAction;
 
 /**
  * {@link InputStream} implementation that reads a character stream from a 
{@link Reader}
@@ -100,17 +101,44 @@ public class ReaderInputStream extends I
  * Construct a new {@link ReaderInputStream}.
  * 
  * @param reader the target {@link Reader}
- * @param charset the charset encoding
+ * @param encoder the charset encoder
+ * @since Commons IO 2.1
+ */
+public ReaderInputStream(Reader reader, CharsetEncoder encoder) {
+this(reader, encoder, DEFAULT_BUFFER_SIZE);
+}
+
+/**
+ * Construct a new {@link ReaderInputStream}.
+ * 
+ * @param reader the target {@link Reader}
+ * @param encoder the charset encoder
  * @param bufferSize the size of the input buffer in number of characters
+ * @since Commons IO 2.1
  */
-public ReaderInputStream(Reader reader, Charset charset, int bufferSize) {
+public ReaderInputStream(Reader reader, CharsetEncoder encoder, int 
bufferSize) {
 this.reader = reader;
-encoder = charset.newEncoder();
+this.encoder = encoder;
 encoderIn = CharBuffer.allocate(bufferSize);
 encoderIn.flip();
 }
 
 /**
+ * Construct a new {@link ReaderInputStream}.
+ * 
+ * @param reader the target {@link Reader}
+ * @param charset the charset encoding
+ * @param bufferSize the size of the input buffer in number of characters
+ */
+public ReaderInputStream(Reader reader, Charset charset, int bufferSize) {
+this(reader,
+ charset.newEncoder()
+.onMalformedInput(CodingErrorAction.REPLACE)
+.onUnmappableCharacter(CodingErrorAction.REPLACE),
+ bufferSize);
+}
+
+/**
  * Construct a new {@link ReaderInputStream} with a default input buffer 
size of
  * 1024 characters.
  * 

Modified: 
commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/WriterOutputStream.java
URL: 
http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/WriterOutputStream.java?rev=1165453r1=1165452r2=1165453view=diff
==
--- 
commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/WriterOutputStream.java
 (original)
+++ 
commons/proper/io/trunk/src/main/java/org/apache/commons/io/output/WriterOutputStream.java
 Mon Sep  5 23:34:43 2011
@@ -93,28 +93,61 @@ public class WriterOutputStream extends 
 private final CharBuffer decoderOut;
 
 /**
+ * Constructs a new {@link WriterOutputStream} with a default output 
buffer size of
+ * 1024 characters. The output buffer will only be flushed when it 
overflows or when
+ * {@link #flush()} or {@link #close()} is called.
+ * 
+ * @param writer the target {@link Writer}
+ * @param decoder the charset decoder
+ * @since Commons IO 2.1
+ */
+public WriterOutputStream(Writer writer, CharsetDecoder decoder) {
+this(writer, decoder, DEFAULT_BUFFER_SIZE, false);
+}
+
+/**
  * Constructs a new {@link WriterOutputStream}.
  * 
  * @param writer the target {@link Writer}
- * @param charset the charset encoding
+ * @param decoder the charset decoder
  * @param bufferSize the size of the output buffer in number of characters
  * @param writeImmediately If tttrue/tt the output buffer will be 
flushed after each
  * write operation, i.e. all available data will 
be written to the
  * underlying {@link Writer} immediately. If 
ttfalse/tt, the
  * output buffer 

svn commit: r1165454 - /commons/proper/commons-parent/trunk/pom.xml

2011-09-05 Thread sebb
Author: sebb
Date: Mon Sep  5 23:35:07 2011
New Revision: 1165454

URL: http://svn.apache.org/viewvc?rev=1165454view=rev
Log:
With release of 3.0, can now share site plugin between M2 and M3

Modified:
commons/proper/commons-parent/trunk/pom.xml

Modified: commons/proper/commons-parent/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/pom.xml?rev=1165454r1=1165453r2=1165454view=diff
==
--- commons/proper/commons-parent/trunk/pom.xml (original)
+++ commons/proper/commons-parent/trunk/pom.xml Mon Sep  5 23:35:07 2011
@@ -429,7 +429,7 @@
   plugin
 groupIdorg.apache.maven.plugins/groupId
 artifactIdmaven-site-plugin/artifactId
-version2.2/version
+version3.0/version
 configuration
   !-- Exclude the navigation file for Maven 1 sites
and the changes file used by the changes-plugin,
@@ -802,10 +802,10 @@
   /modules
 /profile
 
-   !-- 
- Use maven-site-plugin 2.x with Maven 2.x and maven-site-plugin 3.x 
with Maven 3.x  
- See 
http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html 
-   --
+!-- 
+Configure site plugin to support both Maven2 and Maven3, see:
+
http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Using_the_same_version_of_maven-site-plugin_for_both_Maven_2_and_Maven_3
+--
 profile
   idmaven-3/id
   activation
@@ -815,15 +815,6 @@
 /file
   /activation
   build
-pluginManagement
-  plugins
-plugin
-  groupIdorg.apache.maven.plugins/groupId
-  artifactIdmaven-site-plugin/artifactId
-  version3.0-beta-3/version
-/plugin
-  /plugins
-/pluginManagement
 plugins
   plugin
 artifactIdmaven-site-plugin/artifactId




svn commit: r1165483 - /commons/proper/io/trunk/pom.xml

2011-09-05 Thread sebb
Author: sebb
Date: Tue Sep  6 02:47:41 2011
New Revision: 1165483

URL: http://svn.apache.org/viewvc?rev=1165483view=rev
Log:
Tweak description; JUnit 4.9; prep release version

Modified:
commons/proper/io/trunk/pom.xml

Modified: commons/proper/io/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/io/trunk/pom.xml?rev=1165483r1=1165482r2=1165483view=diff
==
--- commons/proper/io/trunk/pom.xml (original)
+++ commons/proper/io/trunk/pom.xml Tue Sep  6 02:47:41 2011
@@ -29,7 +29,7 @@
 
   inceptionYear2002/inceptionYear
   description
-Commons-IO contains utility classes, stream implementations, file 
filters, file comparators and endian classes.
+The Commons IO library contains utility classes, stream 
implementations, file filters, file comparators and endian classes.
   /description
 
   urlhttp://commons.apache.org/io//url
@@ -202,7 +202,7 @@
 dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
-  version4.8.2/version
+  version4.9/version
   scopetest/scope
 /dependency
   /dependencies
@@ -211,7 +211,7 @@
 maven.compile.source1.5/maven.compile.source
 maven.compile.target1.5/maven.compile.target
 commons.componentidio/commons.componentid
-commons.release.version2.0.1/commons.release.version
+commons.release.version2.1/commons.release.version
 commons.release.desc(requires JDK 1.5+)/commons.release.desc
 commons.release.2.version1.4/commons.release.2.version
 commons.release.2.desc(requires JDK 1.3+)/commons.release.2.desc




svn commit: r1165490 - /commons/proper/io/trunk/pom.xml

2011-09-05 Thread sebb
Author: sebb
Date: Tue Sep  6 03:22:59 2011
New Revision: 1165490

URL: http://svn.apache.org/viewvc?rev=1165490view=rev
Log:
Clirr 2.2.3 = 2.3

Modified:
commons/proper/io/trunk/pom.xml

Modified: commons/proper/io/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/io/trunk/pom.xml?rev=1165490r1=1165489r2=1165490view=diff
==
--- commons/proper/io/trunk/pom.xml (original)
+++ commons/proper/io/trunk/pom.xml Tue Sep  6 03:22:59 2011
@@ -272,7 +272,7 @@
   plugin
 groupIdorg.codehaus.mojo/groupId
 artifactIdclirr-maven-plugin/artifactId
-version2.2.3/version
+version2.3/version
 configuration
   comparisonVersion2.0/comparisonVersion
   minSeverityinfo/minSeverity




svn commit: r1165501 - /commons/sandbox/runtime/trunk/src/main/native/include/acr/users.h

2011-09-05 Thread mturk
Author: mturk
Date: Tue Sep  6 05:32:42 2011
New Revision: 1165501

URL: http://svn.apache.org/viewvc?rev=1165501view=rev
Log:
Add users header

Added:
commons/sandbox/runtime/trunk/src/main/native/include/acr/users.h   (with 
props)

Added: commons/sandbox/runtime/trunk/src/main/native/include/acr/users.h
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr/users.h?rev=1165501view=auto
==
--- commons/sandbox/runtime/trunk/src/main/native/include/acr/users.h (added)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr/users.h Tue Sep  
6 05:32:42 2011
@@ -0,0 +1,43 @@
+/* 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.
+ */
+
+#ifndef _ACR_USERS_H
+#define _ACR_USERS_H
+
+#include acr/jniapi.h
+
+#ifdef __cplusplus
+extern C {
+#endif
+
+/**
+ * @file users.h
+ * @brief
+ *
+ * ACR User and Group support.
+ *
+ */
+
+ACR_CLASS_CTOR(Group);
+ACR_CLASS_DTOR(Group);
+ACR_CLASS_CTOR(User);
+ACR_CLASS_DTOR(User);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ACR_USERS_H */

Propchange: commons/sandbox/runtime/trunk/src/main/native/include/acr/users.h
--
svn:eol-style = native