Skip to content

Commit 4628de1

Browse files
committed
PDFBOX-5660: optimize, as suggested by Valery Bokov; closes #323
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1929767 13f79535-47bb-0310-9956-ffa450edef68
1 parent 0ffefe8 commit 4628de1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fontbox/src/main/java/org/apache/fontbox/util/autodetect/WindowsFontDirFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public List<File> find()
5151
LOG.debug("Couldn't get Windows font directories - ignoring", e);
5252
// should continue if this fails
5353
}
54-
String osName = System.getProperty("os.name");
5554
if (windir == null)
5655
{
5756
try
@@ -86,6 +85,7 @@ public List<File> find()
8685
}
8786
else
8887
{
88+
String osName = System.getProperty("os.name");
8989
String windowsDirName = osName.endsWith("NT") ? "WINNT" : "WINDOWS";
9090
// look for true type font folder
9191
for (char driveLetter = 'C'; driveLetter <= 'E'; driveLetter++)

0 commit comments

Comments
 (0)