Skip to content

Commit

Permalink
remove extraneous @throws
Browse files Browse the repository at this point in the history
  • Loading branch information
leerho committed Oct 25, 2023
1 parent 2e47c14 commit 8f92558
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/main/java/org/apache/datasketches/common/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -839,9 +839,6 @@ public static <T> boolean le(final Object item1, final Object item2, final Compa
* Gets the file defined by the given resource file's shortFileName.
* @param shortFileName the last name in the pathname's name sequence.
* @return the file defined by the given resource file's shortFileName.
* @throws URISyntaxException error
* @throws MalformedURLException error
* @throws IOException if an IO error occurs
*/
public static File getResourceFile(final String shortFileName) {
Objects.requireNonNull(shortFileName, "input parameter 'String shortFileName' cannot be null.");
Expand Down Expand Up @@ -870,7 +867,6 @@ public static File getResourceFile(final String shortFileName) {
* @param shortFileName the last name in the pathname's name sequence.
* @return a byte array of the contents of the file defined by the given resource file's shortFileName.
* @throws IllegalArgumentException if resource cannot be read.
* @throws IOException if an IO error occurs
*/
public static byte[] getResourceBytes(final String shortFileName) {
Objects.requireNonNull(shortFileName, "input parameter 'String shortFileName' cannot be null.");
Expand All @@ -897,7 +893,6 @@ public static byte[] getResourceBytes(final String shortFileName) {
* This may be a little smaller than <i>Integer.MAX_VALUE</i>.
* @param in the Input Stream
* @return byte array
* @throws IOException if an IO error occurs
*/
public static byte[] readAllBytesFromInputStream(final InputStream in) {
return readBytesFromInputStream(Integer.MAX_VALUE, in);
Expand All @@ -914,7 +909,7 @@ public static byte[] readAllBytesFromInputStream(final InputStream in) {
* @param in the InputStream
* @return the filled byte array from the input stream
* @throws IllegalArgumentException if array size grows larger than what can be safely allocated by some VMs.
* @throws IOException if an IO error occurs
*/
public static byte[] readBytesFromInputStream(final int numBytesToRead, final InputStream in) {
if (numBytesToRead < 0) { throw new IllegalArgumentException("numBytesToRead must be positive or zero."); }
Expand Down Expand Up @@ -993,7 +988,6 @@ private static String getResourcePath(final URL url) { //must not be null
* @param shortFileName the name before prefixes and suffixes are added here and by the OS.
* The final extension will be the current extension. The prefix "temp_" is added here.
* @return a temp file,which will be eventually deleted by the OS
* @throws IOException if an IO error occurs
*/
private static File createTempFile(final String shortFileName) {
//remove any leading slash
Expand Down

0 comments on commit 8f92558

Please sign in to comment.