Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 23915 invoked from network); 20 Nov 2010 23:29:55 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Nov 2010 23:29:55 -0000 Received: (qmail 32119 invoked by uid 500); 20 Nov 2010 23:30:27 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 32073 invoked by uid 500); 20 Nov 2010 23:30:27 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 32066 invoked by uid 99); 20 Nov 2010 23:30:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Nov 2010 23:30:27 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of akarasulu@gmail.com designates 209.85.216.178 as permitted sender) Received: from [209.85.216.178] (HELO mail-qy0-f178.google.com) (209.85.216.178) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Nov 2010 23:30:21 +0000 Received: by qyk33 with SMTP id 33so842000qyk.16 for ; Sat, 20 Nov 2010 15:30:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=Zbyi38JyA81UdoP6ur4w95yItobScCkVpty0rFNBJhk=; b=v1Q6mPI87o1sremRxUOweRa6ZVQmBBB2lnIY2FHc31+hsNY3NG9dei/dImXdi/WfKV aZ6yJbzelLCkarm8vxOzX2eHFlDEVefpG5rjjyGVdu6mU2UNP7rHsXRu1k4z87lt89Kf QBkCzPG1xUJaHFC26ioFYmpzRC8b/dMS6E3t8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=Ge0EaL3YDGbYNdudFjBKvTGbzq6dnjxhqGrMLbT8a43Jta1gXRNGOWz6MtT/fcCwRF /bTZDgBqtYV0qsDpgyD9fPPpQCxB/86ToUyS1bG53uhSlsPlrOOSS0rCLHdUpBHJh98u tnNWDOEZanqkfjxU7nXrOZH0m7cepFes9eQ1s= MIME-Version: 1.0 Received: by 10.229.90.196 with SMTP id j4mr3338652qcm.270.1290295799717; Sat, 20 Nov 2010 15:29:59 -0800 (PST) Sender: akarasulu@gmail.com Received: by 10.229.192.196 with HTTP; Sat, 20 Nov 2010 15:29:59 -0800 (PST) In-Reply-To: <4CE84A4E.1010906@otego.com> References: <4CE84A4E.1010906@otego.com> Date: Sun, 21 Nov 2010 01:29:59 +0200 X-Google-Sender-Auth: oIzJjHzXJ34pKfHK-ll8ycZi03U Message-ID: Subject: Re: I'm confused From: Alex Karasulu To: Apache Directory Developers List Content-Type: multipart/alternative; boundary=001636310649cc21070495846670 X-Virus-Checked: Checked by ClamAV on apache.org --001636310649cc21070495846670 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Nov 21, 2010 at 12:23 AM, Felix Knecht wrote: > What's the meaning of this method WRT to its comment and its naming (value > is declared as int): > > /** > * @return The hex value for this flag, in its position. > * For instance, getting the flag 5 will return 0x0000 0010 > */ > public int getHexValue() > { > return 1 << value; > } > > - IMO a hex is an alphanumeric pattern (abcdef0123456789), so how can this > method return an int representing a hex? > - 'value' represents all set flags, nto a specific one, but no method > parameter is given to specifiy a specific flag ... > > Any ideas ? > Yeah that's pretty cryptic. You're just multiplying by 2 here. First off this method is never used anywhere so you can delete it. I have no idea where it came from or where it might have been used if at all. The javadoc example is all dorked too. The hex value shown is not 5 which should be 0x0000 0101. Maybe the bit shift was intended in the other direction by the javadoc. The history on this is lost from svn blame so hard to tell what it was about. Regardless the end result should be 0x0000 1010 which is 8+2 or 10. > PS > Taken from > apacheds/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java > I am confused as well :-\ -- Alex Karasulu My Blog :: http://www.jroller.com/akarasulu/ Apache Directory Server :: http://directory.apache.org Apache MINA :: http://mina.apache.org To set up a meeting with me: http://tungle.me/AlexKarasulu --001636310649cc21070495846670 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Sun, Nov 21, 2010 at 12:23 AM, Felix = Knecht <felix@otego= .com> wrote:
What's the meaning of this method WRT to its comment and its naming (va= lue is declared as int):

/**
=A0* @return The hex value for this flag, in its position.
=A0* For instance, getting the flag 5 will return 0x0000 0010
=A0*/
public int getHexValue()
{
=A0 =A0return 1 << value;
}

- IMO a hex is an alphanumeric pattern (abcdef0123456789), so how can this = method return an int representing a hex?
- 'value' represents all set flags, nto a specific one, but no meth= od parameter is given to specifiy a specific flag ...

Any ideas ?

Yeah that's pretty cryptic. You= 're just multiplying by 2 here.=A0

First off t= his method is never used anywhere so you can delete it. I have no idea wher= e it came from or where it might have been used if at all.

The javadoc example is all dorked too. The hex value sh= own is not 5 which should be=A00x0000 0101. Maybe the bit shift was intende= d in the other direction by the javadoc. The history on this is lost from s= vn blame so hard to tell what it was about. Regardless the end result shoul= d be=A00x0000 1010 which is 8+2 or 10.=A0


PS
Taken from apacheds/kerberos-shared/src/main/java/org/apache/directory/serv= er/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java

I am confused as well :-\ --001636310649cc21070495846670--