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 com.google.common.collect.ImmutableSet<java.lang.String> DEFAULT_ALLOWED_METHODS;
descriptor: Lcom/google/common/collect/ImmutableSet;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
Signature: Lcom/google/common/collect/ImmutableSet<Ljava/lang/String;>;
private static final org.slf4j.Logger LOG;
descriptor: Lorg/slf4j/Logger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private com.google.common.collect.ImmutableSet<java.lang.String> allowedMethods;
descriptor: Lcom/google/common/collect/ImmutableSet;
flags: (0x0002) ACC_PRIVATE
Signature: Lcom/google/common/collect/ImmutableSet<Ljava/lang/String;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=10, locals=0, args_size=0
0: ldc "GET"
ldc "POST"
ldc "PUT"
ldc "DELETE"
ldc "HEAD"
ldc "OPTIONS"
iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "PATCH"
aastore
1: invokestatic com.google.common.collect.ImmutableSet.of:(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
putstatic io.dropwizard.jersey.filter.AllowedMethodsFilter.DEFAULT_ALLOWED_METHODS:Lcom/google/common/collect/ImmutableSet;
2: 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 com.google.common.collect.ImmutableSet.of:()Lcom/google/common/collect/ImmutableSet;
putfield io.dropwizard.jersey.filter.AllowedMethodsFilter.allowedMethods:Lcom/google/common/collect/ImmutableSet;
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;)Lcom/google/common/collect/ImmutableSet; (6)
(Ljava/lang/String;)Lcom/google/common/collect/ImmutableSet;
invokevirtual java.util.Optional.map:(Ljava/util/function/Function;)Ljava/util/Optional;
2: getstatic io.dropwizard.jersey.filter.AllowedMethodsFilter.DEFAULT_ALLOWED_METHODS:Lcom/google/common/collect/ImmutableSet;
invokevirtual java.util.Optional.orElse:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.google.common.collect.ImmutableSet
3: putfield io.dropwizard.jersey.filter.AllowedMethodsFilter.allowedMethods:Lcom/google/common/collect/ImmutableSet;
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:Lcom/google/common/collect/ImmutableSet;
aload 1
invokeinterface javax.servlet.http.HttpServletRequest.getMethod:()Ljava/lang/String;
invokevirtual com.google.common.collect.ImmutableSet.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 com.google.common.collect.ImmutableSet lambda$0(java.lang.String);
descriptor: (Ljava/lang/String;)Lcom/google/common/collect/ImmutableSet;
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 com.google.common.collect.ImmutableSet.copyOf:([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
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