Permalink
Browse files

Fixed NPE when netsample network doesn't exist

  • Loading branch information...
1 parent 06109dc commit 5b7adc53f479ae4fbc97fb1c53df1c180a1549e7 @labisso labisso committed Jul 9, 2010
@@ -199,11 +199,12 @@ private void writeNetworkFiles(Map<String,Association> associations) {
if (this.netSampleResource != null) {
if (this.netSampleNetwork != null && this.netSampleNetwork.length() != 0) {
final Association assoc = associations.get(this.netSampleNetwork);
- final List entries = assoc.getEntries();
- if (entries == null || entries.isEmpty()) {
+
+ if (assoc == null || assoc.getEntries() == null || assoc.getEntries().isEmpty()) {
logger.warn ("Not writing netsample file because network '" +
- this.netSampleNetwork + "' has no entries");
+ this.netSampleNetwork + "' does not exist or has no entries");
} else {
+ final List entries = assoc.getEntries();
final File netsampleFile;
try {

0 comments on commit 5b7adc5

Please sign in to comment.