Project

Profile

Help

Bug #5694

closed

Using -export without a filename causes an NPE

Added by Norm Tovey-Walsh over 1 year ago. Updated about 1 year ago.

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

100%

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 over 1 year 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 over 1 year ago

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

Actions #3

Updated by Michael Kay over 1 year 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
Actions #4

Updated by Community Admin over 1 year ago

  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 12.0 added

Bug issue fix applied in the Saxon 12.0 Major Release. Leaving this bug marked as Resolved until fix applied

Actions #5

Updated by O'Neil Delpratt about 1 year ago

  • Fixed in Maintenance Release 11.5 added

Bug fix applied in the Saxon 11.5 maintenance release.

Actions #6

Updated by O'Neil Delpratt about 1 year ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 10.9 added

Bug fix applied in the Saxon 10.9 maintenance release.

Please register to edit this issue

Also available in: Atom PDF