Commits

Sara Magliacane committed 2585dff

debugging

  • Participants
  • Parent commits 58f9006

Comments (0)

Files changed (2)

File src/main/java/nl/vu/recoprov/baseclasses/DependencyNode.java

 	}
 	
 	public long getCompressedSize() {
+		if (this.recoMetadata == null)
+			return 0;
 		return this.recoMetadata.getCompressedSize();
 	}
 
 	public void setCompressedSize(long zipFile) {
+		if (this.recoMetadata == null)
+			this.recoMetadata = new RecoMetadata();
 		this.recoMetadata.setCompressedSize(zipFile);
 	}
 

File src/main/java/nl/vu/recoprov/baseclasses/RecoMetadata.java

 	}
 	
 	public long getCompressedSize() {
-		return 	this.getInt(Property.externalInteger(COMPRESSED_SIZE));
+		if (Property.externalInteger(COMPRESSED_SIZE) == null)
+			return 0;
+		Integer value = this.getInt(Property.externalInteger(COMPRESSED_SIZE));
+		
+		if (value == null)
+			return 0;
+		return (long) value;
 	}
 	
 	public void setCompressedSize(long compressedSize) {
-		this.set(Property.externalInteger(COMPRESSED_SIZE), compressedSize);
+		this.set(Property.externalInteger(COMPRESSED_SIZE), (int) compressedSize);
 	}