/[classpath]/classpath/gnu/classpath/jdwp/util/Value.java
ViewVC logotype

Diff of /classpath/gnu/classpath/jdwp/util/Value.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.1 by gnu_andrew, Tue Aug 2 20:12:08 2005 UTC revision 1.1.2.2 by gnu_andrew, Tue Aug 16 16:22:36 2005 UTC
# Line 43  import gnu.classpath.jdwp.JdwpConstants; Line 43  import gnu.classpath.jdwp.JdwpConstants;
43  import gnu.classpath.jdwp.exception.InvalidFieldException;  import gnu.classpath.jdwp.exception.InvalidFieldException;
44  import gnu.classpath.jdwp.exception.JdwpException;  import gnu.classpath.jdwp.exception.JdwpException;
45  import gnu.classpath.jdwp.exception.JdwpInternalErrorException;  import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
46    import gnu.classpath.jdwp.exception.NotImplementedException;
47  import gnu.classpath.jdwp.id.ObjectId;  import gnu.classpath.jdwp.id.ObjectId;
48    
49  import java.io.DataOutputStream;  import java.io.DataOutputStream;
# Line 65  public class Value Line 66  public class Value
66     * @throws InvalidFieldException     * @throws InvalidFieldException
67     */       */  
68    public static void writeUntaggedValue(DataOutputStream os, Object obj)    public static void writeUntaggedValue(DataOutputStream os, Object obj)
69      throws InvalidFieldException, IOException      throws JdwpException, IOException
70    {    {
71      writeValue(os, obj, false);      writeValue(os, obj, false);
72    }    }
# Line 79  public class Value Line 80  public class Value
80     * @throws InvalidFieldException     * @throws InvalidFieldException
81     */     */
82    public static void writeTaggedValue(DataOutputStream os, Object obj)    public static void writeTaggedValue(DataOutputStream os, Object obj)
83      throws InvalidFieldException, IOException      throws JdwpException, IOException
84    {    {
85      writeValue(os, obj, true);      writeValue(os, obj, true);
86    }    }
# Line 96  public class Value Line 97  public class Value
97     */     */
98    private static void writeValue(DataOutputStream os, Object obj,    private static void writeValue(DataOutputStream os, Object obj,
99                                  boolean tagged)                                  boolean tagged)
100      throws IOException, InvalidFieldException      throws IOException, JdwpException
101    {    {
102      Class clazz = obj.getClass();      Class clazz = obj.getClass();
103      if (clazz.isPrimitive())      if (clazz.isPrimitive())
# Line 156  public class Value Line 157  public class Value
157            }            }
158          else          else
159            { // This shouldn't be possible            { // This shouldn't be possible
160              throw new InvalidFieldException("Field has invalid primitive!");              throw new JdwpInternalErrorException(
161                  "Field has invalid primitive!");
162            }            }
163        }        }
164      else      else
# Line 235  public class Value Line 237  public class Value
237            return new byte[0];            return new byte[0];
238          else          else
239            { // This shouldn't be possible            { // This shouldn't be possible
240              throw new InvalidFieldException("Field has invalid primitive!");              throw new JdwpInternalErrorException(
241                  "Field has invalid primitive!");
242            }            }
243        }        }
244      else      else
# Line 291  public class Value Line 294  public class Value
294          ObjectId oid = Jdwp.getIdManager().readId(bb);          ObjectId oid = Jdwp.getIdManager().readId(bb);
295          return oid.getObject();          return oid.getObject();
296        default:        default:
297          throw new JdwpInternalErrorException("Could not find TAG:" + tag);          throw new NotImplementedException("Tag " + tag
298                                              + " is not implemented.");
299        }        }
300    }    }
301  }  }

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26