Skip to content

Commit

Permalink
Remove redundant modifiers (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed May 18, 2024
1 parent 15b0ffd commit 7b5421d
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static final class MethodMirror {
final Signature sig;
final Method method;

public MethodMirror(Signature sig, Method method) {
MethodMirror(Signature sig, Method method) {
this.sig = sig;
this.method = method;
}
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/org/kohsuke/stapler/Function.java
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ private abstract static class MethodFunction extends Function {

private volatile String[] names;

public MethodFunction(Method m) {
MethodFunction(Method m) {
this.m = m;
// defer the resolution of MethodHandle so that a Function can be built to represent a non-public method
}
Expand Down Expand Up @@ -452,7 +452,7 @@ static final class OverridingInstanceFunction extends InstanceFunction {
// the last one takes precedence
private final List<Method> methods;

public OverridingInstanceFunction(List<Method> m) {
OverridingInstanceFunction(List<Method> m) {
super(m.get(0));
methods = m;
}
Expand Down Expand Up @@ -498,7 +498,7 @@ public Annotation[][] getParameterAnnotations() {
* Static methods on the wrapper type.
*/
static final class StaticFunction extends MethodFunction {
public StaticFunction(Method m) {
StaticFunction(Method m) {
super(m);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class KlassDescriptor<C> {
* @param klazz
* The class to build a descriptor around.
*/
public KlassDescriptor(Klass<C> klazz) {
KlassDescriptor(Klass<C> klazz) {
this.clazz = klazz;
this.fields = klazz.getFields();
this.methods = new FunctionList(klazz.getFunctions());
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/kohsuke/stapler/MetaClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ private static String camelize(String name) {
private static class JavaScriptProxyMethodDispatcher extends NameBasedDispatcher {
private final Function f;

public JavaScriptProxyMethodDispatcher(String name, Function f) {
JavaScriptProxyMethodDispatcher(String name, Function f) {
super(name, 0);
this.f = f;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
final class TruncatedInputStream extends FilterInputStream {
private long len;

public TruncatedInputStream(InputStream in, long len) {
TruncatedInputStream(InputStream in, long len) {
super(in);
this.len = len;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ private static final class WellKnownObjectHandle extends Bound {
private final String url;
private final Object target;

public WellKnownObjectHandle(String url, Object target) {
WellKnownObjectHandle(String url, Object target) {
this.url = url;
this.target = target;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
class FieldProperty extends Property {
private final Field field;

public FieldProperty(Model owner, Field field, Exported exported) {
FieldProperty(Model owner, Field field, Exported exported) {
super(owner, field.getName(), field.getGenericType(), exported);
this.field = field;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* @author Kohsuke Kawaguchi
*/
final class PythonDataWriter extends JSONDataWriter {
public PythonDataWriter(Writer out, ExportConfig config) throws IOException {
PythonDataWriter(Writer out, ExportConfig config) throws IOException {
super(out, config);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* @author Kohsuke Kawaguchi, Jim Meyer
*/
final class RubyDataWriter extends JSONDataWriter {
public RubyDataWriter(Writer out, ExportConfig config) throws IOException {
RubyDataWriter(Writer out, ExportConfig config) throws IOException {
super(out, config);
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/org/kohsuke/stapler/export/TypeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ private static class BinderArg {
assert params.length == args.length;
}

public BinderArg(GenericDeclaration decl, Type[] args) {
BinderArg(GenericDeclaration decl, Type[] args) {
this(decl.getTypeParameters(), args);
}

Expand Down Expand Up @@ -538,7 +538,7 @@ static final class WildcardTypeImpl implements WildcardType {
private final Type[] ub;
private final Type[] lb;

public WildcardTypeImpl(Type[] ub, Type[] lb) {
WildcardTypeImpl(Type[] ub, Type[] lb) {
this.ub = ub;
this.lb = lb;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ private static class Mark {
protected ByteBuf buf;
protected int pos;

public Mark(ByteBuf buf) {
Mark(ByteBuf buf) {
this.buf = buf;
}
}
Expand All @@ -327,7 +327,7 @@ public Mark(ByteBuf buf) {
* to the output yet.
*/
private static final class HeadMark extends Mark {
public HeadMark(ByteBuf buf) {
HeadMark(ByteBuf buf) {
super(buf);
}

Expand All @@ -354,7 +354,7 @@ void finish(OutputStream os) throws IOException {
* Points to the end of the region.
*/
private static final class TailMark extends Mark {
public TailMark(ByteBuf buf) {
TailMark(ByteBuf buf) {
super(buf);
}

Expand Down Expand Up @@ -386,7 +386,7 @@ private static final class ByteBuf {
private int size = 0;
private ByteBuf next;

public ByteBuf(ByteBuf previous, Session f) throws IOException {
ByteBuf(ByteBuf previous, Session f) throws IOException {
if (previous != null) {
assert previous.next == null;
previous.next = this;
Expand Down Expand Up @@ -424,7 +424,7 @@ private interface Session extends Closeable {
private static final class FileSession implements Session {
private final RandomAccessFile file;

public FileSession(File file) throws IOException {
FileSession(File file) throws IOException {
this.file = new RandomAccessFile(file, "r");
}

Expand Down Expand Up @@ -459,7 +459,7 @@ public int read(byte[] buf, int offset, int length) throws IOException {
private static final class GzipAwareSession implements Session {
private final GZIPInputStream gz;

public GzipAwareSession(File file) throws IOException {
GzipAwareSession(File file) throws IOException {
this.gz = new GZIPInputStream(Files.newInputStream(file.toPath(), StandardOpenOption.READ));
}

Expand Down Expand Up @@ -553,7 +553,7 @@ public static long getGzipStreamSize(File file) {
private static final class BufferSession implements Session {
private final InputStream in;

public BufferSession(ByteBuffer buf) {
BufferSession(ByteBuffer buf) {
this.in = buf.newInputStream();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ class FilterPropertyFilter implements PropertyFilter {
private Set<String> includes;
private Set<String> excludes;

public FilterPropertyFilter(String[] includes, String[] excludes) {
FilterPropertyFilter(String[] includes, String[] excludes) {
this(new HashSet<>(Arrays.asList(includes)), new HashSet<>(Arrays.asList(excludes)));
}

public FilterPropertyFilter(Set<String> includes, Set<String> excludes) {
FilterPropertyFilter(Set<String> includes, Set<String> excludes) {
this.includes = includes;
this.excludes = excludes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected FileObject createResource(String name) throws IOException {
private static class CommentStrippingBufferedWriter extends BufferedWriter {
private final AtomicInteger count = new AtomicInteger(0);

public CommentStrippingBufferedWriter(Writer out) {
CommentStrippingBufferedWriter(Writer out) {
super(out);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void run(JellyBuilder builder) {
private static final class AliasMetaMethod extends CachedMethod {
private final String alias;

public AliasMetaMethod(CachedClass clazz, Method method, String alias) {
AliasMetaMethod(CachedClass clazz, Method method, String alias) {
super(clazz, method);
this.alias = Objects.requireNonNull(alias);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
private final String original;
private final String replacement;

public AttributeNameRewritingTagScript(String original, String replacement) {
AttributeNameRewritingTagScript(String original, String replacement) {
this.original = original;
this.replacement = replacement;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private static class I18nExpWithArgsExpression extends ExpressionSupport {
private final String text;
private final Map<String, InternationalizedStringExpression> resourceLiterals;

public I18nExpWithArgsExpression(
I18nExpWithArgsExpression(
String text, Map<String, InternationalizedStringExpression> resourceLiterals, String exp)
throws JellyException {
this.text = text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ final class RequestDispatcherWrapper implements RequestDispatcher {
private final RequestDispatcher core;
private final Object it;

public RequestDispatcherWrapper(RequestDispatcher core, Object it) {
RequestDispatcherWrapper(RequestDispatcher core, Object it) {
this.core = core;
this.it = it;
}
Expand Down
2 changes: 1 addition & 1 deletion jsp/src/main/java/org/kohsuke/stapler/tags/Include.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public void doTag() throws JspException, IOException {
class Wrapper extends HttpServletResponseWrapper {
private final PrintWriter pw;

public Wrapper(HttpServletResponse httpServletResponse, PrintWriter w) {
Wrapper(HttpServletResponse httpServletResponse, PrintWriter w) {
super(httpServletResponse);
this.pw = w;
}
Expand Down

0 comments on commit 7b5421d

Please sign in to comment.