JDK-8008712 : Noisy warnings from javax.print.attribute.standard.*
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2013-02-22
  • Updated: 2013-02-25
  • Resolved: 2013-02-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Duplicate :  
Description
I've submitted this to client-libs/2d as there doesn't seem to be an obvious place for javax.print issues.

The javac compiler was changed recent to omit warnings when when hashCode or equals is overridden but not both. This has resulted in a lot of new warnings in the new build and makes it really hard to see real errors when re-building.

Here's what we get for javax.print.attribute.standard, it would really nice to get these cleaned quickly.

warning: [overrides] Class javax.print.attribute.standard.Destination
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.DocumentName
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.PrinterMakeAndModel
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.RequestingUserName
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobName
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.PrinterResolution
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobMediaSheetsCompleted
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobMediaSheetsSupported
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.PrinterMoreInfo
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.PrinterURI
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.DateTimeAtProcessing
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.PrinterMessageFromOperator
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.DateTimeAtCreation
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobImpressionsCompleted
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.CopiesSupported
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobHoldUntil
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.NumberUpSupported
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobImpressionsSupported
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobImpressions
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobPrioritySupported
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.NumberOfInterveningJobs
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.PagesPerMinute
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobPriority
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.DateTimeAtCompleted
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.QueuedJobCount
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.NumberUp
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobKOctets
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.PrinterMoreInfoManufacturer
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.JobMessageFromOperator
  overrides method equals but does not overrides method hashCode from Object
warning: [overrides] Class javax.print.attribute.standard.PrinterInfo
  overrides method equals but does not overrides method hashCode from Object
Comments
javac is incorrect. Object.hashCode() is over-ridden for all the ones I've looked at. All of these classes have an intermediate class between themselves and Object and it implements hashCode() appropriately for the type.
22-02-2013