Skip to content

Commit 4e0216d

Browse files
committed
repair merge, must be clean as it was before
1 parent 6f55625 commit 4e0216d

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

src/java.desktop/share/classes/javax/swing/JViewport.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -603,15 +603,11 @@ public final Insets getInsets(Insets insets) {
603603

604604

605605
private Graphics getBackingStoreGraphics(Graphics g) {
606-
if (!SwingUtilities2.isPrinting(g)) {
607-
Graphics bsg = backingStoreImage.getGraphics();
608-
bsg.setColor(g.getColor());
609-
bsg.setFont(g.getFont());
610-
bsg.setClip(g.getClipBounds());
611-
return bsg;
612-
} else {
613-
return g;
614-
}
606+
Graphics bsg = backingStoreImage.getGraphics();
607+
bsg.setColor(g.getColor());
608+
bsg.setFont(g.getFont());
609+
bsg.setClip(g.getClipBounds());
610+
return bsg;
615611
}
616612

617613

src/java.desktop/share/classes/sun/print/PathGraphics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

src/java.desktop/share/classes/sun/swing/SwingUtilities2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -1317,7 +1317,7 @@ public int hashCode() {
13171317
* returns true if the Graphics is print Graphics
13181318
* false otherwise
13191319
*/
1320-
public static boolean isPrinting(Graphics g) {
1320+
static boolean isPrinting(Graphics g) {
13211321
return (g instanceof PrinterGraphics || g instanceof PrintGraphics);
13221322
}
13231323

0 commit comments

Comments
 (0)