Project

Profile

Help

Bug #4558

closed

NullPointerException reloading reflexive extension function from SEF file

Added by Michael Kay almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Saxon extensions
Sprint/Milestone:
-
Start date:
2020-05-19
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10
Fix Committed on Branch:
10
Fixed in Maintenance Release:
Platforms:

Description

java.lang.NullPointerException
       at com.saxonica.config.JavaExtensionLibrary.getConversionPreference(JavaExtensionLibrary.java:701)
       at com.saxonica.config.JavaExtensionLibrary.getConversionPreferences(JavaExtensionLibrary.java:634)
       at com.saxonica.config.JavaExtensionLibrary.getBestFit(JavaExtensionLibrary.java:511)
       at com.saxonica.config.JavaExtensionLibrary.access$000(JavaExtensionLibrary.java:44)
       at com.saxonica.config.JavaExtensionLibrary$UnresolvedExtensionFunctionCall.resolve(JavaExtensionLibrary.java:1160)
       at com.saxonica.trans.PackageLoaderPE.lambda$static$8(PackageLoaderPE.java:178)
       at net.sf.saxon.trans.PackageLoaderHE.loadExpression(PackageLoaderHE.java:1075)

reported by email to support@ on 16 May 2020

Actions #1

Updated by Michael Kay almost 4 years ago

Problem reproduced. It arises because the call on Q{java:java.text.SimpleDateFormat}format($date) is ambiguous and needs to be resolved using type information, and the type information has not been reconstructed in the rebuilt expression tree.

Actions #2

Updated by Michael Kay almost 4 years ago

The SEF file has the call as

<javaCall name='Q{java:java.text.SimpleDateFormat}format' arg0type='1X' arg1type='1X'>

where 1X denotes simply "external Java Object". The importer is expecting additional information here relating to the Java class.

I have fixed the problem by changing both the export and import logic to enable the types to be reconstructed.

Actions #3

Updated by Michael Kay almost 4 years ago

  • Status changed from New to Resolved
  • Fix Committed on Branch 10 added

Extended both the import and export logic in AlphaCode.java.

Actions #4

Updated by O'Neil Delpratt over 3 years ago

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

Bug fix applied in the Saxon 10.2 maintenance release.

Actions #5

Updated by O'Neil Delpratt over 3 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF