diff --git a/apps/rest-showcase/src/main/webapp/css/app.css b/apps/rest-showcase/src/main/webapp/css/app.css
index 266479a38..f77ce39f7 100644
--- a/apps/rest-showcase/src/main/webapp/css/app.css
+++ b/apps/rest-showcase/src/main/webapp/css/app.css
@@ -1,3 +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
+ *
+ * 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.
+ */
.form-group .errorMessage {
list-style: none;
font-weight: bold;
diff --git a/core/src/test/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParserTest.java b/core/src/test/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParserTest.java
index 5bfe15173..50b35e567 100644
--- a/core/src/test/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParserTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParserTest.java
@@ -101,7 +101,7 @@ public class DefaultValidatorFileParserTest extends TestCase {
assertEquals("required", cfg.getType());
assertEquals("foo", cfg.getParams().get("fieldName"));
assertEquals("You must enter a value for foo.", cfg.getDefaultMessage());
- assertEquals(4, cfg.getLocation().getLineNumber());
+ assertEquals(24, cfg.getLocation().getLineNumber());
cfg = (ValidatorConfig) configs.get(3);
assertEquals("required", cfg.getType());
@@ -124,7 +124,7 @@ public class DefaultValidatorFileParserTest extends TestCase {
try {
parser.parseActionValidatorConfigs((ValidatorFactory) mockValidatorFactory.proxy(), is, testFileName3);
} catch (XWorkException ex) {
- assertTrue("Wrong line number", 3 == ex.getLocation().getLineNumber());
+ assertTrue("Wrong line number", 23 == ex.getLocation().getLineNumber());
pass = true;
}
assertTrue("Validation file should have thrown exception", pass);
@@ -137,7 +137,7 @@ public class DefaultValidatorFileParserTest extends TestCase {
try {
parser.parseActionValidatorConfigs((ValidatorFactory) mockValidatorFactory.proxy(), is, testFileName4);
} catch (XWorkException ex) {
- assertTrue("Wrong line number: " + ex.getLocation(), 13 == ex.getLocation().getLineNumber());
+ assertTrue("Wrong line number: " + ex.getLocation(), 33 == ex.getLocation().getLineNumber());
pass = true;
}
assertTrue("Validation file should have thrown exception", pass);
@@ -150,7 +150,7 @@ public class DefaultValidatorFileParserTest extends TestCase {
try {
parser.parseActionValidatorConfigs((ValidatorFactory) mockValidatorFactory.proxy(), is, testFileNameFail);
} catch (XWorkException ex) {
- assertTrue("Wrong line number: " + ex.getLocation(), 8 == ex.getLocation().getLineNumber());
+ assertTrue("Wrong line number: " + ex.getLocation(), 28 == ex.getLocation().getLineNumber());
pass = true;
}
assertTrue("Validation file should have thrown exception", pass);
@@ -163,7 +163,7 @@ public class DefaultValidatorFileParserTest extends TestCase {
try {
parser.parseActionValidatorConfigs((ValidatorFactory) mockValidatorFactory.proxy(), is, testFileName5);
} catch (XWorkException ex) {
- assertTrue("Wrong line number", 3 == ex.getLocation().getLineNumber());
+ assertTrue("Wrong line number", 23 == ex.getLocation().getLineNumber());
pass = true;
}
assertTrue("Validation file should have thrown exception", pass);
diff --git a/core/src/test/java/org/apache/struts2/dispatcher/StaticContentLoaderTest.java b/core/src/test/java/org/apache/struts2/dispatcher/StaticContentLoaderTest.java
index e0eed0a0b..7995ecada 100644
--- a/core/src/test/java/org/apache/struts2/dispatcher/StaticContentLoaderTest.java
+++ b/core/src/test/java/org/apache/struts2/dispatcher/StaticContentLoaderTest.java
@@ -57,7 +57,7 @@ public class StaticContentLoaderTest extends TestCase {
public void testValidRersources() throws IOException {
contentLoader.findStaticResource("/struts/resource.css", req, res);
- assertEquals("heya!", res.getContentAsString());
+ assertTrue(res.getContentAsString().contains("heya!"));
}
public void testInvalidRersources1() throws IOException {
diff --git a/core/src/test/resources/org/apache/struts2/static/resource.css b/core/src/test/resources/org/apache/struts2/static/resource.css
index b4d8ec7ca..7d6fde5bf 100644
--- a/core/src/test/resources/org/apache/struts2/static/resource.css
+++ b/core/src/test/resources/org/apache/struts2/static/resource.css
@@ -1 +1,19 @@
+/*
+ * 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
+ *
+ * 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.
+ */
heya!
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 0f393de91..25118a5be 100644
--- a/pom.xml
+++ b/pom.xml
@@ -356,6 +356,7 @@
src/test/resources/org/apache/struts2/interceptor/validation/*
src/site/resources/tags/**
src/main/resources/*LICENSE.txt
+ src/test/resources/com/opensymphony/xwork2/somefile.txt