Skip to content


Browse files Browse the repository at this point in the history
8253965: Delete the outdated java.awt.PeerFixer class
Reviewed-by: prr, pbansal
  • Loading branch information
mrserb committed Oct 9, 2020
1 parent ced46b1 commit 70be8c7
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions src/java.desktop/share/classes/java/awt/
Expand Up @@ -827,52 +827,3 @@ public AccessibleRole getAccessibleRole() {
} // class AccessibleAWTScrollPane


* In JDK 1.1.1, the pkg private class java.awt.PeerFixer was moved to
* become an inner class of ScrollPane, which broke serialization
* for ScrollPane objects using JDK 1.1.
* Instead of moving it back out here, which would break all JDK 1.1.x
* releases, we keep PeerFixer in both places. Because of the scoping rules,
* the PeerFixer that is used in ScrollPane will be the one that is the
* inner class. This pkg private PeerFixer class below will only be used
* if the Java 2 platform is used to deserialize ScrollPane objects that were serialized
* using JDK1.1
class PeerFixer implements AdjustmentListener, {
* serialVersionUID
private static final long serialVersionUID = 7051237413532574756L;

PeerFixer(ScrollPane scroller) {
this.scroller = scroller;

* Invoked when the value of the adjustable has changed.
public void adjustmentValueChanged(AdjustmentEvent e) {
Adjustable adj = e.getAdjustable();
int value = e.getValue();
ScrollPanePeer peer = (ScrollPanePeer) scroller.peer;
if (peer != null) {
peer.setValue(adj, value);

Component c = scroller.getComponent(0);
switch(adj.getOrientation()) {
case Adjustable.VERTICAL:
c.move(c.getLocation().x, -(value));
case Adjustable.HORIZONTAL:
c.move(-(value), c.getLocation().y);
throw new IllegalArgumentException("Illegal adjustable orientation");

private ScrollPane scroller;

1 comment on commit 70be8c7

Copy link

@bridgekeeper bridgekeeper bot commented on 70be8c7 Oct 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.