This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-jxpath.git
commit 812642d916e8d7c974a85d7519553d43fb37bd45 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Oct 18 07:42:29 2022 -0400 Update build from Apache commons-parent 39 to 54 - Add missing license headers - Replace TravisCI with GitHub Actions - Replace CLIRR with JApiCmp - Replace FindBugs with SpotBugs - Fix binary compatibility in ServletContextHandler#collectPropertyNames() --- .travis.yml => .github/dependabot.yml | 51 +++++++------ .github/workflows/codeql-analysis.yml | 85 ++++++++++++++++++++++ .github/workflows/coverage.yml | 52 +++++++++++++ .github/workflows/maven.yml | 63 ++++++++++++++++ .github/workflows/scorecards-analysis.yml | 67 +++++++++++++++++ build.xml | 16 ++++ pom.xml | 65 ++++++++++++----- .../commons/jxpath/ri/parser/ParseException.java | 17 +++++ .../commons/jxpath/ri/parser/SimpleCharStream.java | 17 +++++ .../org/apache/commons/jxpath/ri/parser/Token.java | 18 ++++- .../commons/jxpath/ri/parser/TokenMgrError.java | 17 +++++ .../commons/jxpath/ri/parser/XPathParser.java | 17 +++++ .../jxpath/ri/parser/XPathParserConstants.java | 17 +++++ .../jxpath/ri/parser/XPathParserTokenManager.java | 17 +++++ .../jxpath/servlet/ServletContextHandler.java | 4 +- .../ri/JXPathContextReferenceImplTestCase.java | 17 +++++ .../commons/jxpath/ri/model/JXPath154Test.java | 17 +++++ 17 files changed, 512 insertions(+), 45 deletions(-) diff --git a/.travis.yml b/.github/dependabot.yml similarity index 71% rename from .travis.yml rename to .github/dependabot.yml index fc2a03a..9ebcd0e 100644 --- a/.travis.yml +++ b/.github/dependabot.yml @@ -1,24 +1,27 @@ -# 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. - -language: java -sudo: false - -jdk: - - openjdk7 - - oraclejdk8 - -after_success: - - mvn clean cobertura:cobertura coveralls:report +# 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. + +version: 2 +updates: + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "weekly" + day: "friday" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "friday" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..73b5dc9 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,85 @@ +# 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. + +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '33 9 * * 4' + +permissions: + contents: read + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3.1.0 + with: + persist-credentials: false + - uses: actions/cache@v3.0.11 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # âšī¸ Command-line programs to run using the OS shell. + # đ https://git.io/JvXDl + + # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..6c6476f --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,52 @@ +# 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. + +name: Coverage + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 8 ] + + steps: + - uses: actions/checkout@v3.1.0 + with: + persist-credentials: false + - uses: actions/cache@v3.0.11 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v3.5.1 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Build with Maven + run: mvn -V test jacoco:report --file pom.xml --no-transfer-progress + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: ./target/site/jacoco/jacoco.xml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..33acae0 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,63 @@ +# 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. + +name: Java CI + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + build: + + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + java: [ 8, 11, 17 ] + experimental: [false] +# include: +# - java: 18-ea +# os: ubuntu-latest +# experimental: true +# - java: 18-ea +# os: windows-latest +# experimental: true +# - java: 18-ea +# os: macos-latest +# experimental: true + fail-fast: false + + steps: + - name: Prepare git + run: git config --global core.autocrlf false + - uses: actions/checkout@v3.1.0 + with: + persist-credentials: false + - uses: actions/cache@v3.0.11 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v3.5.1 + with: + distribution: 'temurin' + java-version: ${{ matrix.java }} + - name: Build with Maven + run: mvn -V --file pom.xml --no-transfer-progress -DtrimStackTrace=false diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml new file mode 100644 index 0000000..fd03907 --- /dev/null +++ b/.github/workflows/scorecards-analysis.yml @@ -0,0 +1,67 @@ +# 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. + +name: "Scorecards supply-chain security" + +on: + branch_protection_rule: + schedule: + - cron: "30 1 * * 6" # Weekly on Saturdays + push: + branches: [ "master" ] + +permissions: read-all + +jobs: + + analysis: + + name: "Scorecards analysis" + runs-on: ubuntu-latest + permissions: + security-events: write # Needed to upload the results to the code-scanning dashboard. + actions: read + contents: read + + steps: + + - name: "Checkout code" + uses: actions/checkout@v3.1.0 # 3.0.2 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@ce330fde6b1a5c9c75b417e7efc510b822a35564 # 1.1.2 + with: + results_file: results.sarif + results_format: sarif + # A read-only PAT token, which is sufficient for the action to function. + # The relevant discussion: https://github.com/ossf/scorecard-action/issues/188 + repo_token: ${{ secrets.GITHUB_TOKEN }} + # Publish the results for public repositories to enable scorecard badges. + # For more details: https://github.com/ossf/scorecard-action#publishing-results + publish_results: true + + - name: "Upload artifact" + uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # 3.1.0 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@b398f525a5587552e573b247ac661067fafa920b # 2.1.22 + with: + sarif_file: results.sarif diff --git a/build.xml b/build.xml index 4c32ac6..c5d5d7d 100644 --- a/build.xml +++ b/build.xml @@ -1,4 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> <!--build.xml generated by maven from project.xml version 1.2 on date June 28 2004, time 1759--> diff --git a/pom.xml b/pom.xml index 48b254d..0e278df 100644 --- a/pom.xml +++ b/pom.xml @@ -1,27 +1,25 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -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. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>org.apache.commons</groupId> <artifactId>commons-parent</artifactId> - <version>39</version> + <version>54</version> </parent> <modelVersion>4.0.0</modelVersion> <groupId>commons-jxpath</groupId> @@ -55,6 +53,21 @@ under the License. <name>Matt Benson</name> <email>mben...@apache.org</email> </developer> + <developer> + <id>ggregory</id> + <name>Gary Gregory</name> + <email>ggregory at apache.org</email> + <url>https://www.garygregory.com</url> + <organization>The Apache Software Foundation</organization> + <organizationUrl>https://www.apache.org/</organizationUrl> + <roles> + <role>PMC Member</role> + </roles> + <timezone>America/New_York</timezone> + <properties> + <picUrl>https://people.apache.org/~ggregory/img/garydgregory80.png</picUrl> + </properties> + </developer> </developers> <contributors> <contributor> @@ -76,15 +89,32 @@ under the License. <commons.componentid>jxpath</commons.componentid> <commons.module.name>org.apache.commons.jxpath</commons.module.name> - <!-- should agree with project.version for releases: --> <commons.release.version>1.4</commons.release.version> + <commons.release.isDistModule>true</commons.release.isDistModule> + <commons.rc.version>RC1</commons.rc.version> + <commons.bc.version>1.3</commons.bc.version> + <commons.release.desc>(Java 7)</commons.release.desc> + <commons.jira.id>JXPATH</commons.jira.id> <commons.jira.pid>12310480</commons.jira.pid> + <commons.osgi.import>*;resolution:=optional</commons.osgi.import> </properties> <build> + <defaultGoal>clean apache-rat:check package japicmp:cmp</defaultGoal> <plugins> + <plugin> + <groupId>org.apache.rat</groupId> + <artifactId>apache-rat-plugin</artifactId> + <configuration> + <excludes> + <exclude>src/java/org/apache/commons/jxpath/ri/parser/*</exclude> + <exclude>src/conf/MANIFEST.MF</exclude> + <exclude>xdocs/style/project.css</exclude> + </excludes> + </configuration> + </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> @@ -236,8 +266,7 @@ under the License. </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> - <artifactId>findbugs-maven-plugin</artifactId> - <version>2.4.0</version> + <artifactId>spotbugs-maven-plugin</artifactId> <configuration> <excludeFilterFile>${basedir}/conf/findbugs-exclude-filter.xml</excludeFilterFile> <xmlOutput>true</xmlOutput> diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/ParseException.java b/src/main/java/org/apache/commons/jxpath/ri/parser/ParseException.java index 9bd4359..0444606 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/ParseException.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/ParseException.java @@ -1,3 +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 + * + * 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. + */ + /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ package org.apache.commons.jxpath.ri.parser; diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/SimpleCharStream.java b/src/main/java/org/apache/commons/jxpath/ri/parser/SimpleCharStream.java index 1ccd787..30b448c 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/SimpleCharStream.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/SimpleCharStream.java @@ -1,3 +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 + * + * 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. + */ + /* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 3.0 */ package org.apache.commons.jxpath.ri.parser; diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/Token.java b/src/main/java/org/apache/commons/jxpath/ri/parser/Token.java index 0190042..59e6205 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/Token.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/Token.java @@ -1,10 +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 + * + * 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. + */ + /* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ package org.apache.commons.jxpath.ri.parser; /** * Describes the input token stream. */ - public class Token { /** diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java b/src/main/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java index 39c4e6b..19b03c2 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/TokenMgrError.java @@ -1,3 +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 + * + * 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. + */ + /* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 * * * !!!MODIFIED BY DMITRI PLOTNIKOV - DO NOT REGENERATE!!! diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParser.java b/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParser.java index 2b79e7a..be5e56a 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParser.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParser.java @@ -1,3 +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 + * + * 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. + */ + /* Generated By:JavaCC: Do not edit this line. XPathParser.java */ package org.apache.commons.jxpath.ri.parser; diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParserConstants.java b/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParserConstants.java index d5ce2e1..2cc61e0 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParserConstants.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParserConstants.java @@ -1,3 +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 + * + * 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. + */ + /* Generated By:JavaCC: Do not edit this line. XPathParserConstants.java */ package org.apache.commons.jxpath.ri.parser; diff --git a/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParserTokenManager.java b/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParserTokenManager.java index 15dcb1c..da2a103 100644 --- a/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParserTokenManager.java +++ b/src/main/java/org/apache/commons/jxpath/ri/parser/XPathParserTokenManager.java @@ -1,3 +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 + * + * 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. + */ + /* Generated By:JavaCC: Do not edit this line. XPathParserTokenManager.java */ package org.apache.commons.jxpath.ri.parser; import org.apache.commons.jxpath.ri.Compiler; diff --git a/src/main/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java b/src/main/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java index bc27079..3a280bc 100644 --- a/src/main/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java +++ b/src/main/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java @@ -36,7 +36,7 @@ public class ServletContextHandler implements DynamicPropertyHandler { private static final int DEFAULT_PROPERTY_COUNT = 16; public String[] getPropertyNames(Object context) { - Set list = new HashSet(DEFAULT_PROPERTY_COUNT); + HashSet list = new HashSet(DEFAULT_PROPERTY_COUNT); collectPropertyNames(list, context); return (String[]) list.toArray(new String[list.size()]); } @@ -46,7 +46,7 @@ public class ServletContextHandler implements DynamicPropertyHandler { * @param set destination * @param bean to read */ - protected void collectPropertyNames(Set set, Object bean) { + protected void collectPropertyNames(HashSet set, Object bean) { if (bean instanceof HttpSessionAndServletContext) { bean = ((HttpSessionAndServletContext) bean).getServletContext(); } diff --git a/src/test/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImplTestCase.java b/src/test/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImplTestCase.java index d1dead3..8d97d70 100644 --- a/src/test/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImplTestCase.java +++ b/src/test/java/org/apache/commons/jxpath/ri/JXPathContextReferenceImplTestCase.java @@ -1,3 +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 + * + * 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. + */ + package org.apache.commons.jxpath.ri; import junit.framework.TestCase; diff --git a/src/test/java/org/apache/commons/jxpath/ri/model/JXPath154Test.java b/src/test/java/org/apache/commons/jxpath/ri/model/JXPath154Test.java index a1be81e..9756f74 100644 --- a/src/test/java/org/apache/commons/jxpath/ri/model/JXPath154Test.java +++ b/src/test/java/org/apache/commons/jxpath/ri/model/JXPath154Test.java @@ -1,3 +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 + * + * 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. + */ + package org.apache.commons.jxpath.ri.model; import org.apache.commons.jxpath.JXPathContext;