--- a/jdk/src/share/classes/javax/sql/rowset/serial/SerialStruct.java Thu Jan 26 09:51:35 2012 +0100
+++ b/jdk/src/share/classes/javax/sql/rowset/serial/SerialStruct.java Thu Jan 26 19:41:35 2012 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
import javax.sql.*;
import java.io.*;
import java.math.*;
+import java.util.Arrays;
import java.util.Map;
import java.util.Vector;
@@ -174,7 +175,8 @@
* @throws SerialException if an error occurs
*/
public Object[] getAttributes() throws SerialException {
- return attribs;
+ Object[] val = this.attribs;
+ return (val == null) ? null : Arrays.copyOf(val, val.length);
}
/**
@@ -197,7 +199,8 @@
public Object[] getAttributes(Map<String,Class<?>> map)
throws SerialException
{
- return attribs;
+ Object[] val = this.attribs;
+ return (val == null) ? null : Arrays.copyOf(val, val.length);
}