pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/biojava/biojava/commit/7217ee82acf8098206d67b67feb54c0ed5170b6a

esheet" href="https://github.githubassets.com/assets/global-d18f184ea1a06a2c.css" /> Safeguards · biojava/biojava@7217ee8 · GitHub
Skip to content

Commit 7217ee8

Browse files
committed
Safeguards
1 parent c33627f commit 7217ee8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,13 +536,13 @@ public void setChains(int modelIdx, List<Chain> chains){
536536
*/
537537
@Override
538538
public List<Chain> getModel(int modelIdx) {
539+
if (models.isEmpty()) return new ArrayList<>();
539540
return models.get(modelIdx).getChains();
540541
}
541542

542543
/** {@inheritDoc} */
543544
@Override
544545
public Chain getChain(String asymId, int modelIdx) {
545-
546546
List<Chain> chains = getChains(modelIdx);
547547
for (Chain c : chains) {
548548
if (c.getId().equals(asymId)) {
@@ -566,6 +566,8 @@ public Chain getPolyChain(String asymId) {
566566

567567
@Override
568568
public Chain getPolyChain(String asymId, int modelIdx) {
569+
if (models.isEmpty()) return null;
570+
569571
Model model = models.get(modelIdx);
570572
if (model==null) {
571573
return null;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

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