Skip to content

Commit f04effa

Browse files
committed
Better handlng of null
1 parent 846c13f commit f04effa

File tree

1 file changed

+1
-1
lines changed
  • biojava-structure/src/main/java/org/biojava/nbio/structure

1 file changed

+1
-1
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/PDBStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public enum Status {
7070
* @throws IllegalArgumentException If the string is not recognized
7171
*/
7272
public static Status fromString(String statusStr) {
73-
if (statusStr == null) return null;
73+
if (statusStr == null) throw new IllegalArgumentException("Status string can't be null");
7474
if(statusStr.equalsIgnoreCase("REMOVED"))
7575
return Status.REMOVED;
7676
else if(statusStr.equalsIgnoreCase("CURRENT"))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy