1
1
/*
2
- * Copyright (c) 2003, 2021 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2003, 2022 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,6 @@ public final class MathContext implements Serializable {
58
58
/* ----- Constants ----- */
59
59
60
60
// defaults for constructors
61
- private static final int DEFAULT_DIGITS = 9 ;
62
61
private static final RoundingMode DEFAULT_ROUNDINGMODE = RoundingMode .HALF_UP ;
63
62
// Smallest values for digits (Maximum is Integer.MAX_VALUE)
64
63
private static final int MIN_DIGITS = 0 ;
@@ -140,7 +139,6 @@ public final class MathContext implements Serializable {
140
139
*/
141
140
public MathContext (int setPrecision ) {
142
141
this (setPrecision , DEFAULT_ROUNDINGMODE );
143
- return ;
144
142
}
145
143
146
144
/**
@@ -162,7 +160,6 @@ public MathContext(int setPrecision,
162
160
163
161
precision = setPrecision ;
164
162
roundingMode = setRoundingMode ;
165
- return ;
166
163
}
167
164
168
165
/**
@@ -181,7 +178,6 @@ public MathContext(int setPrecision,
181
178
* @throws NullPointerException if the argument is {@code null}
182
179
*/
183
180
public MathContext (String val ) {
184
- boolean bad = false ;
185
181
int setPrecision ;
186
182
if (val == null )
187
183
throw new NullPointerException ("null String" );
@@ -232,7 +228,6 @@ public int getPrecision() {
232
228
* @return a {@code RoundingMode} object which is the value of the
233
229
* {@code roundingMode} setting
234
230
*/
235
-
236
231
public RoundingMode getRoundingMode () {
237
232
return roundingMode ;
238
233
}
0 commit comments