@@ -13,7 +13,7 @@ private import semmle.code.java.security.XSS
1313/**
1414 * Gets a name for the root package of JAX-RS.
1515 */
16- string getAJaxRsPackage ( ) { result in [ javaxOrJakarta ( ) + ".ws.rs" , "jakarta.ws.rs" ] }
16+ string getAJaxRsPackage ( ) { result in [ javaxOrJakarta ( ) + ".ws.rs" ] }
1717
1818/**
1919 * Gets a name for package `subpackage` within the JAX-RS hierarchy.
@@ -42,7 +42,7 @@ class JaxWsEndpoint extends Class {
4242 result .isPublic ( ) and
4343 not result instanceof InitializerMethod and
4444 not exists ( Annotation a | a = result .getAnAnnotation ( ) |
45- a .getType ( ) .hasQualifiedName ( [ javaxOrJakarta ( ) + "" , "jakarta" ] + ".jws" , "WebMethod" ) and
45+ a .getType ( ) .hasQualifiedName ( javaxOrJakarta ( ) + ".jws" , "WebMethod" ) and
4646 a .getValue ( "exclude" ) .( BooleanLiteral ) .getBooleanValue ( ) = true
4747 ) and
4848 forex ( ParamOrReturn paramOrRet | paramOrRet = result .getAParameter ( ) or paramOrRet = result |
@@ -62,8 +62,7 @@ class JaxWsEndpoint extends Class {
6262/** The annotation type `@XmlJavaTypeAdapter`. */
6363class XmlJavaTypeAdapter extends AnnotationType {
6464 XmlJavaTypeAdapter ( ) {
65- this .hasQualifiedName ( [ javaxOrJakarta ( ) + "" , "jakarta" ] + ".xml.bind.annotation.adapters" ,
66- "XmlJavaTypeAdapter" )
65+ this .hasQualifiedName ( javaxOrJakarta ( ) + ".xml.bind.annotation.adapters" , "XmlJavaTypeAdapter" )
6766 }
6867}
6968
@@ -292,9 +291,7 @@ class JaxRSAnnotation extends Annotation {
292291 JaxRSAnnotation ( ) {
293292 exists ( AnnotationType a |
294293 a = this .getType ( ) and
295- a .getPackage ( )
296- .getName ( )
297- .regexpMatch ( [ javaxOrJakarta ( ) + "\\.ws\\.rs(\\..*)?" , "jakarta\\.ws\\.rs(\\..*)?" ] )
294+ a .getPackage ( ) .getName ( ) .regexpMatch ( javaxOrJakarta ( ) + "\\.ws\\.rs(\\..*)?" )
298295 )
299296 }
300297}
0 commit comments