From 6de5f7b7eb0467541c05d7ef1d1870f10f17fff3bdb5adea370a93a16750655d Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Sat, 30 Apr 2022 11:20:34 +0000 Subject: [PATCH] Fix regression OBS-URL: https://build.opensuse.org/package/show/Java:packages/javacc?expand=0&rev=28 --- ...one-deprecated-annotation-per-method.patch | 50 ++++ 0002-Fix-annotations-for-JavaCharStream.patch | 281 ++++++++++++++++++ javacc.changes | 9 + javacc.spec | 4 +- 4 files changed, 343 insertions(+), 1 deletion(-) create mode 100644 0001-Generate-max.-one-deprecated-annotation-per-method.patch create mode 100644 0002-Fix-annotations-for-JavaCharStream.patch diff --git a/0001-Generate-max.-one-deprecated-annotation-per-method.patch b/0001-Generate-max.-one-deprecated-annotation-per-method.patch new file mode 100644 index 0000000..08deca3 --- /dev/null +++ b/0001-Generate-max.-one-deprecated-annotation-per-method.patch @@ -0,0 +1,50 @@ +From 4a9fc6a7992e8623956dee6c8cebd0b224968418 Mon Sep 17 00:00:00 2001 +From: Zbynek Konecny +Date: Wed, 20 Apr 2022 17:01:00 +0200 +Subject: [PATCH 1/2] Generate max. one deprecated annotation per method + +--- + .../resources/templates/gwt/SimpleCharStream.template | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/src/main/resources/templates/gwt/SimpleCharStream.template b/src/main/resources/templates/gwt/SimpleCharStream.template +index 9c88437..a1de1e3 100644 +--- a/src/main/resources/templates/gwt/SimpleCharStream.template ++++ b/src/main/resources/templates/gwt/SimpleCharStream.template +@@ -215,14 +215,13 @@ ${SUPPORT_CLASS_VISIBILITY_PUBLIC?public :}class SimpleCharStream + return c; + } + +-#if GENERATE_ANNOTATIONS +- @Deprecated +-#fi + /** + * @deprecated + * @see #getEndColumn + */ ++#if GENERATE_ANNOTATIONS + @Deprecated ++#fi + ${PREFIX}public int getColumn() { + #if KEEP_LINE_COLUMN + return bufcolumn[bufpos]; +@@ -231,14 +230,13 @@ ${SUPPORT_CLASS_VISIBILITY_PUBLIC?public :}class SimpleCharStream + #fi + } + +-#if GENERATE_ANNOTATIONS +- @Deprecated +-#fi + /** + * @deprecated + * @see #getEndLine + */ ++#if GENERATE_ANNOTATIONS + @Deprecated ++#fi + ${PREFIX}public int getLine() { + #if KEEP_LINE_COLUMN + return bufline[bufpos]; +-- +2.36.0 + diff --git a/0002-Fix-annotations-for-JavaCharStream.patch b/0002-Fix-annotations-for-JavaCharStream.patch new file mode 100644 index 0000000..efad64a --- /dev/null +++ b/0002-Fix-annotations-for-JavaCharStream.patch @@ -0,0 +1,281 @@ +From 1e076c05b3739f12fc40e3b652183d770bfcc305 Mon Sep 17 00:00:00 2001 +From: Zbynek Konecny +Date: Mon, 25 Apr 2022 19:17:30 +0200 +Subject: [PATCH 2/2] Fix annotations for JavaCharStream + +--- + pom.xml | 21 ++++- + .../templates/gwt/JavaCharStream.template | 12 ++- + test/gwtTemplate/Parser.jj | 76 +++++++++++++++++++ + test/gwtUnicodeTemplate/Parser.jj | 76 +++++++++++++++++++ + 4 files changed, 175 insertions(+), 10 deletions(-) + create mode 100644 test/gwtTemplate/Parser.jj + create mode 100644 test/gwtUnicodeTemplate/Parser.jj + +diff --git a/pom.xml b/pom.xml +index 1f0b371..aedaed9 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -310,7 +310,7 @@ + + + +- + + +@@ -647,7 +662,7 @@ + + + +-