For a variety of reasons, I’ve been exploring the Java language lately. Officially, and legitimately, with Oracle adding Java stored procedures to the database a couple of releases back, it’s pretty much inevitable that I’ll have to use it. There’s other reasons, too – things have been in a bit of flux (flux is such a great word, don’t you think) for a while, and it seems like maybe a good time to do some career reorientation. Or at least lay the groundwork. Once upon a time, I was a damn good developer and software project guy. Much has changed the past few years, while I was embarked on an ill-fated side trip into IT management (surely one of the seven levels of hell) and then back into the technical side as a database administrator. It looks like the theology of development has pretty much divided into two camps, Microsoft’s .Net and Sun’s Java. I guess my background in Unix made me lean towards Java. So there I am.
So far, I’ve just been scratching around. I have a bit of working code – working from the DOS, or Unix, command line. But Oracle and I are having a small disagreement about whether it does or does not have a method within the class. I, personally, believe t does:
public class EncodePinUtil {
public java.lang.String encode(java.lang.String args) {
String encodedPin = null;
String pinToEncode = null;
pinToEncode = args;
encodedPin = ueEncodePin(pinToEncode);
return encodedPin;
}
My hypothesis is that encode is, indeed, a method. Oracle’s hypothesis is that, while there may be madness in my method, there is no method in my madness. This is, as might be imagined, somewhat frustrating. Perhaps I should resort to RTFM.
Remember how you felt when I was posting about makeup and extra low-ride Gap jeans? Well, guess what? Turnabout’s fair play. You win. I can comment on sports. I can comment on politics. I can comment on treehouses, mouse traps and panic attacks. But you start talkin’ computer languages and such? I’m speechless. Well, almost.
Well, I can’t necessarily find fault, though the code itself isn’t spectacular.
Among other things, you appear to be missing the end brace of the class. You’re also doing unnecessary initialization (setting things to null when you’re just going to re-set them to something else), using “String” and “Java.Lang.String” inconsistently, and the entire method is unnecessary because the ueEncodePin function evidently already exists and does exactly what your methods does.
I suggest the following:
public java.lang.String encode(java.lang.String strPin)
{
return ueEncodePin(strPin);
}
That shouldn’t be any better from a purely syntactic point of view, but see if it works.
I just left off the end brace when I copied the code. And yes, the ueEncodePin method exists, but it has some code I’d rather not expose.
Don’t be trying to steal my job 🙂 I’m already on thin ice at the moment without you becoming a proficient coder again…
Ah. Well, does the simplified version work?
Sadly, no. Oracle is still stubborn. Bash at it I shall continue to do.