You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by gg...@apache.org on 2023/06/23 16:30:48 UTC

[juneau] branch master updated (0c8225b8d -> eac32f82d)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


    from 0c8225b8d Add Apache's code of conduct as a site reference
     new 9ab9d0d18 Update Git ignore file for nested Eclipse project files
     new eac32f82d [juneau-common] Throw IllegalArgumentException instead of RuntimeException

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                                        | 8 ++++----
 .../src/main/java/org/apache/juneau/common/internal/IOUtils.java  | 2 +-
 .../main/java/org/apache/juneau/common/internal/StringUtils.java  | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)


[juneau] 02/02: [juneau-common] Throw IllegalArgumentException instead of RuntimeException

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git

commit eac32f82d9175c0679c044a716684bd980ef0673
Author: Gary Gregory <gg...@rocketsoftware.com>
AuthorDate: Fri Jun 23 12:29:44 2023 -0400

    [juneau-common] Throw IllegalArgumentException instead of
    RuntimeException
---
 .../src/main/java/org/apache/juneau/common/internal/IOUtils.java      | 2 +-
 .../src/main/java/org/apache/juneau/common/internal/StringUtils.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/IOUtils.java b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/IOUtils.java
index 35aa977bc..d401af181 100644
--- a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/IOUtils.java
+++ b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/IOUtils.java
@@ -431,7 +431,7 @@ public final class IOUtils {
 			return read((File)in);
 		if (in instanceof byte[])
 			return read((byte[])in);
-		throw new RuntimeException("Invalid type passed to read:  " + in.getClass().getName());
+		throw new IllegalArgumentException("Invalid type passed to read:  " + in.getClass().getName());
 	}
 
 	/**
diff --git a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/StringUtils.java b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/StringUtils.java
index f3d681597..4777380c6 100644
--- a/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/StringUtils.java
+++ b/juneau-core/juneau-common/src/main/java/org/apache/juneau/common/internal/StringUtils.java
@@ -186,7 +186,7 @@ public final class StringUtils {
 			return null;
 		if (s.length() == 1)
 			return s.charAt(0);
-		throw new RuntimeException("Invalid character: '"+s+"'");
+		throw new IllegalArgumentException("Invalid character: '" + s + "'");
 	}
 
 	/**
@@ -838,7 +838,7 @@ public final class StringUtils {
 		if (state == S4)
 			l.add(s.substring(mark));
 		else if (state == S2 || state == S3)
-			throw new RuntimeException("Unmatched string quotes: "+s);
+			throw new IllegalArgumentException("Unmatched string quotes: " + s);
 		return l.toArray(new String[l.size()]);
 	}
 


[juneau] 01/02: Update Git ignore file for nested Eclipse project files

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git

commit 9ab9d0d18165f60e37b4a3bbd0b367deaee21a23
Author: Gary Gregory <gg...@rocketsoftware.com>
AuthorDate: Fri Jun 23 12:23:10 2023 -0400

    Update Git ignore file for nested Eclipse project files
---
 .gitignore | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index f4ea50f58..6d196b241 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
-/target/
+**/target/
 **/.DS_Store
-.classpath
-.project
-/.settings/
+**/.classpath
+**/.project
+**/.settings/
 /bin/
 derby.log