Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb9aff1f

Browse files
author
zhourenjian@gmail.com
committed
Fixed bug that a comment block is missing in generated sources
1 parente299104 commitb9aff1f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

‎sources/net.sf.j2s.ajax/generator/net/sf/j2s/ajax/SimpleSource4Java.java‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,12 +509,8 @@ public int compare(Class<?> c1, Class<?> c2) {
509509
}
510510
}
511511

512-
if (gotStaticFinalFields) {
513-
source.append("\r\n");
514-
SourceUtils.insertLineComment(source,"\t",index++,true);
515-
}else {
516-
index++;
517-
}
512+
source.append("\r\n");
513+
SourceUtils.insertLineComment(source,"\t",index++,true);
518514

519515
booleanfirstField =true;
520516
for (Iterator<Field>itr =fields.iterator();itr.hasNext();) {
@@ -542,7 +538,9 @@ public int compare(Class<?> c1, Class<?> c2) {
542538
}
543539
}
544540

545-
source.append("\r\n");
541+
if (!firstField) {// contains fields
542+
source.append("\r\n");
543+
}// else no blank line as previous comment block contains a blank line
546544
SourceUtils.insertLineComment(source,"\t",index++,true);
547545
booleanmoreCodesAdded =false;
548546
if (fieldMappings !=null &&fieldMappings.size() >0) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp