Skip to content

Commit 758260b

Browse files
committed
#75: Merge branch 'dev_javaplugin'
2 parents 489d8a5 + 4b14d69 commit 758260b

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

cobigen/cobigen-javaplugin/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>com.capgemini</groupId>
66
<artifactId>cobigen-javaplugin</artifactId>
77
<name>CobiGen - Java Plug-in</name>
8-
<version>1.2.0</version>
8+
<version>1.2.1-SNAPSHOT</version>
99
<packaging>jar</packaging>
1010

1111
<parent>

cobigen/cobigen-javaplugin/src/main/java/com/capgemini/cobigen/javaplugin/inputreader/JavaInputReader.java

+4-7
Original file line numberDiff line numberDiff line change
@@ -351,16 +351,13 @@ else if (!((List<?>) parsedModel).isEmpty()
351351
// so take model1 as documented
352352
return parsedModel;
353353
}
354-
} else
354+
} else if (parsedModel instanceof String[]) {
355+
return Lists.newLinkedList(Arrays.asList(parsedModel));
356+
}
355357
// we will prefer parsed model if parsed value of type String. This is the case for annotation values.
356358
// QDox will always return the expression, which is a assigned to the annotation's value, as a string.
357-
if (parsedModel instanceof String) {
359+
else {
358360
return parsedModel;
359-
} else if (parsedModel instanceof String[]) {
360-
return Lists.newLinkedList(Arrays.asList(parsedModel));
361-
} else {
362-
throw new IllegalStateException(
363-
"Anything unintended happened. Please state an issue at GitHub or mail one of the developers");
364361
}
365362
}
366363
}

cobigen/cobigen-javaplugin/src/test/java/com/capgemini/cobigen/javaplugin/unittest/inputreader/testdata/TestClassWithRecursiveAnnotations.java

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public boolean isBoolvalue() {
2424
* new value of boolvalue
2525
* @author mbrunnli (05.12.2014)
2626
*/
27+
@Action(fault = @FaultAction(className = NullPointerException.class))
2728
public void setBoolvalue(boolean boolvalue) {
2829
this.boolvalue = boolvalue;
2930
}

cobigen/cobigen-javaplugin/src/test/resources/testdata/unittest/inputreader/TestClassWithRecursiveAnnotations.java

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public boolean isBoolvalue() {
2424
* new value of boolvalue
2525
* @author mbrunnli (05.12.2014)
2626
*/
27+
@Action(fault = @FaultAction(className = NullPointerException.class))
2728
public void setBoolvalue(boolean boolvalue) {
2829
this.boolvalue = boolvalue;
2930
}

0 commit comments

Comments
 (0)