Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not print an error when a wildcard is used in component header #383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

laeubi
Copy link

@laeubi laeubi commented Feb 20, 2025

Currently SCR prints an error if one uses a wildcard in the header but nothing matches. But because fragemnts are not allowed to provide an own header, only the host can enable this.

So this now adds an additional check before logging an error that prevents an error from being printed if a wildcard is provided.

See

Currently SCR prints an error if one uses a wildcard in the header but
nothing matches. But because fragemnts are not allowed to provide an own
header, only the host can enable this.

So this now adds an additional check before logging an error that
prevents an error from being printed if a wildcard is provided and
prints a trace message instead.
@laeubi laeubi force-pushed the do_not_print_an_error_if_wildcard_is_used branch from 39619a9 to 6b4de07 Compare February 21, 2025 14:42
@laeubi
Copy link
Author

laeubi commented Feb 24, 2025

@tjwatson @stbischof can this be merged?

@stbischof
Copy link
Contributor

What i the benefit?

We log an error before. Now we also trace the same information additional.

Isnt that just Duplikat?

@laeubi
Copy link
Author

laeubi commented Feb 24, 2025

Please notice this line in the PR:

https://github.com/apache/felix-dev/pull/383/files#diff-1cdeca2eb3dfd6054d5c998e7acdafef598a9a30bab68ebc4912aac55d8f74ffR289

so before it always printed an error, now it only prints error if not a wildcard (but a trace message instead).

@tjwatson tjwatson self-requested a review February 24, 2025 14:07
@tjwatson
Copy link
Member

Isnt that just Duplikat?

Now that @stbischof made the comment. I think the code could be more clear with the use of if(*){log.trace}else{log.error} instead of an extra continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants