You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2014/09/13 01:12:37 UTC
svn commit: r1624676 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/
Author: kkolinko
Date: Fri Sep 12 23:12:36 2014
New Revision: 1624676
URL: http://svn.apache.org/r1624676
Log:
Reduce visibility of constructors.
Remove unused constants
It is merge of r1624568, r1624571 from tomcat/trunk.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/Constants.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AccessFlags.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1624568,1624571
Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
------------------------------------------------------------------------------
Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624568,1624571
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/Constants.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/Constants.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/Constants.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/Constants.java Fri Sep 12 23:12:36 2014
@@ -95,28 +95,9 @@ public interface Constants {
/** Attributes and their corresponding names.
*/
public static final byte ATTR_UNKNOWN = -1;
- public static final byte ATTR_SOURCE_FILE = 0;
- public static final byte ATTR_CONSTANT_VALUE = 1;
- public static final byte ATTR_CODE = 2;
- public static final byte ATTR_EXCEPTIONS = 3;
- public static final byte ATTR_LINE_NUMBER_TABLE = 4;
- public static final byte ATTR_LOCAL_VARIABLE_TABLE = 5;
- public static final byte ATTR_INNER_CLASSES = 6;
- public static final byte ATTR_SYNTHETIC = 7;
- public static final byte ATTR_DEPRECATED = 8;
- public static final byte ATTR_PMG = 9;
- public static final byte ATTR_SIGNATURE = 10;
- public static final byte ATTR_STACK_MAP = 11;
public static final byte ATTR_RUNTIME_VISIBLE_ANNOTATIONS = 12;
- public static final byte ATTR_RUNTIME_INVISIBLE_ANNOTATIONS = 13;
public static final byte ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS = 14;
- public static final byte ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS = 15;
public static final byte ATTR_ANNOTATION_DEFAULT = 16;
- public static final byte ATTR_LOCAL_VARIABLE_TYPE_TABLE = 17;
- public static final byte ATTR_ENCLOSING_METHOD = 18;
- public static final byte ATTR_STACK_MAP_TABLE = 19;
- public static final byte ATTR_BOOTSTRAP_METHODS = 20;
- public static final byte ATTR_METHOD_PARAMETERS = 21;
public static final short KNOWN_ATTRIBUTES = 22;
@@ -131,31 +112,4 @@ public interface Constants {
"AnnotationDefault", "LocalVariableTypeTable", "EnclosingMethod", "StackMapTable",
"BootstrapMethods", "MethodParameters"
};
-
- /** Constants used in the StackMap attribute.
- */
- public static final byte ITEM_Bogus = 0;
- public static final byte ITEM_Object = 7;
- public static final byte ITEM_NewObject = 8;
-
- /** Constants used to identify StackMapEntry types.
- *
- * For those types which can specify a range, the
- * constant names the lowest value.
- */
- public static final int SAME_FRAME = 0;
- public static final int SAME_LOCALS_1_STACK_ITEM_FRAME = 64;
- public static final int SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED = 247;
- public static final int CHOP_FRAME = 248;
- public static final int SAME_FRAME_EXTENDED = 251;
- public static final int APPEND_FRAME = 252;
- public static final int FULL_FRAME = 255;
-
- /** Constants that define the maximum value of
- * those constants which store ranges. */
-
- public static final int SAME_FRAME_MAX = 63;
- public static final int SAME_LOCALS_1_STACK_ITEM_FRAME_MAX = 127;
- public static final int CHOP_FRAME_MAX = 250;
- public static final int APPEND_FRAME_MAX = 254;
}
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AccessFlags.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AccessFlags.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AccessFlags.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AccessFlags.java Fri Sep 12 23:12:36 2014
@@ -27,7 +27,7 @@ public abstract class AccessFlags {
protected int access_flags;
- public AccessFlags() {
+ AccessFlags() {
}
/**
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java Fri Sep 12 23:12:36 2014
@@ -34,7 +34,7 @@ public class AnnotationDefault extends A
* @param constant_pool
* Array of constants
*/
- public AnnotationDefault(DataInputStream file, ConstantPool constant_pool)
+ AnnotationDefault(DataInputStream file, ConstantPool constant_pool)
throws IOException {
// Default value
ElementValue.readElementValue(file, constant_pool);
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationElementValue.java Fri Sep 12 23:12:36 2014
@@ -22,7 +22,7 @@ public class AnnotationElementValue exte
// For annotation element values, this is the annotation
private AnnotationEntry annotationEntry;
- public AnnotationElementValue(int type, AnnotationEntry annotationEntry,
+ AnnotationElementValue(int type, AnnotationEntry annotationEntry,
ConstantPool cpool)
{
super(type, cpool);
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java Fri Sep 12 23:12:36 2014
@@ -57,7 +57,7 @@ public class AnnotationEntry implements
return annotationEntry;
}
- public AnnotationEntry(int type_index, ConstantPool constant_pool) {
+ AnnotationEntry(int type_index, ConstantPool constant_pool) {
this.type_index = type_index;
this.constant_pool = constant_pool;
}
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java Fri Sep 12 23:12:36 2014
@@ -34,7 +34,7 @@ public abstract class Annotations extend
* @param file Input stream
* @param constant_pool Array of constants
*/
- public Annotations(DataInputStream file, ConstantPool constant_pool)
+ Annotations(DataInputStream file, ConstantPool constant_pool)
throws IOException {
final int annotation_table_length = (file.readUnsignedShort());
annotation_table = new AnnotationEntry[annotation_table_length];
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ArrayElementValue.java Fri Sep 12 23:12:36 2014
@@ -22,7 +22,7 @@ public class ArrayElementValue extends E
// For array types, this is the array
private ElementValue[] evalues;
- public ArrayElementValue(int type, ElementValue[] datums, ConstantPool cpool)
+ ArrayElementValue(int type, ElementValue[] datums, ConstantPool cpool)
{
super(type, cpool);
if (type != ARRAY) {
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java Fri Sep 12 23:12:36 2014
@@ -34,6 +34,9 @@ import org.apache.tomcat.util.bcel.Const
*/
public abstract class Attribute {
+ Attribute() {
+ }
+
/*
* Class method reads one attribute from the input data stream. This method
* must not be accessible from the outside. It is called by the Field and
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ClassElementValue.java Fri Sep 12 23:12:36 2014
@@ -26,8 +26,7 @@ public class ClassElementValue extends E
// For 'class' this points to the class entry in the cpool
private int idx;
- public ClassElementValue(int type, int idx, ConstantPool cpool)
- {
+ ClassElementValue(int type, int idx, ConstantPool cpool) {
super(type, cpool);
this.idx = idx;
}
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java Fri Sep 12 23:12:36 2014
@@ -31,8 +31,7 @@ public abstract class ElementValue
protected ConstantPool cpool;
- protected ElementValue(int type, ConstantPool cpool)
- {
+ ElementValue(int type, ConstantPool cpool) {
this.type = type;
this.cpool = cpool;
}
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ElementValuePair.java Fri Sep 12 23:12:36 2014
@@ -33,9 +33,8 @@ public class ElementValuePair
private int elementNameIndex;
- public ElementValuePair(int elementNameIndex, ElementValue elementValue,
- ConstantPool constantPool)
- {
+ ElementValuePair(int elementNameIndex, ElementValue elementValue,
+ ConstantPool constantPool) {
this.elementValue = elementValue;
this.elementNameIndex = elementNameIndex;
this.constantPool = constantPool;
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/EnumElementValue.java Fri Sep 12 23:12:36 2014
@@ -23,8 +23,7 @@ public class EnumElementValue extends El
{
private int valueIdx;
- public EnumElementValue(int type, int valueIdx, ConstantPool cpool)
- {
+ EnumElementValue(int type, int valueIdx, ConstantPool cpool) {
super(type, cpool);
if (type != ENUM_CONSTANT)
throw new RuntimeException(
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/JavaClass.java Fri Sep 12 23:12:36 2014
@@ -57,7 +57,7 @@ public class JavaClass extends AccessFla
* @param interfaces Implemented interfaces
* @param attributes Class attributes
*/
- public JavaClass(int class_name_index, int superclass_name_index,
+ JavaClass(int class_name_index, int superclass_name_index,
int access_flags, ConstantPool constant_pool, int[] interfaces,
Attribute[] attributes) {
if (interfaces == null) {
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java Fri Sep 12 23:12:36 2014
@@ -35,7 +35,7 @@ public class RuntimeVisibleAnnotations e
* @param constant_pool
* Array of constants
*/
- public RuntimeVisibleAnnotations(DataInputStream file,
+ RuntimeVisibleAnnotations(DataInputStream file,
ConstantPool constant_pool) throws IOException {
super(file, constant_pool);
}
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java?rev=1624676&r1=1624675&r2=1624676&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/SimpleElementValue.java Fri Sep 12 23:12:36 2014
@@ -23,8 +23,7 @@ public class SimpleElementValue extends
{
private int index;
- public SimpleElementValue(int type, int index, ConstantPool cpool)
- {
+ SimpleElementValue(int type, int index, ConstantPool cpool) {
super(type, cpool);
this.index = index;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org