Skip to content

Commit 99f04e0

Browse files
JihoonKim1004JihoonKim1004
authored andcommitted
Cleaned up some code and had removal of dijit components rather than dojox [since require Dictionary and etcetera from dojox, hopefully will be moved to dojo soon].
1 parent e40c32c commit 99f04e0

30 files changed

Lines changed: 166 additions & 260 deletions

File tree

jsf-flex-shared/core/src/main/java/com/googlecode/jsfFlex/renderkit/annotationDocletParser/_AnnotationDocletParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ public abstract class _AnnotationDocletParser {
3535
static final String BY_ATTRIBUTE = "byAttribute";
3636

3737
private Set _tokenValueSet;
38-
3938
private _MXMLMapper _mapper;
4039

41-
public _AnnotationDocletParser(){
40+
_AnnotationDocletParser(){
4241
super();
4342
}
4443

jsf-flex-shared/core/src/main/java/com/googlecode/jsfFlex/shared/context/MxmlContext.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
*/
3636
public abstract class MxmlContext {
3737

38+
MxmlContext(){
39+
super();
40+
}
41+
3842
public abstract boolean isProductionEnv();
3943

4044
public abstract void setProductionEnv(boolean productionEnv);

jsf-flex-shared/core/src/main/java/com/googlecode/jsfFlex/shared/tasks/TaskRunnerImpl.java

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
*/
3434
class TaskRunnerImpl implements _TaskRunner {
3535

36+
private final Object _lock;
3637
private final List _tasks;
3738

3839
TaskRunnerImpl(){
@@ -44,25 +45,35 @@ class TaskRunnerImpl implements _TaskRunner {
4445
_tasks = new LinkedList();
4546
_tasks.addAll(tasks);
4647
}
48+
49+
{
50+
_lock = new Object();
51+
}
4752

48-
public synchronized void addTask(_Task toAdd) {
49-
_tasks.add(toAdd);
50-
execute();
53+
public void addTask(_Task toAdd) {
54+
synchronized(_lock){
55+
_tasks.add(toAdd);
56+
execute();
57+
}
5158
}
5259

53-
public synchronized void addTasks(Collection _tasksToAdd) {
54-
_tasks.addAll(_tasksToAdd);
55-
execute();
60+
public void addTasks(Collection _tasksToAdd) {
61+
synchronized(_lock){
62+
_tasks.addAll(_tasksToAdd);
63+
execute();
64+
}
5665
}
5766

58-
public synchronized void execute() {
67+
public void execute() {
5968

60-
_Task current;
61-
for(Iterator iterate = _tasks.iterator(); iterate.hasNext();){
62-
current = (_Task) iterate.next();
63-
current.performTask();
69+
synchronized(_lock){
70+
_Task current;
71+
for(Iterator iterate = _tasks.iterator(); iterate.hasNext();){
72+
current = (_Task) iterate.next();
73+
current.performTask();
74+
}
75+
clearAllTask();
6476
}
65-
clearAllTask();
6677
}
6778

6879
private void clearAllTask(){

jsf-flex-shared/core/src/main/java/com/googlecode/jsfFlex/shared/tasks/_RunnerFactory.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ private _RunnerFactory(){
130130
super();
131131
}
132132

133-
public static final synchronized _RunnerFactory getInstance(){
133+
public static final _RunnerFactory getInstance(){
134134
return INSTANCE;
135135
}
136136

137-
public final synchronized _CommonTaskRunner getCommonTaskRunnerImpl(){
137+
public final _CommonTaskRunner getCommonTaskRunnerImpl(){
138138

139139
_CommonTaskRunner _specificInstance = null;
140140

@@ -149,7 +149,7 @@ public final synchronized _CommonTaskRunner getCommonTaskRunnerImpl(){
149149
return _specificInstance;
150150
}
151151

152-
public final synchronized _FileManipulatorTaskRunner getFileManipulatorTaskRunnerImpl(){
152+
public final _FileManipulatorTaskRunner getFileManipulatorTaskRunnerImpl(){
153153

154154
_FileManipulatorTaskRunner _specificInstance = null;
155155

@@ -164,7 +164,7 @@ public final synchronized _FileManipulatorTaskRunner getFileManipulatorTaskRunne
164164
return _specificInstance;
165165
}
166166

167-
public final synchronized _FlexTaskRunner getFlexTaskRunnerImpl(){
167+
public final _FlexTaskRunner getFlexTaskRunnerImpl(){
168168

169169
_FlexTaskRunner _specificInstance = null;
170170

@@ -179,7 +179,7 @@ public final synchronized _FlexTaskRunner getFlexTaskRunnerImpl(){
179179
return _specificInstance;
180180
}
181181

182-
public final synchronized _AnnotationDocletParser getAnnotationDocletParserImpl(){
182+
public final _AnnotationDocletParser getAnnotationDocletParserImpl(){
183183

184184
_AnnotationDocletParser _specificInstance = null;
185185

jsf-flex-shared/core/src/main/java/com/googlecode/jsfFlex/shared/util/MXMLConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public final class MXMLConstants {
6767
public static final String SIBLING_REPLACE_TOKEN_PREMXML_IDENTIFIER_SUFF = " -->";
6868

6969
public static final String TAG_BODY_CONTENT_ATTR = "tagBodyContent";
70-
public static final String TAG_BODY_CONTENT_TOKEN = "${tagBodyContent}";
70+
public static final String TAG_BODY_CONTENT_TOKEN = "{tagBodyContent}";
7171

7272
public static final String MXML_DIRECTORY_NAME = "mxml";
7373
public static final String SWF_DIRECTORY_NAME = "swf";

jsf-flex/core/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -259,26 +259,26 @@
259259
</executions>
260260
</plugin>
261261

262-
<!-- Do not need the Beta components of DOJO, so remove -->
263-
<!--
262+
<!-- Need Dojo + Dojox [latter mainly for Dictionary, hopefully it will be moved to Dojo soon.
263+
Since the size of War becomes gt 20GiB with all three packages, will remove Dijit which
264+
is not needed for now -->
264265
<plugin>
265266
<artifactId>maven-antrun-plugin</artifactId>
266267
<configuration>
267268
<tasks>
268-
<delete dir="${project.build.directory}/${dojo.component.path}/dojo-${dojo.version}/dojox"/>
269+
<delete dir="${project.build.directory}/${dojo.component.path}/dojo-${dojo.version}/dijit"/>
269270
</tasks>
270271
</configuration>
271272
<executions>
272273
<execution>
273-
<id>removeDojox</id>
274+
<id>removeDijit</id>
274275
<phase>process-resources</phase>
275276
<goals>
276277
<goal>run</goal>
277278
</goals>
278279
</execution>
279280
</executions>
280281
</plugin>
281-
-->
282282

283283
<plugin>
284284
<groupId>org.apache.maven.plugins</groupId>

jsf-flex/core/src/main/java/com/googlecode/jsfFlex/renderkit/html/util/JsfFlexDojoResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected Object initialValue()
7676
}
7777
};
7878

79-
public static JsfFlexDojoResource getDojoInstance(){
79+
public static synchronized JsfFlexDojoResource getDojoInstance(){
8080
JsfFlexDojoResource dojoInstance = null;
8181
if(_currentResourceInstance.get() == null){
8282
dojoInstance = new JsfFlexDojoResource(){
@@ -116,7 +116,7 @@ public void processRequestResource(HttpServletResponse httpResponse, String[] re
116116
return dojoInstance;
117117
}
118118

119-
public static JsfFlexResource getInstance(){
119+
public static synchronized JsfFlexResource getInstance(){
120120
return (JsfFlexResource) JsfFlexDojoResource.getDojoInstance();
121121
}
122122

jsf-flex/core/src/main/java/com/googlecode/jsfFlex/renderkit/html/util/JsfFlexResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected Object initialValue()
4141
}
4242
};
4343

44-
public static JsfFlexResource getInstance(){
44+
public static synchronized JsfFlexResource getInstance(){
4545
JsfFlexResource instance = null;
4646
if(_currentResourceInstance.get() == null){
4747
instance = new JsfFlexResourceImpl();

jsf-flex/core/src/main/java/com/googlecode/jsfFlex/renderkit/mxml/AbstractMXMLResponseStateManager.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,9 @@
2424
* @author Ji Hoon Kim
2525
*/
2626
public abstract class AbstractMXMLResponseStateManager extends ResponseStateManager {
27-
27+
28+
AbstractMXMLResponseStateManager(){
29+
super();
30+
}
31+
2832
}

jsf-flex/core/src/main/java/com/googlecode/jsfFlex/renderkit/mxml/AbstractMXMLResponseWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*/
3838
public abstract class AbstractMXMLResponseWriter extends ResponseWriter {
3939

40-
protected AbstractMXMLResponseWriter(){
40+
AbstractMXMLResponseWriter(){
4141
super();
4242
}
4343

0 commit comments

Comments
 (0)