Hi to all,
I'm just returned, et voilĂ  some other small things to fix :-) ...

ApplicationContext.java:381 Method
org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(Graphics)
uses the nextDouble method of Random to generate a random integer;
using nextInt is more efficient
ApplicationContext.java:382 Method
org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(Graphics)
uses the nextDouble method of Random to generate a random integer;
using nextInt is more efficient

=> I'm already doing the patch, I'll post here the code for this
before commit ...


DesktopApplicationContext.java:270 Incorrect lazy initialization and
update of static field
org.apache.pivot.wtk.DesktopApplicationContext.applicationContext

Description:
This method contains an unsynchronized lazy initialization of a static
field. After the field is set, the object stored into that location is
further accessed. The setting of the field is visible to other threads
as soon as it is set. If the further accesses in the method that set
the field serve to initialize the object, then you have a very serious
multithreading bug, unless something else prevents any other thread
from accessing the stored object until it is fully initialized.

=> this is related to the applicationContext variable ... should we
synchronize its access ?


DesktopApplicationContext.java:343
org.apache.pivot.wtk.DesktopApplicationContext.main(String[]) might
ignore java.lang.Exception
=> should we write a message in System.err in this case, like "Web
Start not available", and "User Home not available" ?


FilteredList.java:475 Nullcheck of FilteredList.view at line 480 of
value previously dereferenced
=> view is already used in the line 475, so a check of view != null is
not necessary, or should be done before line 475 ...


MapListTest.java:146 Should
org.apache.pivot.collections.test.MapListTest$TestMapListListener be a
_static_ inner class?
MapListTest.java:160 Should
org.apache.pivot.collections.test.MapListTest$TestComparator be a
_static_ inner class?


HashSet.java:106 Call to unsupported method
org.apache.pivot.collections.HashMap.setComparator(Comparator)
HashMapTest.java:133 Call to unsupported method
org.apache.pivot.collections.HashMap.setComparator(Comparator)

HashMapTest.java:125 Call to unsupported method new
org.apache.pivot.collections.HashMap(Comparator)
=> is it wanted (partial implementation at the moment), or a mistake ?


ArrayList.java:363 org.apache.pivot.wtk.TreeView$BranchHandler doesn't
override org.apache.pivot.collections.ArrayList.equals(Object)
=> Todd should tell me something on this ...



And last, two bugs from the High Priority, we have already discussed
some time ago:

TableViewDateCellRenderer.java:35 Found static field of type
java.text.DateFormat
=> we could change this to protected or private

ApplicationContext.java:1353
org.apache.pivot.wtk.ApplicationContext.resourceCache is or uses a map
or set of URLs, which can be a performance hog
=> this have to be explored ... but instead of using URL as Map keys,
what do you think on use URI, or at least a String representation of
the currently used URL ? This change require small modifications in
many classes under wtk, this is why I'd like to have this in a major
release as 1.3, and not in a bug fix release like the 1.3.1


Tell me what i have to do ...

Bye,
Sandro

Reply via email to