Polish static finals

Closes gh-12083
This commit is contained in:
igor-suhorukov
2018-02-16 01:38:51 +03:00
committed by Phillip Webb
parent 752a42710c
commit fe023817c7
13 changed files with 33 additions and 33 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@ class Tree extends ReflectionWrapper {
private final Method acceptMethod = findMethod("accept", this.treeVisitorType,
Object.class);
private final Method GET_CLASS_TREE_MEMBERS = findMethod(
private final Method getClassTreeMembers = findMethod(
findClass("com.sun.source.tree.ClassTree"), "getMembers");
Tree(Object instance) {
@@ -65,7 +65,7 @@ class Tree extends ReflectionWrapper {
throws Throwable {
if (method.getName().equals("visitClass")) {
if ((Integer) args[1] == 0) {
Iterable members = (Iterable) Tree.this.GET_CLASS_TREE_MEMBERS
Iterable members = (Iterable) Tree.this.getClassTreeMembers
.invoke(args[0]);
for (Object member : members) {
if (member != null) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@ import org.springframework.boot.loader.data.RandomAccessData;
*/
class CentralDirectoryParser {
private int CENTRAL_DIRECTORY_HEADER_BASE_SIZE = 46;
private static final int CENTRAL_DIRECTORY_HEADER_BASE_SIZE = 46;
private final List<CentralDirectoryVisitor> visitors = new ArrayList<>();
@@ -67,7 +67,7 @@ class CentralDirectoryParser {
for (int i = 0; i < endRecord.getNumberOfRecords(); i++) {
fileHeader.load(bytes, dataOffset, null, 0, null);
visitFileHeader(dataOffset, fileHeader);
dataOffset += this.CENTRAL_DIRECTORY_HEADER_BASE_SIZE
dataOffset += CENTRAL_DIRECTORY_HEADER_BASE_SIZE
+ fileHeader.getName().length() + fileHeader.getComment().length()
+ fileHeader.getExtra().length;
}