Issue 4501 - jdbcldap: use of enum reserved work (Java 1.5)
Summary: jdbcldap: use of enum reserved work (Java 1.5)
Status: VERIFIED FIXED
Alias: None
Product: JLDAP
Classification: Unclassified
Component: JDBC (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Shawn McKinney
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-24 23:44 UTC by charkins@pobox.com
Modified: 2023-05-15 17:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description charkins@pobox.com 2006-04-24 23:44:26 UTC
Full_Name: Casey Harkins
Version: N/A
OS: Linux
URL: http://www.upl.cs.wisc.edu/~charkins/jdbcldap/enum_to_enu.patch
Submission from: (NULL) (69.217.146.185)


The jdbcldap package uses 'enum' as a variable name which is a reserved word in
Java 1.5. This simple patch renames cases of enum to enu. Development looks like
it might be dead, so not sure if anyone really cares. :-)

Comment 1 Kurt Zeilenga 2006-05-02 05:06:22 UTC
moved from Incoming to Software Bugs
Comment 2 ando@openldap.org 2006-08-31 19:06:03 UTC
changed notes
Comment 3 Howard Chu 2006-12-13 02:07:55 UTC
moved from Software Bugs to Contrib
Comment 4 OpenLDAP project 2014-08-01 21:03:27 UTC
JDBC
Comment 5 Fredrik Roubert 2023-02-18 17:38:48 UTC
Java 1.5 is no longer sufficient to be able to build this code base using a still supported JDK, so I propose updating the scope of this issue to Java 8 instead and then resolve that with this series of patches:

https://git.openldap.org/openldap/jdbcldap/-/merge_requests/6
Comment 6 Fredrik Roubert 2023-03-11 15:07:48 UTC
Does anyone have any opinion about this?
Comment 7 Quanah Gibson-Mount 2023-03-13 16:43:00 UTC
(In reply to Fredrik Roubert from comment #6)
> Does anyone have any opinion about this?

We've assigned it for review, ty for the PR!
Comment 8 Shawn McKinney 2023-05-10 12:31:07 UTC
I've setup a build env, using Java 8, apache ant 1.10, etc. Now, getting errors on missing dependencies, org.eclipse.swt.*, jfaces, ...

I have not found instructions on openldap.org website how to build this. That's fine, certainly not something for this MR to address. But, before I go spend time chasing this down, are there steps written down? Doesn't have to be accurate, anything at all would help.

Thanks
Comment 9 Fredrik Roubert 2023-05-10 16:55:15 UTC
I never managed to find any documentation about what JAR files were needed, so instead I used guesswork and Google to come up with this list on my own for building with JDK 1.4.2:

ant-1.7.0.jar
ant-junit-1.6.5.jar
ant-launcher-1.6.5.jar
jface-3.0.1.jar
junit-3.8.1.jar
novell-jldap-2013.08.30.1433-xplat.jar
swt-linux-gtk-3.0.1.jar

I have no idea how correct that list might be, but at least it turned out to be sufficent to make the build work.

For building with JDK 8, the list becomes substantially smaller:

jface-3.0.1.jar
novell-jldap-2013.08.30.1433-xplat.jar
swt-linux-gtk-3.0.1.jar

But I can't help wondering about JdbcLdapBrowserApp, whether that really is something that is ever used by anyone anymore, for if it is not, you would be able to simplify your codebase considerably by deleting all that source code (and with that, the need for org.eclipse.swt and jfaces).
Comment 10 Shawn McKinney 2023-05-11 00:04:59 UTC
(In reply to Fredrik Roubert from comment #9)
> I never managed to find any documentation about what JAR files were needed,
> so instead I used guesswork and Google to come up with this list on my own
> for building with JDK 1.4.2:
> 
> ant-1.7.0.jar
> ant-junit-1.6.5.jar
> ant-launcher-1.6.5.jar
> jface-3.0.1.jar
> junit-3.8.1.jar
> novell-jldap-2013.08.30.1433-xplat.jar
> swt-linux-gtk-3.0.1.jar
> 
> I have no idea how correct that list might be, but at least it turned out to
> be sufficent to make the build work.
> 
> For building with JDK 8, the list becomes substantially smaller:
> 
> jface-3.0.1.jar
> novell-jldap-2013.08.30.1433-xplat.jar
> swt-linux-gtk-3.0.1.jar

Thanks, before I saw your reply, got it built with these (similar list):
jldap-2009-10-07.jar
junit-4.13.2.jar
org.eclipse.jface-3.29.0.jar
org.eclipse.swt.gtk.linux.x86_64-3.122.0.jar

> 
> But I can't help wondering about JdbcLdapBrowserApp, whether that really is
> something that is ever used by anyone anymore, for if it is not, you would
> be able to simplify your codebase considerably by deleting all that source
> code (and with that, the need for org.eclipse.swt and jfaces).

Fortunately, these jars, other than jdbcldap, are recent, meaning they at least have no known CVE's outstanding? But, like you I'm left with the same thoughts. Who's using this, what parts can be sundowned, how do we test it, what to do next.

--
Shawn
Comment 11 Quanah Gibson-Mount 2023-05-15 17:58:40 UTC
Commits: 
  • f200ebd2 
by Fredrik Roubert at 2023-02-18T18:27:29+01:00 
ITS#4501 Set javac source="8".


  • 578fba58 
by Fredrik Roubert at 2023-02-18T18:27:29+01:00 
ITS#4501 Delete unused class Compare.

JDK 1.5 removed the String.compareTo(Object) method so this class won't
compile anymore, but luckily it's unused and can simply be deleted.


  • fa6c4c44 
by Fredrik Roubert at 2023-02-18T18:27:29+01:00 
ITS#4501 Replace use of 'enum' as an identifier.

Java 1.5 made 'enum' a keyword, which may not be used as an identifier.


  • 339120d5 
by Fredrik Roubert at 2023-02-18T18:27:29+01:00 
ITS#4501 Replace use of deprecated class StringBufferInputStream.

JDK 1.1 deprecated class StringBufferInputStream because it does not
properly convert characters into bytes.


  • f494f56d 
by Fredrik Roubert at 2023-02-18T18:27:29+01:00 
ITS#4501 Replace call to deprecated LDAPConnection.bind() method.

JLDAP Sep_ndk_2003 deprecated LDAPConnection.bind(int, String, String)
in favour of LDAPConnection.bind(int, String, byte[]).


  • 70b87f22 
by Fredrik Roubert at 2023-02-18T18:27:29+01:00 
ITS#4501 Replace call to deprecated File.toURL() method.

JDK 6 deprecated File.toURL() in favour of File.toURI().toURL() because
it does not automatically escape characters that are illegal in URLs.


  • 44c3341b 
by Fredrik Roubert at 2023-02-18T18:27:29+01:00 
ITS#4501 Add @Deprecated annotations to deprecated interface methods.

JDK 1.5 deprecated these interface methods so they should be annotated
as deprecated also in this implementation of that interface.


  • 25e88de0 
by Fredrik Roubert at 2023-02-18T18:27:29+01:00 
ITS#4501 Use full package name to disambiguate ambiguous reference.

JDK 8 introduced java.util.Base64 which has the same class name as
com.novell.ldap.util.Base64 which this code calls.


  • 762419dc 
by Fredrik Roubert at 2023-02-18T18:27:29+01:00 
ITS#4501 Add java.sql interface methods introduced by JDK 6.


  • 8432fbfe 
by Fredrik Roubert at 2023-02-18T18:27:29+01:00 
ITS#4501 Add java.sql interface methods introduced by JDK 7.