Comments (6)
Same seems to happen, if I remove a function and try to add that to the api-changes.
...
"code": "java.class.removed",
...
but it still reports
...
"code": "java.method.removed",
...
You specified a different difference code in your config. I hope this should work when you correct that.
As for a deprecated method showing up as removed - from top of my head I don't know why that should happen by default. Are you sure you don't configure Revapi to for example filter out the deprecated methods from the analysis?
from revapi.
I think the example you gave got truncated somehow... Would you be able to reformulate your question a little?
from revapi.
Hm, I thought more on general information about the "deprecation process" consider by revapi.
My concrete issue is:
I would like to indicate deprecation e.g. for this function HealthStatisticLogger
* @param executor executor to schedule active calls of {@link #dump()}.
* @throws NullPointerException if executor is {@code null}
* @since 3.0 (added unit)
* @deprecated use {@link CounterStatisticManager#CounterStatisticManager(String)}
* instead and call {@link #dump()} externally.
*/
protected CounterStatisticManager(String tag, long interval, TimeUnit unit, ScheduledExecutorService executor) {
if (executor == null) {
What I tried is to add the annotation as well:
* @param executor executor to schedule active calls of {@link #dump()}.
* @throws NullPointerException if executor is {@code null}
* @since 3.0 (added unit)
* @deprecated use {@link CounterStatisticManager#CounterStatisticManager(String)}
* instead and call {@link #dump()} externally.
*/
@Deprecated
protected CounterStatisticManager(String tag, long interval, TimeUnit unit, ScheduledExecutorService executor) {
if (executor == null) {
that results in the error:
[INFO] Comparing [org.eclipse.californium:element-connector:jar:3.0.0] against [org.eclipse.californium:element-connector:jar:3.1.0-SNAPSHOT] (including their transitive dependencies).
[INFO] API problems found.
[INFO] If you're using the semver-ignore extension, update your module's version to one compatible with the current changes (e.g. mvn package revapi:update-versions). If you want to explicitly ignore these changes or provide justifications for them, add the json snippets to your Revapi configuration for the "revapi.differences" extension.{
"ignore": true,
"code": "java.method.removed",
"old": "method void org.eclipse.californium.elements.util.CounterStatisticManager::(java.lang.String, long, java.util.concurrent.TimeUnit, java.util.concurrent.ScheduledExecutorService)",
"justification": "ADD YOUR EXPLANATION FOR THE NECESSITY OF THIS CHANGE"
/* "package": "org.eclipse.californium.elements.util",
"classQualifiedName": "org.eclipse.californium.elements.util.CounterStatisticManager",
"classSimpleName": "CounterStatisticManager",
"methodName": "",
"elementKind": "constructor",
"oldArchive": "org.eclipse.californium:element-connector:jar:3.0.0",
"oldArchiveRole": "primary",
"breaksVersioningRules": "true",
*/},
I tried to ignore deprecation by pom.xml - revapi, that doesn't help.
So, what is the intended way of revapi to signal deprecation?
from revapi.
Same seems to happen, if I remove a function and try to add that to the api-changes.
"3.1.0": [
{
"extension": "revapi.differences",
"configuration": {
"ignore": true,
"differences": [
{
"ignore": true,
"code": "java.class.removed",
"old": "method org.eclipse.californium.core.network.stack.Layer org.eclipse.californium.core.network.stack.CoapUdpStack::createBlockwiseLayer(java.lang.String, org.eclipse.californium.elements.config.Configuration)",
"justification": "Not part of the public API"
},
but it still reports
{
"ignore": true,
"code": "java.method.removed",
"old": "method org.eclipse.californium.core.network.stack.Layer org.eclipse.californium.core.network.stack.CoapUdpStack::createBlockwiseLayer(java.lang.String, org.eclipse.californium.elements.config.Configuration)",
"justification": "ADD YOUR EXPLANATION FOR THE NECESSITY OF THIS CHANGE"
from revapi.
You're right.
from revapi.
Are you sure you don't configure Revapi to for example filter out the deprecated methods from the analysis?
Yes, this was the case. I removed
<revapi.filter>
<elements>
<exclude>
<item>
<matcher>java</matcher>
<match>@java.lang.Deprecated ^*;</match>
</item>
</exclude>
</elements>
</revapi.filter>
and it works now. Thanks a lot!
from revapi.
Related Issues (20)
- java.class.externalClassExposedInAPI thrown for an API already exposed in another module HOT 1
- Possibly false-positive java.class.externalClassExposedInAPI HOT 4
- Version format check is too restrictive HOT 4
- Be able to substitute artifacts based on some pattern to handle the XWiki legacy strategy HOT 5
- Making a public constructor protected in an abstract class should not be reported as breakage HOT 2
- Maven site for revapi fails miserably
- Revapi produces inconsistent results
- Enforcing criticality HOT 2
- Running into an endless Loop at org.jvnet.hudson HOT 3
- Infinite loop in differences HOT 2
- externalClassExposedInAPI in dependencies ? HOT 15
- "Invalid element" when upgrading to revapi-java 0.27.0 HOT 2
- Potential NullPointerException in ClasspathScanner$Scanner HOT 5
- Add Concept for String or Pattern Match
- Ability to Enforce TreeFilter Ordering HOT 1
- revapi dependency org.apache.logging.log4j:log4j-core has multiple CVE against it
- how could a enum class be excluded from java.field.enumConstantOrderChanged? HOT 4
- Fix warnings reported by Maven when using the Revapi plugin
- Class visibility reduction from `public` to `package` is reported as `java.class.removed` in latest version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from revapi.