Project

Profile

Help

Bug #5694

closed

Using -export without a filename causes an NPE

Added by Norm Tovey-Walsh 7 days ago. Updated 4 days ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Command Line
Sprint/Milestone:
-
Start date:
2022-09-23
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
10, 11, trunk
Fix Committed on Branch:
10, 11, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

Hardly a serious problem, but...

$ saxon -xsl:src/main/xsl/dashboard.xsl -export -nogo -target:JS
----------------------------------------
java.lang.NullPointerException
	at java.base/java.io.File.<init>(File.java:278)
	at net.sf.saxon.Transform.doTransform(Transform.java:755)
	at net.sf.saxon.Transform.main(Transform.java:81)
Fatal error during transformation: java.lang.NullPointerException:  (no message)
Actions #1

Updated by Michael Kay 4 days ago

This can be fixed by changing the relevant entry in Transform.setPermittedOptions() to

options.addRecognizedOption("export", CommandLineOptions.TYPE_FILENAME | CommandLineOptions.VALUE_REQUIRED,
                                    "Display compiled expression tree and optimization decisions for exportation");

It's worth reviewing the list to see if any other options should be similarly marked.

Actions #2

Updated by Michael Kay 4 days ago

I am adding the VALUE_REQUIRED flag to export, scmin, Tout, and TP.

Actions #3

Updated by Michael Kay 4 days ago

  • Category set to Command Line
  • Status changed from New to Resolved
  • Assignee set to Michael Kay
  • Applies to branch 10, 11, trunk added
  • Fix Committed on Branch 10, 11, trunk added
  • Platforms .NET, Java added

Please register to edit this issue

Also available in: Atom PDF