Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 1154:24b87650136f
Fix ArrayIndexOutOfBounds in certain cases.
flys-artifacts/trunk@2685 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 09 Sep 2011 12:37:52 +0000 |
parents | 302461d5d071 |
children | 854c2f7da3f1 |
comparison
equal
deleted
inserted
replaced
1153:62ad0a753b68 | 1154:24b87650136f |
---|---|
780 | 780 |
781 /** | 781 /** |
782 * Get name of cross section. | 782 * Get name of cross section. |
783 */ | 783 */ |
784 public String getCrossSectionName() { | 784 public String getCrossSectionName() { |
785 return getCrossSections().get(0).getDescription(); | 785 List<CrossSection> sections = getCrossSections(); |
786 | |
787 if (sections.size() > 0) { | |
788 return sections.get(0).getDescription(); | |
789 } | |
790 else { | |
791 return ""; | |
792 } | |
786 } | 793 } |
787 | 794 |
788 | 795 |
789 /** | 796 /** |
790 * Get points of CrossSection Line. | 797 * Get points of CrossSection Line. |