anathema/anathema — Issue #3: Allow non-Latin-1 characters in character names
Author: UrsKR
Created: 2011-11-19 17:05:02+00:00
State: open

@kelemen reports in Issue #1:
The bug manifest itself only if you use such characters in the name of the
character.

I have tested this bug and it is present in Anathema 2.0.1 (official).
However in the original version it can be triggered when non latin1 (the
chracters you have tried were latin1 characters) character is used as name
for the character. If the encoding is changed to utf-8 the bug will trigger
if non ascii7 character is used in the name.

This is the exception @UrsKR reproduced with the character name "さくら":
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at net.sf.anathema.character.generic.framework.resources.CharacterUI.getSmallTypeIcon(CharacterUI.java:43)
at net.sf.anathema.character.impl.module.CharacterTypeUi.getIcon(CharacterTypeUi.java:41)
at net.disy.commons.swing.ui.ObjectUiListCellRenderer.getListCellRendererComponent(ObjectUiListCellRenderer.java:32)
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1361)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1311)
at javax.swing.plaf.basic.BasicListUI.getPreferredSize(BasicListUI.java:578)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1660)
at javax.swing.JList.getPreferredScrollableViewportSize(JList.java:2449)
at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:92)
at java.awt.Container.preferredSize(Container.java:1788)
at java.awt.Container.getPreferredSize(Container.java:1773)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
at javax.swing.ScrollPaneLayout.preferredLayoutSize(ScrollPaneLayout.java:492)
at java.awt.Container.preferredSize(Container.java:1788)
at java.awt.Container.getPreferredSize(Container.java:1773)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
at net.disy.commons.swing.layout.grid.GridCell.(GridCell.java:33)
at net.disy.commons.swing.layout.grid.GridBuilder.add(GridBuilder.java:44)
at net.disy.commons.swing.layout.grid.GridDialogLayout.createGrid(GridDialogLayout.java:350)
at net.disy.commons.swing.layout.grid.GridDialogLayout.getLayoutSize(GridDialogLayout.java:333)
at net.disy.commons.swing.layout.grid.GridDialogLayout.preferredLayoutSize(GridDialogLayout.java:323)
at java.awt.Container.preferredSize(Container.java:1788)
at java.awt.Container.getPreferredSize(Container.java:1773)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
at java.awt.GridLayout.preferredLayoutSize(GridLayout.java:341)
at java.awt.Container.preferredSize(Container.java:1788)
at java.awt.Container.getPreferredSize(Container.java:1773)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1662)
at net.disy.commons.swing.dialog.core.AbstractDialog.updateSize(AbstractDialog.java:145)
at net.disy.commons.swing.dialog.core.AbstractDialog.setMessage(AbstractDialog.java:167)
at net.disy.commons.swing.dialog.wizard.WizardDialog.updateMessage(WizardDialog.java:253)
at net.disy.commons.swing.dialog.wizard.WizardDialog.showPage(WizardDialog.java:218)
at net.disy.commons.swing.dialog.wizard.WizardDialog.getConfiguredDialog(WizardDialog.java:276)
at net.sf.anathema.framework.presenter.action.AbstractItemAction.showDialog(AbstractItemAction.java:30)
at net.sf.anathema.framework.presenter.action.ItemTypeLoadAction.execute(ItemTypeLoadAction.java:70)
at net.disy.commons.swing.action.SmartAction.actionPerformed(SmartAction.java:107)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6504)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6269)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4860)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4686)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2713)
at java.awt.Component.dispatchEvent(Component.java:4686)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
at java.awt.EventQueue.access$000(EventQueue.java:101)
at java.awt.EventQueue$3.run(EventQueue.java:666)
at java.awt.EventQueue$3.run(EventQueue.java:664)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:680)
at java.awt.EventQueue$4.run(EventQueue.java:678)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)