Bug 180544 - Console doesn't build with Java 1.5
Console doesn't build with Java 1.5
Status: VERIFIED
Product: Fedora Management Console
Classification: Fedora
Component: General (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nathan Kinder
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-08 16:57 EST by Nathan Kinder
Modified: 2015-01-04 18:59 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
CVS DIffs (12.04 KB, patch)
2006-02-08 16:57 EST, Nathan Kinder
no flags Details | Diff
CVS Commit (1.84 KB, text/plain)
2006-02-08 17:12 EST, Nathan Kinder
no flags Details

  None (edit)
Description Nathan Kinder 2006-02-08 16:57:38 EST
Building Console fails with Java 1.5.  This is because "enum" has been added as
a reserved keyword in Java 1.5, and we use it as a variable name.  These
variable names need to be changed.

There is also a warning issued during build time about our usage of
Method.invoke().  We are passing a "null" as the second parameter, but invoke()
is overloaded and the compiler has to guess about which method to use.  We need
to cast this parameter to the "Object" type.
Comment 1 Nathan Kinder 2006-02-08 16:57:38 EST
Created attachment 124413 [details]
CVS DIffs
Comment 2 Nathan Kinder 2006-02-08 17:12:13 EST
Created attachment 124415 [details]
CVS Commit

Checked into Console (HEAD).  Reviewed by Rich.
Comment 3 Nathan Kinder 2006-02-08 18:52:13 EST
Checked in a modification the the cast used when calling Method.invoke().  This
is needed to maintain Java 1.4 compatibility.  Reviewed by Noriko.

Checking in DirUtil.java;
/cvs/dirsec/console/src/com/netscape/management/client/util/DirUtil.java,v  <--
 DirUtil.java
new revision: 1.3; previous revision: 1.2
done

Index: DirUtil.java
===================================================================
RCS file: /cvs/dirsec/console/src/com/netscape/management/client/util/DirUtil.java,v
retrieving revision 1.2
diff -u -5 -t -r1.2 DirUtil.java
--- DirUtil.java        8 Feb 2006 22:13:30 -0000       1.2
+++ DirUtil.java        8 Feb 2006 23:54:41 -0000
@@ -139,11 +139,11 @@

                                 Method m = c.getMethod( "getCipherSuite", new
Class[0] );
-                                _cipherSuite = m.invoke( null, (Object)null );
+                                _cipherSuite = m.invoke( null, (Object[])null );
                         } catch (Exception e) {

Note You need to log in before you can comment on or make changes to this bug.