mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
use consistent rethrow for impossible CloneNotSupportedException
This commit is contained in:
parent
eeaee75b26
commit
ea4e0eea7b
@ -96,8 +96,7 @@ public final class PortIterator implements Iterator<Integer>, Cloneable {
|
||||
return (PortIterator) super.clone();
|
||||
}
|
||||
catch (CloneNotSupportedException e) {
|
||||
assert false : "this should never happen";
|
||||
return null;
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -50,8 +50,7 @@ public abstract class AbstractExporter implements Exporter {
|
||||
return (Exporter) super.clone();
|
||||
}
|
||||
catch (CloneNotSupportedException e) {
|
||||
// this cannot happen
|
||||
return null;
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user