Skip to content

Commit c1ec2e7

Browse files
committed
prevent @SuppressWarnings from being re-added
1 parent b61fc91 commit c1ec2e7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

java/build.xml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,29 @@
4747
<property name="uuc" value="@SuppressWarnings({ &quot;unused&quot;, &quot;unchecked&quot;, &quot;cast&quot; })${line.separator}" />
4848
<property name="uc" value="@SuppressWarnings({ &quot;unused&quot;, &quot;cast&quot; })${line.separator}" />
4949

50+
<!-- need to match against the previous line so that we don't re-add -->
5051
<replaceregexp
5152
file="generated/processing/mode/java/preproc/JavaLexer.java"
52-
match="(public class JavaLexer .*)"
53-
replace="${uuc}\1">
53+
match="(\n\n)(public class JavaLexer .*)"
54+
replace="\1${uuc}\2">
5455
</replaceregexp>
5556

5657
<replaceregexp
5758
file="generated/processing/mode/java/preproc/JavaRecognizer.java"
58-
match="(public class JavaRecognizer .*)"
59-
replace="${uc}\1">
59+
match="(\*/\n)(public class JavaRecognizer .*)"
60+
replace="\1${uc}\2">
6061
</replaceregexp>
6162

6263
<replaceregexp
6364
file="generated/processing/mode/java/preproc/PdeLexer.java"
64-
match="(public class PdeLexer .*)"
65-
replace="${uuc}\1">
65+
match="(\n\n)(public class PdeLexer .*)"
66+
replace="\1${uuc}\2">
6667
</replaceregexp>
6768

6869
<replaceregexp
6970
file="generated/processing/mode/java/preproc/PdeRecognizer.java"
70-
match="(public class PdeRecognizer .*)"
71-
replace="${uc}\1">
71+
match="(\n\n)(public class PdeRecognizer .*)"
72+
replace="\1${uc}\2">
7273
</replaceregexp>
7374
<!-- end of workaround for old antlr -->
7475
</target>

0 commit comments

Comments
 (0)