[Design of JBoss Portal] - Re: common.text package update
by Antoine_h
Hello,
I looked at the FastURLDecoder and the way it is used in the JSF backing beans, such as :
org.jboss.portal.core.identity.ui.EditProfileAction
Main question : FastURLDecoder is not multi thread safe ?
then, in the EditProfileAction, it is used like that :
private final static FastURLDecoder decoder = FastURLDecoder.getUTF8Instance();
and getUTF8Instance returns the same static instance of FastURLDecoder.
then, in case two threads call the encode() method at the same time... there will be some mixing in the data, and bad result. no ?
I am not very used to these multi thread safe issues, but it seems to me that :
- either the FastURLDecoder should be programmed to be threads safe
- either it should not be used as a static in a jsf backing bean
did I missed something ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138244#4138244
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138244
18 years
[Design the new POJO MicroContainer] - Re: Field injection
by adrian@jboss.org
I've fixed the security hole problems in the private field access,
although I haven't tested every use case.
I rewrote (deleted one) your tests since they were broken/making incorrect assumptions
about how it should work. The one I deleted I tried to fix but it was like playing a game
of "kaplunk" ;-)
See the FieldsAccessControlTestCase in the controller tests for how to write it
properly. It basically deploys two files (one during bootstrap which isn't
subject to security and one manually that is).
Implementation and a WARNING:
The access to private fields is now correctly controlled inside the
ReflectFieldInfoImpl with final methods that nobody can override.
The only way the MC can get it wrong is by accessing fields when it is not
using the controller context's AccessControlContext. i.e. it is running under
its own privileges instead of whoever tried to register the bean.
So the other use cases still need testing to make sure this does not happen
(either now or in the future).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138234#4138234
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138234
18 years
[Design the new POJO MicroContainer] - Re: testNotAnEar
by scott.stark@jboss.org
It looks like empty directories are not being copied over to target/test-classes:
| [starksm@valkyrie deployers-vfs]$ ls target/tests-classes/structure/ear/
| archive.ear* noappxml.ear/ someappxml.ear/
| complexwithappxml.ear/ simplewithappxml.ear/ strict.ear/
|
| ...
| Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.031 sec <<< FAILURE!
| testNotAnEAR(org.jboss.test.deployers.vfs.structure.ear.test.EARStructureRecognizeTestCase) Time elapsed: 0.016 sec <<< ERROR!
| java.io.FileNotFoundException: File does not exist: C:\home\svn\JBossMC\jboss-deployers\trunk\deployers-vfs\target\tests-classes\structure\ear\notanear
|
If I just add an empty file to notanear, the mvn test output consistently passes:
| [starksm@valkyrie deployers-vfs]$ touch src/resources/tests/structure/ear/notanear/empty
| [starksm@valkyrie deployers-vfs]$ mvn test
| ...
| Results :
|
| Tests run: 155, Failures: 0, Errors: 0, Skipped: 0
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138223#4138223
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138223
18 years