Skip to content

Commit

Permalink
[core] Handle quotes correctly in designer.bat and other *.bat files
Browse files Browse the repository at this point in the history
Fixes #3328
  • Loading branch information
adangel committed Jan 13, 2022
1 parent 7173f65 commit 308173a
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
2 changes: 2 additions & 0 deletions docs/pages/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ This is a {{ site.pmd.release_type }} release.

### Fixed Issues

* core
* [#3328](https://github.com/pmd/pmd/issues/3328): \[core] designer.bat errors when JAVAFX_HOME contains spaces
* java-bestpractices
* [#3209](https://github.com/pmd/pmd/issues/3209): \[java] UnusedPrivateMethod false positive with static method and cast expression
* [#3468](https://github.com/pmd/pmd/issues/3468): \[java] UnusedPrivateMethod false positive when outer class calls private static method on inner class
Expand Down
4 changes: 2 additions & 2 deletions pmd-dist/src/main/resources/scripts/ast-dump.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
set TOPDIR=%~dp0..
set TOPDIR="%~dp0.."
set OPTS=
set MAIN_CLASS=net.sourceforge.pmd.util.treeexport.TreeExportCli

java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
java %PMD_JAVA_OPTS% -classpath %TOPDIR%\lib\* %OPTS% %MAIN_CLASS% %*
4 changes: 2 additions & 2 deletions pmd-dist/src/main/resources/scripts/bgastviewer.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
set TOPDIR=%~dp0..
set TOPDIR="%~dp0.."
set OPTS=
set MAIN_CLASS=net.sourceforge.pmd.util.viewer.Viewer

java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
java %PMD_JAVA_OPTS% -classpath %TOPDIR%\lib\* %OPTS% %MAIN_CLASS% %*
4 changes: 2 additions & 2 deletions pmd-dist/src/main/resources/scripts/cpd.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
set TOPDIR=%~dp0..
set TOPDIR="%~dp0.."
set OPTS=
set MAIN_CLASS=net.sourceforge.pmd.cpd.CPD

java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
java %PMD_JAVA_OPTS% -classpath %TOPDIR%\lib\* %OPTS% %MAIN_CLASS% %*
4 changes: 2 additions & 2 deletions pmd-dist/src/main/resources/scripts/cpdgui.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
set TOPDIR=%~dp0..
set TOPDIR="%~dp0.."
set OPTS=
set MAIN_CLASS=net.sourceforge.pmd.cpd.GUI

java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
java %PMD_JAVA_OPTS% -classpath %TOPDIR%\lib\* %OPTS% %MAIN_CLASS% %*
8 changes: 4 additions & 4 deletions pmd-dist/src/main/resources/scripts/designer.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
set TOPDIR=%~dp0..
set TOPDIR="%~dp0.."
set OPTS=
set MAIN_CLASS=net.sourceforge.pmd.util.fxdesigner.DesignerStarter

Expand Down Expand Up @@ -42,10 +42,10 @@ if %_needjfxlib% EQU 1 (
pause
exit
)
set "classpath=%TOPDIR%\lib\*;%JAVAFX_HOME%\lib\*"
set classpath=%TOPDIR%\lib\*;%JAVAFX_HOME%\lib\*
) else (
set "classpath=%TOPDIR%\lib\*"
set classpath=%TOPDIR%\lib\*
)


java %PMD_JAVA_OPTS% %jreopts% -classpath "%classpath%" %OPTS% %MAIN_CLASS% %*
java %PMD_JAVA_OPTS% %jreopts% -classpath %classpath% %OPTS% %MAIN_CLASS% %*
4 changes: 2 additions & 2 deletions pmd-dist/src/main/resources/scripts/designerold.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
set TOPDIR=%~dp0..
set TOPDIR="%~dp0.."
set OPTS=
set MAIN_CLASS=net.sourceforge.pmd.util.designer.Designer

java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
java %PMD_JAVA_OPTS% -classpath %TOPDIR%\lib\* %OPTS% %MAIN_CLASS% %*
4 changes: 2 additions & 2 deletions pmd-dist/src/main/resources/scripts/pmd.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
set TOPDIR=%~dp0..
set TOPDIR="%~dp0.."
set OPTS=
set MAIN_CLASS=net.sourceforge.pmd.PMD

java %PMD_JAVA_OPTS% -classpath "%TOPDIR%\lib\*" %OPTS% %MAIN_CLASS% %*
java %PMD_JAVA_OPTS% -classpath %TOPDIR%\lib\* %OPTS% %MAIN_CLASS% %*

0 comments on commit 308173a

Please sign in to comment.