Skip to content

Commit 2bacd9e

Browse files
BabcockBabcock
authored andcommitted
Commit current changes
1 parent 4773aa7 commit 2bacd9e

File tree

2 files changed

+335
-298
lines changed

2 files changed

+335
-298
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# NORDSTROM COMMON
2+
3+
**Nordstrom Common** is a small collection of general-purpose utility classes with wide applicability.
4+
5+
## UncheckedThrow
6+
7+
The **UncheckedThrow** class uses type erasure to enable client code to throw checked exceptions as unchecked. This allows methods to throw checked exceptions without requiring clients to handle or declare them. It should be sparingly, as this exempts client code from handling or declaring exceptions created by their own actions. The target use case for this facility is to throw exceptions that were serialized in responses from a remote system. Although the compiler won't require clients of methods using this technique to handle or declare the suppressed exception, the JavaDoc for such methods should include a `@throws` declaration for implementers who might want to handle or declare it voluntarily.
8+
9+
10+
```java
11+
...
12+
13+
String value;
14+
try {
15+
value = URLDecoder.decode(keyVal[1], "UTF-8");
16+
} catch (UnsupportedEncodingException e) {
17+
UncheckedThrow.throwUnchecked(e);
18+
}
19+
20+
...
21+
```
22+
23+
## DatabaseUtils
24+

0 commit comments

Comments
 (0)