Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed NPE when netsample network doesn't exist

  • Loading branch information...
commit 5b7adc53f479ae4fbc97fb1c53df1c180a1549e7 1 parent 06109dc
@labisso labisso authored
View
7 ...vice/java/source/src/org/globus/workspace/network/defaults/DefaultAssociationAdapter.java
@@ -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 {
Please sign in to comment.
Something went wrong with that request. Please try again.