Skip to content

Commit

Permalink
Patch bcel so that it'll compile under Java 1.5. Part of Greg's work
Browse files Browse the repository at this point in the history
to help get tomcat5 to fully compile under Java 1.5. Thanks Greg!

Submitted by: Greg Kick; gkick at ucla.edu
Reviewed by:  jberry
Approved by:  jberry
Obtained from:  Greg Kick

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@15061 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
jdberry committed Nov 18, 2005
1 parent 2c15fe7 commit f062272
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
6 changes: 5 additions & 1 deletion java/jakarta-bcel/Portfile
@@ -1,9 +1,10 @@
# $Id: Portfile,v 1.4 2005/04/19 18:15:07 jberry Exp $
# $Id: Portfile,v 1.5 2005/11/18 14:20:32 jberry Exp $

PortSystem 1.0

name jakarta-bcel
version 5.1
revision 1

categories java
maintainers jberry@opendarwin.org
Expand All @@ -28,6 +29,9 @@ depends_lib bin:java:kaffe \

worksrcdir bcel-${version}

patchfiles patch-Pass2Verifier.java.diff \
patch-StringRepresentation.java.diff

post-extract {
# Cleanup becl's sloppy distribution
system "cd ${workpath} && unzip bcel-${version}.zip && unzip -o ${distname}.zip"
Expand Down
38 changes: 38 additions & 0 deletions java/jakarta-bcel/files/patch-Pass2Verifier.java.diff
@@ -0,0 +1,38 @@
--- ./src/java/org/apache/bcel/verifier/statics/Pass2Verifier.java 2003-04-25 10:06:16.000000000 -0700
+++ ./src-fix/java/org/apache/bcel/verifier/statics/Pass2Verifier.java 2005-11-17 23:58:06.000000000 -0800
@@ -345,7 +345,7 @@

for (int i=0; i<atts.length; i++){
if ((! (atts[i] instanceof SourceFile)) &&
- (! (atts[i] instanceof Deprecated)) &&
+ (! (atts[i] instanceof org.apache.bcel.classfile.Deprecated)) &&
(! (atts[i] instanceof InnerClasses)) &&
(! (atts[i] instanceof Synthetic))){
addMessage("Attribute '"+tostring(atts[i])+"' as an attribute of the ClassFile structure '"+tostring(obj)+"' is unknown and will therefore be ignored.");
@@ -519,7 +519,7 @@
for (int i=0; i<atts.length; i++){
if ((! (atts[i] instanceof ConstantValue)) &&
(! (atts[i] instanceof Synthetic)) &&
- (! (atts[i] instanceof Deprecated))){
+ (! (atts[i] instanceof org.apache.bcel.classfile.Deprecated))){
addMessage("Attribute '"+tostring(atts[i])+"' as an attribute of Field '"+tostring(obj)+"' is unknown and will therefore be ignored.");
}
if (! (atts[i] instanceof ConstantValue)){
@@ -660,7 +660,7 @@
if ((! (atts[i] instanceof Code)) &&
(! (atts[i] instanceof ExceptionTable)) &&
(! (atts[i] instanceof Synthetic)) &&
- (! (atts[i] instanceof Deprecated))){
+ (! (atts[i] instanceof org.apache.bcel.classfile.Deprecated))){
addMessage("Attribute '"+tostring(atts[i])+"' as an attribute of Method '"+tostring(obj)+"' is unknown and will therefore be ignored.");
}
if ((! (atts[i] instanceof Code)) &&
@@ -702,7 +702,7 @@
addMessage("SourceFile attribute '"+tostring(obj)+"' has a funny name: remember not to confuse certain parsers working on javap's output. Also, this name ('"+sourcefilename+"') is considered an unqualified (simple) file name only.");
}
}
- public void visitDeprecated(Deprecated obj){//vmspec2 4.7.10
+ public void visitDeprecated(org.apache.bcel.classfile.Deprecated obj){//vmspec2 4.7.10
checkIndex(obj, obj.getNameIndex(), CONST_Utf8);

String name = ((ConstantUtf8) cp.getConstant(obj.getNameIndex())).getBytes();
11 changes: 11 additions & 0 deletions java/jakarta-bcel/files/patch-StringRepresentation.java.diff
@@ -0,0 +1,11 @@
--- ./src/java/org/apache/bcel/verifier/statics/StringRepresentation.java 2003-04-25 10:06:16.000000000 -0700
+++ ./src-fix/java/org/apache/bcel/verifier/statics/StringRepresentation.java 2005-11-17 23:58:06.000000000 -0800
@@ -172,7 +172,7 @@
public void visitConstantValue(ConstantValue obj){
tostring = toString(obj);
}
- public void visitDeprecated(Deprecated obj){
+ public void visitDeprecated(org.apache.bcel.classfile.Deprecated obj){
tostring = toString(obj);
}
public void visitExceptionTable(ExceptionTable obj){

0 comments on commit f062272

Please sign in to comment.