You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2014/06/20 18:20:37 UTC
svn commit: r1604204 [3/4] - in /myfaces/test/trunk:
test12/src/main/java/org/apache/myfaces/test/base/
test12/src/main/java/org/apache/myfaces/test/base/junit4/
test12/src/main/java/org/apache/myfaces/test/cargo/
test12/src/main/java/org/apache/myface...
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/InvokeApplicationExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/InvokeApplicationExecutor.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/InvokeApplicationExecutor.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/InvokeApplicationExecutor.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock.lifecycle;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/MockLifecycle.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/MockLifecycle.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/MockLifecycle.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/MockLifecycle.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock.lifecycle;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/MockLifecycleFactory.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/MockLifecycleFactory.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/MockLifecycleFactory.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/MockLifecycleFactory.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock.lifecycle;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/PhaseListenerManager.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/PhaseListenerManager.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/PhaseListenerManager.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/PhaseListenerManager.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock.lifecycle;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/ProcessValidationsExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/ProcessValidationsExecutor.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/ProcessValidationsExecutor.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/ProcessValidationsExecutor.java Fri Jun 20 16:20:34 2014
@@ -1,20 +1,21 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.apache.myfaces.test.mock.lifecycle;
import javax.faces.context.FacesContext;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RenderResponseExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RenderResponseExecutor.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RenderResponseExecutor.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RenderResponseExecutor.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock.lifecycle;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RestoreViewExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RestoreViewExecutor.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RestoreViewExecutor.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RestoreViewExecutor.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock.lifecycle;
@@ -55,9 +57,12 @@ class RestoreViewExecutor implements Pha
// init the View
Application application = facesContext.getApplication();
ViewHandler viewHandler = application.getViewHandler();
- if (JsfVersion.supports12()) {
+ if (JsfVersion.supports12())
+ {
Jsf12Utils.initView(facesContext, viewHandler);
- } else {
+ }
+ else
+ {
// nothing to do
}
@@ -68,7 +73,9 @@ class RestoreViewExecutor implements Pha
if (viewRoot != null)
{
if (log.isTraceEnabled())
+ {
log.trace("View already exists in the FacesContext");
+ }
viewRoot.setLocale(facesContext.getExternalContext()
.getRequestLocale());
@@ -82,14 +89,19 @@ class RestoreViewExecutor implements Pha
if (restoreViewSupport.isPostback(facesContext))
{
if (log.isTraceEnabled())
+ {
log.trace("Request is a postback");
+ }
viewRoot = viewHandler.restoreView(facesContext, viewId);
if (viewRoot == null)
{
- if (JsfVersion.supports12()) {
+ if (JsfVersion.supports12())
+ {
Jsf12Utils.throwViewExpiredException(viewId);
- } else {
+ }
+ else
+ {
Jsf11Utils.throwViewExpiredException(viewId);
}
}
@@ -98,8 +110,10 @@ class RestoreViewExecutor implements Pha
else
{
if (log.isTraceEnabled())
+ {
log
.trace("Request is not a postback. New UIViewRoot will be created");
+ }
viewRoot = viewHandler.createView(facesContext, viewId);
facesContext.renderResponse();
@@ -154,7 +168,9 @@ class RestoreViewExecutor implements Pha
// DebugUtils.assertError(viewId != null, log,
// "RequestServletPath is null, cannot determine viewId of current page.");
if (viewId == null)
+ {
return null;
+ }
// TODO: JSF Spec 2.2.1 - what do they mean by "if the default
// ViewHandler implementation is used..." ?
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RestoreViewSupport.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RestoreViewSupport.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RestoreViewSupport.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/RestoreViewSupport.java Fri Jun 20 16:20:34 2014
@@ -1,25 +1,25 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock.lifecycle;
-import javax.faces.FacesException;
import javax.faces.component.UIComponent;
-import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
/**
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/UpdateModelValuesExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/UpdateModelValuesExecutor.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/UpdateModelValuesExecutor.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/mock/lifecycle/UpdateModelValuesExecutor.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock.lifecycle;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/NamedRunner.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/NamedRunner.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/NamedRunner.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/NamedRunner.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.runners;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/TestClassLoader.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/TestClassLoader.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/TestClassLoader.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/TestClassLoader.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.runners;
@@ -117,7 +119,9 @@ public class TestClassLoader extends Cla
Class c = findLoadedClass(name);
if (c != null)
+ {
return c;
+ }
//
// Delegate the loading of excluded classes to the
// standard class loader.
@@ -138,11 +142,15 @@ public class TestClassLoader extends Cla
{
byte[] data = lookupClassData(name);
if (data == null)
+ {
throw new ClassNotFoundException();
+ }
c = defineClass(name, data, 0, data.length);
}
if (resolve)
+ {
resolveClass(c);
+ }
return c;
}
@@ -172,7 +180,9 @@ public class TestClassLoader extends Cla
data = loadFileData(path, fileName);
}
if (data != null)
+ {
return data;
+ }
}
throw new ClassNotFoundException(className);
}
@@ -216,7 +226,9 @@ public class TestClassLoader extends Cla
byte[] b = new byte[1000];
int n;
while ((n = stream.read(b)) != -1)
+ {
out.write(b, 0, n);
+ }
stream.close();
out.close();
return out.toByteArray();
@@ -242,7 +254,9 @@ public class TestClassLoader extends Cla
InputStream stream = null;
File archive = new File(path);
if (!archive.exists())
+ {
return null;
+ }
try
{
zipFile = new ZipFile(archive);
@@ -253,7 +267,9 @@ public class TestClassLoader extends Cla
}
ZipEntry entry = zipFile.getEntry(fileName);
if (entry == null)
+ {
return null;
+ }
int size = (int) entry.getSize();
try
{
@@ -276,7 +292,9 @@ public class TestClassLoader extends Cla
try
{
if (stream != null)
+ {
stream.close();
+ }
}
catch (IOException e)
{
@@ -292,11 +310,15 @@ public class TestClassLoader extends Cla
{
fExcluded = new Vector<String>(10);
for (int i = 0; i < defaultExclusions.length; i++)
+ {
fExcluded.addElement(defaultExclusions[i]);
+ }
InputStream is = getClass().getResourceAsStream(EXCLUDED_FILE);
if (is == null)
+ {
return;
+ }
Properties p = new Properties();
try
{
@@ -324,9 +346,13 @@ public class TestClassLoader extends Cla
String path = p.getProperty(key);
path = path.trim();
if (path.endsWith("*"))
+ {
path = path.substring(0, path.length() - 1);
+ }
if (path.length() > 0)
+ {
fExcluded.addElement(path);
+ }
}
}
}
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/TestPerClassLoaderRunner.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/TestPerClassLoaderRunner.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/TestPerClassLoaderRunner.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/runners/TestPerClassLoaderRunner.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.runners;
@@ -41,7 +43,8 @@ import org.junit.runners.model.Statement
import org.junit.runners.model.TestClass;
/**
- * A Junit 4 runner that executes each Test method with a new Custom classloader so that all variables,
+ * A Junit 4 runner that executes each Test method with a new Custom classloader so
+ * that all variables,
* also the final ones, are reinitialized.
*
* @author Rudy De Busscher
@@ -150,7 +153,8 @@ public class TestPerClassLoaderRunner ex
Statement statement)
{
// We now to need to search in the class from the custom loader.
- //We also need to search with the annotation loaded by the custom class loader or otherwise we don't find any method.
+ //We also need to search with the annotation loaded by the custom class loader or otherwise
+ // we don't find any method.
List<FrameworkMethod> afters = testClassFromClassLoader
.getAnnotatedMethods((Class<? extends Annotation>) afterFromClassLoader);
return new RunAfters(statement, afters, target);
@@ -162,7 +166,8 @@ public class TestPerClassLoaderRunner ex
Statement statement)
{
// We now to need to search in the class from the custom loader.
- //We also need to search with the annotation loaded by the custom class loader or otherwise we don't find any method.
+ //We also need to search with the annotation loaded by the custom class loader or otherwise
+ // we don't find any method.
List<FrameworkMethod> befores = testClassFromClassLoader
.getAnnotatedMethods((Class<? extends Annotation>) beforeFromClassLoader);
return new RunBefores(statement, befores, target);
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/Jsf11Utils.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/Jsf11Utils.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/Jsf11Utils.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/Jsf11Utils.java Fri Jun 20 16:20:34 2014
@@ -1,23 +1,26 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.util;
-public class Jsf11Utils {
+public class Jsf11Utils
+{
public static void throwViewExpiredException(String viewId)
{
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/Jsf12Utils.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/Jsf12Utils.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/Jsf12Utils.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/Jsf12Utils.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.util;
Modified: myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/JsfVersion.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/JsfVersion.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/JsfVersion.java (original)
+++ myfaces/test/trunk/test12/src/main/java/org/apache/myfaces/test/util/JsfVersion.java Fri Jun 20 16:20:34 2014
@@ -1,71 +1,78 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.apache.myfaces.test.util;
import javax.faces.application.Application;
public class JsfVersion
{
- private static boolean supports12;
- private static boolean supports20;
- static
- {
- try
+ private static boolean supports12;
+ private static boolean supports20;
+
+ static
{
- Application.class.getMethod("getExpressionFactory");
- supports12 = true;
+ try
+ {
+ Application.class.getMethod("getExpressionFactory");
+ supports12 = true;
+
+ try
+ {
+ Application.class.getMethod("getExceptionHandler");
+ supports20 = true;
+
+ }
+ catch (NoSuchMethodException e)
+ {
+ // ignore
+ }
+
+ }
+ catch (NoSuchMethodException e)
+ {
+ // ignore
+ }
+ }
- try
- {
- Application.class.getMethod("getExceptionHandler");
- supports20 = true;
-
- } catch (NoSuchMethodException e) {
- // ignore
- }
+ private JsfVersion()
+ {
+ // avoid instantiation
+ }
- } catch (NoSuchMethodException e) {
- // ignore
+ /**
+ * Does the JSF is version 1.2 or higher
+ *
+ * @return Supports 1.2 or higher
+ */
+ public static boolean supports12()
+ {
+ return supports12;
}
- }
- private JsfVersion() {
- // avoid instantiation
- }
-
- /**
- * Does the JSF is version 1.2 or higher
- *
- * @return Supports 1.2 or higher
- */
- public static boolean supports12()
- {
- return supports12;
- }
-
- /**
- * Does the JSF is version 2.0 or higher
- *
- * @return Supports 2.0 or higher
- */
- public static boolean supports20()
- {
- return supports20;
- }
+ /**
+ * Does the JSF is version 2.0 or higher
+ *
+ * @return Supports 2.0 or higher
+ */
+ public static boolean supports20()
+ {
+ return supports20;
+ }
}
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/AbstractJsfTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/AbstractJsfTestCase.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/AbstractJsfTestCase.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/AbstractJsfTestCase.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.base;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMockTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMockTestCase.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMockTestCase.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMockTestCase.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.base.junit4;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMultipleRequestsTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMultipleRequestsTestCase.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMultipleRequestsTestCase.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfConfigurableMultipleRequestsTestCase.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.base.junit4;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfTestCase.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfTestCase.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/base/junit4/AbstractJsfTestCase.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.base.junit4;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/config/ConfigParser.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/config/ConfigParser.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/config/ConfigParser.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/config/ConfigParser.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.config;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/jmock/AbstractJmockJsfTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/jmock/AbstractJmockJsfTestCase.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/jmock/AbstractJmockJsfTestCase.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/jmock/AbstractJmockJsfTestCase.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.jmock;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockApplication20.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockApplication20.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockApplication20.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockApplication20.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock;
@@ -214,7 +216,8 @@ public class MockApplication20 extends M
private static final Log log = LogFactory.getLog(MockApplication20.class);
- private final Map<Class<? extends SystemEvent>, SystemListenerEntry> _systemEventListenerClassMap = new ConcurrentHashMap<Class<? extends SystemEvent>, SystemListenerEntry>();
+ private final Map<Class<? extends SystemEvent>, SystemListenerEntry> _systemEventListenerClassMap =
+ new ConcurrentHashMap<Class<? extends SystemEvent>, SystemListenerEntry>();
private Map<String, String> _defaultValidatorsIds = new HashMap<String, String>();
@@ -245,7 +248,8 @@ public class MockApplication20 extends M
_handleResourceDependencyAnnotations(context, inspectedClass, component, isProduction);
}
- private void _handleListenerForAnnotations(FacesContext context, Object inspected, Class<?> inspectedClass, UIComponent component, boolean isProduction)
+ private void _handleListenerForAnnotations(FacesContext context, Object inspected, Class<?> inspectedClass,
+ UIComponent component, boolean isProduction)
{
List<ListenerFor> listenerForList = null;
@@ -259,10 +263,14 @@ public class MockApplication20 extends M
listenerForList = new ArrayList<ListenerFor>();
if(listener != null)
+ {
listenerForList.add(listener);
+ }
if(listeners != null)
+ {
listenerForList.addAll(Arrays.asList(listeners.value()));
+ }
}
}
@@ -341,7 +349,8 @@ public class MockApplication20 extends M
}
}
- private void _handleResourceDependencyAnnotations(FacesContext context, Class<?> inspectedClass, UIComponent component, boolean isProduction)
+ private void _handleResourceDependencyAnnotations(FacesContext context, Class<?> inspectedClass,
+ UIComponent component, boolean isProduction)
{
List<ResourceDependency> dependencyList = null;
@@ -355,10 +364,14 @@ public class MockApplication20 extends M
dependencyList = new ArrayList<ResourceDependency>();
if(dependency != null)
+ {
dependencyList.add(dependency);
+ }
if(dependencies != null)
+ {
dependencyList.addAll(Arrays.asList(dependencies.value()));
+ }
}
}
@@ -385,7 +398,8 @@ public class MockApplication20 extends M
String name = annotation.name();
if (name != null && name.length() > 0)
{
- name = _ELText.parse(getExpressionFactory(), context.getELContext(), name).toString(context.getELContext());
+ name = _ELText.parse(getExpressionFactory(), context.getELContext(), name).toString(
+ context.getELContext());
}
// Obtain the renderer-type for the resource name by passing name to
@@ -406,7 +420,8 @@ public class MockApplication20 extends M
String library = annotation.library();
if (library != null && library.length() > 0)
{
- library = _ELText.parse(getExpressionFactory(), context.getELContext(), library).toString(context.getELContext());
+ library = _ELText.parse(getExpressionFactory(), context.getELContext(), library).toString(
+ context.getELContext());
// If library is non-null, store it under the key "library".
if ("this".equals(library))
{
@@ -427,7 +442,8 @@ public class MockApplication20 extends M
String target = annotation.target();
if (target != null && target.length() > 0)
{
- target = _ELText.parse(getExpressionFactory(), context.getELContext(), target).toString(context.getELContext());
+ target = _ELText.parse(getExpressionFactory(), context.getELContext(), target).toString(
+ context.getELContext());
// If target is non-null, store it under the key "target".
attributes.put("target", target);
context.getViewRoot().addComponentResource(context, output, target);
@@ -441,7 +457,8 @@ public class MockApplication20 extends M
}
}
- private void _inspectRenderer(FacesContext context, UIComponent component, String componentType, String rendererType)
+ private void _inspectRenderer(FacesContext context, UIComponent component, String componentType,
+ String rendererType)
{
/*
* The Renderer instance to inspect must be obtained by calling FacesContext.getRenderKit() and calling
@@ -575,7 +592,8 @@ public class MockApplication20 extends M
SystemEventListenerHolder holder = (SystemEventListenerHolder) source;
// If the source argument implements SystemEventListenerHolder, call
- // SystemEventListenerHolder.getListenersForEventClass(java.lang.Class) on it, passing the systemEventClass
+ // SystemEventListenerHolder.getListenersForEventClass(java.lang.Class) on it,
+ // passing the systemEventClass
// argument. If the list is not empty, perform algorithm traverseListenerList on the list.
event = _traverseListenerList(holder
.getListenersForEventClass(systemEventClass),
@@ -914,7 +932,8 @@ public class MockApplication20 extends M
*/
UIViewRoot view = context.getViewRoot();
Application application = context.getApplication();
- ViewDeclarationLanguage vdl = application.getViewHandler().getViewDeclarationLanguage(context, view.getViewId());
+ ViewDeclarationLanguage vdl = application.getViewHandler().getViewDeclarationLanguage(
+ context, view.getViewId());
/*
* Obtain a reference to the composite component metadata for this composite component by calling
@@ -1063,7 +1082,10 @@ public class MockApplication20 extends M
private static Class classForName(String type)
throws ClassNotFoundException
{
- if (type == null) throw new NullPointerException("type");
+ if (type == null)
+ {
+ throw new NullPointerException("type");
+ }
try
{
// Try WebApp ClassLoader first
@@ -1082,7 +1104,8 @@ public class MockApplication20 extends M
private void _handleAttachedResourceDependencyAnnotations(FacesContext context, Object inspected)
{
- if (inspected == null) {
+ if (inspected == null)
+ {
return;
}
@@ -1127,7 +1150,8 @@ public class MockApplication20 extends M
String name = annotation.name();
if (name != null && name.length() > 0)
{
- name = _ELText.parse(getExpressionFactory(), context.getELContext(), name).toString(context.getELContext());
+ name = _ELText.parse(getExpressionFactory(), context.getELContext(), name).toString(
+ context.getELContext());
}
// Obtain the renderer-type for the resource name by passing name to
@@ -1147,7 +1171,8 @@ public class MockApplication20 extends M
String library = annotation.library();
if (library != null && library.length() > 0)
{
- library = _ELText.parse(getExpressionFactory(), context.getELContext(), library).toString(context.getELContext());
+ library = _ELText.parse(getExpressionFactory(), context.getELContext(), library).toString(
+ context.getELContext());
// If library is non-null, store it under the key "library".
attributes.put("library", library);
}
@@ -1156,7 +1181,8 @@ public class MockApplication20 extends M
String target = annotation.target();
if (target != null && target.length() > 0)
{
- target = _ELText.parse(getExpressionFactory(), context.getELContext(), target).toString(context.getELContext());
+ target = _ELText.parse(getExpressionFactory(), context.getELContext(), target).toString(
+ context.getELContext());
// If target is non-null, store it under the key "target".
attributes.put("target", target);
context.getViewRoot().addComponentResource(context, output, target);
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockApplicationFactory.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockApplicationFactory.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockApplicationFactory.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockApplicationFactory.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExceptionHandler.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExceptionHandler.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExceptionHandler.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExceptionHandler.java Fri Jun 20 16:20:34 2014
@@ -1,20 +1,21 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
-
package org.apache.myfaces.test.mock;
import javax.el.ELException;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExceptionHandlerFactory.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExceptionHandlerFactory.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExceptionHandlerFactory.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExceptionHandlerFactory.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExternalContext20.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExternalContext20.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExternalContext20.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockExternalContext20.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFacesContext20.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFacesContext20.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFacesContext20.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFacesContext20.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock;
@@ -89,9 +91,9 @@ public class MockFacesContext20 extends
return _currentPhaseId;
}
- public void setCurrentPhaseId(PhaseId _currentPhaseId)
+ public void setCurrentPhaseId(PhaseId currentPhaseId)
{
- this._currentPhaseId = _currentPhaseId;
+ this._currentPhaseId = currentPhaseId;
}
public Map<Object, Object> getAttributes()
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFacesContextFactory.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFacesContextFactory.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFacesContextFactory.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFacesContextFactory.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock;
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFlash.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFlash.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFlash.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockFlash.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock;
@@ -28,7 +30,12 @@ import java.io.Serializable;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
/**
Modified: myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockPartialViewContext.java
URL: http://svn.apache.org/viewvc/myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockPartialViewContext.java?rev=1604204&r1=1604203&r2=1604204&view=diff
==============================================================================
--- myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockPartialViewContext.java (original)
+++ myfaces/test/trunk/test20/src/main/java/org/apache/myfaces/test/mock/MockPartialViewContext.java Fri Jun 20 16:20:34 2014
@@ -1,18 +1,20 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to you under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.myfaces.test.mock;
@@ -332,10 +334,14 @@ public class MockPartialViewContext exte
int oldPos = 0;
// Step 3: retrieve substrings
- for (int pos = str.indexOf(separator), i = 0; pos >= 0; pos = str
- .indexOf(separator, (oldPos = (pos + 1))))
+ int pos = str.indexOf(separator);
+ int i = 0;
+
+ while (pos >= 0)
{
list[i++] = str.substring(oldPos, pos);
+ oldPos = (pos + 1);
+ pos = str.indexOf(separator, oldPos);
}
list[lastTokenIndex] = str.substring(oldPos, len);