-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Java update from 21.0.4 to 21.0.5 including different depenndencies (#…
…7221) * Upgraded Java from 21.0.4 to 21.0.4 Upgraded CheckStyle from 10.18.1 to 10.20.1 Upgraded pmd from 7.6.0 to 7.7.0 Corrected pmd error in ClassLevelTableModel.java * Changed few Java files to meet pmd recommendations. Updated ruleset.xml, renamed deprecated rules. * Correct the targetPlatform in build.gradle from windows-x64 to win-x64. Signed-off-by: Vest <[email protected]> * Corrected the "targetPlaform" naming back from "win" to "windows". Removed two semicolons. Signed-off-by: Vest <[email protected]> * Removed redundant spaces Signed-off-by: Vest <[email protected]> --------- Signed-off-by: Vest <[email protected]>
- Loading branch information
Showing
6 changed files
with
55 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
/* | ||
* Copyright (c) 2009 Tom Parker <[email protected]> | ||
* | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 2.1 of the License, or (at your option) | ||
* any later version. | ||
* | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
* | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this library; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA | ||
|
@@ -22,9 +22,13 @@ | |
import java.awt.Dimension; | ||
import java.awt.GridLayout; | ||
import java.awt.Insets; | ||
import java.util.concurrent.locks.Lock; | ||
import java.util.concurrent.locks.ReentrantLock; | ||
|
||
public class UnstretchingGridLayout extends GridLayout | ||
{ | ||
private transient Lock instanceLock = new ReentrantLock(); | ||
|
||
public UnstretchingGridLayout(int arg0, int arg1) | ||
{ | ||
super(arg0, arg1); | ||
|
@@ -33,8 +37,10 @@ public UnstretchingGridLayout(int arg0, int arg1) | |
@Override | ||
public void layoutContainer(Container parent) | ||
{ | ||
synchronized (parent.getTreeLock()) | ||
try | ||
{ | ||
instanceLock.lock(); | ||
|
||
int componentCount = parent.getComponentCount(); | ||
if (componentCount == 0) | ||
{ | ||
|
@@ -106,6 +112,9 @@ public void layoutContainer(Container parent) | |
} | ||
yLoc += rowHeight[row] + yGutter; | ||
} | ||
} finally | ||
{ | ||
instanceLock.unlock(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
/* | ||
* Copyright 2010 Connor Petty <[email protected]> | ||
* | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
* | ||
* | ||
*/ | ||
package pcgen.gui2.filter; | ||
|
||
|
@@ -30,6 +30,8 @@ | |
import java.awt.event.MouseEvent; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.concurrent.locks.Lock; | ||
import java.util.concurrent.locks.ReentrantLock; | ||
|
||
import javax.swing.JButton; | ||
import javax.swing.JPanel; | ||
|
@@ -211,6 +213,7 @@ public boolean isOpen() | |
*/ | ||
private static class FilterLayout extends FlowLayout | ||
{ | ||
private transient Lock instanceLock = new ReentrantLock(); | ||
|
||
public FilterLayout() | ||
{ | ||
|
@@ -220,8 +223,10 @@ public FilterLayout() | |
@Override | ||
public void layoutContainer(Container target) | ||
{ | ||
synchronized (target.getTreeLock()) | ||
try | ||
{ | ||
instanceLock.lock(); | ||
|
||
Insets insets = target.getInsets(); | ||
int maxwidth = target.getWidth() - (insets.left + insets.right + getHgap() * 2); | ||
int nmembers = target.getComponentCount(); | ||
|
@@ -272,6 +277,9 @@ public void layoutContainer(Container target) | |
} | ||
layoutComponents(target, insets.left + getHgap(), y, maxwidth, rowh, xChildren, yChildren, start, | ||
nmembers, ltr); | ||
} finally | ||
{ | ||
instanceLock.unlock(); | ||
} | ||
} | ||
|
||
|
@@ -300,8 +308,10 @@ private void layoutComponents(Container target, int xOffset, int yOffset, int ma | |
@Override | ||
public Dimension preferredLayoutSize(Container target) | ||
{ | ||
synchronized (target.getTreeLock()) | ||
try | ||
{ | ||
instanceLock.lock(); | ||
|
||
Dimension dim = new Dimension(0, 0); | ||
int nmembers = target.getComponentCount(); | ||
|
||
|
@@ -340,14 +350,19 @@ public Dimension preferredLayoutSize(Container target) | |
dim.width += insets.left + insets.right + getHgap() * 2; | ||
dim.height += insets.top + insets.bottom + getVgap() * 2; | ||
return dim; | ||
} finally | ||
{ | ||
instanceLock.unlock(); | ||
} | ||
} | ||
|
||
@Override | ||
public Dimension minimumLayoutSize(Container target) | ||
{ | ||
synchronized (target.getTreeLock()) | ||
try | ||
{ | ||
instanceLock.lock(); | ||
|
||
Dimension dim = new Dimension(0, 0); | ||
int nmembers = target.getComponentCount(); | ||
|
||
|
@@ -384,9 +399,10 @@ public Dimension minimumLayoutSize(Container target) | |
dim.width += insets.left + insets.right + getHgap() * 2; | ||
dim.height += insets.top + insets.bottom + getVgap() * 2; | ||
return dim; | ||
} finally | ||
{ | ||
instanceLock.unlock(); | ||
} | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters