Skip to content

Commit 59a4a58

Browse files
author
Tobias Wiessner
committed
Integer creation
1 parent 508f534 commit 59a4a58

5 files changed

Lines changed: 10 additions & 30 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Test
2+
Main.java
3+
14
# Build
25
out
36

Main.java

Lines changed: 0 additions & 22 deletions
This file was deleted.

de/uni_stuttgart/ils/reqif4j/attributes/AttributeValueInteger.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ public class AttributeValueInteger extends AttributeValue {
55

66
public AttributeValueInteger(String value, AttributeDefinition type) {
77
super(value, type);
8-
9-
this.value = Integer.parseInt(value);
8+
if(value == null){
9+
this.value = 0;
10+
}else {
11+
this.value = Integer.parseInt(value);
12+
}
1013
}
1114

1215
@Override

de/uni_stuttgart/ils/reqif4j/reqif/ReqIFCoreContent.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ public ReqIFCoreContent(Element coreContent) {
117117

118118
case ReqIFConst.XHTML: this.dataTypes.put(dataTypeID, new DatatypeXHTML(dataTypeID, dataTypeName));
119119
break;
120+
120121
case ReqIFConst.DATE: this.dataTypes.put(dataTypeID, new DatatypeDate(dataTypeID, dataTypeName));
122+
break;
121123

122124
default: this.dataTypes.put(null, new Datatype(dataTypeID, dataTypeName, ReqIFConst.UNDEFINED));
123125
break;

de/uni_stuttgart/ils/reqif4j/reqif/ReqIFz.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88

99
public class ReqIFz extends ReqIFFile {
1010

11-
private String path;
12-
private String name;
13-
private int numberOfReqIFDocuments = 0;
14-
private Map<String, ReqIFDocument> reqifDocuments = new HashMap<>();
15-
private Map<String, Map<String, InputStream>> picturesInReqIFDocument = new HashMap<>();
16-
1711
public ReqIFz(String filePath) throws IOException {
1812
File destDir = new File(filePath + "_unzipped"); // Extract to a separate directory
1913
if (!destDir.exists() && !destDir.mkdirs()) {

0 commit comments

Comments
 (0)