[izpack-users] NullPointerException due to missing pack ID
Tim Wood
T.Wood at teamphone.com
Mon Apr 2 17:39:44 CEST 2007
Hi,
If I do not specify pack ids, when I select a pack in the packs panel
the dependencies of the pack are not displayed and an NPE is thrown.
I think this is due to the code in PacksPanelBase.java in the method
getI18NPackName(Pack); I think the check in the or statement is the
wrong way around:
if ("".equals(packName) || key.equals(packName) || pack.id ==
null)
{
packName = pack.name;
}
Should probably instead be:
if ("".equals(packName) || key == null || key.equals(packName))
{
packName = pack.name;
}
IZPack version: 3.10.1
Specifying Pack ids also works around this issue. The stack trace I get
is:
Exception in thread "AWT-EventQueue-0" java.lang.
at
com.izforge.izpack.panels.PacksPanelBase.getI18NPackName(PacksPanelBase.
java:364)
at
com.izforge.izpack.panels.PacksPanelBase.valueChanged(PacksPanelBase.jav
a:313)
at
javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at
javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at
javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown
Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown
Source)
at
javax.swing.DefaultListSelectionModel.setSelectionInterval(Unknown
Source)
at javax.swing.JTable.changeSelectionModel(Unknown Source)
at javax.swing.JTable.changeSelection(Unknown Source)
at
javax.swing.plaf.basic.BasicTableUI$Handler.makeSelectionChange(Unknown
Source)
at
javax.swing.plaf.basic.BasicTableUI$Handler.adjustFocusAndSelection(Unkn
own Source)
at
javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown
Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown
Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
com.izforge.izpack.panels.PacksPanelBase.getI18NPackName(PacksPanelBase.
java:364)
at
com.izforge.izpack.panels.PacksPanelBase.valueChanged(PacksPanelBase.jav
a:313)
Cheers,
Tim
*****************************************************************
Teamphone Ltd
Registered in England and Wales.
Company Number 01403177. VAT Number GB 645 5327 31
Registered office: 25-27 Shaftesbury Avenue, London, W1D 7EQ
More information about the izpack-users
mailing list