Skip interface keyword as annotation in name matching only
This commit is contained in:
parent
5132985022
commit
ca810060b4
@ -0,0 +1,32 @@
|
|||||||
|
From b102ea1008f34a468981562ad57a9e98b990c3d5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Mari=C3=A1n=20Kon=C4=8Dek?= <marian.koncek@mailbox.org>
|
||||||
|
Date: Wed, 8 Mar 2023 18:23:42 +0100
|
||||||
|
Subject: [PATCH] Skip interface keyword as annotation in name matching only
|
||||||
|
|
||||||
|
Fixes: #5
|
||||||
|
---
|
||||||
|
src/java_symbols.hpp | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/java_symbols.hpp b/src/java_symbols.hpp
|
||||||
|
index 2253f0e..69f555b 100644
|
||||||
|
--- a/src/java_symbols.hpp
|
||||||
|
+++ b/src/java_symbols.hpp
|
||||||
|
@@ -536,12 +536,12 @@ inline std::string remove_annotations(std::string_view content, std_span<const s
|
||||||
|
auto next_position = std_ssize(content);
|
||||||
|
auto copy_end = std_ssize(content);
|
||||||
|
|
||||||
|
- if (annotation.begin() != content.end() and annotation_name != "interface")
|
||||||
|
+ if (annotation.begin() != content.end())
|
||||||
|
{
|
||||||
|
copy_end = annotation.end() - content.begin();
|
||||||
|
next_position = copy_end;
|
||||||
|
|
||||||
|
- if (name_matches(annotation_name, patterns, names, imported_names))
|
||||||
|
+ if (annotation_name != "interface" and name_matches(annotation_name, patterns, names, imported_names))
|
||||||
|
{
|
||||||
|
copy_end = annotation.begin() - content.begin();
|
||||||
|
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
@ -1,12 +1,15 @@
|
|||||||
Name: jurand
|
Name: jurand
|
||||||
Version: 1.2.0
|
Version: 1.2.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: A tool for manipulating Java symbols
|
Summary: A tool for manipulating Java symbols
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/fedora-java/jurand
|
URL: https://github.com/fedora-java/jurand
|
||||||
|
|
||||||
Source0: https://github.com/fedora-java/jurand/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/fedora-java/jurand/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# https://github.com/fedora-java/jurand/issues/5
|
||||||
|
Patch0: 0001-Skip-interface-keyword-as-annotation-in-name-matchin.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
@ -20,6 +23,7 @@ rather than applying simple regular expressions on the source code.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./build.sh
|
./build.sh
|
||||||
@ -43,6 +47,9 @@ export mandir=%{_mandir}/man7
|
|||||||
%doc README.md
|
%doc README.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 08 2023 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.0-2
|
||||||
|
- Skip interface keyword as annotation in name matching only
|
||||||
|
|
||||||
* Wed Mar 08 2023 Marian Koncek <mkoncek@redhat.com> - 1.2.0-1
|
* Wed Mar 08 2023 Marian Koncek <mkoncek@redhat.com> - 1.2.0-1
|
||||||
- Update to upstream version 1.2.0
|
- Update to upstream version 1.2.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user