Unnecessary Utility Java Classes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unnecessary Utility Java Classes

Adrian Crum
I was poking around in the framework/base component and discovered there
are a few utility classes that aren't really necessary:

OutputStreamByteCount.java - used only in UtilObject.java to guess the
size of a Java object. Could be converted to a loop in UtilObject.java.

StringOutputStream.java - used only in SOAPEventHandler.java to output a
debug message. Could be converted to a SOAPEventHandler.java method.

UtilName.java - not used.

UtilParse.java - used only in ProductEvents.java. Could be converted to
a ProductEvents.java method.

Are there any objections to making those changes and removing the four
files?

-Adrian
Reply | Threaded
Open this post in threaded view
|

Re: Unnecessary Utility Java Classes

Malin Nicolas
Adrian Crum a écrit :

> I was poking around in the framework/base component and discovered
> there are a few utility classes that aren't really necessary:
>
> OutputStreamByteCount.java - used only in UtilObject.java to guess the
> size of a Java object. Could be converted to a loop in UtilObject.java.
>
> StringOutputStream.java - used only in SOAPEventHandler.java to output
> a debug message. Could be converted to a SOAPEventHandler.java method.
>
> UtilName.java - not used.
>
> UtilParse.java - used only in ProductEvents.java. Could be converted
> to a ProductEvents.java method.
>
> Are there any objections to making those changes and removing the four
> files?
For the Util class, I think it's dangerous to remove directly it because
some customer code can use then. I propose to pass it on deprecated in a
first time. For other class : +1 :)

Nicolas
>
> -Adrian
>

Reply | Threaded
Open this post in threaded view
|

Re: Unnecessary Utility Java Classes

Adrian Crum
You are correct. I should have been more specific about removing the
files sometime in the future.

-Adrian

Nicolas Malin wrote:

> Adrian Crum a écrit :
>> I was poking around in the framework/base component and discovered
>> there are a few utility classes that aren't really necessary:
>>
>> OutputStreamByteCount.java - used only in UtilObject.java to guess the
>> size of a Java object. Could be converted to a loop in UtilObject.java.
>>
>> StringOutputStream.java - used only in SOAPEventHandler.java to output
>> a debug message. Could be converted to a SOAPEventHandler.java method.
>>
>> UtilName.java - not used.
>>
>> UtilParse.java - used only in ProductEvents.java. Could be converted
>> to a ProductEvents.java method.
>>
>> Are there any objections to making those changes and removing the four
>> files?
> For the Util class, I think it's dangerous to remove directly it because
> some customer code can use then. I propose to pass it on deprecated in a
> first time. For other class : +1 :)
>
> Nicolas
>>
>> -Adrian
>>
>
>