/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 8013900
* @summary More warning compiling jaxp.
* This test only test one of the methods used to implement hashCode()
* in com.sun.org.apache.xerces.internal.impl.dv.xs.PrecisionDecimalDV$XPrecisionDecimal.
* Since that method is private the test unfortunately needs to use reflection
* to invoke the method.
* @run main XPrecisionDecimalToString
* @author Daniel Fuchs
*/
public class XPrecisionDecimalToString {
"com.sun.org.apache.xerces.internal.impl.dv.xs.PrecisionDecimalDV$XPrecisionDecimal";
// Invokes XPrecisionDecimal.canonicalToStringForHashCode through reflection,
// because the method is private...
//
// Construct a canonical String representation of this number
// for the purpose of deriving a hashCode value compliant with
// equals.
// The toString representation will be:
// NaN for NaN, INF for +infinity, -INF for -infinity, 0 for zero,
// and [1-9]\.[0-9]*[1-9]?(E[1-9][0-9]*)? for other numbers.
private static String canonicalToStringForHashCode(String ivalue, String fvalue, int sign, int pvalue) {
try {
method.setAccessible(true);
}
} catch (Exception x) {
}
try {
} catch(Exception x) {
}
}
/**
* @param args the command line arguments
*/
}
+ " => "+ canonical);
}
}
}