File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/processor/java/org/truffleruby/processor Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ private void processBuildInformation(TypeElement element) throws Exception {
174
174
if (e instanceof ExecutableElement ) {
175
175
final String name = e .getSimpleName ().toString ();
176
176
177
- final String value ;
177
+ final Object value ;
178
178
switch (name ) {
179
179
case "getBuildName" :
180
180
value = buildName ;
@@ -185,6 +185,9 @@ private void processBuildInformation(TypeElement element) throws Exception {
185
185
case "getFullRevision" :
186
186
value = fullRevision ;
187
187
break ;
188
+ case "isDirty" :
189
+ value = isDirty ;
190
+ break ;
188
191
case "getCopyrightYear" :
189
192
value = copyrightYear ;
190
193
break ;
@@ -199,11 +202,13 @@ private void processBuildInformation(TypeElement element) throws Exception {
199
202
}
200
203
201
204
stream .println (" @Override" );
202
- stream .println (" public String " + name + "() {" );
205
+ stream .println (" public " + (( ExecutableElement ) e ). getReturnType () + " " + name + "() {" );
203
206
if (value == null ) {
204
207
stream .println (" return null;" );
205
- } else {
208
+ } else if ( value instanceof String ) {
206
209
stream .println (" return \" " + value + "\" ;" );
210
+ } else {
211
+ stream .println (" return " + value + ";" );
207
212
}
208
213
stream .println (" }" );
209
214
stream .println ();
You can’t perform that action at this time.
0 commit comments