mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Use set literals
This commit is contained in:
@@ -321,12 +321,7 @@ class WriteObjectMethod extends Method {
|
|||||||
class ReadObjectMethod extends Method {
|
class ReadObjectMethod extends Method {
|
||||||
ReadObjectMethod() {
|
ReadObjectMethod() {
|
||||||
this.getDeclaringType() instanceof TypeObjectInputStream and
|
this.getDeclaringType() instanceof TypeObjectInputStream and
|
||||||
(
|
this.hasName(["readObject", "readObjectOverride", "readUnshared", "resolveObject"])
|
||||||
this.hasName("readObject") or
|
|
||||||
this.hasName("readObjectOverride") or
|
|
||||||
this.hasName("readUnshared") or
|
|
||||||
this.hasName("resolveObject")
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,12 +40,7 @@ class Struts2ActionClass extends Class {
|
|||||||
getStrutsMapperClass(this) = "org.apache.struts2.dispatcher.mapper.RestfulActionMapper"
|
getStrutsMapperClass(this) = "org.apache.struts2.dispatcher.mapper.RestfulActionMapper"
|
||||||
then
|
then
|
||||||
// The "Restful" action mapper maps rest APIs to specific methods
|
// The "Restful" action mapper maps rest APIs to specific methods
|
||||||
result.hasName("index") or
|
result.hasName(["index", "create", "editNew", "view", "remove", "update"])
|
||||||
result.hasName("create") or
|
|
||||||
result.hasName("editNew") or
|
|
||||||
result.hasName("view") or
|
|
||||||
result.hasName("remove") or
|
|
||||||
result.hasName("update")
|
|
||||||
else
|
else
|
||||||
if
|
if
|
||||||
getStrutsMapperClass(this) = "org.apache.struts2.rest.RestActionMapper" or
|
getStrutsMapperClass(this) = "org.apache.struts2.rest.RestActionMapper" or
|
||||||
@@ -53,13 +48,7 @@ class Struts2ActionClass extends Class {
|
|||||||
then
|
then
|
||||||
// The "Rest" action mapper is provided with the rest plugin, and maps rest APIs to specific
|
// The "Rest" action mapper is provided with the rest plugin, and maps rest APIs to specific
|
||||||
// methods based on a "ruby-on-rails" style.
|
// methods based on a "ruby-on-rails" style.
|
||||||
result.hasName("index") or
|
result.hasName(["index", "show", "edit", "editNew", "create", "update", "destroy"])
|
||||||
result.hasName("show") or
|
|
||||||
result.hasName("edit") or
|
|
||||||
result.hasName("editNew") or
|
|
||||||
result.hasName("create") or
|
|
||||||
result.hasName("update") or
|
|
||||||
result.hasName("destroy")
|
|
||||||
else
|
else
|
||||||
if exists(getStrutsMapperClass(this))
|
if exists(getStrutsMapperClass(this))
|
||||||
then
|
then
|
||||||
|
|||||||
Reference in New Issue
Block a user