commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r918898 - in /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util: Local.java LocalStrings.properties UUID.java Utils.java
Date Thu, 04 Mar 2010 08:54:43 GMT
Author: mturk
Date: Thu Mar  4 08:54:43 2010
New Revision: 918898

URL: http://svn.apache.org/viewvc?rev=918898&view=rev
Log:
Add util Local class

Added:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Local.java
  (with props)
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/LocalStrings.properties
  (with props)
Modified:
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/UUID.java
    commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Utils.java

Added: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Local.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Local.java?rev=918898&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Local.java
(added)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Local.java
Thu Mar  4 08:54:43 2010
@@ -0,0 +1,33 @@
+/*
+ * 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.util;
+
+/** Util package private constants
+ */
+class Local
+{
+
+    public static final String Package = "org.apache.commons.runtime.util";
+    public static final StringManager sm;
+
+    static {
+        sm = StringManager.getManager(Package);
+    }
+}
+

Propchange: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Local.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/LocalStrings.properties
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/LocalStrings.properties?rev=918898&view=auto
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/LocalStrings.properties
(added)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/LocalStrings.properties
Thu Mar  4 08:54:43 2010
@@ -0,0 +1,18 @@
+# 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.
+
+uuid.invalidBufferSize=Must be at least 16 bytes
+utils.noWrittableTemp=Cannot find writable temporary directory
+

Propchange: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/LocalStrings.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/UUID.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/UUID.java?rev=918898&r1=918897&r2=918898&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/UUID.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/UUID.java
Thu Mar  4 08:54:43 2010
@@ -39,7 +39,7 @@
         throws IllegalArgumentException
     {
         if (uuid.length < 16)
-            throw new IllegalArgumentException("Must be at least 16 bytes");
+            throw new IllegalArgumentException(Local.sm.get("uuid.invalidBufferSize"));
         this.uuid = uuid;
     }
 

Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Utils.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Utils.java?rev=918898&r1=918897&r2=918898&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Utils.java
(original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Utils.java
Thu Mar  4 08:54:43 2010
@@ -241,7 +241,7 @@
         File td    = getTempPath();
 
         if (td == null) {
-            throw new IOException("Cannot find writable temporary directory");
+            throw new IOException(Local.sm.get("utils.noWrittableTemp"));
         }
         while(true) {
             try {



Mime
View raw message