Skip to content

Commit

Permalink
[WINDUPRULE-1014] Fix rule message and divide it in two
Browse files Browse the repository at this point in the history
  • Loading branch information
jmle committed Jul 31, 2023
1 parent c757c4d commit 04d21c4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
23 changes: 16 additions & 7 deletions rules/rules-reviewed/openjdk21/openjdk17/removed-apis.windup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</javaclass>
</when>
<perform>
<hint title="This method has been removed" effort="3" category-id="mandatory">
<hint title="Method java.lang.ThreadGroup.allowThreadSuspension() has been removed" effort="1" category-id="mandatory">
<message>
The `java.lang.ThreadGroup.allowThreadSuspension` method has been removed and cannot be used anymore.
</message>
Expand All @@ -49,15 +49,24 @@
</rule>
<rule id="removed-apis-00010">
<when>
<or>
<javaclass references="java.lang.Compiler"/>
<javaclass references="javax.management.remote.rmi.RMIIIOPServerImpl"/>
</or>
<javaclass references="java.lang.Compiler"/>
</when>
<perform>
<hint title="Method java.lang.Compiler has been removed" effort="3" category-id="mandatory">
<message>
The `java.lang.Compiler` method has been removed and cannot be used anymore.
</message>
</hint>
</perform>
</rule>
<rule id="removed-apis-00015">
<when>
<javaclass references="javax.management.remote.rmi.RMIIIOPServerImpl"/>
</when>
<perform>
<hint title="Finalization has been deprecated for removal in a future release by JDK18." effort="3" category-id="mandatory">
<hint title="javax.management.remote.rmi.RMIIIOPServerImpl" effort="3" category-id="mandatory">
<message>
This class has been removed and cannot be used anymore.
The `javax.management.remote.rmi.RMIIIOPServerImpl` method has been removed and cannot be used anymore.
</message>
</hint>
</perform>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,27 @@
<rule id="removed-apis-test-00010">
<when>
<not>
<iterable-filter size="2">
<hint-exists message="This class has been removed and cannot be used anymore." />
<iterable-filter size="1">
<hint-exists message="The `java.lang.Compiler` method has been removed and cannot be used anymore." />
</iterable-filter>
</not>
</when>
<perform>
<fail message="removed-apis-test-00010 - the hint was not found"/>
</perform>
</rule>
<rule id="removed-apis-test-00015">
<when>
<not>
<iterable-filter size="1">
<hint-exists message="The `javax.management.remote.rmi.RMIIIOPServerImpl` method has been removed and cannot be used anymore." />
</iterable-filter>
</not>
</when>
<perform>
<fail message="removed-apis-test-00015 - the hint was not found"/>
</perform>
</rule>
</rules>
</ruleset>
</ruletest>

0 comments on commit 04d21c4

Please sign in to comment.