[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Beth,
sorry if it caused additional work. I will notify you next time about a problem instead of fixing it.
Roland
On Fri, Aug 6, 2010 at 1:47 PM, Beth Tibbitts
<tibbitts@xxxxxxxxxx> wrote:
Roland,
I appreciate the watchful eye, but next time could you warn me first before changing the code?
We're trying to put out a release plus I'm updating for a customer and also trying to keep head and branch synchronized for the time being.
I don't know why the API tooling didn't warn me but the problem wasn't a missing @since tag, it was an unintended package visibility change.
And I also know there are several cleanup issues with other parts of my code but i am waiting to get some bug fixes in that i need
to run old and new versions of the code side-by-side to work on it, so unexpected changes just confuse things.
I do agree with the intention of your changes, they were just unexpected and at a time that complicates things.
...Beth
Beth Tibbitts
Eclipse Parallel Tools Platform http://eclipse.org/ptp
IBM STG Communications Protocols and Tools
Mailing Address: IBM Corp., Coldstream Research Campus, 745 West New Circle Road, Lexington, KY 40511
----- Forwarded by Beth Tibbitts/Watson/IBM on 08/06/2010 01:39 PM -----
Send ptp-cvs-commit mailing list submissions to
ptp-cvs-commit@xxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
https://dev.eclipse.org/mailman/listinfo/ptp-cvs-commit
or, via email, send a message with subject or body 'help' to
ptp-cvs-commit-request@xxxxxxxxxxx
You can reach the person managing the list at
ptp-cvs-commit-owner@xxxxxxxxxxx
When replying, please edit your Subject line so it is more specific
than "Re: Contents of ptp-cvs-commit digest..."
Today's Topics:
1. gwatson
org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util
ProtocolUtil.java (Eclipse CVS Genie)
2. gwatson
org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util
StringTable.java (Eclipse CVS Genie)
3. gwatson
org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util
VarInt.java (Eclipse CVS Genie)
4. rschulz
org.eclipse.ptp/tools/etfw/org.eclipse.ptp.etfw.feedback/src/org/eclipse/ptp/etfw/feedback/util
ViewActivator.java (Eclipse CVS Genie)
5. rschulz
org.eclipse.ptp/tools/etfw/org.eclipse.ptp.etfw.feedback/src/org/eclipse/ptp/etfw/feedback/actions/handlers
ShowFeedbackHandler.java (Eclipse CVS Genie)
----------------------------------------------------------------------
Message: 1
Date: Fri, 06 Aug 2010 13:37:15 +0000
From: Eclipse CVS Genie <genie@xxxxxxxxxxx>
Subject: [ptp-cvs-commit] gwatson
org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util
ProtocolUtil.java
To: ptp-cvs-commit@xxxxxxxxxxx
Message-ID: <20100806133715.1932C162B78@xxxxxxxxxxxxxxxx>
Update of /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util
In directory node1:/tmp/cvs-serv155374/util/org/eclipse/ptp/proxy/util
Modified Files:
ProtocolUtil.java
Log Message:
Remove string table.
Add data types.
Index: ProtocolUtil.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util/ProtocolUtil.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** ProtocolUtil.java 4 Aug 2010 14:54:24 -0000 1.10
--- ProtocolUtil.java 6 Aug 2010 13:37:12 -0000 1.11
***************
*** 16,20 ****
--- 16,22 ----
import java.nio.CharBuffer;
import java.nio.charset.CharacterCodingException;
+ import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
+ import java.util.List;
import org.eclipse.ptp.proxy.packet.ProxyPacket;
***************
*** 22,43 ****
public class ProtocolUtil {
! public final static int HEXADECIMAL = 0;
! public final static int OCTAL = 1;
! public final static int BINARY = 2;
! public final static int DECIMAL = 3;
! public final static int RAW = 4;
! public final static int NATURAL = 5;
!
! public final static int FLOAT = 10;
! public final static int ADDRESS = 11;
! public final static int INSTRUCTION = 12;
! public final static int CHAR = 13;
! public final static int STRING = 14;
! public final static int UNSIGNED = 15;
!
! private final static int FLAG_NORMAL = 0x80000000;
! private final static int FLAG_NOSTORE = 0x40000000;
! private final static int LENGTH_MASK = 0x3fffffff;
! private final static int ID_MASK = 0x7fffffff;
/**
--- 24,51 ----
public class ProtocolUtil {
! /**
! * @since 5.0
! */
! public final static int TYPE_STRING_ATTR = 0;
! /**
! * @since 5.0
! */
! public final static int TYPE_INTEGER = 1;
! /**
! * @since 5.0
! */
! public final static int TYPE_BITSET = 2;
! /**
! * @since 5.0
! */
! public final static int TYPE_STRING = 3;
! /**
! * @since 5.0
! */
! public final static int TYPE_INTEGER_ATTR = 4;
! /**
! * @since 5.0
! */
! public final static int TYPE_BOOLEAN_ATTR = 5;
/**
***************
*** 47,50 ****
--- 55,59 ----
* @return BigInteger
*/
+ @Deprecated
public static BigInteger decodeAddress(String address) {
int index = 0;
***************
*** 90,127 ****
/**
- * Convert a proxy representation of an attribute into a Java String
- *
- * Attributes are key/value pairs of the form "key=value". They are encoded
- * into a pair of length/value pairs, with the first length/value pair being
- * the key of a key=value pair and the second length/value pair being the
- * value of a key=value pair or a stand-alone string's value.
- *
- * @param buf
- * buffer containing bytes to decode
- * @param decoder
- * charset decoder
- * @return attribute converted to Java String
- * @throws IOException
- * if decoding failed
- * @since 5.0
- */
- public static String decodeAttribute(ByteBuffer buf, CharsetDecoder decoder, StringTable stringTable) throws IOException {
- String result = ""; //$NON-NLS-1$
-
- String key = decodeString(buf, decoder, stringTable);
- if (key != null) {
- result = key;
- }
- String value = decodeString(buf, decoder, stringTable);
- if (value != null) {
- if (result.length() > 0) {
- result += "="; //$NON-NLS-1$
- }
- result += value;
- }
- return result;
- }
-
- /**
* Convert as sequence of hexadecimal values to a Java byte array.
*
--- 99,102 ----
***************
*** 129,132 ****
--- 104,108 ----
* @return byte array
*/
+ @Deprecated
public static byte[] decodeBytes(String str) {
int len = str.length() / 2;
***************
*** 143,174 ****
/**
! * Convert a proxy representation of a string to a String.
! *
! * In order to reduce message traffic, only the first occurrence of a string
! * is included in the packet. When a unique string is seen, it may be added
! * to a string table. Subsequent references to the same string will use the
! * index of the string in the string table, rather than the actual string.
! *
! * A string is represented as a length field followed by an optional value.
! * The length field is an unsigned 32 bit integer encoded as a varint. The
! * field is interpreted as follows:
! *
! * <pre>
! * +----------------------------+
! * Bit # | 31 | 30 | Remaining Bits |
! * +----------------------------+
! * Value | E | S | Depends on flags |
! * +----------------------------+
! *
! * E = 0
! * The value is omitted. Bits 30-0 = string table ID + 1
! * E = 1
! * The value is the actual string with bits 29-0 set to the length of
! * the string excluding any null termination.
! * E = 1, S = 1
! * Don't add the string to the string table.
! *
! * If all the bits are 0, the value is omitted. The string should be skipped.
! * </pre>
*
* @param buf
--- 119,127 ----
/**
! * Convert a proxy representation of a string to a String. A string is
! * represented by a length in varint format followed by the string
! * characters. If the characters are multibyte, then the length will reflect
! * this. If length is 0, then the string is null and should be skipped,
! * otherswise length = strlen(string) + 1;
*
* @param buf
***************
*** 182,228 ****
* @since 5.0
*/
! public static String decodeString(ByteBuffer buf, CharsetDecoder decoder, StringTable stringTable) throws IOException {
! String result = ""; //$NON-NLS-1$
VarInt strLen = new VarInt(buf);
if (!strLen.isValid()) {
throw new IOException(Messages.getString("ProtocolUtil.0")); //$NON-NLS-1$
}
! int flags = strLen.getValue();
! if (flags == 0) {
! return null;
! }
! if ((flags & FLAG_NORMAL) == FLAG_NORMAL) {
! /*
! * Normal string. Decode and insert into string table if required.
! */
! int len = flags & LENGTH_MASK;
!
! if (len > 0) {
! ByteBuffer strBuf = buf.slice();
! try {
! strBuf.limit(len);
! } catch (IllegalArgumentException e) {
! throw new IOException(e.getMessage());
! }
! try {
! CharBuffer chars = decoder.decode(strBuf);
! result = chars.toString();
! } catch (CharacterCodingException e) {
! throw new IOException(e.getMessage());
! }
! try {
! buf.position(buf.position() + len);
! } catch (IllegalArgumentException e) {
! throw new IOException(e.getMessage());
! }
}
! if ((flags & FLAG_NOSTORE) == 0) {
! stringTable.put(result);
}
- } else {
- /*
- * String table entry
- */
- result = stringTable.get((flags & ID_MASK) - 1);
}
return result;
--- 135,163 ----
* @since 5.0
*/
! public static String decodeString(ByteBuffer buf, CharsetDecoder decoder) throws IOException {
! String result = null;
VarInt strLen = new VarInt(buf);
if (!strLen.isValid()) {
throw new IOException(Messages.getString("ProtocolUtil.0")); //$NON-NLS-1$
}
! int len = strLen.getValue() - 1;
! if (len >= 0) {
! ByteBuffer strBuf = buf.slice();
! try {
! strBuf.limit(len);
! } catch (IllegalArgumentException e) {
! throw new IOException(e.getMessage());
}
! try {
! CharBuffer chars = decoder.decode(strBuf);
! result = chars.toString();
! } catch (CharacterCodingException e) {
! throw new IOException(e.getMessage());
! }
! try {
! buf.position(buf.position() + len);
! } catch (IllegalArgumentException e) {
! throw new IOException(e.getMessage());
}
}
return result;
***************
*** 236,239 ****
--- 171,175 ----
* @return proxy string converted to Java String
*/
+ @Deprecated
public static String decodeString(CharBuffer buf, int start) {
int end = start + ProxyPacket.PACKET_ARG_LEN_SIZE;
***************
*** 245,248 ****
--- 181,219 ----
/**
+ * Convert a proxy representation of a string attribute into a Java String.
+ * Assumes that the type byte as been removed from the buffer.
+ *
+ * Attributes are key/value pairs of the form "key=value". They are encoded
+ * into a pair of length/value pairs, with the first length/value pair being
+ * the key of a key=value pair and the second length/value pair being the
+ * value of a key=value pair or a stand-alone string's value.
+ *
+ * @param buf
+ * buffer containing bytes to decode
+ * @param decoder
+ * charset decoder
+ * @return attribute converted to Java String
+ * @throws IOException
+ * if decoding failed
+ * @since 5.0
+ */
+ public static String decodeStringAttributeType(ByteBuffer buf, CharsetDecoder decoder) throws IOException {
+ String result = ""; //$NON-NLS-1$
+
+ String key = decodeString(buf, decoder);
+ if (key != null) {
+ result = key;
+ }
+ String value = decodeString(buf, decoder);
+ if (value != null) {
+ if (result.length() > 0) {
+ result += "="; //$NON-NLS-1$
+ }
+ result += value;
+ }
+ return result;
+ }
+
+ /**
* Convert an integer to it's proxy representation
*
***************
*** 251,254 ****
--- 222,226 ----
* @return proxy representation
*/
+ @Deprecated
public static String encodeIntVal(int val, int len) {
char[] res = new char[len];
***************
*** 272,275 ****
--- 244,248 ----
* @return proxy representation
*/
+ @Deprecated
public static String encodeString(String str) {
int len;
***************
*** 285,287 ****
--- 258,291 ----
}
+ /**
+ * @since 5.0
+ */
+ public static void encodeStringAttributeType(List<ByteBuffer> bufs, String attribute, Charset charset) throws IOException {
+ String[] kv = attribute.split("="); //$NON-NLS-1$
+ bufs.add(ByteBuffer.allocate(1).put((byte) TYPE_STRING_ATTR));
+ encodeString(bufs, kv[0], charset);
+ if (kv.length == 1) {
+ bufs.add(new VarInt(0).getBytes());
+ } else {
+ encodeString(bufs, kv[1], charset);
+ }
+ }
+
+ /**
+ * Encode a string and place the encoded bytes in buffer.
+ *
+ * @param str
+ * @param charset
+ * @since 5.0
+ */
+ public static void encodeStringType(List<ByteBuffer> bufs, String str, Charset charset) {
+ bufs.add(ByteBuffer.allocate(1).put((byte) TYPE_STRING));
+ encodeString(bufs, str, charset);
+ }
+
+ private static void encodeString(List<ByteBuffer> bufs, String str, Charset charset) {
+ bufs.add(new VarInt(str.length()).getBytes());
+ bufs.add(ByteBuffer.wrap(str.getBytes(charset)));
+ }
+
}
------------------------------
Message: 2
Date: Fri, 06 Aug 2010 13:37:39 +0000
From: Eclipse CVS Genie <genie@xxxxxxxxxxx>
Subject: [ptp-cvs-commit] gwatson
org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util
StringTable.java
To: ptp-cvs-commit@xxxxxxxxxxx
Message-ID: <20100806133739.10403162B78@xxxxxxxxxxxxxxxx>
Update of /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util
In directory node1:/tmp/cvs-serv155485/util/org/eclipse/ptp/proxy/util
Modified Files:
StringTable.java
Log Message:
Fix index.
Index: StringTable.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util/StringTable.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** StringTable.java 2 Aug 2010 22:21:06 -0000 1.1
--- StringTable.java 6 Aug 2010 13:37:36 -0000 1.2
***************
*** 26,30 ****
public StringEntry(String str, int index) {
fEntry = str;
! fIndex = index;
}
--- 26,30 ----
public StringEntry(String str, int index) {
fEntry = str;
! fIndex = index + 1;
}
***************
*** 56,60 ****
/**
! * Lookup a string given it's index in the table
*
* @param index
--- 56,60 ----
/**
! * Look up a string given it's index in the table
*
* @param index
***************
*** 62,74 ****
* @return string at the given index position, or null if no entry exists
* @throws IndexOutOfBoundsException
! * if index < 0 or index >= size()
*/
public String get(int index) throws IndexOutOfBoundsException {
! StringEntry entry = fList.get(index);
return entry.getEntry();
}
/**
! * Lookup a string's index in the table
*
* @param string
--- 62,74 ----
* @return string at the given index position, or null if no entry exists
* @throws IndexOutOfBoundsException
! * if index < 1 or index > size()
*/
public String get(int index) throws IndexOutOfBoundsException {
! StringEntry entry = fList.get(index - 1);
return entry.getEntry();
}
/**
! * Look up a string's index in the table
*
* @param string
***************
*** 92,96 ****
* @param string
* string to insert
! * @return index of string in the table
*/
public int put(String str) {
--- 92,97 ----
* @param string
* string to insert
! * @return index of string in the table if the string already exists, or
! * -index if the string is inserted in the table for the first time
*/
public int put(String str) {
***************
*** 100,103 ****
--- 101,105 ----
fMap.put(str, entry);
fList.add(entry);
+ return -entry.getIndex();
}
return entry.getIndex();
------------------------------
Message: 3
Date: Fri, 06 Aug 2010 13:38:27 +0000
From: Eclipse CVS Genie <genie@xxxxxxxxxxx>
Subject: [ptp-cvs-commit] gwatson
org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util
VarInt.java
To: ptp-cvs-commit@xxxxxxxxxxx
Message-ID: <20100806133827.5111F162B78@xxxxxxxxxxxxxxxx>
Update of /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util
In directory node1:/tmp/cvs-serv155678/util/org/eclipse/ptp/proxy/util
Modified Files:
VarInt.java
Log Message:
Set buffer limit to actual length
Rewinde buffer before using
Index: VarInt.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.proxy.protocol/util/org/eclipse/ptp/proxy/util/VarInt.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** VarInt.java 2 Aug 2010 17:11:28 -0000 1.4
--- VarInt.java 6 Aug 2010 13:38:25 -0000 1.5
***************
*** 53,57 ****
public ByteBuffer getBytes() {
if (fBytes == null && fValid) {
! fBytes = ByteBuffer.allocate(5); // maximum size of varint enconding
int val = fValue;
while (val > 0) {
--- 53,57 ----
public ByteBuffer getBytes() {
if (fBytes == null && fValid) {
! fBytes = ByteBuffer.allocate(5); // maximum size
int val = fValue;
while (val > 0) {
***************
*** 62,68 ****
}
fBytes.put(b);
}
- fBytes.rewind();
}
return fBytes;
}
--- 62,70 ----
}
fBytes.put(b);
+ fBytes.limit(fBytes.position()); // set limit to the size of the
+ // buffer
}
}
+ fBytes.rewind();
return fBytes;
}
------------------------------
Message: 4
Date: Fri, 06 Aug 2010 14:09:03 +0000
From: Eclipse CVS Genie <genie@xxxxxxxxxxx>
Subject: [ptp-cvs-commit] rschulz
org.eclipse.ptp/tools/etfw/org.eclipse.ptp.etfw.feedback/src/org/eclipse/ptp/etfw/feedback/util
ViewActivator.java
To: ptp-cvs-commit@xxxxxxxxxxx
Message-ID: <20100806140903.1E7BD14BDE2@xxxxxxxxxxxxxxxx>
Update of /cvsroot/tools/org.eclipse.ptp/tools/etfw/org.eclipse.ptp.etfw.feedback/src/org/eclipse/ptp/etfw/feedback/util
In directory node1:/tmp/cvs-serv162790/src/org/eclipse/ptp/etfw/feedback/util
Modified Files:
ViewActivator.java
Log Message:
Fix API and unused imports
Index: ViewActivator.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.ptp/tools/etfw/org.eclipse.ptp.etfw.feedback/src/org/eclipse/ptp/etfw/feedback/util/ViewActivator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ViewActivator.java 5 Aug 2010 14:17:24 -0000 1.2
--- ViewActivator.java 6 Aug 2010 14:09:00 -0000 1.3
***************
*** 25,28 ****
--- 25,29 ----
*
* @author Beth Tibbitts
+ * @since 3.0
*/
public class ViewActivator
------------------------------
Message: 5
Date: Fri, 06 Aug 2010 14:09:03 +0000
From: Eclipse CVS Genie <genie@xxxxxxxxxxx>
Subject: [ptp-cvs-commit] rschulz
org.eclipse.ptp/tools/etfw/org.eclipse.ptp.etfw.feedback/src/org/eclipse/ptp/etfw/feedback/actions/handlers
ShowFeedbackHandler.java
To: ptp-cvs-commit@xxxxxxxxxxx
Message-ID: <20100806140903.4381716E3A2@xxxxxxxxxxxxxxxx>
Update of /cvsroot/tools/org.eclipse.ptp/tools/etfw/org.eclipse.ptp.etfw.feedback/src/org/eclipse/ptp/etfw/feedback/actions/handlers
In directory node1:/tmp/cvs-serv162790/src/org/eclipse/ptp/etfw/feedback/actions/handlers
Modified Files:
ShowFeedbackHandler.java
Log Message:
Fix API and unused imports
Index: ShowFeedbackHandler.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.ptp/tools/etfw/org.eclipse.ptp.etfw.feedback/src/org/eclipse/ptp/etfw/feedback/actions/handlers/ShowFeedbackHandler.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ShowFeedbackHandler.java 5 Aug 2010 14:17:24 -0000 1.4
--- ShowFeedbackHandler.java 6 Aug 2010 14:09:01 -0000 1.5
***************
*** 31,36 ****
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
- import org.eclipse.core.runtime.IExtensionPoint;
- import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
--- 31,34 ----
------------------------------
_______________________________________________
ptp-cvs-commit mailing list
ptp-cvs-commit@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-cvs-commit
End of ptp-cvs-commit Digest, Vol 63, Issue 32
**********************************************
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
--
ORNL/UT Center for Molecular Biophysics
cmb.ornl.gov865-241-1537, ORNL PO BOX 2008 MS6309
