Modify the given Array
class to that, when the logging level is FINER
, you log the method entries and returns of the get
and set
methods. Hint: entering
, exiting
.
Also log all index and enumeration errors as SEVERE
methods with throwing
before throwing an IndexOutOfBoundsException
or NoSuchElementException
. In this exercise, the Array
class can store arbitrary objects, so you don't need to compare against an element class.
Finally, log an INFO
message whenever the internal array is relocated. The message should be this + " now has length " + elements.length
.
Use the edu.sjsu.cs
logger.