Bug 43859 - [Patch] [BUILD] Error when compiling CredentialImpl.java
Summary: [Patch] [BUILD] Error when compiling CredentialImpl.java
Status: RESOLVED FIXED
Alias: None
Product: Lenya
Classification: Unclassified
Component: Build System (show other bugs)
Version: 2.0
Hardware: Other Windows XP
: P2 normal
Target Milestone: 2.0.1
Assignee: Lenya Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-14 13:15 UTC by michael.trindler
Modified: 2008-02-22 08:16 UTC (History)
0 users



Attachments
fixes hashCode() method for Java 1.4.2 (645 bytes, patch)
2007-11-14 13:48 UTC, Jonathan Addison
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description michael.trindler 2007-11-14 13:15:36 UTC
(Windows XP, Lenya SVN Rev. 595021, j2sdk1.4.2_04)

compile-module-org.apache.lenya.modules.ac:
Created dir: <path>\build\lenya\modules\org.apache.lenya.modules.ac\java\classes\api
Compiling 12 source files to
<path>\build\lenya\modules\org.apache.lenya.modules.ac\java\classes\api
<path>\src\modules-core\ac\java\src\org\apache\lenya\ac\impl\CredentialImpl.java:110:
cannot resolve symbol
symbol  : method valueOf (int)
location: class java.lang.Integer
        return Integer.valueOf(getAccreditable().hashCode() +
getRole().hashCode()).hashCode();
                      ^
1 error

BUILD FAILED
<path>\src\targets\webapp-build.xml:174: The following error occurred while
executing this line:
<path>\src\targets\modules-build.xml:74: The following error occurred while
executing this line:
<path>\build\lenya\temp\modules-build.xml:3811: Compile failed; see the compiler
error output for details.
Comment 1 Jonathan Addison 2007-11-14 13:48:38 UTC
Created attachment 21126 [details]
fixes hashCode() method for Java 1.4.2

This seems to fix the problem for Java 1.4.2, but I haven't tested with any
other Java versions.
Comment 2 michael.trindler 2007-11-14 14:33:18 UTC
Thanks, Jonathan!

Your patch fixed the compilation issue on windows / java 1.4.2 (though I had to
apply the changes manually - the patch file was malformed the way I downloaded it).

Will try it on Mac OS / java 1.5.2 too.
Comment 3 michael.trindler 2007-11-14 14:45:56 UTC
> Will try it on Mac OS / java 1.5.2 too.

Works fine!
Comment 4 Andreas Hartmann 2008-01-28 09:20:32 UTC
I applied the patch in revision 615959. Please test. Thanks a lot!
Comment 5 Simon Wagner 2008-02-21 08:02:07 UTC
Compiling Lenya from source on Gentoo Linux w/ sun-jdk-1.4.2.16, tomcat-5.5.26
gave me a similar failure:

compile-module-org.apache.lenya.modules.ac:
Created dir:
/usr/local/src/apache-lenya-2.0/build/lenya/modules/org.apache.lenya.modules.ac/java/classes/api
Compiling 12 source files to
/usr/local/src/apache-lenya-2.0/build/lenya/modules/org.apache.lenya.modules.ac/java/classes/api
/usr/local/src/apache-lenya-2.0/src/modules-core/ac/java/src/org/apache/lenya/ac/impl/CredentialImpl.java:110:
cannot resolve symbol
symbol  : method valueOf (int)
location: class java.lang.Integer
        return Integer.valueOf(getAccreditable().hashCode() +
getRole().hashCode()).hashCode();
                      ^
1 error

BUILD FAILED

When using blackdown-jdk, it's the same. No errors, however, when compiling w/
sun-jdk-1.5.0.13 and tomcat-6.0.16, but not surprisingly that build throws a
server exception.

Do you want to reopen the bug or should I file a new one for that?
Thanks.
Comment 6 Richard Frovarp 2008-02-21 08:32:29 UTC
You're reporting the same issue, which has been reported to be fixed. My guess
is you are using the 2.0.0 release? 2.0.0 came out before this fix was applied.
The upcoming 2.0.1 release will have the fix. The subversion trunk would also
have the fix. 
Comment 7 Simon Wagner 2008-02-22 08:16:31 UTC
Sorry, it seems that I have mixed up something. Builds fine with svn 630221.
Thanks for your work.