public class io.dropwizard.jersey.filter.AllowedMethodsFilter implements javax.servlet.Filter
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: io.dropwizard.jersey.filter.AllowedMethodsFilter
super_class: java.lang.Object
{
public static final java.lang.String ALLOWED_METHODS_PARAM;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: "allowedMethods"
public static final java.util.Set<java.lang.String> DEFAULT_ALLOWED_METHODS;
descriptor: Ljava/util/Set;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
Signature: Ljava/util/Set<Ljava/lang/String;>;
private static final org.slf4j.Logger LOG;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private java.util.Set<java.lang.String> allowedMethods;
descriptor: Ljava/util/Set;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/Set<Ljava/lang/String;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=0, args_size=0
0: bipush 7
anewarray java.lang.String
dup
iconst_0
1: ldc "GET"
aastore
dup
iconst_1
ldc "POST"
aastore
dup
iconst_2
ldc "PUT"
aastore
dup
iconst_3
ldc "DELETE"
aastore
dup
iconst_4
ldc "HEAD"
aastore
dup
iconst_5
ldc "OPTIONS"
aastore
dup
bipush 6
ldc "PATCH"
aastore
2: invokestatic io.dropwizard.util.Sets.of:([Ljava/lang/Object;)Ljava/util/Set;
putstatic io.dropwizard.jersey.filter.AllowedMethodsFilter.DEFAULT_ALLOWED_METHODS:Ljava/util/Set;
3: ldc Lio/dropwizard/jersey/filter/AllowedMethodsFilter;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putstatic io.dropwizard.jersey.filter.AllowedMethodsFilter.LOG:Lorg/slf4j/Logger;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
invokestatic java.util.Collections.emptySet:()Ljava/util/Set;
putfield io.dropwizard.jersey.filter.AllowedMethodsFilter.allowedMethods:Ljava/util/Set;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lio/dropwizard/jersey/filter/AllowedMethodsFilter;
public void init(javax.servlet.FilterConfig);
descriptor: (Ljavax/servlet/FilterConfig;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
ldc "allowedMethods"
invokeinterface javax.servlet.FilterConfig.getInitParameter:(Ljava/lang/String;)Ljava/lang/String;
invokestatic java.util.Optional.ofNullable:(Ljava/lang/Object;)Ljava/util/Optional;
1: invokedynamic apply()Ljava/util/function/Function;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)Ljava/lang/Object;
io/dropwizard/jersey/filter/AllowedMethodsFilter.lambda$0(Ljava/lang/String;)Ljava/util/Set; (6)
(Ljava/lang/String;)Ljava/util/Set;
invokevirtual java.util.Optional.map:(Ljava/util/function/Function;)Ljava/util/Optional;
2: getstatic io.dropwizard.jersey.filter.AllowedMethodsFilter.DEFAULT_ALLOWED_METHODS:Ljava/util/Set;
invokevirtual java.util.Optional.orElse:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.util.Set
3: putfield io.dropwizard.jersey.filter.AllowedMethodsFilter.allowedMethods:Ljava/util/Set;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lio/dropwizard/jersey/filter/AllowedMethodsFilter;
0 5 1 config Ljavax/servlet/FilterConfig;
MethodParameters:
Name Flags
config
public void doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain);
descriptor: (Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 1
checkcast javax.servlet.http.HttpServletRequest
aload 2
checkcast javax.servlet.http.HttpServletResponse
aload 3
invokevirtual io.dropwizard.jersey.filter.AllowedMethodsFilter.handle:(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V
1: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lio/dropwizard/jersey/filter/AllowedMethodsFilter;
0 2 1 request Ljavax/servlet/ServletRequest;
0 2 2 response Ljavax/servlet/ServletResponse;
0 2 3 chain Ljavax/servlet/FilterChain;
Exceptions:
throws java.io.IOException, javax.servlet.ServletException
MethodParameters:
Name Flags
request
response
chain
private void handle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, javax.servlet.FilterChain);
descriptor: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;Ljavax/servlet/FilterChain;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
getfield io.dropwizard.jersey.filter.AllowedMethodsFilter.allowedMethods:Ljava/util/Set;
aload 1
invokeinterface javax.servlet.http.HttpServletRequest.getMethod:()Ljava/lang/String;
invokeinterface java.util.Set.contains:(Ljava/lang/Object;)Z
ifeq 3
1: aload 3
aload 1
aload 2
invokeinterface javax.servlet.FilterChain.doFilter:(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V
2: goto 5
3: StackMap locals:
StackMap stack:
getstatic io.dropwizard.jersey.filter.AllowedMethodsFilter.LOG:Lorg/slf4j/Logger;
ldc "Request with disallowed method {} blocked"
aload 1
invokeinterface javax.servlet.http.HttpServletRequest.getMethod:()Ljava/lang/String;
invokeinterface org.slf4j.Logger.debug:(Ljava/lang/String;Ljava/lang/Object;)V
4: aload 2
sipush 405
invokeinterface javax.servlet.http.HttpServletResponse.sendError:(I)V
5: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lio/dropwizard/jersey/filter/AllowedMethodsFilter;
0 6 1 request Ljavax/servlet/http/HttpServletRequest;
0 6 2 response Ljavax/servlet/http/HttpServletResponse;
0 6 3 chain Ljavax/servlet/FilterChain;
Exceptions:
throws java.io.IOException, javax.servlet.ServletException
MethodParameters:
Name Flags
request
response
chain
public void destroy();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=0, locals=1, args_size=1
start local 0 0: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lio/dropwizard/jersey/filter/AllowedMethodsFilter;
private static java.util.Set lambda$0(java.lang.String);
descriptor: (Ljava/lang/String;)Ljava/util/Set;
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
ldc ","
invokevirtual java.lang.String.split:(Ljava/lang/String;)[Ljava/lang/String;
invokestatic io.dropwizard.util.Sets.of:([Ljava/lang/Object;)Ljava/util/Set;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 p Ljava/lang/String;
}
SourceFile: "AllowedMethodsFilter.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles