Bug 180544 - Console doesn't build with Java 1.5
Summary: Console doesn't build with Java 1.5
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora Management Console
Classification: Fedora
Component: General
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nathan Kinder
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-02-08 21:57 UTC by Nathan Kinder
Modified: 2020-01-07 20:00 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-01-07 20:00:40 UTC
Embargoed:


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

Description Nathan Kinder 2006-02-08 21:57:38 UTC
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 21:57:38 UTC
Created attachment 124413 [details]
CVS DIffs

Comment 2 Nathan Kinder 2006-02-08 22:12:13 UTC
Created attachment 124415 [details]
CVS Commit

Checked into Console (HEAD).  Reviewed by Rich.

Comment 3 Nathan Kinder 2006-02-08 23:52:13 UTC
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.