Anomalie #1862

java.lang.NullPointerException: charsetName when using custom app.name

Added by Éric Chatellier over 1 year ago. Updated about 1 year ago.

Status:RésoluStart date:12/22/2011
Priority:NormalDue date:
Assignee:Tony Chemit% Done:

100%

Category:nuiton-utilsSpent time:-
Target version:2.4.8

Description

This exception occurs when ApplicationConfig is used with a custom app.name option.

java.lang.NullPointerException: charsetName
java.io.InputStreamReader.(InputStreamReader.java:82)
org.nuiton.util.ApplicationConfig.loadResource(ApplicationConfig.java:1821)
org.nuiton.util.ApplicationConfig.parse(ApplicationConfig.java:1687)

Associated revisions

Revision 2337
Added by Tony Chemit about 1 year ago

fixes #1862: java.lang.NullPointerException: charsetName when using custom app.name

History

#1 Updated by Brendan Le Ny over 1 year ago

  • Target version set to 2.4.2

Same thing in Wao.

I needed to replace

ApplicationConfig conf = new ApplicationConfig();
conf.setAppName(APP_NAME);
conf.setConfigFileName(DEFAULT_FILENAME);
conf.parse(new String[]{});

by

ApplicationConfig conf = new ApplicationConfig();
conf.setAppName(APP_NAME);
conf.setEncoding("UTF-8");
conf.setConfigFileName(DEFAULT_FILENAME);
conf.parse(new String[]{});

setEncoding() must be called after setAppName or it doesn't solve the issue.

#2 Updated by Éric Chatellier over 1 year ago

  • Target version changed from 2.4.2 to 2.4.3

#3 Updated by Maven Release over 1 year ago

  • Target version changed from 2.4.3 to 2.4.4

#4 Updated by Brendan Le Ny over 1 year ago

  • Target version changed from 2.4.4 to 2.4.5

#5 Updated by Maven Release about 1 year ago

  • Target version changed from 2.4.5 to 2.4.6

#6 Updated by Tony Chemit about 1 year ago

  • Target version deleted (2.4.6)

#7 Updated by Tony Chemit about 1 year ago

  • Status changed from Nouveau to Assigné
  • Assignee set to Tony Chemit
  • Target version set to 2.4.8

#8 Updated by Tony Chemit about 1 year ago

  • Status changed from Assigné to Résolu
  • % Done changed from 0 to 100

Appliqué par commit r2337.

Also available in: Atom PDF