Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4304B113B6 for ; Wed, 23 Apr 2014 12:57:06 +0000 (UTC) Received: (qmail 19320 invoked by uid 500); 23 Apr 2014 12:57:00 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 19077 invoked by uid 500); 23 Apr 2014 12:57:00 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 19067 invoked by uid 99); 23 Apr 2014 12:56:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2014 12:56:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Apr 2014 12:56:57 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 788AA23888D7; Wed, 23 Apr 2014 12:56:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1589401 - in /commons/proper/bcel/trunk/src: examples/Mini/ main/java/org/apache/bcel/classfile/ main/java/org/apache/bcel/generic/ main/java/org/apache/bcel/util/ site/xdoc/ Date: Wed, 23 Apr 2014 12:56:36 -0000 To: commits@commons.apache.org From: ebourg@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140423125637.788AA23888D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ebourg Date: Wed Apr 23 12:56:36 2014 New Revision: 1589401 URL: http://svn.apache.org/r1589401 Log: Removed more final modifiers from static methods Modified: commons/proper/bcel/trunk/src/examples/Mini/ASTFunDecl.java commons/proper/bcel/trunk/src/examples/Mini/MiniParser.java commons/proper/bcel/trunk/src/examples/Mini/MiniParserTokenManager.java commons/proper/bcel/trunk/src/examples/Mini/Token.java commons/proper/bcel/trunk/src/examples/Mini/TokenMgrError.java commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Constant.java commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/BranchHandle.java commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/BranchInstruction.java commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionHandle.java commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java commons/proper/bcel/trunk/src/site/xdoc/manual.xml Modified: commons/proper/bcel/trunk/src/examples/Mini/ASTFunDecl.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/examples/Mini/ASTFunDecl.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/examples/Mini/ASTFunDecl.java (original) +++ commons/proper/bcel/trunk/src/examples/Mini/ASTFunDecl.java Wed Apr 23 12:56:36 2014 @@ -401,7 +401,7 @@ implements MiniParserTreeConstants, org. */ static int size, max_size; - static final void reset() { size = max_size = 0; } + static void reset() { size = max_size = 0; } private static String getVarDecls() { StringBuffer buf = new StringBuffer(" int "); @@ -420,24 +420,24 @@ implements MiniParserTreeConstants, org. /** Used by byte_code() */ - static final void pop(int s) { size -= s; } - static final void push(int s) { + static void pop(int s) { size -= s; } + static void push(int s) { size += s; if(size > max_size) { max_size = size; } } - static final void push() { push(1); } + static void push() { push(1); } /** Used byte code() */ - static final void push(StringBuffer buf, String str) { + static void push(StringBuffer buf, String str) { buf.append(" _s" + size + " = " + str + ";\n"); push(1); } - static final String pop() { + static String pop() { return "_s" + (--size); } } Modified: commons/proper/bcel/trunk/src/examples/Mini/MiniParser.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/examples/Mini/MiniParser.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/examples/Mini/MiniParser.java (original) +++ commons/proper/bcel/trunk/src/examples/Mini/MiniParser.java Wed Apr 23 12:56:36 2014 @@ -27,7 +27,7 @@ public class MiniParser/*@bgen(jjtree)*/ /* A program consists of a number of function declarations with a * distinguished function `main' that starts the program. */ - static final public void Program() throws ParseException { + static public void Program() throws ParseException { /*@bgen(jjtree) Program */ ASTProgram jjtn000 = new ASTProgram(JJTPROGRAM); boolean jjtc000 = true; @@ -76,7 +76,7 @@ public class MiniParser/*@bgen(jjtree)*/ /* "FUN" Ident() "(" NameList() ")" = Expr() */ - static final public void FunDecl() throws ParseException { + static public void FunDecl() throws ParseException { /*@bgen(jjtree) FunDecl */ ASTFunDecl jjtn000 = new ASTFunDecl(JJTFUNDECL); boolean jjtc000 = true; @@ -141,7 +141,7 @@ public class MiniParser/*@bgen(jjtree)*/ } } - static final public void Expr() throws ParseException { + static public void Expr() throws ParseException { /*@bgen(jjtree) Expr */ ASTExpr jjtn000 = new ASTExpr(JJTEXPR); boolean jjtc000 = true; @@ -220,7 +220,7 @@ public class MiniParser/*@bgen(jjtree)*/ * else's to the innermost if statement. The LOOKAHEAD specification * is to tell JavaCC that we know what we are doing. */ - static final public void IfExpr() throws ParseException { + static public void IfExpr() throws ParseException { /*@bgen(jjtree) IfExpr */ ASTIfExpr jjtn000 = new ASTIfExpr(JJTIFEXPR); boolean jjtc000 = true; @@ -269,7 +269,7 @@ public class MiniParser/*@bgen(jjtree)*/ } } - static final public void LetExpr() throws ParseException { + static public void LetExpr() throws ParseException { /*@bgen(jjtree) LetExpr */ ASTLetExpr jjtn000 = new ASTLetExpr(JJTLETEXPR); boolean jjtc000 = true; @@ -325,7 +325,7 @@ public class MiniParser/*@bgen(jjtree)*/ } } - static final public Token FunAppl() throws ParseException { + static public Token FunAppl() throws ParseException { /*@bgen(jjtree) FunAppl */ ASTFunAppl jjtn000 = new ASTFunAppl(JJTFUNAPPL); boolean jjtc000 = true; @@ -400,7 +400,7 @@ public class MiniParser/*@bgen(jjtree)*/ throw new Error("Missing return statement in function"); } - static final public void Term() throws ParseException { + static public void Term() throws ParseException { /*@bgen(jjtree) Term */ ASTTerm jjtn000 = new ASTTerm(JJTTERM); boolean jjtc000 = true; @@ -452,7 +452,7 @@ public class MiniParser/*@bgen(jjtree)*/ } } - static final public void Factor() throws ParseException { + static public void Factor() throws ParseException { /*@bgen(jjtree) Factor */ ASTFactor jjtn000 = new ASTFactor(JJTFACTOR); boolean jjtc000 = true; @@ -506,7 +506,7 @@ public class MiniParser/*@bgen(jjtree)*/ } } - static final public void Element() throws ParseException { + static public void Element() throws ParseException { if (jj_2_1(2)) { expr_token = FunAppl(); } else { @@ -534,7 +534,7 @@ public class MiniParser/*@bgen(jjtree)*/ } } - static final public Token Integer() throws ParseException { + static public Token Integer() throws ParseException { /*@bgen(jjtree) Integer */ ASTInteger jjtn000 = new ASTInteger(JJTINTEGER); boolean jjtc000 = true; @@ -559,7 +559,7 @@ public class MiniParser/*@bgen(jjtree)*/ throw new Error("Missing return statement in function"); } - static final public Token Ident() throws ParseException { + static public Token Ident() throws ParseException { /*@bgen(jjtree) Ident */ ASTIdent jjtn000 = new ASTIdent(JJTIDENT); boolean jjtc000 = true; @@ -604,7 +604,7 @@ public class MiniParser/*@bgen(jjtree)*/ throw new Error("Missing return statement in function"); } - static final public int AddOp() throws ParseException { + static public int AddOp() throws ParseException { Token t=null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case PLUS: @@ -627,7 +627,7 @@ public class MiniParser/*@bgen(jjtree)*/ throw new Error("Missing return statement in function"); } - static final public int MultOp() throws ParseException { + static public int MultOp() throws ParseException { Token t=null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case MULT: @@ -653,7 +653,7 @@ public class MiniParser/*@bgen(jjtree)*/ throw new Error("Missing return statement in function"); } - static final public int CmpOp() throws ParseException { + static public int CmpOp() throws ParseException { Token t=null; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case EQ: @@ -705,14 +705,14 @@ public class MiniParser/*@bgen(jjtree)*/ throw new Error("Missing return statement in function"); } - static final private boolean jj_2_1(int xla) { + static private boolean jj_2_1(int xla) { jj_la = xla; jj_lastpos = jj_scanpos = token; boolean retval = !jj_3_1(); jj_save(0, xla); return retval; } - static final private boolean jj_3R_8() { + static private boolean jj_3R_8() { if (jj_scan_token(FALSE)) { return true; } @@ -722,7 +722,7 @@ public class MiniParser/*@bgen(jjtree)*/ return false; } - static final private boolean jj_3R_11() { + static private boolean jj_3R_11() { if (jj_scan_token(IDENT)) { return true; } @@ -732,7 +732,7 @@ public class MiniParser/*@bgen(jjtree)*/ return false; } - static final private boolean jj_3R_7() { + static private boolean jj_3R_7() { if (jj_scan_token(TRUE)) { return true; } @@ -742,7 +742,7 @@ public class MiniParser/*@bgen(jjtree)*/ return false; } - static final private boolean jj_3R_6() { + static private boolean jj_3R_6() { Token xsp; xsp = jj_scanpos; if (jj_3R_7()) { @@ -774,7 +774,7 @@ public class MiniParser/*@bgen(jjtree)*/ return false; } - static final private boolean jj_3_1() { + static private boolean jj_3_1() { if (jj_3R_5()) { return true; } @@ -784,7 +784,7 @@ public class MiniParser/*@bgen(jjtree)*/ return false; } - static final private boolean jj_3R_5() { + static private boolean jj_3R_5() { if (jj_3R_6()) { return true; } @@ -800,7 +800,7 @@ public class MiniParser/*@bgen(jjtree)*/ return false; } - static final private boolean jj_3R_10() { + static private boolean jj_3R_10() { if (jj_scan_token(WRITE)) { return true; } @@ -810,7 +810,7 @@ public class MiniParser/*@bgen(jjtree)*/ return false; } - static final private boolean jj_3R_9() { + static private boolean jj_3R_9() { if (jj_scan_token(READ)) { return true; } @@ -943,7 +943,7 @@ public class MiniParser/*@bgen(jjtree)*/ } } - static final private Token jj_consume_token(int kind) throws ParseException { + static private Token jj_consume_token(int kind) throws ParseException { Token oldToken; if ((oldToken = token).next != null) { token = token.next; @@ -972,7 +972,7 @@ public class MiniParser/*@bgen(jjtree)*/ throw generateParseException(); } - static final private boolean jj_scan_token(int kind) { + static private boolean jj_scan_token(int kind) { if (jj_scanpos == jj_lastpos) { jj_la--; if (jj_scanpos.next == null) { @@ -993,7 +993,7 @@ public class MiniParser/*@bgen(jjtree)*/ return (jj_scanpos.kind != kind); } - static final public Token getNextToken() { + static public Token getNextToken() { if (token.next != null) { token = token.next; } else { @@ -1004,7 +1004,7 @@ public class MiniParser/*@bgen(jjtree)*/ return token; } - static final public Token getToken(int index) { + static public Token getToken(int index) { Token t = lookingAhead ? jj_scanpos : token; for (int i = 0; i < index; i++) { if (t.next != null) { @@ -1016,7 +1016,7 @@ public class MiniParser/*@bgen(jjtree)*/ return t; } - static final private int jj_ntk() { + static private int jj_ntk() { if ((jj_nt=token.next) == null) { return (jj_ntk = (token.next=MiniParserTokenManager.getNextToken()).kind); } else { @@ -1066,7 +1066,7 @@ public class MiniParser/*@bgen(jjtree)*/ } } - static final public ParseException generateParseException() { + static public ParseException generateParseException() { jj_expentries.removeAllElements(); boolean[] la1tokens = new boolean[43]; for (int i = 0; i < 43; i++) { @@ -1105,13 +1105,13 @@ public class MiniParser/*@bgen(jjtree)*/ return new ParseException(token, exptokseq, tokenImage); } - static final public void enable_tracing() { + static public void enable_tracing() { } - static final public void disable_tracing() { + static public void disable_tracing() { } - static final private void jj_rescan_token() { + static private void jj_rescan_token() { jj_rescan = true; for (int i = 0; i < 1; i++) { JJCalls p = jj_2_rtns[i]; @@ -1128,7 +1128,7 @@ public class MiniParser/*@bgen(jjtree)*/ jj_rescan = false; } - static final private void jj_save(int index, int xla) { + static private void jj_save(int index, int xla) { JJCalls p = jj_2_rtns[index]; while (p.gen > jj_gen) { if (p.next == null) { p = p.next = new JJCalls(); break; } Modified: commons/proper/bcel/trunk/src/examples/Mini/MiniParserTokenManager.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/examples/Mini/MiniParserTokenManager.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/examples/Mini/MiniParserTokenManager.java (original) +++ commons/proper/bcel/trunk/src/examples/Mini/MiniParserTokenManager.java Wed Apr 23 12:56:36 2014 @@ -651,7 +651,7 @@ static int jjround; static int jjmatchedPos; static int jjmatchedKind; -public static final Token getNextToken() +public static Token getNextToken() { Token specialToken = null; Token matchedToken; @@ -770,7 +770,7 @@ public static final Token getNextToken() } } -static final void SkipLexicalActions(Token matchedToken) +static void SkipLexicalActions(Token matchedToken) { switch(jjmatchedKind) { Modified: commons/proper/bcel/trunk/src/examples/Mini/Token.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/examples/Mini/Token.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/examples/Mini/Token.java (original) +++ commons/proper/bcel/trunk/src/examples/Mini/Token.java Wed Apr 23 12:56:36 2014 @@ -88,7 +88,7 @@ public class Token { * to the following switch statement. Then you can cast matchedToken * variable to the appropriate type and use it in your lexical actions. */ - public static final Token newToken(int ofKind) + public static Token newToken(int ofKind) { switch(ofKind) { Modified: commons/proper/bcel/trunk/src/examples/Mini/TokenMgrError.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/examples/Mini/TokenMgrError.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/examples/Mini/TokenMgrError.java (original) +++ commons/proper/bcel/trunk/src/examples/Mini/TokenMgrError.java Wed Apr 23 12:56:36 2014 @@ -54,7 +54,7 @@ public class TokenMgrError extends Error * Replaces unprintable characters by their espaced (or unicode escaped) * equivalents in the given string */ - protected static final String addEscapes(String str) { + protected static String addEscapes(String str) { StringBuffer retval = new StringBuffer(); char ch; for (int i = 0; i < str.length(); i++) { Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Constant.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Constant.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Constant.java (original) +++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Constant.java Wed Apr 23 12:56:36 2014 @@ -125,7 +125,7 @@ public abstract class Constant implement * @param file Input stream * @return Constant object */ - static final Constant readConstant( DataInputStream file ) throws IOException, + static Constant readConstant( DataInputStream file ) throws IOException, ClassFormatException { byte b = file.readByte(); // Read tag byte switch (b) { Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java (original) +++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java Wed Apr 23 12:56:36 2014 @@ -218,7 +218,7 @@ public class JavaClass extends AccessFla /* Print debug information depending on `JavaClass.debug' */ - static final void Debug( String str ) { + static void Debug( String str ) { if (debug) { System.out.println(str); } Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/BranchHandle.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/BranchHandle.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/BranchHandle.java (original) +++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/BranchHandle.java Wed Apr 23 12:56:36 2014 @@ -45,7 +45,7 @@ public final class BranchHandle extends private static BranchHandle bh_list = null; // List of reusable handles - static final BranchHandle getBranchHandle( BranchInstruction i ) { + static BranchHandle getBranchHandle( BranchInstruction i ) { if (bh_list == null) { return new BranchHandle(i); } Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/BranchInstruction.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/BranchInstruction.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/BranchInstruction.java (original) +++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/BranchInstruction.java Wed Apr 23 12:56:36 2014 @@ -192,7 +192,7 @@ public abstract class BranchInstruction /** * Used by BranchInstruction, LocalVariableGen, CodeExceptionGen */ - static final void notifyTarget( InstructionHandle old_ih, InstructionHandle new_ih, + static void notifyTarget( InstructionHandle old_ih, InstructionHandle new_ih, InstructionTargeter t ) { if (old_ih != null) { old_ih.removeTargeter(t); Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionHandle.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionHandle.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionHandle.java (original) +++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionHandle.java Wed Apr 23 12:56:36 2014 @@ -106,7 +106,7 @@ public class InstructionHandle implement /** Factory method. */ - static final InstructionHandle getInstructionHandle( Instruction i ) { + static InstructionHandle getInstructionHandle( Instruction i ) { if (ih_list == null) { return new InstructionHandle(i); } else { Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java (original) +++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/Class2HTML.java Wed Apr 23 12:56:36 2014 @@ -158,7 +158,7 @@ public class Class2HTML implements Const } - static final String referenceType( String type ) { + static String referenceType( String type ) { String short_type = Utility.compactClassName(type); short_type = Utility.compactClassName(short_type, class_package + ".", true); int index = type.indexOf('['); // Type is an array? Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java (original) +++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java Wed Apr 23 12:56:36 2014 @@ -155,7 +155,7 @@ public class ClassPath implements Serial * * @return class path as used by default by BCEL */ - public static final String getClassPath() { + public static String getClassPath() { String class_path = System.getProperty("java.class.path"); String boot_path = System.getProperty("sun.boot.class.path"); String ext_path = System.getProperty("java.ext.dirs"); Modified: commons/proper/bcel/trunk/src/site/xdoc/manual.xml URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/site/xdoc/manual.xml?rev=1589401&r1=1589400&r2=1589401&view=diff ============================================================================== --- commons/proper/bcel/trunk/src/site/xdoc/manual.xml (original) +++ commons/proper/bcel/trunk/src/site/xdoc/manual.xml Wed Apr 23 12:56:36 2014 @@ -461,11 +461,11 @@ private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); - public static final int fac(int n) { + public static int fac(int n) { return (n == 0)? 1 : n * fac(n - 1); } - public static final int readInt() { + public static int readInt() { int n = 4711; try { System.out.print("Please enter a number> ");