@@ -174,6 +174,10 @@ protected void setStateInternal(byte[] state) {
174174 * </li>
175175 * </ol>
176176 *
177+ * <p>Note: It is not recommended to use this method from a constructor
178+ * as it can be overridden by subclasses possibly leading to unexpected behaviour.
179+ * Future versions may remove this method, or change it to static.
180+ *
177181 * @param state State. Must be allocated.
178182 * @param seed Seed. Cannot be null.
179183 */
@@ -185,7 +189,7 @@ protected void fillState(int[] state,
185189
186190 if (seedSize < stateSize ) {
187191 for (int i = seedSize ; i < stateSize ; i ++) {
188- state [i ] = (int ) scrambleWell (state [i - seed . length ], i );
192+ state [i ] = (int ) scrambleWell (state [i - seedSize ], i );
189193 }
190194 }
191195 }
@@ -205,6 +209,10 @@ protected void fillState(int[] state,
205209 * </li>
206210 * </ol>
207211 *
212+ * <p>Note: It is not recommended to use this method from a constructor
213+ * as it can be overridden by subclasses possibly leading to unexpected behaviour.
214+ * Future versions may remove this method, or change it to static.
215+ *
208216 * @param state State. Must be allocated.
209217 * @param seed Seed. Cannot be null.
210218 */
@@ -216,7 +224,7 @@ protected void fillState(long[] state,
216224
217225 if (seedSize < stateSize ) {
218226 for (int i = seedSize ; i < stateSize ; i ++) {
219- state [i ] = scrambleWell (state [i - seed . length ], i );
227+ state [i ] = scrambleWell (state [i - seedSize ], i );
220228 }
221229 }
222230 }
0 commit comments